@commercetools-uikit/data-table 17.1.0 → 18.1.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.
|
@@ -52,8 +52,8 @@ var _someInstanceProperty__default = /*#__PURE__*/_interopDefault(_someInstanceP
|
|
|
52
52
|
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
53
53
|
|
|
54
54
|
const getPaddingStyle = props => {
|
|
55
|
-
if (props.isCondensed) return /*#__PURE__*/react.css("padding:", designSystem.designTokens.
|
|
56
|
-
return /*#__PURE__*/react.css("padding:", designSystem.designTokens.
|
|
55
|
+
if (props.isCondensed) return /*#__PURE__*/react.css("padding:", designSystem.designTokens.spacing20, " ", designSystem.designTokens.spacing40, ";" + ("" ), "" );
|
|
56
|
+
return /*#__PURE__*/react.css("padding:", designSystem.designTokens.spacing30, " ", designSystem.designTokens.spacing40, ";" + ("" ), "" );
|
|
57
57
|
};
|
|
58
58
|
var _ref8 = {
|
|
59
59
|
name: "9nkbgg",
|
|
@@ -140,7 +140,7 @@ var _ref2 = {
|
|
|
140
140
|
} ;
|
|
141
141
|
const BaseCell = /*#__PURE__*/_styled__default["default"]("td", {
|
|
142
142
|
target: "e10u1n7e2"
|
|
143
|
-
} )("position:relative;display:flex;background-color:", designSystem.designTokens.colorSurface, ";border-bottom:", props => props.shouldRenderBottomBorder ? "1px solid ".concat(designSystem.designTokens.colorNeutral95, ";") : 'none', ";font-size:", designSystem.designTokens.
|
|
143
|
+
} )("position:relative;display:flex;background-color:", designSystem.designTokens.colorSurface, ";border-bottom:", props => props.shouldRenderBottomBorder ? "1px solid ".concat(designSystem.designTokens.colorNeutral95, ";") : 'none', ";font-size:", designSystem.designTokens.fontSize20, ";", props => props.shouldClipContent ? _ref2 : '', " ", props => props.shouldIgnoreRowClick ? _ref$1 : '', ";" + ("" ));
|
|
144
144
|
/*#__PURE__*/_styled__default["default"]("td", {
|
|
145
145
|
target: "e10u1n7e1"
|
|
146
146
|
} )("position:", props => props.disableFooterStickiness ? 'relative' : 'sticky', ";left:0;bottom:0;grid-column:1/", props => props.numberOfColumns, ";background-color:", designSystem.designTokens.colorSurface, ";border-bottom:1px solid ", designSystem.designTokens.colorNeutral90, ";border-top:1px solid ", designSystem.designTokens.colorNeutral90, ";margin-top:-1px;" + ("" ));
|
|
@@ -186,13 +186,13 @@ const rotateCounterClockwise = react.keyframes(_templateObject3 || (_templateObj
|
|
|
186
186
|
const getSortableHeaderStyles = props => /*#__PURE__*/react.css("width:100%;display:flex;align-items:center;svg[data-icon-state='inactive'],svg[data-icon-state='active']{margin-left:", designSystem.designTokens.spacing10, ";flex-shrink:0;}svg[data-icon-state='inactive']{display:", props.isActive ? 'none' : 'inline-block', ";animation:", fadeIn, " 150ms ease-in-out;}svg[data-icon-state='active']{display:", props.isActive ? 'inline-block' : 'none', ";animation:", props.isActive && /*#__PURE__*/react.css(props.label === 'asc' ? rotateCounterClockwise : rotateClockwise, " 150ms ease-in-out;" + ("" ), "" ), ";}>svg *{fill:", designSystem.designTokens.colorNeutral60, "!important;}:hover,:focus{svg[data-icon-state='inactive']{display:none;}svg[data-icon-state='active']{display:inline-block;animation:", !props.isActive && /*#__PURE__*/react.css(fadeIn, " 150ms ease-in-out;" + ("" ), "" ), ";}}" + ("" ), "" );
|
|
187
187
|
const HeaderCellInner = /*#__PURE__*/_styled__default["default"]("div", {
|
|
188
188
|
target: "e1ipt8n24"
|
|
189
|
-
} )("box-sizing:border-box;display:flex;justify-content:flex-start;padding:0 ",
|
|
189
|
+
} )("box-sizing:border-box;display:flex;justify-content:flex-start;padding:0 ", designSystem.designTokens.spacing40, ";", getCellInnerStyles, " ", props => props.isSortable ? getSortableHeaderStyles(props) : '', ";", props => props.as === 'button' ? getButtonStyle() : '', ";", props => props.shouldWrap ? '' : 'white-space: nowrap', ";" + ("" ));
|
|
190
190
|
const BaseHeaderCell = /*#__PURE__*/_styled__default["default"]("th", {
|
|
191
191
|
target: "e1ipt8n23"
|
|
192
|
-
} )("color:", designSystem.designTokens.colorNeutral40, ";background-color:", designSystem.designTokens.colorNeutral98, ";position:", props => props.disableHeaderStickiness ? 'relative' : 'sticky', ";top:0;z-index:1;line-height:", designSystem.designTokens.
|
|
192
|
+
} )("color:", designSystem.designTokens.colorNeutral40, ";background-color:", designSystem.designTokens.colorNeutral98, ";position:", props => props.disableHeaderStickiness ? 'relative' : 'sticky', ";top:0;z-index:1;line-height:", designSystem.designTokens.lineHeight40, ";padding:0;font-weight:", designSystem.designTokens.fontWeight500, ";font-size:", designSystem.designTokens.fontSize10, ";:after{content:'';position:absolute;z-index:-1;width:100%;height:", designSystem.designTokens.borderWidth1, ";bottom:0;left:0;background-color:", designSystem.designTokens.colorNeutral95, ";}:hover,:active{z-index:2;}", HeaderCellInner, "{", props => props.shouldClipContent ? 'overflow: hidden;' : '', ";}" + ("" ));
|
|
193
193
|
const HeaderLabelWrapper = /*#__PURE__*/_styled__default["default"]("div", {
|
|
194
194
|
target: "e1ipt8n22"
|
|
195
|
-
} )("display:inline-flex;min-height:1.4em;margin:", designSystem.designTokens.
|
|
195
|
+
} )("display:inline-flex;min-height:1.4em;margin:", designSystem.designTokens.spacing20, " 0;flex:0 0 fit-content;" + ("" ));
|
|
196
196
|
const HeaderLabelTextWrapper = /*#__PURE__*/_styled__default["default"]("span", {
|
|
197
197
|
target: "e1ipt8n21"
|
|
198
198
|
} )({
|
|
@@ -208,7 +208,7 @@ var convertNumericDimensionToPixelValue$1 = convertNumericDimensionToPixelValue;
|
|
|
208
208
|
|
|
209
209
|
const getClickableRowStyle = props => {
|
|
210
210
|
if (props.isRowClickable) {
|
|
211
|
-
return /*#__PURE__*/react.css("cursor:pointer;&:hover td{background:", designSystem.designTokens.
|
|
211
|
+
return /*#__PURE__*/react.css("cursor:pointer;&:hover td{background:", designSystem.designTokens.colorNeutral98, ";}" + ("" ), "" );
|
|
212
212
|
}
|
|
213
213
|
return '';
|
|
214
214
|
};
|
|
@@ -224,7 +224,7 @@ const getDisabledSelfContainmentStyles = props => {
|
|
|
224
224
|
};
|
|
225
225
|
const TableContainer = /*#__PURE__*/_styled__default["default"]("div", {
|
|
226
226
|
target: "epk01s24"
|
|
227
|
-
} )("position:relative;z-index:0;box-shadow:", designSystem.designTokens.
|
|
227
|
+
} )("position:relative;z-index:0;box-shadow:", designSystem.designTokens.shadow17, ";border:1px solid ", designSystem.designTokens.colorNeutral95, ";border-radius:", designSystem.designTokens.borderRadius4, ";", props =>
|
|
228
228
|
// this is needed in order to have a sticky header
|
|
229
229
|
props.maxHeight ? "overflow-x: auto;" : '', " ", props => props.maxWidth && !props.disableSelfContainment ? "max-width: ".concat(convertNumericDimensionToPixelValue$1(props.maxWidth), ";") : '', " ", props => props.isBeingResized && "\n * {\n user-select: none;\n }", " ", getDisabledSelfContainmentStyles, ";" + ("" ));
|
|
230
230
|
const TableGrid = /*#__PURE__*/_styled__default["default"]("table", {
|
|
@@ -750,7 +750,7 @@ DataTable.displayName = 'DataTable';
|
|
|
750
750
|
var DataTable$1 = DataTable;
|
|
751
751
|
|
|
752
752
|
// NOTE: This string will be replaced on build time with the package version.
|
|
753
|
-
var version = "
|
|
753
|
+
var version = "18.1.0";
|
|
754
754
|
|
|
755
755
|
Object.defineProperty(exports, 'useRowSelection', {
|
|
756
756
|
enumerable: true,
|