@7shifts/sous-chef 3.40.3 → 3.41.1
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/FormSection/FormSection.d.ts +3 -1
- package/dist/index.css +6 -0
- package/dist/index.js +15 -10
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +15 -10
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,6 +5,8 @@ type Props = {
|
|
|
5
5
|
subtitle?: React.ReactNode;
|
|
6
6
|
noMargin?: boolean;
|
|
7
7
|
testId?: string;
|
|
8
|
+
/** When set `as="card"` it will render the form section in a card */
|
|
9
|
+
as?: 'card';
|
|
8
10
|
};
|
|
9
|
-
declare const FormSection: ({ children, title, subtitle, noMargin, testId }: Props) => React.JSX.Element;
|
|
11
|
+
declare const FormSection: ({ children, title, subtitle, noMargin, testId, as }: Props) => React.JSX.Element;
|
|
10
12
|
export default FormSection;
|
package/dist/index.css
CHANGED
|
@@ -806,6 +806,12 @@ Just for future references:
|
|
|
806
806
|
._iEk2C {
|
|
807
807
|
padding-left: 20px;
|
|
808
808
|
}
|
|
809
|
+
|
|
810
|
+
@media only screen and (max-width: 480px) {
|
|
811
|
+
.Toastify__toast-container--bottom-center {
|
|
812
|
+
padding: 1em;
|
|
813
|
+
}
|
|
814
|
+
}
|
|
809
815
|
._1vpCK {
|
|
810
816
|
text-align: left;
|
|
811
817
|
}
|
package/dist/index.js
CHANGED
|
@@ -8861,6 +8861,7 @@ var DataTable$1 = function DataTable(_ref) {
|
|
|
8861
8861
|
};
|
|
8862
8862
|
var state = getDataTableState(isLoading, content.length);
|
|
8863
8863
|
var skeletonRows = Array.from(Array(AMOUNT_OF_SKELETON_ROWS).keys());
|
|
8864
|
+
var isShowingContent = state === DATA_TABLE_STATES.CONTENT || state === DATA_TABLE_STATES.BACKGROUND_LOADING;
|
|
8864
8865
|
return React__default.createElement(Context.Provider, {
|
|
8865
8866
|
value: {
|
|
8866
8867
|
columns: columns,
|
|
@@ -8888,11 +8889,11 @@ var DataTable$1 = function DataTable(_ref) {
|
|
|
8888
8889
|
}, dataProps), columns && isShowingColumns && React__default.createElement(DataTableHeader, {
|
|
8889
8890
|
columns: columns,
|
|
8890
8891
|
onSort: onSort,
|
|
8891
|
-
showActionMenu: showActionMenu
|
|
8892
|
+
showActionMenu: isShowingContent && showActionMenu
|
|
8892
8893
|
}), React__default.createElement("tbody", {
|
|
8893
|
-
className: classnames(styles$b['data-table__body'], (_classNames3 = {}, _classNames3[styles$b['data-table__body--no-bottom-radius']] = isShowingFooter, _classNames3)),
|
|
8894
|
+
className: classnames(styles$b['data-table__body'], (_classNames3 = {}, _classNames3[styles$b['data-table__body--no-bottom-radius']] = isShowingFooter && isShowingContent, _classNames3)),
|
|
8894
8895
|
"data-testid": testId
|
|
8895
|
-
},
|
|
8896
|
+
}, isShowingContent && content.map(function (item, index) {
|
|
8896
8897
|
return React__default.createElement(RowItem, {
|
|
8897
8898
|
item: item,
|
|
8898
8899
|
columns: columns,
|
|
@@ -8907,7 +8908,7 @@ var DataTable$1 = function DataTable(_ref) {
|
|
|
8907
8908
|
return React__default.createElement(SkeletonRow, {
|
|
8908
8909
|
key: index
|
|
8909
8910
|
});
|
|
8910
|
-
}))), isShowingFooter &&
|
|
8911
|
+
}))), isShowingFooter && isShowingContent && React__default.createElement("tfoot", {
|
|
8911
8912
|
className: styles$b['data-table__footer'],
|
|
8912
8913
|
"data-testid": testId && testId + "-footer"
|
|
8913
8914
|
}, footerComponent)))), !isShowingFooter && isScrollableTable && React__default.createElement(DataTableScrollFakeBorder, {
|
|
@@ -9641,17 +9642,21 @@ var FormSection = function FormSection(_ref) {
|
|
|
9641
9642
|
subtitle = _ref.subtitle,
|
|
9642
9643
|
_ref$noMargin = _ref.noMargin,
|
|
9643
9644
|
noMargin = _ref$noMargin === void 0 ? false : _ref$noMargin,
|
|
9644
|
-
testId = _ref.testId
|
|
9645
|
-
|
|
9646
|
-
|
|
9647
|
-
"data-testid": testId
|
|
9648
|
-
}, React__default.createElement(Stack, null, React__default.createElement(Stack, {
|
|
9645
|
+
testId = _ref.testId,
|
|
9646
|
+
as = _ref.as;
|
|
9647
|
+
var content = React__default.createElement(Stack, null, React__default.createElement(Stack, {
|
|
9649
9648
|
space: 8
|
|
9650
9649
|
}, title && React__default.createElement("h2", {
|
|
9651
9650
|
className: classnames(styles$W['form-section__title'])
|
|
9652
9651
|
}, title), subtitle && React__default.createElement("h3", {
|
|
9653
9652
|
className: classnames(styles$W['form-section__subtitle'])
|
|
9654
|
-
}, subtitle)), children)
|
|
9653
|
+
}, subtitle)), children);
|
|
9654
|
+
return React__default.createElement("div", {
|
|
9655
|
+
className: classnames(styles$W['form-section'], (_classnames = {}, _classnames[styles$W['form-section--no-margin']] = noMargin || as === 'card', _classnames)),
|
|
9656
|
+
"data-testid": testId
|
|
9657
|
+
}, as === 'card' ? React__default.createElement(Card$1, {
|
|
9658
|
+
testId: testId && testId + "-card"
|
|
9659
|
+
}, content) : content);
|
|
9655
9660
|
};
|
|
9656
9661
|
|
|
9657
9662
|
var updateButtonProps$1 = function updateButtonProps(child, newProps) {
|