@7shifts/sous-chef 3.43.3-beta.0 → 3.43.3-beta.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/hooks/useBackgroundColor.d.ts +1 -0
- package/dist/index.css +5 -23
- package/dist/index.d.ts +0 -1
- package/dist/index.js +33 -9
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +33 -9
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useBackgroundColor: () => string;
|
package/dist/index.css
CHANGED
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
@font-face {
|
|
2
|
-
font-family: "Proxima Nova";
|
|
3
|
-
src: url("https://app.7shifts.com/fonts/proximaNova-semibold.eot");
|
|
4
|
-
src: url("https://app.7shifts.com/fonts/proximaNova-semibold.eot?#iefix") format("embedded-opentype"), url("https://app.7shifts.com/fonts/proximaNova-semibold.woff") format("woff"), url("https://app.7shifts.com/fonts/proximaNova-semibold.ttf") format("truetype"), url("https://app.7shifts.com/fonts/proximaNova-semibold.svg#ProximaNova-Semibold") format("svg");
|
|
5
|
-
font-weight: 600;
|
|
6
|
-
font-style: normal;
|
|
7
|
-
}
|
|
8
|
-
@font-face {
|
|
9
|
-
font-family: "Proxima Nova";
|
|
10
|
-
src: url("https://app.7shifts.com/fonts/ProximaNova-Regular.eot");
|
|
11
|
-
src: url("https://app.7shifts.com/fonts/ProximaNova-Regular.eot?#iefix") format("embedded-opentype"), url("https://app.7shifts.com/fonts/ProximaNova-Regular.woff") format("woff"), url("https://app.7shifts.com/fonts/ProximaNova-Regular.ttf") format("truetype"), url("https://app.7shifts.com/fonts/ProximaNova-Regular.svg#proxima_nova_rgregular") format("svg");
|
|
12
|
-
font-weight: normal;
|
|
13
|
-
font-style: normal;
|
|
14
|
-
}
|
|
15
1
|
:root {
|
|
16
2
|
--font-family-brand: "Proxima Nova", sans-serif;
|
|
17
3
|
--font-family-body: "Proxima Nova", sans-serif;
|
|
@@ -143,12 +129,6 @@
|
|
|
143
129
|
--z-index-tooltip: 300;
|
|
144
130
|
--z-index-portal: 9999;
|
|
145
131
|
}
|
|
146
|
-
body {
|
|
147
|
-
font-family: var(--font-family-brand);
|
|
148
|
-
font-size: var(--font-size-200);
|
|
149
|
-
line-height: var(--font-line-height-200);
|
|
150
|
-
font-weight: var(--p-font-weight-normal);
|
|
151
|
-
}
|
|
152
132
|
._OINV1 {
|
|
153
133
|
display: flex;
|
|
154
134
|
}
|
|
@@ -1018,7 +998,7 @@ Just for future references:
|
|
|
1018
998
|
pointer-events: none;
|
|
1019
999
|
}
|
|
1020
1000
|
._1oK6H {
|
|
1021
|
-
top:
|
|
1001
|
+
top: 24px;
|
|
1022
1002
|
border-bottom: 0;
|
|
1023
1003
|
border-top-right-radius: 8px;
|
|
1024
1004
|
border-top-left-radius: 8px;
|
|
@@ -2344,7 +2324,8 @@ input:disabled + ._2W10t::after {
|
|
|
2344
2324
|
._24Yjb table thead tr th:first-of-type {
|
|
2345
2325
|
position: sticky;
|
|
2346
2326
|
left: 0;
|
|
2347
|
-
|
|
2327
|
+
-webkit-backdrop-filter: blur(100px);
|
|
2328
|
+
backdrop-filter: blur(100px);
|
|
2348
2329
|
}
|
|
2349
2330
|
._24Yjb table tbody tr td:first-of-type {
|
|
2350
2331
|
position: sticky;
|
|
@@ -2388,7 +2369,8 @@ input:disabled + ._2W10t::after {
|
|
|
2388
2369
|
._2pehG table thead tr th:last-of-type {
|
|
2389
2370
|
position: sticky;
|
|
2390
2371
|
right: 0;
|
|
2391
|
-
|
|
2372
|
+
-webkit-backdrop-filter: blur(100px);
|
|
2373
|
+
backdrop-filter: blur(100px);
|
|
2392
2374
|
}
|
|
2393
2375
|
._2pehG table tbody tr td:last-of-type {
|
|
2394
2376
|
position: sticky;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import './foundation/tokens/typography/_typography-tokens.scss';
|
|
2
2
|
import './foundation/tokens/color/_color-tokens.scss';
|
|
3
3
|
import './foundation/tokens/zindex/_z-index-tokens.scss';
|
|
4
|
-
import './foundation/_initital-setup.scss';
|
|
5
4
|
export * from './foundation/tokens/color/color-constants';
|
|
6
5
|
export * from './foundation/tokens/zindex/z-index-constants';
|
|
7
6
|
export * from './core';
|
package/dist/index.js
CHANGED
|
@@ -5981,10 +5981,34 @@ var HeaderSortIcon = function HeaderSortIcon(_ref) {
|
|
|
5981
5981
|
})));
|
|
5982
5982
|
};
|
|
5983
5983
|
|
|
5984
|
+
var ModalContext = React.createContext({
|
|
5985
|
+
isModalMounted: false
|
|
5986
|
+
});
|
|
5987
|
+
var useModalContext = function useModalContext() {
|
|
5988
|
+
var context = React.useContext(ModalContext);
|
|
5989
|
+
return context || {};
|
|
5990
|
+
};
|
|
5991
|
+
|
|
5992
|
+
var useBackgroundColor = function useBackgroundColor() {
|
|
5993
|
+
var _useModalContext = useModalContext(),
|
|
5994
|
+
isInsideModal = _useModalContext.isModalMounted;
|
|
5995
|
+
var _useState = React.useState(COLORS.white),
|
|
5996
|
+
backgroundColor = _useState[0],
|
|
5997
|
+
setBackgroundColor = _useState[1];
|
|
5998
|
+
React.useLayoutEffect(function () {
|
|
5999
|
+
if (!isInsideModal) {
|
|
6000
|
+
var bodyStyles = window.getComputedStyle(document.body);
|
|
6001
|
+
setBackgroundColor(bodyStyles.getPropertyValue('background-color'));
|
|
6002
|
+
}
|
|
6003
|
+
}, [isInsideModal]);
|
|
6004
|
+
return backgroundColor;
|
|
6005
|
+
};
|
|
6006
|
+
|
|
5984
6007
|
var DataTableHeader = function DataTableHeader(_ref) {
|
|
5985
6008
|
var columns = _ref.columns,
|
|
5986
6009
|
onSort = _ref.onSort,
|
|
5987
6010
|
showActionMenu = _ref.showActionMenu;
|
|
6011
|
+
var backgroundColor = useBackgroundColor();
|
|
5988
6012
|
var haveLabels = columns.find(function (column) {
|
|
5989
6013
|
return column.label && column.label !== '';
|
|
5990
6014
|
});
|
|
@@ -6006,7 +6030,11 @@ var DataTableHeader = function DataTableHeader(_ref) {
|
|
|
6006
6030
|
return React__default.createElement(React.Fragment, null, React__default.createElement(ColumnSizes, {
|
|
6007
6031
|
columns: columns,
|
|
6008
6032
|
showActionMenu: showActionMenu
|
|
6009
|
-
}), React__default.createElement("thead",
|
|
6033
|
+
}), React__default.createElement("thead", {
|
|
6034
|
+
style: {
|
|
6035
|
+
backgroundColor: backgroundColor
|
|
6036
|
+
}
|
|
6037
|
+
}, React__default.createElement("tr", {
|
|
6010
6038
|
className: styles$a['data-table-header']
|
|
6011
6039
|
}, columns.filter(function (column) {
|
|
6012
6040
|
return !column.hidden;
|
|
@@ -7692,14 +7720,6 @@ var ModalHeader = function ModalHeader(_ref) {
|
|
|
7692
7720
|
}, subHeader));
|
|
7693
7721
|
};
|
|
7694
7722
|
|
|
7695
|
-
var ModalContext = React.createContext({
|
|
7696
|
-
isModalMounted: false
|
|
7697
|
-
});
|
|
7698
|
-
var useModalContext = function useModalContext() {
|
|
7699
|
-
var context = React.useContext(ModalContext);
|
|
7700
|
-
return context || {};
|
|
7701
|
-
};
|
|
7702
|
-
|
|
7703
7723
|
var _excluded$2y = ["children", "header", "subHeader", "onClose", "loading", "zIndex", "rootElementId", "width", "height", "maxWidth", "shouldReturnFocusAfterClose", "testId"];
|
|
7704
7724
|
var Modal = function Modal(_ref) {
|
|
7705
7725
|
var children = _ref.children,
|
|
@@ -8633,6 +8653,7 @@ var DataTableStickyColumnsContainer = function DataTableStickyColumnsContainer(_
|
|
|
8633
8653
|
stickyColumns = _ref.stickyColumns,
|
|
8634
8654
|
isShowingColumns = _ref.isShowingColumns,
|
|
8635
8655
|
isShowingFooter = _ref.isShowingFooter;
|
|
8656
|
+
var backgroundColor = useBackgroundColor();
|
|
8636
8657
|
var _useDataTableScrollSt = useDataTableScrollState(stickyColumns),
|
|
8637
8658
|
scrollContainerRef = _useDataTableScrollSt.scrollContainerRef,
|
|
8638
8659
|
onScroll = _useDataTableScrollSt.onScroll,
|
|
@@ -8657,6 +8678,9 @@ var DataTableStickyColumnsContainer = function DataTableStickyColumnsContainer(_
|
|
|
8657
8678
|
isShowingColumns: !!isShowingColumns
|
|
8658
8679
|
}), React__default.createElement("div", {
|
|
8659
8680
|
className: classnames(styles$K[containerClassName], (_classNames = {}, _classNames[styles$K[containerClassName + "--with-footer"]] = isShowingFooter, _classNames[styles$K[containerClassName + "--with-left-sticky-columns"]] = hasLeftColumnSticky, _classNames[styles$K[containerClassName + "--with-left-sticky-columns-and-shadow"]] = hasLeftColumnSticky && hasScrollOnLeft, _classNames[styles$K[containerClassName + "--with-right-sticky-columns"]] = hasRightColumnSticky, _classNames[styles$K[containerClassName + "--with-right-sticky-columns-and-shadow"]] = hasRightColumnSticky && hasScrollOnRight, _classNames[styles$K[containerClassName + "--no-shadow"]] = noShadow, _classNames)),
|
|
8681
|
+
style: {
|
|
8682
|
+
backgroundColor: backgroundColor
|
|
8683
|
+
},
|
|
8660
8684
|
onScroll: onScroll,
|
|
8661
8685
|
ref: scrollContainerRef,
|
|
8662
8686
|
"data-testid": "sticky-columns-container"
|