@7shifts/sous-chef 3.7.0 → 3.9.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/MultiSelectField/MultiSelectField.d.ts +3 -1
- package/dist/forms/SelectField/SelectField.d.ts +2 -0
- package/dist/forms/SelectField/useSelectField.d.ts +1 -1
- package/dist/index.css +251 -114
- package/dist/index.js +522 -422
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +522 -422
- package/dist/index.modern.js.map +1 -1
- package/dist/lists/DataTable/DataTableCell/DataTableCell.d.ts +3 -1
- package/dist/lists/DataTableRow/DataTableRow.d.ts +5 -1
- package/dist/lists/DataTableRow/DataTableRowActions/DataTableRowActions.d.ts +3 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4280,7 +4280,9 @@ var useDataTableContext = function useDataTableContext() {
|
|
|
4280
4280
|
return context;
|
|
4281
4281
|
};
|
|
4282
4282
|
|
|
4283
|
-
var styles$9 = {"item":"_2GGMG","
|
|
4283
|
+
var styles$9 = {"item":"_2GGMG","clickable":"_3VoZI","selected":"_1ZCir"};
|
|
4284
|
+
|
|
4285
|
+
var styles$a = {"actions":"_3Iab2"};
|
|
4284
4286
|
|
|
4285
4287
|
var MenuContext = React__default.createContext({
|
|
4286
4288
|
onToggleMenu: function onToggleMenu() {},
|
|
@@ -4310,7 +4312,7 @@ var Menu = function Menu(_ref) {
|
|
|
4310
4312
|
}, children);
|
|
4311
4313
|
};
|
|
4312
4314
|
|
|
4313
|
-
var styles$
|
|
4315
|
+
var styles$b = {"list":"_v0AEt","list-item":"_IRJ4j"};
|
|
4314
4316
|
|
|
4315
4317
|
var MenuItem = function MenuItem(_ref) {
|
|
4316
4318
|
var onClick = _ref.onClick,
|
|
@@ -4326,7 +4328,7 @@ var MenuItem = function MenuItem(_ref) {
|
|
|
4326
4328
|
};
|
|
4327
4329
|
|
|
4328
4330
|
return React__default.createElement("li", {
|
|
4329
|
-
className: styles$
|
|
4331
|
+
className: styles$b['list-item'],
|
|
4330
4332
|
onClick: handleClick,
|
|
4331
4333
|
onKeyPress: handleClick,
|
|
4332
4334
|
tabIndex: 0,
|
|
@@ -4418,7 +4420,7 @@ var MenuListVisible = function MenuListVisible(_ref2) {
|
|
|
4418
4420
|
setPosition(pos);
|
|
4419
4421
|
}, [triggerRef]);
|
|
4420
4422
|
return React__default.createElement("ul", {
|
|
4421
|
-
className: classnames(styles$
|
|
4423
|
+
className: classnames(styles$b['list']),
|
|
4422
4424
|
role: "menu",
|
|
4423
4425
|
style: position,
|
|
4424
4426
|
ref: paneElement
|
|
@@ -4435,283 +4437,7 @@ var KebabMenu = function KebabMenu(_ref) {
|
|
|
4435
4437
|
})));
|
|
4436
4438
|
};
|
|
4437
4439
|
|
|
4438
|
-
var
|
|
4439
|
-
var actions = _ref.actions;
|
|
4440
|
-
var kebabMenuItems = actions.filter(function (action) {
|
|
4441
|
-
return action.showInKebab === undefined || action.showInKebab;
|
|
4442
|
-
});
|
|
4443
|
-
var sideActions = actions.filter(function (action) {
|
|
4444
|
-
return action.showInKebab === false;
|
|
4445
|
-
});
|
|
4446
|
-
return React__default.createElement("div", {
|
|
4447
|
-
className: classnames(styles$9['item-column'], styles$9['actions']),
|
|
4448
|
-
"data-testid": "data-table-dropdown-menu"
|
|
4449
|
-
}, sideActions.length > 0 && sideActions.map(function (action) {
|
|
4450
|
-
return React__default.createElement(Button$1, Object.assign({
|
|
4451
|
-
key: action.action,
|
|
4452
|
-
onClick: action.onAction,
|
|
4453
|
-
theme: "link-icon"
|
|
4454
|
-
}, action.showInKebab === false ? action.buttonProps : {}), action.label);
|
|
4455
|
-
}), kebabMenuItems.length > 0 && React__default.createElement(KebabMenu, {
|
|
4456
|
-
actions: kebabMenuItems
|
|
4457
|
-
}));
|
|
4458
|
-
};
|
|
4459
|
-
|
|
4460
|
-
var _excluded$2f = ["children", "onClick", "isSelected", "actions", "hasDefaultPadding", "testId"];
|
|
4461
|
-
|
|
4462
|
-
var DataTableRowComponent = function DataTableRowComponent(_ref, ref) {
|
|
4463
|
-
var _classnames;
|
|
4464
|
-
|
|
4465
|
-
var children = _ref.children,
|
|
4466
|
-
onClick = _ref.onClick,
|
|
4467
|
-
_ref$isSelected = _ref.isSelected,
|
|
4468
|
-
isSelected = _ref$isSelected === void 0 ? false : _ref$isSelected,
|
|
4469
|
-
_ref$actions = _ref.actions,
|
|
4470
|
-
actions = _ref$actions === void 0 ? [] : _ref$actions,
|
|
4471
|
-
_ref$hasDefaultPaddin = _ref.hasDefaultPadding,
|
|
4472
|
-
hasDefaultPadding = _ref$hasDefaultPaddin === void 0 ? true : _ref$hasDefaultPaddin,
|
|
4473
|
-
testId = _ref.testId,
|
|
4474
|
-
nativeDivProps = _objectWithoutPropertiesLoose(_ref, _excluded$2f);
|
|
4475
|
-
|
|
4476
|
-
var _useDataTableContext = useDataTableContext(),
|
|
4477
|
-
columns = _useDataTableContext.columns,
|
|
4478
|
-
showActionMenu = _useDataTableContext.showActionMenu,
|
|
4479
|
-
hasVerticalBorders = _useDataTableContext.hasVerticalBorders;
|
|
4480
|
-
|
|
4481
|
-
var styleNames = classnames(styles$9['item'], (_classnames = {}, _classnames[styles$9['clickable']] = onClick, _classnames[styles$9['selected']] = isSelected, _classnames));
|
|
4482
|
-
|
|
4483
|
-
var renderColumn = function renderColumn(columnElement, index) {
|
|
4484
|
-
var _classnames2;
|
|
4485
|
-
|
|
4486
|
-
var column = columns === null || columns === void 0 ? void 0 : columns[index];
|
|
4487
|
-
var isRightAligned = column === null || column === void 0 ? void 0 : column.isRightAligned;
|
|
4488
|
-
return React__default.createElement("div", {
|
|
4489
|
-
className: classnames((_classnames2 = {}, _classnames2[styles$9['item-column--right-align']] = isRightAligned, _classnames2[styles$9['item-column--vertical-border']] = hasVerticalBorders, _classnames2[styles$9['item-column--default-padding']] = hasDefaultPadding, _classnames2), styles$9['item-column']),
|
|
4490
|
-
style: {
|
|
4491
|
-
flex: (column === null || column === void 0 ? void 0 : column.size) || 1
|
|
4492
|
-
},
|
|
4493
|
-
key: index,
|
|
4494
|
-
"data-testid": testId && testId + "-column"
|
|
4495
|
-
}, columnElement);
|
|
4496
|
-
};
|
|
4497
|
-
|
|
4498
|
-
return React__default.createElement("div", Object.assign({}, nativeDivProps, {
|
|
4499
|
-
className: styleNames,
|
|
4500
|
-
onClick: onClick ? onClick : undefined,
|
|
4501
|
-
onKeyPress: onClick ? onClick : undefined,
|
|
4502
|
-
"data-testid": testId && testId + "-row",
|
|
4503
|
-
role: "row",
|
|
4504
|
-
ref: ref
|
|
4505
|
-
}), React__default.Children.toArray(children).filter(Boolean).map(function (child, index) {
|
|
4506
|
-
return renderColumn(child, index);
|
|
4507
|
-
}), showActionMenu && React__default.createElement(ActionsCell, {
|
|
4508
|
-
actions: actions
|
|
4509
|
-
}));
|
|
4510
|
-
};
|
|
4511
|
-
|
|
4512
|
-
var DataTableRow = React.forwardRef(DataTableRowComponent);
|
|
4513
|
-
|
|
4514
|
-
var styles$b = {"header":"_2ZgmC","header-item":"_3slLU","header-item--sortable":"_1-26z","header-item--right-align":"_1vCLo","header-item--action":"_2i1wY","header-sort-icon":"_BLrNe","body":"_CT4Lp","footer":"_398L3","pagination-controls":"_2smmY"};
|
|
4515
|
-
|
|
4516
|
-
var WHITE = '#ffffff';
|
|
4517
|
-
var EGGPLANT200 = '#d3dbf4';
|
|
4518
|
-
var EGGPLANT300 = '#a7b7ea';
|
|
4519
|
-
var EGGPLANT400 = '#6d87dd';
|
|
4520
|
-
var EGGPLANT500 = '#6179c6';
|
|
4521
|
-
var EGGPLANT600 = '#415184';
|
|
4522
|
-
var RADISH400 = '#e76767';
|
|
4523
|
-
var GREY100 = '#F3F3F3';
|
|
4524
|
-
var GREY200 = '#D5D5D5';
|
|
4525
|
-
var GREY300 = '#949494';
|
|
4526
|
-
var GREY400 = '#767676';
|
|
4527
|
-
var GREY500 = '#464646';
|
|
4528
|
-
|
|
4529
|
-
var SORT_ORDER = {
|
|
4530
|
-
ASC: 'asc',
|
|
4531
|
-
DESC: 'desc'
|
|
4532
|
-
};
|
|
4533
|
-
|
|
4534
|
-
var DataTableHeader = function DataTableHeader(_ref) {
|
|
4535
|
-
var columns = _ref.columns,
|
|
4536
|
-
onSort = _ref.onSort,
|
|
4537
|
-
showActionMenu = _ref.showActionMenu;
|
|
4538
|
-
var haveLabels = columns.find(function (column) {
|
|
4539
|
-
return column.label && column.label !== '';
|
|
4540
|
-
});
|
|
4541
|
-
|
|
4542
|
-
if (!haveLabels) {
|
|
4543
|
-
return null;
|
|
4544
|
-
}
|
|
4545
|
-
|
|
4546
|
-
var handleSort = function handleSort(column) {
|
|
4547
|
-
var nextDirection = getNextSort(column);
|
|
4548
|
-
|
|
4549
|
-
if (onSort) {
|
|
4550
|
-
onSort({
|
|
4551
|
-
columnName: column.name,
|
|
4552
|
-
direction: nextDirection
|
|
4553
|
-
});
|
|
4554
|
-
}
|
|
4555
|
-
};
|
|
4556
|
-
|
|
4557
|
-
return React__default.createElement("div", {
|
|
4558
|
-
className: styles$b['header']
|
|
4559
|
-
}, columns.map(function (column) {
|
|
4560
|
-
var _classnames;
|
|
4561
|
-
|
|
4562
|
-
var isSortable = column.isSortable;
|
|
4563
|
-
var sortDir = column.currentSort;
|
|
4564
|
-
var isRightAligned = column.isRightAligned;
|
|
4565
|
-
return React__default.createElement("div", {
|
|
4566
|
-
className: classnames((_classnames = {}, _classnames[styles$b['header-item']] = true, _classnames[styles$b['header-item--sortable']] = isSortable, _classnames[styles$b['header-item--right-align']] = isRightAligned, _classnames)),
|
|
4567
|
-
style: {
|
|
4568
|
-
flex: column.size || 1
|
|
4569
|
-
},
|
|
4570
|
-
key: column.name,
|
|
4571
|
-
onClick: function onClick() {
|
|
4572
|
-
return isSortable && handleSort(column);
|
|
4573
|
-
},
|
|
4574
|
-
onKeyPress: function onKeyPress() {
|
|
4575
|
-
return isSortable && handleSort(column);
|
|
4576
|
-
},
|
|
4577
|
-
role: "columnheader",
|
|
4578
|
-
tabIndex: 0
|
|
4579
|
-
}, column.label, ' ', isSortable && React__default.createElement("span", {
|
|
4580
|
-
className: styles$b['header-sort-icon']
|
|
4581
|
-
}, React__default.createElement(IconSort$1, {
|
|
4582
|
-
sortDirection: sortDir
|
|
4583
|
-
})));
|
|
4584
|
-
}), showActionMenu && React__default.createElement("div", {
|
|
4585
|
-
className: classnames(styles$b['header-item'], styles$b['header-item--action'])
|
|
4586
|
-
}));
|
|
4587
|
-
};
|
|
4588
|
-
|
|
4589
|
-
var getNextSort = function getNextSort(column) {
|
|
4590
|
-
switch (column.currentSort) {
|
|
4591
|
-
case SORT_ORDER.ASC:
|
|
4592
|
-
return null;
|
|
4593
|
-
|
|
4594
|
-
case SORT_ORDER.DESC:
|
|
4595
|
-
return SORT_ORDER.ASC;
|
|
4596
|
-
|
|
4597
|
-
default:
|
|
4598
|
-
return SORT_ORDER.DESC;
|
|
4599
|
-
}
|
|
4600
|
-
};
|
|
4601
|
-
|
|
4602
|
-
var IconSort$1 = function IconSort(_ref2) {
|
|
4603
|
-
var sortDirection = _ref2.sortDirection;
|
|
4604
|
-
var sortDir = sortDirection || null;
|
|
4605
|
-
return React__default.createElement("div", {
|
|
4606
|
-
style: {
|
|
4607
|
-
display: 'inline-flex',
|
|
4608
|
-
flexDirection: 'column'
|
|
4609
|
-
}
|
|
4610
|
-
}, sortDir !== 'desc' && React__default.createElement(IconChevronUp, {
|
|
4611
|
-
size: "small",
|
|
4612
|
-
color: GREY400
|
|
4613
|
-
}), sortDir !== 'asc' && React__default.createElement("span", {
|
|
4614
|
-
style: {
|
|
4615
|
-
marginTop: '-4px'
|
|
4616
|
-
}
|
|
4617
|
-
}, React__default.createElement(IconChevronDown, {
|
|
4618
|
-
size: "small",
|
|
4619
|
-
color: GREY400
|
|
4620
|
-
})));
|
|
4621
|
-
};
|
|
4622
|
-
|
|
4623
|
-
var DataTable = function DataTable(_ref) {
|
|
4624
|
-
var items = _ref.items,
|
|
4625
|
-
columns = _ref.columns,
|
|
4626
|
-
itemComponent = _ref.itemComponent,
|
|
4627
|
-
maxHeight = _ref.maxHeight,
|
|
4628
|
-
_ref$hasPrevious = _ref.hasPrevious,
|
|
4629
|
-
hasPrevious = _ref$hasPrevious === void 0 ? true : _ref$hasPrevious,
|
|
4630
|
-
_ref$hasNext = _ref.hasNext,
|
|
4631
|
-
hasNext = _ref$hasNext === void 0 ? true : _ref$hasNext,
|
|
4632
|
-
onPreviousClick = _ref.onPreviousClick,
|
|
4633
|
-
onNextClick = _ref.onNextClick,
|
|
4634
|
-
onSort = _ref.onSort,
|
|
4635
|
-
_ref$isLoading = _ref.isLoading,
|
|
4636
|
-
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
|
|
4637
|
-
_ref$showActionMenu = _ref.showActionMenu,
|
|
4638
|
-
showActionMenu = _ref$showActionMenu === void 0 ? false : _ref$showActionMenu,
|
|
4639
|
-
footerComponent = _ref.footerComponent,
|
|
4640
|
-
_ref$hasVerticalBorde = _ref.hasVerticalBorders,
|
|
4641
|
-
hasVerticalBorders = _ref$hasVerticalBorde === void 0 ? false : _ref$hasVerticalBorde,
|
|
4642
|
-
testId = _ref.testId;
|
|
4643
|
-
var RowItem = itemComponent || DefaultItemComponent;
|
|
4644
|
-
var conditionalStyles = {};
|
|
4645
|
-
|
|
4646
|
-
if (maxHeight !== null) {
|
|
4647
|
-
conditionalStyles = _extends({}, conditionalStyles, {
|
|
4648
|
-
maxHeight: maxHeight,
|
|
4649
|
-
overflowY: 'auto'
|
|
4650
|
-
});
|
|
4651
|
-
}
|
|
4652
|
-
|
|
4653
|
-
var numberOfRows = items.length + (footerComponent ? 1 : 0);
|
|
4654
|
-
return React__default.createElement(Context.Provider, {
|
|
4655
|
-
value: {
|
|
4656
|
-
columns: columns,
|
|
4657
|
-
showActionMenu: showActionMenu,
|
|
4658
|
-
numberOfRows: numberOfRows,
|
|
4659
|
-
hasVerticalBorders: hasVerticalBorders
|
|
4660
|
-
}
|
|
4661
|
-
}, columns && React__default.createElement(DataTableHeader, {
|
|
4662
|
-
columns: columns,
|
|
4663
|
-
onSort: onSort,
|
|
4664
|
-
showActionMenu: showActionMenu
|
|
4665
|
-
}), React__default.createElement("div", {
|
|
4666
|
-
className: styles$b['body'],
|
|
4667
|
-
style: conditionalStyles,
|
|
4668
|
-
role: "table",
|
|
4669
|
-
"data-testid": testId
|
|
4670
|
-
}, isLoading && React__default.createElement(Spinner, {
|
|
4671
|
-
block: true
|
|
4672
|
-
}), !isLoading && items.map(function (item, index) {
|
|
4673
|
-
return React__default.createElement(RowItem, {
|
|
4674
|
-
item: item,
|
|
4675
|
-
columns: columns,
|
|
4676
|
-
key: index,
|
|
4677
|
-
index: index,
|
|
4678
|
-
testId: testId
|
|
4679
|
-
});
|
|
4680
|
-
}), footerComponent && !isLoading && React__default.createElement("div", {
|
|
4681
|
-
className: styles$b['footer'],
|
|
4682
|
-
"data-testid": testId && testId + "-footer"
|
|
4683
|
-
}, footerComponent)), onPreviousClick && onNextClick && (hasPrevious || hasNext) && React__default.createElement("div", {
|
|
4684
|
-
className: styles$b['pagination-controls'],
|
|
4685
|
-
"data-testid": testId && testId + "-pagination-controls"
|
|
4686
|
-
}, React__default.createElement(PaginationControls, {
|
|
4687
|
-
hasPrevious: hasPrevious && !isLoading,
|
|
4688
|
-
hasNext: hasNext && !isLoading,
|
|
4689
|
-
onPreviousClick: onPreviousClick,
|
|
4690
|
-
onNextClick: onNextClick
|
|
4691
|
-
})));
|
|
4692
|
-
};
|
|
4693
|
-
|
|
4694
|
-
var DefaultItemComponent = function DefaultItemComponent(_ref2) {
|
|
4695
|
-
var columns = _ref2.columns,
|
|
4696
|
-
item = _ref2.item,
|
|
4697
|
-
testId = _ref2.testId;
|
|
4698
|
-
var headingKeys = columns ? columns.map(function (column) {
|
|
4699
|
-
return column.name;
|
|
4700
|
-
}) : Object.keys(item);
|
|
4701
|
-
var columnsToShow = headingKeys.filter(function (key) {
|
|
4702
|
-
return key !== 'actions';
|
|
4703
|
-
});
|
|
4704
|
-
return React__default.createElement(DataTableRow, {
|
|
4705
|
-
actions: item.actions,
|
|
4706
|
-
testId: testId
|
|
4707
|
-
}, columnsToShow.map(function (headingKey) {
|
|
4708
|
-
return React__default.createElement("div", {
|
|
4709
|
-
key: headingKey
|
|
4710
|
-
}, item[headingKey] || '');
|
|
4711
|
-
}));
|
|
4712
|
-
};
|
|
4713
|
-
|
|
4714
|
-
var styles$c = {"data-table-cell":"_2Ybjx","data-table-cell--right-aligned":"_1cXj6","data-table-cell--invalid":"_D73Vx"};
|
|
4440
|
+
var styles$c = {"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"};
|
|
4715
4441
|
|
|
4716
4442
|
var styles$d = {"overlay":"_2puqJ","overlay--after-open":"_1167h","overlay--before-close":"_t_t7L","content":"_wQQ_2","content--after-open":"_3jwux","content--before-close":"_2c2QP"};
|
|
4717
4443
|
|
|
@@ -5100,44 +4826,87 @@ var Calendar = function Calendar(_ref) {
|
|
|
5100
4826
|
}))));
|
|
5101
4827
|
};
|
|
5102
4828
|
|
|
5103
|
-
var
|
|
5104
|
-
|
|
4829
|
+
var WHITE = '#ffffff';
|
|
4830
|
+
var EGGPLANT200 = '#d3dbf4';
|
|
4831
|
+
var EGGPLANT300 = '#a7b7ea';
|
|
4832
|
+
var EGGPLANT400 = '#6d87dd';
|
|
4833
|
+
var EGGPLANT500 = '#6179c6';
|
|
4834
|
+
var EGGPLANT600 = '#415184';
|
|
4835
|
+
var RADISH400 = '#e76767';
|
|
4836
|
+
var GREY100 = '#F3F3F3';
|
|
4837
|
+
var GREY200 = '#D5D5D5';
|
|
4838
|
+
var GREY300 = '#949494';
|
|
4839
|
+
var GREY400 = '#767676';
|
|
4840
|
+
var GREY500 = '#464646';
|
|
4841
|
+
|
|
4842
|
+
var DataTableCellElement = function DataTableCellElement(_ref, ref) {
|
|
4843
|
+
var _columns$columnIndex, _classnames, _classnames2, _classnames3;
|
|
5105
4844
|
|
|
5106
4845
|
var children = _ref.children,
|
|
5107
4846
|
columnIndex = _ref.columnIndex,
|
|
5108
4847
|
error = _ref.error,
|
|
5109
4848
|
_ref$delayOnCloseErro = _ref.delayOnCloseError,
|
|
5110
|
-
delayOnCloseError = _ref$delayOnCloseErro === void 0 ? false : _ref$delayOnCloseErro
|
|
4849
|
+
delayOnCloseError = _ref$delayOnCloseErro === void 0 ? false : _ref$delayOnCloseErro,
|
|
4850
|
+
_ref$noPadding = _ref.noPadding,
|
|
4851
|
+
noPadding = _ref$noPadding === void 0 ? false : _ref$noPadding,
|
|
4852
|
+
colSpan = _ref.colSpan;
|
|
5111
4853
|
|
|
5112
4854
|
var _useDataTableContext = useDataTableContext(),
|
|
5113
|
-
columns = _useDataTableContext.columns
|
|
4855
|
+
columns = _useDataTableContext.columns,
|
|
4856
|
+
hasVerticalBorders = _useDataTableContext.hasVerticalBorders;
|
|
5114
4857
|
|
|
5115
4858
|
var column = (_columns$columnIndex = columns === null || columns === void 0 ? void 0 : columns[columnIndex]) != null ? _columns$columnIndex : null;
|
|
5116
4859
|
var isRightAligned = column ? column.isRightAligned : false;
|
|
5117
4860
|
var hasError = !!error;
|
|
5118
4861
|
var errorMessage = error;
|
|
5119
|
-
var icon = hasError && React__default.createElement(
|
|
4862
|
+
var icon = hasError && React__default.createElement("div", {
|
|
4863
|
+
className: classnames(styles$c['data-table-cell__error-icon'], (_classnames = {}, _classnames[styles$c['data-table-cell__error-icon--right-align']] = isRightAligned, _classnames[styles$c['data-table-cell__error-icon--left-align']] = !isRightAligned, _classnames))
|
|
4864
|
+
}, React__default.createElement(IconTimesOctagon, {
|
|
5120
4865
|
size: "medium",
|
|
5121
4866
|
color: RADISH400
|
|
5122
|
-
});
|
|
5123
|
-
var TableCell = React__default.createElement("
|
|
5124
|
-
className: classnames((
|
|
5125
|
-
|
|
4867
|
+
}));
|
|
4868
|
+
var TableCell = React__default.createElement("td", {
|
|
4869
|
+
className: classnames((_classnames2 = {}, _classnames2[styles$c['data-table-cell--invalid']] = hasError, _classnames2[styles$c['data-table-cell--no-padding']] = noPadding, _classnames2[styles$c['data-table-cell--vertical-border']] = hasVerticalBorders, _classnames2), styles$c['data-table-cell']),
|
|
4870
|
+
colSpan: colSpan,
|
|
4871
|
+
ref: ref
|
|
4872
|
+
}, React__default.createElement("div", {
|
|
4873
|
+
className: classnames(styles$c['data-table-cell__content'], (_classnames3 = {}, _classnames3[styles$c['data-table-cell__content--with-error']] = hasError, _classnames3[styles$c['data-table-cell__content--right-align']] = isRightAligned, _classnames3))
|
|
4874
|
+
}, isRightAligned && icon, children, !isRightAligned && icon));
|
|
4875
|
+
return React__default.createElement(Tooltip$1, {
|
|
4876
|
+
overlay: errorMessage,
|
|
4877
|
+
delayOnClose: delayOnCloseError,
|
|
4878
|
+
placement: "top",
|
|
4879
|
+
theme: "white"
|
|
4880
|
+
}, TableCell);
|
|
4881
|
+
};
|
|
5126
4882
|
|
|
5127
|
-
|
|
5128
|
-
return React__default.createElement(Tooltip$1, {
|
|
5129
|
-
overlay: errorMessage,
|
|
5130
|
-
delayOnClose: delayOnCloseError,
|
|
5131
|
-
placement: "top",
|
|
5132
|
-
theme: "white"
|
|
5133
|
-
}, TableCell);
|
|
5134
|
-
}
|
|
4883
|
+
var DataTableCell = React.forwardRef(DataTableCellElement);
|
|
5135
4884
|
|
|
5136
|
-
|
|
4885
|
+
var DataTableRowActions = function DataTableRowActions(_ref) {
|
|
4886
|
+
var actions = _ref.actions,
|
|
4887
|
+
columnIndex = _ref.columnIndex;
|
|
4888
|
+
var kebabMenuItems = actions.filter(function (action) {
|
|
4889
|
+
return action.showInKebab === undefined || action.showInKebab;
|
|
4890
|
+
});
|
|
4891
|
+
var sideActions = actions.filter(function (action) {
|
|
4892
|
+
return action.showInKebab === false;
|
|
4893
|
+
});
|
|
4894
|
+
return React__default.createElement(DataTableCell, {
|
|
4895
|
+
columnIndex: columnIndex
|
|
4896
|
+
}, React__default.createElement("div", {
|
|
4897
|
+
className: styles$a['actions'],
|
|
4898
|
+
"data-testid": "data-table-dropdown-menu"
|
|
4899
|
+
}, sideActions.length > 0 && sideActions.map(function (action) {
|
|
4900
|
+
return React__default.createElement(Button$1, Object.assign({
|
|
4901
|
+
key: action.action,
|
|
4902
|
+
onClick: action.onAction,
|
|
4903
|
+
theme: typeof action.label === 'string' ? 'default' : 'link-icon'
|
|
4904
|
+
}, action.showInKebab === false ? action.buttonProps : {}), action.label);
|
|
4905
|
+
}), kebabMenuItems.length > 0 && React__default.createElement(KebabMenu, {
|
|
4906
|
+
actions: kebabMenuItems
|
|
4907
|
+
})));
|
|
5137
4908
|
};
|
|
5138
4909
|
|
|
5139
|
-
var DataTableCell = React.forwardRef(DataTableCellElement);
|
|
5140
|
-
|
|
5141
4910
|
var Context$1 = React.createContext({});
|
|
5142
4911
|
var useFormContext = function useFormContext() {
|
|
5143
4912
|
var context = React.useContext(Context$1);
|
|
@@ -5508,6 +5277,331 @@ var DataTableEditableCellElement = function DataTableEditableCellElement(_ref, r
|
|
|
5508
5277
|
|
|
5509
5278
|
var DataTableEditableCell = React.forwardRef(DataTableEditableCellElement);
|
|
5510
5279
|
|
|
5280
|
+
var _excluded$2f = ["children", "onClick", "isSelected", "actions", "hasDefaultPadding", "hasDefaultCell", "testId"];
|
|
5281
|
+
|
|
5282
|
+
var DataTableRowComponent = function DataTableRowComponent(_ref, ref) {
|
|
5283
|
+
var _classnames;
|
|
5284
|
+
|
|
5285
|
+
var children = _ref.children,
|
|
5286
|
+
onClick = _ref.onClick,
|
|
5287
|
+
_ref$isSelected = _ref.isSelected,
|
|
5288
|
+
isSelected = _ref$isSelected === void 0 ? false : _ref$isSelected,
|
|
5289
|
+
_ref$actions = _ref.actions,
|
|
5290
|
+
actions = _ref$actions === void 0 ? [] : _ref$actions,
|
|
5291
|
+
_ref$hasDefaultCell = _ref.hasDefaultCell,
|
|
5292
|
+
hasDefaultCell = _ref$hasDefaultCell === void 0 ? true : _ref$hasDefaultCell,
|
|
5293
|
+
testId = _ref.testId,
|
|
5294
|
+
nativeDivProps = _objectWithoutPropertiesLoose(_ref, _excluded$2f);
|
|
5295
|
+
|
|
5296
|
+
var _useDataTableContext = useDataTableContext(),
|
|
5297
|
+
showActionMenu = _useDataTableContext.showActionMenu;
|
|
5298
|
+
|
|
5299
|
+
var styleNames = classnames(styles$9['item'], (_classnames = {}, _classnames[styles$9['clickable']] = onClick, _classnames[styles$9['selected']] = isSelected, _classnames));
|
|
5300
|
+
|
|
5301
|
+
var renderColumn = function renderColumn(columnElement, index) {
|
|
5302
|
+
var isUsingDataTableCell = columnElement && typeof columnElement === 'object' && 'type' in columnElement && (columnElement === null || columnElement === void 0 ? void 0 : columnElement.type) === DataTableCell;
|
|
5303
|
+
|
|
5304
|
+
if (isUsingDataTableCell || !hasDefaultCell) {
|
|
5305
|
+
return columnElement;
|
|
5306
|
+
}
|
|
5307
|
+
|
|
5308
|
+
var isUsingDataTableEditableCell = columnElement && typeof columnElement === 'object' && 'type' in columnElement && (columnElement === null || columnElement === void 0 ? void 0 : columnElement.type) === DataTableEditableCell;
|
|
5309
|
+
return React__default.createElement(DataTableCell, {
|
|
5310
|
+
key: index,
|
|
5311
|
+
columnIndex: index,
|
|
5312
|
+
noPadding: !!isUsingDataTableEditableCell
|
|
5313
|
+
}, columnElement);
|
|
5314
|
+
};
|
|
5315
|
+
|
|
5316
|
+
return React__default.createElement("tr", Object.assign({}, nativeDivProps, {
|
|
5317
|
+
className: styleNames,
|
|
5318
|
+
onClick: onClick ? onClick : undefined,
|
|
5319
|
+
onKeyPress: onClick ? onClick : undefined,
|
|
5320
|
+
"data-testid": testId && testId + "-row",
|
|
5321
|
+
role: "row",
|
|
5322
|
+
ref: ref
|
|
5323
|
+
}), React__default.Children.toArray(children).filter(Boolean).map(function (child, index) {
|
|
5324
|
+
return renderColumn(child, index);
|
|
5325
|
+
}), showActionMenu && React__default.createElement(DataTableRowActions, {
|
|
5326
|
+
actions: actions,
|
|
5327
|
+
columnIndex: React__default.Children.count(children)
|
|
5328
|
+
}));
|
|
5329
|
+
};
|
|
5330
|
+
|
|
5331
|
+
var DataTableRow = React.forwardRef(DataTableRowComponent);
|
|
5332
|
+
|
|
5333
|
+
var styles$o = {"table-container":"_3qoNq","table-content":"_2HcDV","table-content--with-scroll":"_3dowz","table":"_tGpUv","table--no-columns":"_3VePT","header":"_2ZgmC","header-item":"_3slLU","header-item__content":"_1jb-H","header-item__content--right-align":"_2Np60","header-item--sortable":"_1-26z","header-item--action":"_2i1wY","header-sort-icon":"_BLrNe","body":"_CT4Lp","body--no-bottom-radius":"_1wU1R","footer":"_398L3","pagination-controls":"_2smmY"};
|
|
5334
|
+
|
|
5335
|
+
var calculatePercentageOfProportion = function calculatePercentageOfProportion(proportionNumbers) {
|
|
5336
|
+
var sum = proportionNumbers.reduce(function (total, num) {
|
|
5337
|
+
return total + num;
|
|
5338
|
+
}, 0);
|
|
5339
|
+
var percentages = proportionNumbers.map(function (num) {
|
|
5340
|
+
return parseFloat((num / sum * 100).toFixed(2));
|
|
5341
|
+
});
|
|
5342
|
+
return percentages;
|
|
5343
|
+
};
|
|
5344
|
+
|
|
5345
|
+
var SORT_ORDER = {
|
|
5346
|
+
ASC: 'asc',
|
|
5347
|
+
DESC: 'desc'
|
|
5348
|
+
};
|
|
5349
|
+
|
|
5350
|
+
var DataTableHeader = function DataTableHeader(_ref) {
|
|
5351
|
+
var columns = _ref.columns,
|
|
5352
|
+
onSort = _ref.onSort,
|
|
5353
|
+
showActionMenu = _ref.showActionMenu;
|
|
5354
|
+
var haveLabels = columns.find(function (column) {
|
|
5355
|
+
return column.label && column.label !== '';
|
|
5356
|
+
});
|
|
5357
|
+
|
|
5358
|
+
if (!haveLabels) {
|
|
5359
|
+
return React__default.createElement(ColumnSizes, {
|
|
5360
|
+
columns: columns,
|
|
5361
|
+
showActionMenu: showActionMenu
|
|
5362
|
+
});
|
|
5363
|
+
}
|
|
5364
|
+
|
|
5365
|
+
var handleSort = function handleSort(column) {
|
|
5366
|
+
var nextDirection = getNextSort(column);
|
|
5367
|
+
|
|
5368
|
+
if (onSort) {
|
|
5369
|
+
onSort({
|
|
5370
|
+
columnName: column.name,
|
|
5371
|
+
direction: nextDirection
|
|
5372
|
+
});
|
|
5373
|
+
}
|
|
5374
|
+
};
|
|
5375
|
+
|
|
5376
|
+
return React__default.createElement(React.Fragment, null, React__default.createElement(ColumnSizes, {
|
|
5377
|
+
columns: columns,
|
|
5378
|
+
showActionMenu: showActionMenu
|
|
5379
|
+
}), React__default.createElement("thead", null, React__default.createElement("tr", {
|
|
5380
|
+
className: styles$o['header']
|
|
5381
|
+
}, columns.map(function (column) {
|
|
5382
|
+
var _classnames, _classnames2;
|
|
5383
|
+
|
|
5384
|
+
var isSortable = column.isSortable;
|
|
5385
|
+
var sortDir = column.currentSort;
|
|
5386
|
+
var isRightAligned = column.isRightAligned;
|
|
5387
|
+
return React__default.createElement("th", {
|
|
5388
|
+
className: classnames((_classnames = {}, _classnames[styles$o['header-item']] = true, _classnames[styles$o['header-item--sortable']] = isSortable, _classnames)),
|
|
5389
|
+
style: {
|
|
5390
|
+
flex: column.size || 1
|
|
5391
|
+
},
|
|
5392
|
+
key: column.name,
|
|
5393
|
+
onClick: function onClick() {
|
|
5394
|
+
return isSortable && handleSort(column);
|
|
5395
|
+
},
|
|
5396
|
+
onKeyPress: function onKeyPress() {
|
|
5397
|
+
return isSortable && handleSort(column);
|
|
5398
|
+
},
|
|
5399
|
+
role: "columnheader",
|
|
5400
|
+
tabIndex: 0
|
|
5401
|
+
}, React__default.createElement("div", {
|
|
5402
|
+
className: classnames(styles$o['header-item__content'], (_classnames2 = {}, _classnames2[styles$o['header-item__content--right-align']] = isRightAligned, _classnames2))
|
|
5403
|
+
}, column.label, ' ', isSortable && React__default.createElement("span", {
|
|
5404
|
+
className: styles$o['header-sort-icon']
|
|
5405
|
+
}, React__default.createElement(IconSort$1, {
|
|
5406
|
+
sortDirection: sortDir
|
|
5407
|
+
}))));
|
|
5408
|
+
}), showActionMenu && React__default.createElement("th", {
|
|
5409
|
+
className: classnames(styles$o['header-item'], styles$o['header-item--action'])
|
|
5410
|
+
}))));
|
|
5411
|
+
};
|
|
5412
|
+
|
|
5413
|
+
var ColumnSizes = function ColumnSizes(_ref2) {
|
|
5414
|
+
var columns = _ref2.columns,
|
|
5415
|
+
showActionMenu = _ref2.showActionMenu;
|
|
5416
|
+
var columnPercentageSizes = calculatePercentageOfProportion(columns.map(function (column) {
|
|
5417
|
+
return column.size || 1;
|
|
5418
|
+
}));
|
|
5419
|
+
return React__default.createElement("colgroup", null, columns.map(function (column, index) {
|
|
5420
|
+
return React__default.createElement("col", {
|
|
5421
|
+
key: column.name,
|
|
5422
|
+
style: {
|
|
5423
|
+
width: columnPercentageSizes[index] + "%"
|
|
5424
|
+
}
|
|
5425
|
+
});
|
|
5426
|
+
}), showActionMenu && React__default.createElement("col", {
|
|
5427
|
+
style: {
|
|
5428
|
+
width: "1%",
|
|
5429
|
+
whiteSpace: 'nowrap'
|
|
5430
|
+
}
|
|
5431
|
+
}));
|
|
5432
|
+
};
|
|
5433
|
+
|
|
5434
|
+
var getNextSort = function getNextSort(column) {
|
|
5435
|
+
switch (column.currentSort) {
|
|
5436
|
+
case SORT_ORDER.ASC:
|
|
5437
|
+
return null;
|
|
5438
|
+
|
|
5439
|
+
case SORT_ORDER.DESC:
|
|
5440
|
+
return SORT_ORDER.ASC;
|
|
5441
|
+
|
|
5442
|
+
default:
|
|
5443
|
+
return SORT_ORDER.DESC;
|
|
5444
|
+
}
|
|
5445
|
+
};
|
|
5446
|
+
|
|
5447
|
+
var IconSort$1 = function IconSort(_ref3) {
|
|
5448
|
+
var sortDirection = _ref3.sortDirection;
|
|
5449
|
+
var sortDir = sortDirection || null;
|
|
5450
|
+
return React__default.createElement("div", {
|
|
5451
|
+
style: {
|
|
5452
|
+
display: 'inline-flex',
|
|
5453
|
+
flexDirection: 'column'
|
|
5454
|
+
}
|
|
5455
|
+
}, sortDir !== 'desc' && React__default.createElement(IconChevronUp, {
|
|
5456
|
+
size: "small",
|
|
5457
|
+
color: GREY400
|
|
5458
|
+
}), sortDir !== 'asc' && React__default.createElement("span", {
|
|
5459
|
+
style: {
|
|
5460
|
+
marginTop: '-4px'
|
|
5461
|
+
}
|
|
5462
|
+
}, React__default.createElement(IconChevronDown, {
|
|
5463
|
+
size: "small",
|
|
5464
|
+
color: GREY400
|
|
5465
|
+
})));
|
|
5466
|
+
};
|
|
5467
|
+
|
|
5468
|
+
var styles$p = {"data-table-scroll-fake-border":"_1zw4R","data-table-scroll-fake-border--top":"_2vWl5","data-table-scroll-fake-border--bottom":"_397Yd","data-table-scroll-fake-border__left":"_AGTVL","data-table-scroll-fake-border__left--top":"_3wzKK","data-table-scroll-fake-border__left--bottom":"_2pJrs","data-table-scroll-fake-border__right":"_vh4go","data-table-scroll-fake-border__right--top":"_2sj0a","data-table-scroll-fake-border__right--bottom":"_1s8kO"};
|
|
5469
|
+
|
|
5470
|
+
var DataTableScrollFakeBorder = function DataTableScrollFakeBorder(_ref) {
|
|
5471
|
+
var _classNames, _classNames2, _classNames3;
|
|
5472
|
+
|
|
5473
|
+
var placement = _ref.placement;
|
|
5474
|
+
return React__default.createElement("div", {
|
|
5475
|
+
className: classnames(styles$p['data-table-scroll-fake-border'], (_classNames = {}, _classNames[styles$p['data-table-scroll-fake-border--top']] = placement === 'top', _classNames[styles$p['data-table-scroll-fake-border--bottom']] = placement === 'bottom', _classNames))
|
|
5476
|
+
}, React__default.createElement("div", {
|
|
5477
|
+
className: classnames(styles$p['data-table-scroll-fake-border__left'], (_classNames2 = {}, _classNames2[styles$p['data-table-scroll-fake-border__left--top']] = placement === 'top', _classNames2[styles$p['data-table-scroll-fake-border__left--bottom']] = placement === 'bottom', _classNames2))
|
|
5478
|
+
}), React__default.createElement("div", {
|
|
5479
|
+
className: classnames(styles$p['data-table-scroll-fake-border__right'], (_classNames3 = {}, _classNames3[styles$p['data-table-scroll-fake-border__right--top']] = placement === 'top', _classNames3[styles$p['data-table-scroll-fake-border__right--bottom']] = placement === 'bottom', _classNames3))
|
|
5480
|
+
}));
|
|
5481
|
+
};
|
|
5482
|
+
|
|
5483
|
+
var styles$q = {"data-table-loading-block":"_94pbt"};
|
|
5484
|
+
|
|
5485
|
+
var DataTableLoadingBlock = function DataTableLoadingBlock(_ref) {
|
|
5486
|
+
var amountOfColumns = _ref.amountOfColumns,
|
|
5487
|
+
showActionMenu = _ref.showActionMenu;
|
|
5488
|
+
var aditionalColums = showActionMenu ? 1 : 0;
|
|
5489
|
+
var colSpan = amountOfColumns + aditionalColums;
|
|
5490
|
+
return React__default.createElement("tr", {
|
|
5491
|
+
className: styles$q['data-table-loading-block']
|
|
5492
|
+
}, React__default.createElement("td", {
|
|
5493
|
+
colSpan: colSpan
|
|
5494
|
+
}, React__default.createElement(Spinner, {
|
|
5495
|
+
block: true
|
|
5496
|
+
})));
|
|
5497
|
+
};
|
|
5498
|
+
|
|
5499
|
+
var DataTable = function DataTable(_ref) {
|
|
5500
|
+
var _classNames, _classNames2, _classNames3;
|
|
5501
|
+
|
|
5502
|
+
var items = _ref.items,
|
|
5503
|
+
columns = _ref.columns,
|
|
5504
|
+
itemComponent = _ref.itemComponent,
|
|
5505
|
+
maxHeight = _ref.maxHeight,
|
|
5506
|
+
_ref$hasPrevious = _ref.hasPrevious,
|
|
5507
|
+
hasPrevious = _ref$hasPrevious === void 0 ? true : _ref$hasPrevious,
|
|
5508
|
+
_ref$hasNext = _ref.hasNext,
|
|
5509
|
+
hasNext = _ref$hasNext === void 0 ? true : _ref$hasNext,
|
|
5510
|
+
onPreviousClick = _ref.onPreviousClick,
|
|
5511
|
+
onNextClick = _ref.onNextClick,
|
|
5512
|
+
onSort = _ref.onSort,
|
|
5513
|
+
_ref$isLoading = _ref.isLoading,
|
|
5514
|
+
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
|
|
5515
|
+
_ref$showActionMenu = _ref.showActionMenu,
|
|
5516
|
+
showActionMenu = _ref$showActionMenu === void 0 ? false : _ref$showActionMenu,
|
|
5517
|
+
footerComponent = _ref.footerComponent,
|
|
5518
|
+
_ref$hasVerticalBorde = _ref.hasVerticalBorders,
|
|
5519
|
+
hasVerticalBorders = _ref$hasVerticalBorde === void 0 ? false : _ref$hasVerticalBorde,
|
|
5520
|
+
testId = _ref.testId;
|
|
5521
|
+
var RowItem = itemComponent || DefaultItemComponent;
|
|
5522
|
+
var conditionalStyles = {};
|
|
5523
|
+
var isScrollableTable = !!maxHeight;
|
|
5524
|
+
|
|
5525
|
+
if (isScrollableTable) {
|
|
5526
|
+
conditionalStyles = _extends({}, conditionalStyles, {
|
|
5527
|
+
maxHeight: maxHeight,
|
|
5528
|
+
overflowY: 'auto'
|
|
5529
|
+
});
|
|
5530
|
+
}
|
|
5531
|
+
|
|
5532
|
+
var numberOfRows = items.length + (footerComponent ? 1 : 0);
|
|
5533
|
+
var isShowingFooter = footerComponent && !isLoading;
|
|
5534
|
+
var isShowingColumns = columns && columns.length > 0;
|
|
5535
|
+
return React__default.createElement(Context.Provider, {
|
|
5536
|
+
value: {
|
|
5537
|
+
columns: columns,
|
|
5538
|
+
showActionMenu: showActionMenu,
|
|
5539
|
+
numberOfRows: numberOfRows,
|
|
5540
|
+
hasVerticalBorders: hasVerticalBorders
|
|
5541
|
+
}
|
|
5542
|
+
}, React__default.createElement("div", {
|
|
5543
|
+
className: classnames(styles$o['table-container'])
|
|
5544
|
+
}, isShowingColumns && isScrollableTable && React__default.createElement(DataTableScrollFakeBorder, {
|
|
5545
|
+
placement: "top"
|
|
5546
|
+
}), React__default.createElement("div", {
|
|
5547
|
+
className: classnames(styles$o['table-content'], (_classNames = {}, _classNames[styles$o['table-content--with-scroll']] = isScrollableTable, _classNames)),
|
|
5548
|
+
style: conditionalStyles
|
|
5549
|
+
}, React__default.createElement("table", {
|
|
5550
|
+
className: classnames(styles$o['table'], (_classNames2 = {}, _classNames2[styles$o['table--no-columns']] = !isShowingColumns, _classNames2))
|
|
5551
|
+
}, columns && isShowingColumns && React__default.createElement(DataTableHeader, {
|
|
5552
|
+
columns: columns,
|
|
5553
|
+
onSort: onSort,
|
|
5554
|
+
showActionMenu: showActionMenu
|
|
5555
|
+
}), React__default.createElement("tbody", {
|
|
5556
|
+
className: classnames(styles$o['body'], (_classNames3 = {}, _classNames3[styles$o['body--no-bottom-radius']] = isShowingFooter, _classNames3)),
|
|
5557
|
+
"data-testid": testId
|
|
5558
|
+
}, isLoading && React__default.createElement(DataTableLoadingBlock, {
|
|
5559
|
+
amountOfColumns: (columns === null || columns === void 0 ? void 0 : columns.length) || 1,
|
|
5560
|
+
showActionMenu: showActionMenu
|
|
5561
|
+
}), !isLoading && items.map(function (item, index) {
|
|
5562
|
+
return React__default.createElement(RowItem, {
|
|
5563
|
+
item: item,
|
|
5564
|
+
columns: columns,
|
|
5565
|
+
key: index,
|
|
5566
|
+
index: index,
|
|
5567
|
+
testId: testId
|
|
5568
|
+
});
|
|
5569
|
+
})), isShowingFooter && React__default.createElement("tfoot", {
|
|
5570
|
+
className: styles$o['footer'],
|
|
5571
|
+
"data-testid": testId && testId + "-footer"
|
|
5572
|
+
}, footerComponent))), !isShowingFooter && isScrollableTable && React__default.createElement(DataTableScrollFakeBorder, {
|
|
5573
|
+
placement: "bottom"
|
|
5574
|
+
})), onPreviousClick && onNextClick && (hasPrevious || hasNext) && React__default.createElement("div", {
|
|
5575
|
+
className: styles$o['pagination-controls'],
|
|
5576
|
+
"data-testid": testId && testId + "-pagination-controls"
|
|
5577
|
+
}, React__default.createElement(PaginationControls, {
|
|
5578
|
+
hasPrevious: hasPrevious && !isLoading,
|
|
5579
|
+
hasNext: hasNext && !isLoading,
|
|
5580
|
+
onPreviousClick: onPreviousClick,
|
|
5581
|
+
onNextClick: onNextClick
|
|
5582
|
+
})));
|
|
5583
|
+
};
|
|
5584
|
+
|
|
5585
|
+
var DefaultItemComponent = function DefaultItemComponent(_ref2) {
|
|
5586
|
+
var columns = _ref2.columns,
|
|
5587
|
+
item = _ref2.item,
|
|
5588
|
+
testId = _ref2.testId;
|
|
5589
|
+
var headingKeys = columns ? columns.map(function (column) {
|
|
5590
|
+
return column.name;
|
|
5591
|
+
}) : Object.keys(item);
|
|
5592
|
+
var columnsToShow = headingKeys.filter(function (key) {
|
|
5593
|
+
return key !== 'actions';
|
|
5594
|
+
});
|
|
5595
|
+
return React__default.createElement(DataTableRow, {
|
|
5596
|
+
actions: item.actions,
|
|
5597
|
+
testId: testId
|
|
5598
|
+
}, columnsToShow.map(function (headingKey) {
|
|
5599
|
+
return React__default.createElement("div", {
|
|
5600
|
+
key: headingKey
|
|
5601
|
+
}, item[headingKey] || '');
|
|
5602
|
+
}));
|
|
5603
|
+
};
|
|
5604
|
+
|
|
5511
5605
|
var useSelectFieldControllers = function useSelectFieldControllers(_ref) {
|
|
5512
5606
|
var name = _ref.name,
|
|
5513
5607
|
inputId = _ref.id,
|
|
@@ -5712,9 +5806,9 @@ var ToolbarSelect = function ToolbarSelect(_ref) {
|
|
|
5712
5806
|
}));
|
|
5713
5807
|
};
|
|
5714
5808
|
|
|
5715
|
-
var styles$
|
|
5809
|
+
var styles$r = {"date-filter":"_2X-yg","date-filter--wide":"_3O5Kh"};
|
|
5716
5810
|
|
|
5717
|
-
var styles$
|
|
5811
|
+
var styles$s = {"date-filter-display":"_23gnr","date-filter-display--non-interactive":"_Zv1Se","date-filter-display--wide":"_18V8V","date-filter-display__display-icon":"_2v9v_"};
|
|
5718
5812
|
|
|
5719
5813
|
var DATE_FILTER_MODE = {
|
|
5720
5814
|
DAY: 'day',
|
|
@@ -5776,14 +5870,14 @@ var DateFilterDisplay = function DateFilterDisplay(_ref) {
|
|
|
5776
5870
|
weekStart = _ref.weekStart,
|
|
5777
5871
|
onClick = _ref.onClick;
|
|
5778
5872
|
return React__default.createElement("button", {
|
|
5779
|
-
className: classnames(styles$
|
|
5873
|
+
className: classnames(styles$s['date-filter-display'], (_classnames = {}, _classnames[styles$s['date-filter-display--wide']] = mode === DATE_FILTER_MODE.WEEK, _classnames[styles$s['date-filter-display--non-interactive']] = mode === DATE_FILTER_MODE.MONTH, _classnames)),
|
|
5780
5874
|
onClick: onClick,
|
|
5781
5875
|
tabIndex: mode === DATE_FILTER_MODE.MONTH ? -1 : undefined
|
|
5782
5876
|
}, React__default.createElement(Inline, {
|
|
5783
5877
|
space: 12,
|
|
5784
5878
|
alignItems: "center"
|
|
5785
5879
|
}, React__default.createElement("div", {
|
|
5786
|
-
className: classnames(styles$
|
|
5880
|
+
className: classnames(styles$s['date-filter-display__display-icon'])
|
|
5787
5881
|
}, React__default.createElement(IconCalendarAlt, {
|
|
5788
5882
|
size: "flexible",
|
|
5789
5883
|
color: GREY400
|
|
@@ -5794,7 +5888,7 @@ var DateFilterDisplay = function DateFilterDisplay(_ref) {
|
|
|
5794
5888
|
})));
|
|
5795
5889
|
};
|
|
5796
5890
|
|
|
5797
|
-
var styles$
|
|
5891
|
+
var styles$t = {"date-stepper":"_s8MoI","date-stepper--backward":"_34Yoi","date-stepper--forward":"_BeWpb"};
|
|
5798
5892
|
|
|
5799
5893
|
var handleDateStepper = function handleDateStepper(date, mode, stepDirection, onChange) {
|
|
5800
5894
|
var step = stepDirection === STEP_DIRECTION.FORWARD ? 1 : -1;
|
|
@@ -5829,7 +5923,7 @@ var DateFilterStepper = function DateFilterStepper(_ref) {
|
|
|
5829
5923
|
onChange = _ref.onChange,
|
|
5830
5924
|
date = _ref.date;
|
|
5831
5925
|
return React__default.createElement("button", {
|
|
5832
|
-
className: classnames(styles$
|
|
5926
|
+
className: classnames(styles$t['date-stepper'], (_classnames = {}, _classnames[styles$t['date-stepper--backward']] = stepDirection === STEP_DIRECTION.BACKWARD, _classnames[styles$t['date-stepper--forward']] = stepDirection === STEP_DIRECTION.FORWARD, _classnames)),
|
|
5833
5927
|
onClick: function onClick() {
|
|
5834
5928
|
return handleDateStepper(date, mode, stepDirection, onChange);
|
|
5835
5929
|
}
|
|
@@ -5865,7 +5959,7 @@ var DateFilter = function DateFilter(_ref) {
|
|
|
5865
5959
|
return React__default.createElement("div", {
|
|
5866
5960
|
"data-testid": testId,
|
|
5867
5961
|
ref: calendarAnchorRef,
|
|
5868
|
-
className: classnames(styles$
|
|
5962
|
+
className: classnames(styles$r['date-filter'], (_classnames = {}, _classnames[styles$r['date-filter--wide']] = mode === DATE_FILTER_MODE.WEEK, _classnames))
|
|
5869
5963
|
}, React__default.createElement(Inline, {
|
|
5870
5964
|
space: 0
|
|
5871
5965
|
}, React__default.createElement(DateFilterStepper, {
|
|
@@ -5906,7 +6000,7 @@ var DateFilter = function DateFilter(_ref) {
|
|
|
5906
6000
|
}));
|
|
5907
6001
|
};
|
|
5908
6002
|
|
|
5909
|
-
var styles$
|
|
6003
|
+
var styles$u = {"segmented-control":"_J5ph7","segmented-control__button":"_2xgv4","segmented-control__button--selected":"_1vG3O","segmented-control__divider":"_1uKNF"};
|
|
5910
6004
|
|
|
5911
6005
|
var SegmentedControl = function SegmentedControl(_ref) {
|
|
5912
6006
|
var options = _ref.options,
|
|
@@ -5923,7 +6017,7 @@ var SegmentedControl = function SegmentedControl(_ref) {
|
|
|
5923
6017
|
};
|
|
5924
6018
|
|
|
5925
6019
|
return React__default.createElement("div", {
|
|
5926
|
-
className: styles$
|
|
6020
|
+
className: styles$u['segmented-control'],
|
|
5927
6021
|
"data-testid": testId
|
|
5928
6022
|
}, options.map(function (option, i) {
|
|
5929
6023
|
var _classnames;
|
|
@@ -5934,16 +6028,16 @@ var SegmentedControl = function SegmentedControl(_ref) {
|
|
|
5934
6028
|
onClick: function onClick() {
|
|
5935
6029
|
return onChange(option);
|
|
5936
6030
|
},
|
|
5937
|
-
className: classnames(styles$
|
|
6031
|
+
className: classnames(styles$u['segmented-control__button'], (_classnames = {}, _classnames[styles$u['segmented-control__button--selected']] = isSelected(option), _classnames))
|
|
5938
6032
|
}, option), !isLastElement(i) && React__default.createElement("div", {
|
|
5939
|
-
className: classnames(styles$
|
|
6033
|
+
className: classnames(styles$u['segmented-control__divider'])
|
|
5940
6034
|
}));
|
|
5941
6035
|
}));
|
|
5942
6036
|
};
|
|
5943
6037
|
|
|
5944
|
-
var styles$
|
|
6038
|
+
var styles$v = {"form--standard-size":"_3CaV0"};
|
|
5945
6039
|
|
|
5946
|
-
var styles$
|
|
6040
|
+
var styles$w = {"card":"_29ZIp","card__body":"_3Q8NT","card__body--interactive":"_2Fah6","card--focus":"_SGno0","card__body--focus":"_1zqRN","card__body--with-kebab":"_3Hwms","card__kebab":"_TmEUS"};
|
|
5947
6041
|
|
|
5948
6042
|
var _excluded$2g = ["children", "onClick", "isSelected", "actions", "testId"];
|
|
5949
6043
|
|
|
@@ -5960,18 +6054,18 @@ var Card = function Card(_ref) {
|
|
|
5960
6054
|
|
|
5961
6055
|
var positionStyles = usePositionStyles(positionProps);
|
|
5962
6056
|
return React__default.createElement("div", {
|
|
5963
|
-
className: classnames(styles$
|
|
6057
|
+
className: classnames(styles$w['card']),
|
|
5964
6058
|
style: positionStyles
|
|
5965
6059
|
}, onClick ? React__default.createElement("button", {
|
|
5966
|
-
className: classnames(styles$
|
|
6060
|
+
className: classnames(styles$w['card__body'], styles$w['card__body--interactive'], (_classnames = {}, _classnames[styles$w['card__body--focus']] = isSelected, _classnames[styles$w['card__body--with-kebab']] = actions, _classnames)),
|
|
5967
6061
|
"data-testid": testId,
|
|
5968
6062
|
tabIndex: 0,
|
|
5969
6063
|
onClick: onClick
|
|
5970
6064
|
}, children) : React__default.createElement("div", {
|
|
5971
|
-
className: classnames(styles$
|
|
6065
|
+
className: classnames(styles$w['card__body'], (_classnames2 = {}, _classnames2[styles$w['card__body--focus']] = isSelected, _classnames2[styles$w['card__body--with-kebab']] = actions, _classnames2)),
|
|
5972
6066
|
"data-testid": testId
|
|
5973
6067
|
}, children), actions && React__default.createElement("div", {
|
|
5974
|
-
className: classnames(styles$
|
|
6068
|
+
className: classnames(styles$w['card__kebab'])
|
|
5975
6069
|
}, React__default.createElement(KebabMenu, {
|
|
5976
6070
|
actions: actions
|
|
5977
6071
|
})));
|
|
@@ -6000,7 +6094,7 @@ var ALIGNMENTS = {
|
|
|
6000
6094
|
JUSTIFY: 'justify'
|
|
6001
6095
|
};
|
|
6002
6096
|
|
|
6003
|
-
var styles$
|
|
6097
|
+
var styles$x = {"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"};
|
|
6004
6098
|
|
|
6005
6099
|
var _excluded$2h = ["children", "as", "emphasis", "alignment", "color", "testId"];
|
|
6006
6100
|
|
|
@@ -6021,7 +6115,7 @@ var Text = function Text(_ref) {
|
|
|
6021
6115
|
style: _extends({
|
|
6022
6116
|
color: color
|
|
6023
6117
|
}, positionStyles),
|
|
6024
|
-
className: classnames(styles$
|
|
6118
|
+
className: classnames(styles$x['text'], (_classnames = {}, _classnames[styles$x['text--bold']] = emphasis === null || emphasis === void 0 ? void 0 : emphasis.includes(FONT_EMPHASIS.BOLD), _classnames[styles$x['text--italic']] = emphasis === null || emphasis === void 0 ? void 0 : emphasis.includes(FONT_EMPHASIS.ITALIC), _classnames[styles$x['text--underline']] = emphasis === null || emphasis === void 0 ? void 0 : emphasis.includes(FONT_EMPHASIS.UNDERLINE), _classnames[styles$x['text--monospace']] = emphasis === null || emphasis === void 0 ? void 0 : emphasis.includes(FONT_EMPHASIS.MONOSPACE), _classnames[styles$x['text--align-left']] = alignment === ALIGNMENTS.LEFT, _classnames[styles$x['text--align-right']] = alignment === ALIGNMENTS.RIGHT, _classnames[styles$x['text--align-center']] = alignment === ALIGNMENTS.CENTER, _classnames[styles$x['text--align-justify']] = alignment === ALIGNMENTS.JUSTIFY, _classnames[styles$x['text__body']] = as === TEXT_TYPES.BODY, _classnames[styles$x['text__insight']] = as === TEXT_TYPES.INSIGHT, _classnames[styles$x['text__caption']] = as === TEXT_TYPES.CAPTION, _classnames)),
|
|
6025
6119
|
'data-testid': testId
|
|
6026
6120
|
};
|
|
6027
6121
|
var pTypes = [TEXT_TYPES.BODY, TEXT_TYPES.CAPTION, TEXT_TYPES.INSIGHT];
|
|
@@ -6037,7 +6131,7 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
|
6037
6131
|
}, children);
|
|
6038
6132
|
};
|
|
6039
6133
|
|
|
6040
|
-
var styles$
|
|
6134
|
+
var styles$y = {"breadcrumb-item":"_XFvYB"};
|
|
6041
6135
|
|
|
6042
6136
|
var BreadcrumbItem = function BreadcrumbItem(_ref) {
|
|
6043
6137
|
var href = _ref.href,
|
|
@@ -6050,24 +6144,24 @@ var BreadcrumbItem = function BreadcrumbItem(_ref) {
|
|
|
6050
6144
|
}), children);
|
|
6051
6145
|
return reloadDocument ? React__default.createElement("a", {
|
|
6052
6146
|
href: href,
|
|
6053
|
-
className: styles$
|
|
6147
|
+
className: styles$y['breadcrumb-item'],
|
|
6054
6148
|
"data-testid": testId
|
|
6055
6149
|
}, content) : React__default.createElement(reactRouterDom.Link, {
|
|
6056
6150
|
to: href,
|
|
6057
|
-
className: styles$
|
|
6151
|
+
className: styles$y['breadcrumb-item'],
|
|
6058
6152
|
relative: "path",
|
|
6059
6153
|
reloadDocument: reloadDocument,
|
|
6060
6154
|
"data-testid": testId
|
|
6061
6155
|
}, content);
|
|
6062
6156
|
};
|
|
6063
6157
|
|
|
6064
|
-
var styles$
|
|
6158
|
+
var styles$z = {"page-breadcrumbs":"_HAJCd"};
|
|
6065
6159
|
|
|
6066
6160
|
var PageBreadcrumbs = function PageBreadcrumbs(_ref) {
|
|
6067
6161
|
var breadcrumbs = _ref.breadcrumbs;
|
|
6068
6162
|
var items = getBreadbrumbItems(breadcrumbs);
|
|
6069
6163
|
return React__default.createElement("div", {
|
|
6070
|
-
className: styles$
|
|
6164
|
+
className: styles$z['page-breadcrumbs']
|
|
6071
6165
|
}, React__default.createElement(Breadcrumbs, null, items));
|
|
6072
6166
|
};
|
|
6073
6167
|
|
|
@@ -6092,7 +6186,7 @@ var getBreadbrumbItems = function getBreadbrumbItems(breadcrumbs) {
|
|
|
6092
6186
|
}, breadcrumbs.label);
|
|
6093
6187
|
};
|
|
6094
6188
|
|
|
6095
|
-
var styles$
|
|
6189
|
+
var styles$A = {"page":"_FbhTM","page--fullwidth":"_3QyAE","page--restricted":"_17aOG"};
|
|
6096
6190
|
|
|
6097
6191
|
var PAGE_SIZES = {
|
|
6098
6192
|
FULL_WIDTH: 'fullwidth',
|
|
@@ -6115,7 +6209,7 @@ var Page = function Page(_ref) {
|
|
|
6115
6209
|
var hasHeader = title || actions;
|
|
6116
6210
|
var hasPageBlocks = hasHeader || banner || filterBar;
|
|
6117
6211
|
return React__default.createElement("div", {
|
|
6118
|
-
className: classnames(styles$
|
|
6212
|
+
className: classnames(styles$A['page'], (_classNames = {}, _classNames[styles$A['page--restricted']] = size === PAGE_SIZES.RESTRICTED, _classNames[styles$A['page--fullwidth']] = size === PAGE_SIZES.FULL_WIDTH, _classNames)),
|
|
6119
6213
|
"data-testid": testId
|
|
6120
6214
|
}, React__default.createElement(Stack, {
|
|
6121
6215
|
space: 20
|
|
@@ -6135,7 +6229,7 @@ var Page = function Page(_ref) {
|
|
|
6135
6229
|
}, title), actions), subtitle && React__default.createElement(Text, null, subtitle)), banner, filterBar)), children));
|
|
6136
6230
|
};
|
|
6137
6231
|
|
|
6138
|
-
var styles$
|
|
6232
|
+
var styles$B = {"form-section":"_7-5gD","form-section__title":"_a83vM","form-section__subtitle":"_1lKv8","form-section--no-margin":"_lZyFQ"};
|
|
6139
6233
|
|
|
6140
6234
|
var FormSection = function FormSection(_ref) {
|
|
6141
6235
|
var _classnames;
|
|
@@ -6147,14 +6241,14 @@ var FormSection = function FormSection(_ref) {
|
|
|
6147
6241
|
noMargin = _ref$noMargin === void 0 ? false : _ref$noMargin,
|
|
6148
6242
|
testId = _ref.testId;
|
|
6149
6243
|
return React__default.createElement("div", {
|
|
6150
|
-
className: classnames(styles$
|
|
6244
|
+
className: classnames(styles$B['form-section'], (_classnames = {}, _classnames[styles$B['form-section--no-margin']] = noMargin, _classnames)),
|
|
6151
6245
|
"data-testid": testId
|
|
6152
6246
|
}, React__default.createElement(Stack, null, React__default.createElement(Stack, {
|
|
6153
6247
|
space: 8
|
|
6154
6248
|
}, title && React__default.createElement("h2", {
|
|
6155
|
-
className: classnames(styles$
|
|
6249
|
+
className: classnames(styles$B['form-section__title'])
|
|
6156
6250
|
}, title), subtitle && React__default.createElement("h3", {
|
|
6157
|
-
className: classnames(styles$
|
|
6251
|
+
className: classnames(styles$B['form-section__subtitle'])
|
|
6158
6252
|
}, subtitle)), children));
|
|
6159
6253
|
};
|
|
6160
6254
|
|
|
@@ -6172,7 +6266,7 @@ var updateButtonProps$1 = function updateButtonProps(child, newProps) {
|
|
|
6172
6266
|
}, newProps, child.props));
|
|
6173
6267
|
};
|
|
6174
6268
|
|
|
6175
|
-
var styles$
|
|
6269
|
+
var styles$C = {"form-footer":"_3vVBF"};
|
|
6176
6270
|
|
|
6177
6271
|
var FormFooterActions = function FormFooterActions(_ref) {
|
|
6178
6272
|
var _actions$primary, _actions$secondary, _actions$tertiary;
|
|
@@ -6207,7 +6301,7 @@ var FormFooter = function FormFooter(_ref) {
|
|
|
6207
6301
|
});
|
|
6208
6302
|
var isInlineChildren = React__default.Children.count(children) === 1 && React__default.isValidElement(children) && children.type === Inline;
|
|
6209
6303
|
return React__default.createElement("div", {
|
|
6210
|
-
className: classnames(styles$
|
|
6304
|
+
className: classnames(styles$C['form-footer']),
|
|
6211
6305
|
"data-testid": testId
|
|
6212
6306
|
}, actions && React__default.createElement(FormFooterActions, {
|
|
6213
6307
|
actions: actions
|
|
@@ -6249,12 +6343,12 @@ var Form = function Form(_ref) {
|
|
|
6249
6343
|
}
|
|
6250
6344
|
}, React__default.createElement("form", {
|
|
6251
6345
|
onSubmit: onSubmit ? handleSubmit : formik === null || formik === void 0 ? void 0 : formik.handleSubmit,
|
|
6252
|
-
className: classnames((_classnames = {}, _classnames[styles$
|
|
6346
|
+
className: classnames((_classnames = {}, _classnames[styles$v['form--standard-size']] = !wide, _classnames)),
|
|
6253
6347
|
"data-testid": testId
|
|
6254
6348
|
}, stackContent ? React__default.createElement(Stack, null, formattedChildren) : formattedChildren));
|
|
6255
6349
|
};
|
|
6256
6350
|
|
|
6257
|
-
var styles$
|
|
6351
|
+
var styles$D = {"form-row":"_2i-Ll"};
|
|
6258
6352
|
|
|
6259
6353
|
var SIZE_25_PERCENT = '25%';
|
|
6260
6354
|
var SIZE_33_PERCENT = '33.333%';
|
|
@@ -6285,7 +6379,7 @@ var FormRow = function FormRow(_ref) {
|
|
|
6285
6379
|
space: 20,
|
|
6286
6380
|
testId: testId,
|
|
6287
6381
|
alignItems: "stretch",
|
|
6288
|
-
extraClass: styles$
|
|
6382
|
+
extraClass: styles$D['form-row']
|
|
6289
6383
|
}, children, additionalColumns.map(function (_, index) {
|
|
6290
6384
|
return React__default.createElement("span", {
|
|
6291
6385
|
key: index,
|
|
@@ -6294,7 +6388,7 @@ var FormRow = function FormRow(_ref) {
|
|
|
6294
6388
|
}));
|
|
6295
6389
|
};
|
|
6296
6390
|
|
|
6297
|
-
var styles$
|
|
6391
|
+
var styles$E = {"text-field":"_BkzdC","text-field--focus":"_Rop31","text-field--disabled":"_2x3Cm","text-field--invalid":"_3zOwV","text-field__toolbar":"_rQqnL"};
|
|
6298
6392
|
|
|
6299
6393
|
var useGrowTextAreaRef = function useGrowTextAreaRef(minHeight, maxHeight, autoGrow, forwardedRef) {
|
|
6300
6394
|
var textareaRef = React.useRef(null);
|
|
@@ -6370,7 +6464,7 @@ var TextAreaField = function TextAreaField(_ref) {
|
|
|
6370
6464
|
updateHeight = _useGrowTextAreaRef.updateHeight;
|
|
6371
6465
|
|
|
6372
6466
|
return React__default.createElement(Field, Object.assign({}, fieldProps), React__default.createElement("div", {
|
|
6373
|
-
className: classnames(styles$
|
|
6467
|
+
className: classnames(styles$E['text-field'], (_classnames = {}, _classnames[styles$E['text-field--invalid']] = hasError, _classnames[styles$E['text-field--disabled']] = disabled, _classnames[styles$E['text-field--focus']] = hasFocus, _classnames)),
|
|
6374
6468
|
ref: containerRef,
|
|
6375
6469
|
onClick: function onClick(event) {
|
|
6376
6470
|
if (event.target === (containerRef === null || containerRef === void 0 ? void 0 : containerRef.current)) {
|
|
@@ -6402,7 +6496,7 @@ var TextAreaField = function TextAreaField(_ref) {
|
|
|
6402
6496
|
},
|
|
6403
6497
|
ref: textAreaRef
|
|
6404
6498
|
}), toolbar && React__default.createElement("div", {
|
|
6405
|
-
className: styles$
|
|
6499
|
+
className: styles$E['text-field__toolbar'],
|
|
6406
6500
|
id: controllers.id + "-toolbar",
|
|
6407
6501
|
ref: toolbarRef,
|
|
6408
6502
|
onClick: function onClick(event) {
|
|
@@ -6551,7 +6645,7 @@ var useCheckBoxFieldControllers = function useCheckBoxFieldControllers(_ref) {
|
|
|
6551
6645
|
return controllers;
|
|
6552
6646
|
};
|
|
6553
6647
|
|
|
6554
|
-
var styles$
|
|
6648
|
+
var styles$F = {"check-box-field":"_2sg0c","check-box-field__caption":"_2LdrP","check-box-field__custom-input":"_2mA8e"};
|
|
6555
6649
|
|
|
6556
6650
|
var CheckboxField = function CheckboxField(_ref) {
|
|
6557
6651
|
var name = _ref.name,
|
|
@@ -6581,7 +6675,7 @@ var CheckboxField = function CheckboxField(_ref) {
|
|
|
6581
6675
|
flexItems: true,
|
|
6582
6676
|
flex: ['0 0 auto']
|
|
6583
6677
|
}, React__default.createElement("div", {
|
|
6584
|
-
className: styles$
|
|
6678
|
+
className: styles$F['check-box-field']
|
|
6585
6679
|
}, React__default.createElement("input", {
|
|
6586
6680
|
name: name,
|
|
6587
6681
|
id: controllers.id,
|
|
@@ -6594,12 +6688,12 @@ var CheckboxField = function CheckboxField(_ref) {
|
|
|
6594
6688
|
onChange: controllers.onChange,
|
|
6595
6689
|
onBlur: controllers.onBlur
|
|
6596
6690
|
}), React__default.createElement("span", {
|
|
6597
|
-
className: styles$
|
|
6691
|
+
className: styles$F['check-box-field__custom-input']
|
|
6598
6692
|
})), label && React__default.createElement(Label, {
|
|
6599
6693
|
htmlFor: controllers.id,
|
|
6600
6694
|
truncate: false
|
|
6601
6695
|
}, label)), caption && React__default.createElement("div", {
|
|
6602
|
-
className: styles$
|
|
6696
|
+
className: styles$F['check-box-field__caption']
|
|
6603
6697
|
}, React__default.createElement(Caption, {
|
|
6604
6698
|
fieldId: controllers.id
|
|
6605
6699
|
}, caption)), controllers.error && React__default.createElement(ErrorMessage, {
|
|
@@ -6607,7 +6701,7 @@ var CheckboxField = function CheckboxField(_ref) {
|
|
|
6607
6701
|
}, controllers.error));
|
|
6608
6702
|
};
|
|
6609
6703
|
|
|
6610
|
-
var styles$
|
|
6704
|
+
var styles$G = {"pill-select-field":"_g6T-p","pill-select-field__custom-input":"_1i2AX"};
|
|
6611
6705
|
|
|
6612
6706
|
var useMultiSelectFieldControllers = function useMultiSelectFieldControllers(_ref) {
|
|
6613
6707
|
var name = _ref.name,
|
|
@@ -6699,7 +6793,7 @@ var PillSelectField = function PillSelectField(_ref) {
|
|
|
6699
6793
|
var itemId = controllers.id + "-" + itemIdentifier;
|
|
6700
6794
|
return React__default.createElement("div", {
|
|
6701
6795
|
key: itemIdentifier,
|
|
6702
|
-
className: styles$
|
|
6796
|
+
className: styles$G['pill-select-field']
|
|
6703
6797
|
}, React__default.createElement("input", {
|
|
6704
6798
|
name: name + "-" + itemIdentifier,
|
|
6705
6799
|
id: itemId,
|
|
@@ -6721,7 +6815,7 @@ var PillSelectField = function PillSelectField(_ref) {
|
|
|
6721
6815
|
controllers.onChange(newValue);
|
|
6722
6816
|
}
|
|
6723
6817
|
}), React__default.createElement("span", {
|
|
6724
|
-
className: styles$
|
|
6818
|
+
className: styles$G['pill-select-field__custom-input']
|
|
6725
6819
|
}, option.label));
|
|
6726
6820
|
})));
|
|
6727
6821
|
};
|
|
@@ -6769,9 +6863,9 @@ var useRadioGroupFieldContext = function useRadioGroupFieldContext() {
|
|
|
6769
6863
|
return context;
|
|
6770
6864
|
};
|
|
6771
6865
|
|
|
6772
|
-
var styles$
|
|
6866
|
+
var styles$H = {"label":"_1WGz2","label--truncate":"_mQ9Rd","radio-group-field__label":"_RXyG_"};
|
|
6773
6867
|
|
|
6774
|
-
var styles$
|
|
6868
|
+
var styles$I = {"label":"_1Tw96","label--truncate":"_1o8rK","radio-group-box-option":"_2OGKE","radio-group-box-option__box":"_23M9k","radio-group-box-option__label":"_1r-Wg"};
|
|
6775
6869
|
|
|
6776
6870
|
var RadioGroupBoxOption = function RadioGroupBoxOption(_ref) {
|
|
6777
6871
|
var value = _ref.value,
|
|
@@ -6786,7 +6880,7 @@ var RadioGroupBoxOption = function RadioGroupBoxOption(_ref) {
|
|
|
6786
6880
|
id: inputId
|
|
6787
6881
|
});
|
|
6788
6882
|
return React__default.createElement("label", {
|
|
6789
|
-
className: styles$
|
|
6883
|
+
className: styles$I['radio-group-box-option']
|
|
6790
6884
|
}, React__default.createElement("input", {
|
|
6791
6885
|
type: "radio",
|
|
6792
6886
|
"data-testid": testId,
|
|
@@ -6797,7 +6891,7 @@ var RadioGroupBoxOption = function RadioGroupBoxOption(_ref) {
|
|
|
6797
6891
|
checked: radioGroupContext.value !== undefined ? radioGroupContext.value === value : undefined,
|
|
6798
6892
|
disabled: radioGroupContext.disabled
|
|
6799
6893
|
}), React__default.createElement("div", {
|
|
6800
|
-
className: styles$
|
|
6894
|
+
className: styles$I['radio-group-box-option__box']
|
|
6801
6895
|
}, React__default.createElement(Stack, {
|
|
6802
6896
|
space: 16,
|
|
6803
6897
|
alignItems: "center",
|
|
@@ -6806,13 +6900,13 @@ var RadioGroupBoxOption = function RadioGroupBoxOption(_ref) {
|
|
|
6806
6900
|
space: 8,
|
|
6807
6901
|
alignItems: "center"
|
|
6808
6902
|
}, label && React__default.createElement("div", {
|
|
6809
|
-
className: styles$
|
|
6903
|
+
className: styles$I['radio-group-box-option__label']
|
|
6810
6904
|
}, label), caption && React__default.createElement(Caption, {
|
|
6811
6905
|
fieldId: id
|
|
6812
6906
|
}, caption)))));
|
|
6813
6907
|
};
|
|
6814
6908
|
|
|
6815
|
-
var styles$
|
|
6909
|
+
var styles$J = {"radio-group-option":"_1Clmp","radio-group-option__caption":"_3UmWA","radio-group-option__custom-input":"_1tMq-"};
|
|
6816
6910
|
|
|
6817
6911
|
var RadioGroupOption = function RadioGroupOption(_ref) {
|
|
6818
6912
|
var value = _ref.value,
|
|
@@ -6831,7 +6925,7 @@ var RadioGroupOption = function RadioGroupOption(_ref) {
|
|
|
6831
6925
|
space: 8,
|
|
6832
6926
|
alignItems: "center"
|
|
6833
6927
|
}, React__default.createElement("div", {
|
|
6834
|
-
className: styles$
|
|
6928
|
+
className: styles$J['radio-group-option']
|
|
6835
6929
|
}, React__default.createElement("input", {
|
|
6836
6930
|
type: "radio",
|
|
6837
6931
|
"data-testid": testId,
|
|
@@ -6842,11 +6936,11 @@ var RadioGroupOption = function RadioGroupOption(_ref) {
|
|
|
6842
6936
|
checked: radioGroupContext.value !== undefined ? radioGroupContext.value === value : undefined,
|
|
6843
6937
|
disabled: radioGroupContext.disabled
|
|
6844
6938
|
}), React__default.createElement("span", {
|
|
6845
|
-
className: styles$
|
|
6939
|
+
className: styles$J['radio-group-option__custom-input']
|
|
6846
6940
|
})), label && React__default.createElement(Label, {
|
|
6847
6941
|
htmlFor: id
|
|
6848
6942
|
}, label)), caption && React__default.createElement("div", {
|
|
6849
|
-
className: styles$
|
|
6943
|
+
className: styles$J['radio-group-option__caption']
|
|
6850
6944
|
}, React__default.createElement(Caption, {
|
|
6851
6945
|
fieldId: id
|
|
6852
6946
|
}, caption)));
|
|
@@ -6981,7 +7075,7 @@ var RadioGroupField = function RadioGroupField(_ref) {
|
|
|
6981
7075
|
}, React__default.createElement(Stack, {
|
|
6982
7076
|
space: 12
|
|
6983
7077
|
}, label && React__default.createElement("div", {
|
|
6984
|
-
className: styles$
|
|
7078
|
+
className: styles$H['radio-group-field__label']
|
|
6985
7079
|
}, label), React__default.createElement(Stack, {
|
|
6986
7080
|
space: 8
|
|
6987
7081
|
}, optionsType === OPTION_TYPES.RADIO ? React__default.createElement(RadioOptions, {
|
|
@@ -6994,9 +7088,9 @@ var RadioGroupField = function RadioGroupField(_ref) {
|
|
|
6994
7088
|
}, children), controllers.error && React__default.createElement(ErrorMessage, null, controllers.error))));
|
|
6995
7089
|
};
|
|
6996
7090
|
|
|
6997
|
-
var styles$
|
|
7091
|
+
var styles$K = {"text-field":"_18Rzv","text-field--invalid":"_3eD7t","text-field--prefixed":"_2evrG","text-field--suffixed":"_-MgeO","password-container":"_-Rf3c","password-toggle":"_yinPY"};
|
|
6998
7092
|
|
|
6999
|
-
var styles$
|
|
7093
|
+
var styles$L = {"password-criteria":"_U0krC","password-criteria--invalid":"_2XIl4"};
|
|
7000
7094
|
|
|
7001
7095
|
var PasswordCriteria = function PasswordCriteria(_ref) {
|
|
7002
7096
|
var _classnames;
|
|
@@ -7004,7 +7098,7 @@ var PasswordCriteria = function PasswordCriteria(_ref) {
|
|
|
7004
7098
|
var met = _ref.met,
|
|
7005
7099
|
children = _ref.children;
|
|
7006
7100
|
return React__default.createElement("span", {
|
|
7007
|
-
className: classnames(styles$
|
|
7101
|
+
className: classnames(styles$L['password-criteria'], (_classnames = {}, _classnames[styles$L['password-criteria--invalid']] = !met, _classnames))
|
|
7008
7102
|
}, React__default.createElement(Inline, {
|
|
7009
7103
|
space: met ? 4 : 8
|
|
7010
7104
|
}, met ? React__default.createElement(IconCheck, {
|
|
@@ -7089,11 +7183,11 @@ var PasswordField = function PasswordField(_ref) {
|
|
|
7089
7183
|
error: controllers.error
|
|
7090
7184
|
};
|
|
7091
7185
|
return React__default.createElement(Field, Object.assign({}, fieldProps), React__default.createElement("div", {
|
|
7092
|
-
className: styles$
|
|
7186
|
+
className: styles$K['password-container']
|
|
7093
7187
|
}, React__default.createElement("input", {
|
|
7094
7188
|
name: name,
|
|
7095
7189
|
id: controllers.id,
|
|
7096
|
-
className: classnames(styles$
|
|
7190
|
+
className: classnames(styles$K['text-field'], (_classnames = {}, _classnames[styles$K['text-field--invalid']] = hasError, _classnames)),
|
|
7097
7191
|
type: type,
|
|
7098
7192
|
"data-testid": testId,
|
|
7099
7193
|
"aria-describedby": hasError ? controllers.id + "-error-message" : controllers.id + "-describer",
|
|
@@ -7105,7 +7199,7 @@ var PasswordField = function PasswordField(_ref) {
|
|
|
7105
7199
|
onChange: controllers.onChange,
|
|
7106
7200
|
onBlur: controllers.onBlur
|
|
7107
7201
|
}), React__default.createElement("div", {
|
|
7108
|
-
className: styles$
|
|
7202
|
+
className: styles$K['password-toggle'],
|
|
7109
7203
|
onClick: toggleType,
|
|
7110
7204
|
onKeyPress: toggleType,
|
|
7111
7205
|
"data-testid": testId && testId + "-toggle",
|
|
@@ -7307,7 +7401,9 @@ var MultiSelectField = function MultiSelectField(_ref) {
|
|
|
7307
7401
|
closeOnSelect = _ref$closeOnSelect === void 0 ? false : _ref$closeOnSelect,
|
|
7308
7402
|
_ref$menuShouldScroll = _ref.menuShouldScrollIntoView,
|
|
7309
7403
|
menuShouldScrollIntoView = _ref$menuShouldScroll === void 0 ? true : _ref$menuShouldScroll,
|
|
7310
|
-
testId = _ref.testId
|
|
7404
|
+
testId = _ref.testId,
|
|
7405
|
+
_ref$isSearchable = _ref.isSearchable,
|
|
7406
|
+
isSearchable = _ref$isSearchable === void 0 ? true : _ref$isSearchable;
|
|
7311
7407
|
var controllers = useMultiSelectFieldControllers({
|
|
7312
7408
|
name: name,
|
|
7313
7409
|
id: inputId,
|
|
@@ -7360,11 +7456,12 @@ var MultiSelectField = function MultiSelectField(_ref) {
|
|
|
7360
7456
|
}
|
|
7361
7457
|
|
|
7362
7458
|
return !isScrollingTheSelectMenu(e.target);
|
|
7363
|
-
}
|
|
7459
|
+
},
|
|
7460
|
+
isSearchable: isSearchable
|
|
7364
7461
|
}));
|
|
7365
7462
|
};
|
|
7366
7463
|
|
|
7367
|
-
var styles$
|
|
7464
|
+
var styles$M = {"custom-control":"_1cDCR"};
|
|
7368
7465
|
|
|
7369
7466
|
var _excluded$2k = ["children"];
|
|
7370
7467
|
|
|
@@ -7377,7 +7474,7 @@ function CustomControl(_ref) {
|
|
|
7377
7474
|
var SelectedOptionPrefix = props.selectProps.componentsProps.SelectedOptionPrefix;
|
|
7378
7475
|
var selectedOption = (_props$getValue = props.getValue()) === null || _props$getValue === void 0 ? void 0 : _props$getValue[0];
|
|
7379
7476
|
return React__default.createElement(Select.components.Control, Object.assign({}, props), SelectedOptionPrefix && selectedOption ? React__default.createElement("div", {
|
|
7380
|
-
className: styles$
|
|
7477
|
+
className: styles$M['custom-control'],
|
|
7381
7478
|
style: {
|
|
7382
7479
|
paddingLeft: selectedOption ? 8 : 0
|
|
7383
7480
|
}
|
|
@@ -7390,7 +7487,7 @@ function CustomControl(_ref) {
|
|
|
7390
7487
|
}, props)), children)) : children);
|
|
7391
7488
|
}
|
|
7392
7489
|
|
|
7393
|
-
var styles$
|
|
7490
|
+
var styles$N = {"custom-menu-text-field":"_2-zhH","custom-menu-hr":"_3sdnK","custom-menu-div":"_2F1jP"};
|
|
7394
7491
|
|
|
7395
7492
|
var _excluded$2l = ["children"];
|
|
7396
7493
|
|
|
@@ -7450,15 +7547,15 @@ function CustomMenu(_ref) {
|
|
|
7450
7547
|
return React__default.createElement(Select.components.Menu, Object.assign({}, props), React__default.createElement("div", {
|
|
7451
7548
|
ref: containerRef
|
|
7452
7549
|
}, children, React__default.createElement("hr", {
|
|
7453
|
-
className: styles$
|
|
7550
|
+
className: styles$N['custom-menu-hr']
|
|
7454
7551
|
}), !showFooter ? React__default.createElement(CreatableButton, null) : React__default.createElement("div", {
|
|
7455
|
-
className: styles$
|
|
7552
|
+
className: styles$N['custom-menu-div']
|
|
7456
7553
|
}, React__default.createElement(Flex, {
|
|
7457
7554
|
space: 4,
|
|
7458
7555
|
flex: [1],
|
|
7459
7556
|
flexItems: true
|
|
7460
7557
|
}, React__default.createElement("input", {
|
|
7461
|
-
className: classnames(textFieldStyles['text-field'], styles$
|
|
7558
|
+
className: classnames(textFieldStyles['text-field'], styles$N['custom-menu-text-field']),
|
|
7462
7559
|
autoCorrect: "off",
|
|
7463
7560
|
autoComplete: "off",
|
|
7464
7561
|
spellCheck: "false",
|
|
@@ -7521,7 +7618,9 @@ var useSelectField = function useSelectField(_ref) {
|
|
|
7521
7618
|
SelectedOptionPrefix = _ref.SelectedOptionPrefix,
|
|
7522
7619
|
testId = _ref.testId,
|
|
7523
7620
|
creatableButton = _ref.creatableButton,
|
|
7524
|
-
onCreate = _ref.onCreate
|
|
7621
|
+
onCreate = _ref.onCreate,
|
|
7622
|
+
_ref$isSearchable = _ref.isSearchable,
|
|
7623
|
+
isSearchable = _ref$isSearchable === void 0 ? true : _ref$isSearchable;
|
|
7525
7624
|
|
|
7526
7625
|
var _useState = React.useState(false),
|
|
7527
7626
|
isMenuInputFocus = _useState[0],
|
|
@@ -7584,7 +7683,8 @@ var useSelectField = function useSelectField(_ref) {
|
|
|
7584
7683
|
}),
|
|
7585
7684
|
value: controllers.value,
|
|
7586
7685
|
defaultValue: defaultValue,
|
|
7587
|
-
menuIsOpen: isMenuInputFocus || undefined
|
|
7686
|
+
menuIsOpen: isMenuInputFocus || undefined,
|
|
7687
|
+
isSearchable: isSearchable
|
|
7588
7688
|
};
|
|
7589
7689
|
var fieldProps = {
|
|
7590
7690
|
caption: caption,
|
|
@@ -7609,7 +7709,7 @@ var SelectField = function SelectField(props) {
|
|
|
7609
7709
|
}, React__default.createElement(Select__default, Object.assign({}, selectProps))));
|
|
7610
7710
|
};
|
|
7611
7711
|
|
|
7612
|
-
var styles$
|
|
7712
|
+
var styles$O = {"custom-list":"_uC4zU"};
|
|
7613
7713
|
|
|
7614
7714
|
var _excluded$2m = ["children", "hasMoreOptions", "hasMoreOptionsFirstLoad"];
|
|
7615
7715
|
|
|
@@ -7628,7 +7728,7 @@ var CustomList = function CustomList(_ref) {
|
|
|
7628
7728
|
return React__default.createElement(Select.components.MenuList, Object.assign({}, props), React__default.createElement(React.Fragment, null, children, showFooter && React__default.createElement(Inline, {
|
|
7629
7729
|
justifyContent: "center"
|
|
7630
7730
|
}, React__default.createElement("div", {
|
|
7631
|
-
className: styles$
|
|
7731
|
+
className: styles$O['custom-list']
|
|
7632
7732
|
}, getLocalizedString('main.START_TYPING_TO_SEE_MORE_OPTIONS')))));
|
|
7633
7733
|
};
|
|
7634
7734
|
|
|
@@ -7984,7 +8084,7 @@ var getFormikError = function getFormikError(error) {
|
|
|
7984
8084
|
return undefined;
|
|
7985
8085
|
};
|
|
7986
8086
|
|
|
7987
|
-
var styles$
|
|
8087
|
+
var styles$P = {"container":"_1Ini2","wrapper":"_21VnL","interactionDisabled":"_wJ6Cb","DayPicker-Day":"_1c48y","navBar":"_3KwsN","todayButton":"_10CBO","navButtonInteractionDisabled":"_dHL-D","navButtonPrev":"_6kNi3","navButtonNext":"_13W_e","months":"_1FeSY","month":"_wU6A4","caption":"_AMbAo","weekdays":"_1LEst","weekdaysRow":"_2XECo","weekday":"_1C5ry","body":"_11F-Y","week":"_3MAFk","day":"_mG73F","disabled":"_2pgnH","selected":"_MtLaz","outside":"_CRqyX","footer":"_2KG9-","today":"_2JA2y","overlayWrapper":"_1JWbc","overlay":"_2tL6g","weekNumber":"_3u72O","text-field":"_25rf7","date-range-field":"_3qVhi","text-field--invalid":"_2M9Ud","text-field--prefixed":"_3TUb2","text-field--suffixed":"_foqL0","date-range-field--invalid":"_3df9R","date-range-field--disabled":"_2Nkht"};
|
|
7988
8088
|
|
|
7989
8089
|
var FromDate = function FromDate(_ref) {
|
|
7990
8090
|
var name = _ref.name,
|
|
@@ -8023,7 +8123,7 @@ var FromDate = function FromDate(_ref) {
|
|
|
8023
8123
|
}
|
|
8024
8124
|
|
|
8025
8125
|
var dayPickerProps = {
|
|
8026
|
-
classNames: styles$
|
|
8126
|
+
classNames: styles$P,
|
|
8027
8127
|
months: MONTH_NAMES,
|
|
8028
8128
|
weekdaysLong: DAYS,
|
|
8029
8129
|
weekdaysShort: DAYS.map(function (day) {
|
|
@@ -8050,7 +8150,7 @@ var FromDate = function FromDate(_ref) {
|
|
|
8050
8150
|
};
|
|
8051
8151
|
return React__default.createElement(DayPickerInput, {
|
|
8052
8152
|
format: format,
|
|
8053
|
-
classNames: styles$
|
|
8153
|
+
classNames: styles$P,
|
|
8054
8154
|
selectedDay: start,
|
|
8055
8155
|
value: start,
|
|
8056
8156
|
formatDate: formatDate,
|
|
@@ -8124,7 +8224,7 @@ var ToDate = function ToDate(_ref, ref) {
|
|
|
8124
8224
|
}
|
|
8125
8225
|
|
|
8126
8226
|
var dayPickerProps = {
|
|
8127
|
-
classNames: styles$
|
|
8227
|
+
classNames: styles$P,
|
|
8128
8228
|
months: MONTH_NAMES,
|
|
8129
8229
|
weekdaysLong: DAYS,
|
|
8130
8230
|
weekdaysShort: DAYS.map(function (day) {
|
|
@@ -8143,7 +8243,7 @@ var ToDate = function ToDate(_ref, ref) {
|
|
|
8143
8243
|
};
|
|
8144
8244
|
return React__default.createElement(DayPickerInput, {
|
|
8145
8245
|
format: format,
|
|
8146
|
-
classNames: styles$
|
|
8246
|
+
classNames: styles$P,
|
|
8147
8247
|
selectedDay: end,
|
|
8148
8248
|
value: end,
|
|
8149
8249
|
formatDate: formatDate,
|
|
@@ -8228,7 +8328,7 @@ var DateRangeField = function DateRangeField(_ref) {
|
|
|
8228
8328
|
start = _controllers$value.start,
|
|
8229
8329
|
end = _controllers$value.end;
|
|
8230
8330
|
return React__default.createElement(Field, Object.assign({}, fieldProps), React__default.createElement("div", {
|
|
8231
|
-
className: classnames(styles$
|
|
8331
|
+
className: classnames(styles$P['date-range-field'], (_classnames = {}, _classnames[styles$P['date-range-field--invalid']] = hasError, _classnames[styles$P['date-range-field--disabled']] = disabled, _classnames)),
|
|
8232
8332
|
"data-testid": testId
|
|
8233
8333
|
}, React__default.createElement(IconCalendarAlt, {
|
|
8234
8334
|
size: "medium",
|
|
@@ -8608,7 +8708,7 @@ var BUTTON_THEME = {
|
|
|
8608
8708
|
UPSELL: 'upsell'
|
|
8609
8709
|
};
|
|
8610
8710
|
|
|
8611
|
-
var styles$
|
|
8711
|
+
var styles$Q = {"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"};
|
|
8612
8712
|
|
|
8613
8713
|
var ButtonCTA = function ButtonCTA(_ref) {
|
|
8614
8714
|
var button = _ref.button,
|
|
@@ -8631,7 +8731,7 @@ var ButtonCTA = function ButtonCTA(_ref) {
|
|
|
8631
8731
|
}, button.props));
|
|
8632
8732
|
};
|
|
8633
8733
|
|
|
8634
|
-
var styles$
|
|
8734
|
+
var styles$R = {"banner__caption":"_1jqm8"};
|
|
8635
8735
|
|
|
8636
8736
|
var InlineBannerCTA = function InlineBannerCTA(_ref) {
|
|
8637
8737
|
var primaryButton = _ref.primaryButton,
|
|
@@ -8662,7 +8762,7 @@ var InlineBannerCTA = function InlineBannerCTA(_ref) {
|
|
|
8662
8762
|
bannerTheme: bannerTheme,
|
|
8663
8763
|
primaryCTA: true
|
|
8664
8764
|
})), caption && multiLine && React__default.createElement("div", {
|
|
8665
|
-
className: styles$
|
|
8765
|
+
className: styles$R['banner__caption']
|
|
8666
8766
|
}, caption));
|
|
8667
8767
|
};
|
|
8668
8768
|
|
|
@@ -8709,14 +8809,14 @@ var InlineBanner = function InlineBanner(_ref) {
|
|
|
8709
8809
|
var Layout = multiLine ? Stack : Inline;
|
|
8710
8810
|
return React__default.createElement("div", {
|
|
8711
8811
|
"data-testid": testId,
|
|
8712
|
-
className: classnames(styles$
|
|
8812
|
+
className: classnames(styles$Q['banner'], (_classnames = {}, _classnames[styles$Q['banner--info']] = theme === BANNER_THEME.INFO, _classnames[styles$Q['banner--warning']] = theme === BANNER_THEME.WARNING, _classnames[styles$Q['banner--success']] = theme === BANNER_THEME.SUCCESS, _classnames[styles$Q['banner--danger']] = theme === BANNER_THEME.DANGER, _classnames[styles$Q['banner--upsell']] = theme === BANNER_THEME.UPSELL, _classnames[styles$Q['banner--single-line']] = !multiLine, _classnames)),
|
|
8713
8813
|
style: positionStyles
|
|
8714
8814
|
}, React__default.createElement(Inline, {
|
|
8715
8815
|
alignItems: multiLine ? undefined : 'center',
|
|
8716
8816
|
flex: ['0 1 auto', 1],
|
|
8717
8817
|
space: 12
|
|
8718
8818
|
}, React__default.createElement("div", {
|
|
8719
|
-
className: styles$
|
|
8819
|
+
className: styles$Q['banner__icon']
|
|
8720
8820
|
}, React__default.createElement(InlineBannerIcon, {
|
|
8721
8821
|
theme: theme
|
|
8722
8822
|
})), React__default.createElement(Layout, {
|
|
@@ -8726,9 +8826,9 @@ var InlineBanner = function InlineBanner(_ref) {
|
|
|
8726
8826
|
flex: ['min-content'],
|
|
8727
8827
|
flexWrap: multiLine ? undefined : 'wrap'
|
|
8728
8828
|
}, title && React__default.createElement("div", {
|
|
8729
|
-
className: styles$
|
|
8829
|
+
className: styles$Q['banner__title']
|
|
8730
8830
|
}, title), React__default.createElement("div", {
|
|
8731
|
-
className: classnames(styles$
|
|
8831
|
+
className: classnames(styles$Q['banner__body'], (_classnames2 = {}, _classnames2[styles$Q['banner__body--multilineCTA']] = primaryButton && multiLine, _classnames2))
|
|
8732
8832
|
}, children), primaryButton && React__default.createElement(InlineBannerCTA, {
|
|
8733
8833
|
primaryButton: primaryButton,
|
|
8734
8834
|
secondaryButton: secondaryButton,
|
|
@@ -8736,7 +8836,7 @@ var InlineBanner = function InlineBanner(_ref) {
|
|
|
8736
8836
|
multiLine: multiLine,
|
|
8737
8837
|
bannerTheme: theme
|
|
8738
8838
|
})), dismissable && React__default.createElement("div", {
|
|
8739
|
-
className: styles$
|
|
8839
|
+
className: styles$Q['banner__close']
|
|
8740
8840
|
}, React__default.createElement(Button$1, {
|
|
8741
8841
|
theme: "link-icon",
|
|
8742
8842
|
type: "button",
|
|
@@ -8750,7 +8850,7 @@ var PERSISTENT_BANNER_THEME = {
|
|
|
8750
8850
|
DANGER: 'danger'
|
|
8751
8851
|
};
|
|
8752
8852
|
|
|
8753
|
-
var styles$
|
|
8853
|
+
var styles$S = {"persistent-banner":"_1KO1J","persistent-banner--info":"_2mTN3","persistent-banner--danger":"_1YuCF","persistent-banner--upsell":"_tlNFk"};
|
|
8754
8854
|
|
|
8755
8855
|
var PersistentBanner = function PersistentBanner(_ref) {
|
|
8756
8856
|
var _classNames;
|
|
@@ -8779,7 +8879,7 @@ var PersistentBanner = function PersistentBanner(_ref) {
|
|
|
8779
8879
|
};
|
|
8780
8880
|
|
|
8781
8881
|
return React__default.createElement("div", {
|
|
8782
|
-
className: classnames(styles$
|
|
8882
|
+
className: classnames(styles$S['persistent-banner'], (_classNames = {}, _classNames[styles$S['persistent-banner--info']] = theme === PERSISTENT_BANNER_THEME.INFO, _classNames[styles$S['persistent-banner--danger']] = theme === PERSISTENT_BANNER_THEME.DANGER, _classNames[styles$S['persistent-banner--upsell']] = theme === PERSISTENT_BANNER_THEME.UPSELL, _classNames)),
|
|
8783
8883
|
"data-testid": testId
|
|
8784
8884
|
}, onDismiss ? React__default.createElement(Inline, {
|
|
8785
8885
|
flex: [1],
|
|
@@ -8851,7 +8951,7 @@ var useProgress = function useProgress(progress, maxValue, getMetric) {
|
|
|
8851
8951
|
};
|
|
8852
8952
|
};
|
|
8853
8953
|
|
|
8854
|
-
var styles$
|
|
8954
|
+
var styles$T = {"circular-progress":"_1XR7V","circular-progress__label":"_1BygP","circular-progress__track":"_1Ak-z","circular-progress__indicator":"_22YIp"};
|
|
8855
8955
|
|
|
8856
8956
|
var CircularProgress = function CircularProgress(_ref) {
|
|
8857
8957
|
var progress = _ref.progress,
|
|
@@ -8866,7 +8966,7 @@ var CircularProgress = function CircularProgress(_ref) {
|
|
|
8866
8966
|
|
|
8867
8967
|
var determinant = metric.percentage * 2.79;
|
|
8868
8968
|
return React__default.createElement("div", Object.assign({}, elementProps, {
|
|
8869
|
-
className: styles$
|
|
8969
|
+
className: styles$T['circular-progress'],
|
|
8870
8970
|
"data-testid": testId
|
|
8871
8971
|
}), React__default.createElement("svg", {
|
|
8872
8972
|
viewBox: "0 0 100 100"
|
|
@@ -8875,21 +8975,21 @@ var CircularProgress = function CircularProgress(_ref) {
|
|
|
8875
8975
|
cy: 50,
|
|
8876
8976
|
r: 45,
|
|
8877
8977
|
strokeWidth: "10px",
|
|
8878
|
-
className: styles$
|
|
8978
|
+
className: styles$T['circular-progress__track']
|
|
8879
8979
|
}), React__default.createElement("circle", {
|
|
8880
8980
|
cx: 50,
|
|
8881
8981
|
cy: 50,
|
|
8882
8982
|
r: 45,
|
|
8883
8983
|
strokeWidth: "10px",
|
|
8884
|
-
className: styles$
|
|
8984
|
+
className: styles$T['circular-progress__indicator'],
|
|
8885
8985
|
strokeDashoffset: "66",
|
|
8886
8986
|
strokeDasharray: determinant + " " + (279 - determinant)
|
|
8887
8987
|
})), React__default.createElement("div", {
|
|
8888
|
-
className: styles$
|
|
8988
|
+
className: styles$T['circular-progress__label']
|
|
8889
8989
|
}, children || metric.progress + "/" + metric.maxValue));
|
|
8890
8990
|
};
|
|
8891
8991
|
|
|
8892
|
-
var styles$
|
|
8992
|
+
var styles$U = {"progress-bar":"_3nyZN","progress-bar__indicator":"_11TEp","progress-bar__steps":"_3XFTU"};
|
|
8893
8993
|
|
|
8894
8994
|
var ProgressBar = function ProgressBar(_ref) {
|
|
8895
8995
|
var progress = _ref.progress,
|
|
@@ -8904,15 +9004,15 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
8904
9004
|
metric = _useProgress.metric;
|
|
8905
9005
|
|
|
8906
9006
|
return React__default.createElement(Stack, null, React__default.createElement("div", Object.assign({}, elementProps, {
|
|
8907
|
-
className: styles$
|
|
9007
|
+
className: styles$U['progress-bar'],
|
|
8908
9008
|
"data-testid": testId
|
|
8909
9009
|
}), React__default.createElement("div", {
|
|
8910
|
-
className: styles$
|
|
9010
|
+
className: styles$U['progress-bar__indicator'],
|
|
8911
9011
|
style: {
|
|
8912
9012
|
width: metric.percentage + "%"
|
|
8913
9013
|
}
|
|
8914
9014
|
})), steps && steps.length > 0 && React__default.createElement("div", {
|
|
8915
|
-
className: styles$
|
|
9015
|
+
className: styles$U['progress-bar__steps']
|
|
8916
9016
|
}, steps.map(function (step) {
|
|
8917
9017
|
return React__default.createElement("div", {
|
|
8918
9018
|
key: step
|
|
@@ -8920,7 +9020,7 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
8920
9020
|
})));
|
|
8921
9021
|
};
|
|
8922
9022
|
|
|
8923
|
-
var styles$
|
|
9023
|
+
var styles$V = {"badge":"_2f81N","badge--warning":"_2g1GI","badge--danger":"_2zLnM","badge--success":"_27QOo","badge--info":"_2gmsM"};
|
|
8924
9024
|
|
|
8925
9025
|
var _excluded$2s = ["children", "theme", "title", "testId"];
|
|
8926
9026
|
|
|
@@ -8944,7 +9044,7 @@ var Badge = function Badge(_ref, forwardedRef) {
|
|
|
8944
9044
|
overlay: title,
|
|
8945
9045
|
ref: ref
|
|
8946
9046
|
}, React__default.createElement("div", Object.assign({
|
|
8947
|
-
className: classnames(styles$
|
|
9047
|
+
className: classnames(styles$V['badge'], (_classnames = {}, _classnames[styles$V['badge--success']] = theme === 'success', _classnames[styles$V['badge--danger']] = theme === 'danger', _classnames[styles$V['badge--info']] = theme === 'info', _classnames[styles$V['badge--warning']] = theme === 'warning', _classnames)),
|
|
8948
9048
|
ref: ref,
|
|
8949
9049
|
"data-testid": testId
|
|
8950
9050
|
}, otherProps), children));
|
|
@@ -8952,9 +9052,9 @@ var Badge = function Badge(_ref, forwardedRef) {
|
|
|
8952
9052
|
|
|
8953
9053
|
var Badge$1 = React.forwardRef(Badge);
|
|
8954
9054
|
|
|
8955
|
-
var styles$
|
|
9055
|
+
var styles$W = {"avatar":"_2wJGB","avatar--small":"_3QTSo","avatar__badge":"_2Rl8S","avatar--medium":"_1zwj0","avatar--large":"_3-U6x","avatar--extra-large":"_3qn2q"};
|
|
8956
9056
|
|
|
8957
|
-
var styles$
|
|
9057
|
+
var styles$X = {"avatar-image":"_GKL9P"};
|
|
8958
9058
|
|
|
8959
9059
|
var AvatarImage = function AvatarImage(_ref) {
|
|
8960
9060
|
var url = _ref.url,
|
|
@@ -8979,7 +9079,7 @@ var AvatarImage = function AvatarImage(_ref) {
|
|
|
8979
9079
|
}
|
|
8980
9080
|
|
|
8981
9081
|
return React__default.createElement("div", {
|
|
8982
|
-
className: styles$
|
|
9082
|
+
className: styles$X['avatar-image']
|
|
8983
9083
|
}, React__default.createElement(IconUserSolid, {
|
|
8984
9084
|
size: "flexible",
|
|
8985
9085
|
color: color
|
|
@@ -9048,7 +9148,7 @@ var Avatar = function Avatar(_ref) {
|
|
|
9048
9148
|
|
|
9049
9149
|
var backgroundColor = url ? GREY200 : color;
|
|
9050
9150
|
return React__default.createElement("div", {
|
|
9051
|
-
className: classnames(styles$
|
|
9151
|
+
className: classnames(styles$W['avatar'], (_classnames = {}, _classnames[styles$W['avatar--small']] = size === 'small', _classnames[styles$W['avatar--medium']] = size === 'medium', _classnames[styles$W['avatar--large']] = size === 'large', _classnames[styles$W['avatar--extra-large']] = size === 'extra-large', _classnames)),
|
|
9052
9152
|
style: {
|
|
9053
9153
|
backgroundColor: children || url && !showIconInsteadOfImage ? backgroundColor : defaultProfilePictureColors.backgroundColor
|
|
9054
9154
|
},
|
|
@@ -9061,7 +9161,7 @@ var Avatar = function Avatar(_ref) {
|
|
|
9061
9161
|
return setShowIconInsteadOfImage(true);
|
|
9062
9162
|
}
|
|
9063
9163
|
}), badge && size !== 'small' && React__default.createElement("div", {
|
|
9064
|
-
className: styles$
|
|
9164
|
+
className: styles$W['avatar__badge']
|
|
9065
9165
|
}, badge));
|
|
9066
9166
|
};
|
|
9067
9167
|
|
|
@@ -9074,7 +9174,7 @@ var CHIP_THEME = {
|
|
|
9074
9174
|
DANGER: 'danger'
|
|
9075
9175
|
};
|
|
9076
9176
|
|
|
9077
|
-
var styles$
|
|
9177
|
+
var styles$Y = {"chip":"_1fIeV","chip--marketing":"_V4byU","chip--success":"_37gN9","chip--upsell":"_Tw7tp","chip--warning":"_t94VZ","chip--info":"_3SmeO","chip--danger":"_2eoX0"};
|
|
9078
9178
|
|
|
9079
9179
|
var Chip = function Chip(_ref) {
|
|
9080
9180
|
var _classnames;
|
|
@@ -9085,11 +9185,11 @@ var Chip = function Chip(_ref) {
|
|
|
9085
9185
|
testId = _ref.testId;
|
|
9086
9186
|
return React__default.createElement("div", {
|
|
9087
9187
|
"data-testid": testId,
|
|
9088
|
-
className: classnames(styles$
|
|
9188
|
+
className: classnames(styles$Y['chip'], (_classnames = {}, _classnames[styles$Y['chip--marketing']] = theme === CHIP_THEME.MARKETING, _classnames[styles$Y['chip--success']] = theme === CHIP_THEME.SUCCESS, _classnames[styles$Y['chip--upsell']] = theme === CHIP_THEME.UPSELL, _classnames[styles$Y['chip--warning']] = theme === CHIP_THEME.WARNING, _classnames[styles$Y['chip--info']] = theme === CHIP_THEME.INFO, _classnames[styles$Y['chip--danger']] = theme === CHIP_THEME.DANGER, _classnames))
|
|
9089
9189
|
}, children);
|
|
9090
9190
|
};
|
|
9091
9191
|
|
|
9092
|
-
var styles$
|
|
9192
|
+
var styles$Z = {"pill":"_23q4Y","pill--default":"_niDEM","pill--success":"_IwDRB","pill--danger":"_MPji-","pill--warning":"_3S2m8","pill--info":"_2G3ML"};
|
|
9093
9193
|
|
|
9094
9194
|
var PILL_THEME = {
|
|
9095
9195
|
INFO: 'info',
|
|
@@ -9108,28 +9208,28 @@ var Pill = function Pill(_ref) {
|
|
|
9108
9208
|
testId = _ref.testId;
|
|
9109
9209
|
return React__default.createElement("div", {
|
|
9110
9210
|
"data-testid": testId,
|
|
9111
|
-
className: classnames(styles$
|
|
9211
|
+
className: classnames(styles$Z['pill'], (_classnames = {}, _classnames[styles$Z['pill--default']] = theme === PILL_THEME.DEFAULT, _classnames[styles$Z['pill--warning']] = theme === PILL_THEME.WARNING, _classnames[styles$Z['pill--success']] = theme === PILL_THEME.SUCCESS, _classnames[styles$Z['pill--danger']] = theme === PILL_THEME.DANGER, _classnames[styles$Z['pill--info']] = theme === PILL_THEME.INFO, _classnames))
|
|
9112
9212
|
}, children);
|
|
9113
9213
|
};
|
|
9114
9214
|
|
|
9115
9215
|
var Bold = function Bold(_ref) {
|
|
9116
9216
|
var children = _ref.children;
|
|
9117
9217
|
return React__default.createElement("span", {
|
|
9118
|
-
className: classnames(styles$
|
|
9218
|
+
className: classnames(styles$x['text--bold'], styles$x['text'])
|
|
9119
9219
|
}, children);
|
|
9120
9220
|
};
|
|
9121
9221
|
|
|
9122
9222
|
var Underline = function Underline(_ref) {
|
|
9123
9223
|
var children = _ref.children;
|
|
9124
9224
|
return React__default.createElement("span", {
|
|
9125
|
-
className: classnames(styles$
|
|
9225
|
+
className: classnames(styles$x['text--underline'], styles$x['text'])
|
|
9126
9226
|
}, children);
|
|
9127
9227
|
};
|
|
9128
9228
|
|
|
9129
9229
|
var Italic = function Italic(_ref) {
|
|
9130
9230
|
var children = _ref.children;
|
|
9131
9231
|
return React__default.createElement("span", {
|
|
9132
|
-
className: classnames(styles$
|
|
9232
|
+
className: classnames(styles$x['text--italic'], styles$x['text'])
|
|
9133
9233
|
}, children);
|
|
9134
9234
|
};
|
|
9135
9235
|
|
|
@@ -9139,9 +9239,9 @@ var EMPTY_STATE_SIZE = {
|
|
|
9139
9239
|
LARGE: 'large'
|
|
9140
9240
|
};
|
|
9141
9241
|
|
|
9142
|
-
var styles$
|
|
9242
|
+
var styles$_ = {"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"};
|
|
9143
9243
|
|
|
9144
|
-
var styles
|
|
9244
|
+
var styles$$ = {"empty-state-container-cta":"_1Cx9N"};
|
|
9145
9245
|
|
|
9146
9246
|
var EmptyStateContainerCTA = function EmptyStateContainerCTA(_ref) {
|
|
9147
9247
|
var _actions$primary, _actions$secondary;
|
|
@@ -9157,7 +9257,7 @@ var EmptyStateContainerCTA = function EmptyStateContainerCTA(_ref) {
|
|
|
9157
9257
|
size: BUTTON_SIZES.MIN_WIDTH_100
|
|
9158
9258
|
});
|
|
9159
9259
|
return React__default.createElement("div", {
|
|
9160
|
-
className: styles
|
|
9260
|
+
className: styles$$['empty-state-container-cta']
|
|
9161
9261
|
}, primaryButton, secondaryButton);
|
|
9162
9262
|
};
|
|
9163
9263
|
|
|
@@ -9172,7 +9272,7 @@ var EmptyStateContainerStack = function EmptyStateContainerStack(_ref) {
|
|
|
9172
9272
|
isPaywall = _ref$isPaywall === void 0 ? false : _ref$isPaywall,
|
|
9173
9273
|
testId = _ref.testId;
|
|
9174
9274
|
return React__default.createElement("div", {
|
|
9175
|
-
className: styles$
|
|
9275
|
+
className: styles$_['empty-state-container-stack'],
|
|
9176
9276
|
"data-testid": testId
|
|
9177
9277
|
}, React__default.createElement("img", {
|
|
9178
9278
|
src: mediaUrl,
|
|
@@ -9188,7 +9288,7 @@ var EmptyStateContainerStack = function EmptyStateContainerStack(_ref) {
|
|
|
9188
9288
|
emphasis: "bold",
|
|
9189
9289
|
as: "body"
|
|
9190
9290
|
}, title), React__default.createElement("div", {
|
|
9191
|
-
className: styles$
|
|
9291
|
+
className: styles$_['empty-state-container-stack__body']
|
|
9192
9292
|
}, children)), React__default.createElement(Stack, {
|
|
9193
9293
|
space: 8,
|
|
9194
9294
|
alignItems: "center"
|
|
@@ -9200,7 +9300,7 @@ var EmptyStateContainerStack = function EmptyStateContainerStack(_ref) {
|
|
|
9200
9300
|
}, caption)));
|
|
9201
9301
|
};
|
|
9202
9302
|
|
|
9203
|
-
var styles$
|
|
9303
|
+
var styles$10 = {"empty-state-container-inline":"_eMr1V","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"};
|
|
9204
9304
|
|
|
9205
9305
|
var EmptyStateContainerInline = function EmptyStateContainerInline(_ref) {
|
|
9206
9306
|
var _classnames;
|
|
@@ -9217,10 +9317,10 @@ var EmptyStateContainerInline = function EmptyStateContainerInline(_ref) {
|
|
|
9217
9317
|
isPaywall = _ref$isPaywall === void 0 ? false : _ref$isPaywall,
|
|
9218
9318
|
testId = _ref.testId;
|
|
9219
9319
|
return React__default.createElement("div", {
|
|
9220
|
-
className: styles$
|
|
9320
|
+
className: styles$10['empty-state-container-inline'],
|
|
9221
9321
|
"data-testid": testId
|
|
9222
9322
|
}, React__default.createElement("div", {
|
|
9223
|
-
className: classnames(styles$
|
|
9323
|
+
className: classnames(styles$10['empty-state-container-inline__content'], (_classnames = {}, _classnames[styles$10['empty-state-container__content--full-page']] = size === EMPTY_STATE_SIZE.LARGE, _classnames[styles$10['empty-state-container__content--inline-horizontal']] = size === EMPTY_STATE_SIZE.MEDIUM, _classnames))
|
|
9224
9324
|
}, React__default.createElement(Stack, {
|
|
9225
9325
|
space: 8
|
|
9226
9326
|
}, header && React__default.createElement(Text, {
|
|
@@ -9229,7 +9329,7 @@ var EmptyStateContainerInline = function EmptyStateContainerInline(_ref) {
|
|
|
9229
9329
|
}, header), React__default.createElement(Text, {
|
|
9230
9330
|
as: "h1"
|
|
9231
9331
|
}, title)), React__default.createElement("div", {
|
|
9232
|
-
className: styles$
|
|
9332
|
+
className: styles$10['empty-state-container-inline__body']
|
|
9233
9333
|
}, children), React__default.createElement(Stack, {
|
|
9234
9334
|
space: 8
|
|
9235
9335
|
}, actions && React__default.createElement(EmptyStateContainerCTA, {
|