@7shifts/sous-chef 3.59.0 → 3.61.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/assets/MagnifyingGlassIllustration/MagnifyingGlassIllustration.d.ts +3 -0
- package/dist/assets/MagnifyingGlassIllustration/index.d.ts +1 -0
- package/dist/i18n/locales/en.json +3 -0
- package/dist/i18n/locales/es.json +3 -0
- package/dist/i18n/locales/fr.json +3 -0
- package/dist/index.css +22 -0
- package/dist/index.css.map +1 -1
- package/dist/index.js +46 -8
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +46 -8
- package/dist/index.modern.js.map +1 -1
- package/dist/lists/ActionList/ActionList.d.ts +6 -2
- package/dist/lists/ActionList/type.d.ts +10 -0
- package/package.json +1 -1
- package/dist/lists/DataTable/DataTableEmptyState/EmptyStateIllustration/EmptyStateIllustration.d.ts +0 -3
- package/dist/lists/DataTable/DataTableEmptyState/EmptyStateIllustration/index.d.ts +0 -1
package/dist/index.modern.js
CHANGED
|
@@ -5958,6 +5958,9 @@ var DataTable$1 = {
|
|
|
5958
5958
|
emptyStateTitle: "No results found",
|
|
5959
5959
|
emptyStateCaption: "Try adding a new item to the list or adjust your search terms."
|
|
5960
5960
|
};
|
|
5961
|
+
var ActionList$1 = {
|
|
5962
|
+
emptyStateTitle: "No action items"
|
|
5963
|
+
};
|
|
5961
5964
|
var PhoneField$1 = {
|
|
5962
5965
|
malformedPhoneNumber: "Malformed phone number. Please enter a valid phone number."
|
|
5963
5966
|
};
|
|
@@ -5969,6 +5972,7 @@ var en = {
|
|
|
5969
5972
|
Calendar: Calendar$1,
|
|
5970
5973
|
Card: Card$1,
|
|
5971
5974
|
DataTable: DataTable$1,
|
|
5975
|
+
ActionList: ActionList$1,
|
|
5972
5976
|
PhoneField: PhoneField$1
|
|
5973
5977
|
};
|
|
5974
5978
|
|
|
@@ -9304,7 +9308,7 @@ const EmptyStateContainerStack = ({
|
|
|
9304
9308
|
}, caption)));
|
|
9305
9309
|
};
|
|
9306
9310
|
|
|
9307
|
-
const
|
|
9311
|
+
const MagnifyingGlassIllustration = () => {
|
|
9308
9312
|
return React__default.createElement("svg", {
|
|
9309
9313
|
width: "200",
|
|
9310
9314
|
height: "110",
|
|
@@ -9393,7 +9397,7 @@ const DataTableEmptyState = ({
|
|
|
9393
9397
|
className: styles$B['data-table-empty-state']
|
|
9394
9398
|
}, React__default.createElement(EmptyStateContainerStack, {
|
|
9395
9399
|
mediaUrl: customImage,
|
|
9396
|
-
mediaComponent: customImage === '' ? React__default.createElement(
|
|
9400
|
+
mediaComponent: customImage === '' ? React__default.createElement(MagnifyingGlassIllustration, null) : undefined,
|
|
9397
9401
|
title: customEmptyState ? customEmptyState.title : translate('emptyStateTitle'),
|
|
9398
9402
|
actions: customEmptyState && customEmptyState.actions,
|
|
9399
9403
|
size: "small"
|
|
@@ -9629,16 +9633,32 @@ const Accordion = props => {
|
|
|
9629
9633
|
})));
|
|
9630
9634
|
};
|
|
9631
9635
|
|
|
9632
|
-
var styles$w = {"action-list":"_pWke5"};
|
|
9636
|
+
var styles$w = {"action-list":"_pWke5","action-list__title":"_p8I7K","action-list__empty-state":"_l-tFB"};
|
|
9633
9637
|
|
|
9634
9638
|
const ActionList = ({
|
|
9635
9639
|
children,
|
|
9636
|
-
testId
|
|
9640
|
+
testId,
|
|
9641
|
+
title,
|
|
9642
|
+
emptyState,
|
|
9643
|
+
maxHeight
|
|
9637
9644
|
}) => {
|
|
9645
|
+
const translate = useTranslation('ActionList');
|
|
9638
9646
|
return React__default.createElement("div", {
|
|
9639
9647
|
className: styles$w['action-list'],
|
|
9640
|
-
"data-testid": testId
|
|
9641
|
-
|
|
9648
|
+
"data-testid": testId,
|
|
9649
|
+
style: {
|
|
9650
|
+
maxHeight: maxHeight
|
|
9651
|
+
}
|
|
9652
|
+
}, title && React__default.createElement("div", {
|
|
9653
|
+
className: styles$w['action-list__title']
|
|
9654
|
+
}, title), children ? children : React__default.createElement("div", {
|
|
9655
|
+
className: styles$w['action-list__empty-state']
|
|
9656
|
+
}, React__default.createElement(EmptyStateContainerStack, {
|
|
9657
|
+
title: (emptyState == null ? void 0 : emptyState.title) || translate('emptyStateTitle'),
|
|
9658
|
+
mediaUrl: emptyState == null ? void 0 : emptyState.image,
|
|
9659
|
+
mediaComponent: !(emptyState != null && emptyState.image) && React__default.createElement(MagnifyingGlassIllustration, null),
|
|
9660
|
+
actions: emptyState == null ? void 0 : emptyState.actions
|
|
9661
|
+
}, emptyState == null ? void 0 : emptyState.caption)));
|
|
9642
9662
|
};
|
|
9643
9663
|
|
|
9644
9664
|
var style = {"action-list-item":"_JnBey","action-list-item--disabled":"_DT13p","action-list-item--interactive":"_G-7Pi","action-list-item__actions":"_xuiNi"};
|
|
@@ -13694,13 +13714,19 @@ const CHIP_THEME = {
|
|
|
13694
13714
|
DANGER: 'danger'
|
|
13695
13715
|
};
|
|
13696
13716
|
|
|
13697
|
-
var styles$4 = {"chip":"_Cg5Nf","chip--marketing":"_b60R5","chip--success":"_ItVyo","chip--upsell":"_iUCAH","chip--warning":"_RbXoR","chip--info":"_NiP9z","chip--danger":"_2ltep"};
|
|
13717
|
+
var styles$4 = {"chip":"_Cg5Nf","chip__children":"_e3zFF","chip--marketing":"_b60R5","chip--success":"_ItVyo","chip--upsell":"_iUCAH","chip--warning":"_RbXoR","chip--info":"_NiP9z","chip--danger":"_2ltep"};
|
|
13698
13718
|
|
|
13699
13719
|
const Chip = ({
|
|
13700
13720
|
children,
|
|
13701
13721
|
theme: _theme = CHIP_THEME.MARKETING,
|
|
13702
13722
|
testId
|
|
13703
13723
|
}) => {
|
|
13724
|
+
const formattedChildren = React__default.Children.map(children, child => {
|
|
13725
|
+
if (React__default.isValidElement(child)) {
|
|
13726
|
+
return updateIconSize(child);
|
|
13727
|
+
}
|
|
13728
|
+
return child;
|
|
13729
|
+
});
|
|
13704
13730
|
return React__default.createElement("div", {
|
|
13705
13731
|
"data-testid": testId,
|
|
13706
13732
|
className: classnames(styles$4['chip'], {
|
|
@@ -13711,7 +13737,19 @@ const Chip = ({
|
|
|
13711
13737
|
[styles$4['chip--info']]: _theme === CHIP_THEME.INFO,
|
|
13712
13738
|
[styles$4['chip--danger']]: _theme === CHIP_THEME.DANGER
|
|
13713
13739
|
})
|
|
13714
|
-
},
|
|
13740
|
+
}, React__default.createElement("div", {
|
|
13741
|
+
className: styles$4['chip__children']
|
|
13742
|
+
}, formattedChildren));
|
|
13743
|
+
};
|
|
13744
|
+
const updateIconSize = child => {
|
|
13745
|
+
var _child$type$displayNa, _child$type;
|
|
13746
|
+
const isIcon = (_child$type$displayNa = (_child$type = child.type) == null || (_child$type = _child$type.displayName) == null ? void 0 : _child$type.startsWith('Icon')) != null ? _child$type$displayNa : false;
|
|
13747
|
+
if (!isIcon) {
|
|
13748
|
+
return child;
|
|
13749
|
+
}
|
|
13750
|
+
return React__default.cloneElement(child, _extends({}, child.props, {
|
|
13751
|
+
size: "small"
|
|
13752
|
+
}));
|
|
13715
13753
|
};
|
|
13716
13754
|
|
|
13717
13755
|
var styles$3 = {"pill":"_vOTWZ","pill--default":"_j2h8A","pill--success":"_lFih-","pill--danger":"_sLhtK","pill--warning":"_DKrCl","pill--info":"_8TTGV","pill--upsell":"_0-TG8"};
|