@geotab/zenith 3.14.0-beta.1 → 3.14.0-beta.3

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.
@@ -252,8 +252,10 @@ const TableInner = ({
252
252
  const handleOnTriggerClick = (0, react_1.useCallback)(() => setSelectMode(prev => !prev), []);
253
253
  const hasPostActions = (0, react_1.useMemo)(() => columnsPopup || isMobile && selectable || !isMobile && fullscreenButton || isFeedVisible, [columnsPopup, fullscreenButton, isFeedVisible, isMobile, selectable]);
254
254
  const hasToolbar = (0, react_1.useMemo)(() => bulkActions || feedSortControl || pagination && !isMobile || other.length || columnsPopup || !isMobile && fullscreenButton || isFeedVisible, [bulkActions, columnsPopup, feedSortControl, fullscreenButton, isFeedVisible, isMobile, other.length, pagination]);
255
- const gridAutoHeight = (0, react_1.useMemo)(() => contentHeight !== undefined ? `${contentHeight}px` : undefined, [contentHeight]);
256
- const gridHeight = (0, react_1.useMemo)(() => height || gridAutoHeight, [gridAutoHeight, height]);
255
+ const gridAutoHeight = (0, react_1.useMemo)(() => contentHeight ? `${contentHeight}px` : undefined, [contentHeight]);
256
+ const minHeight = "400px";
257
+ const gridHeight = (0, react_1.useMemo)(() => height || gridAutoHeight || minHeight, [gridAutoHeight, height]);
258
+ // TODO: disadvantages?
257
259
  const {
258
260
  gridClasses,
259
261
  restClasses
@@ -261,10 +263,10 @@ const TableInner = ({
261
263
  return (0, jsx_runtime_1.jsx)(layoutFullScreen_1.LayoutFullScreen, {
262
264
  className: (0, classNames_1.classNames)([...gridClasses]),
263
265
  children: (0, jsx_runtime_1.jsxs)("div", {
264
- style: gridHeight ? {
266
+ style: {
265
267
  height: gridHeight
266
- } : undefined,
267
- className: (0, classNames_1.classNames)(["zen-table-wrapper", gridHeight ? "" : "zen-table-wrapper--fit-content", hasToolbar ? "zen-table-wrapper--with-toolbar" : "", ...restClasses]),
268
+ },
269
+ className: (0, classNames_1.classNames)(["zen-table-wrapper", hasToolbar ? "zen-table-wrapper--with-toolbar" : "", ...restClasses]),
268
270
  children: [hasToolbar ? (0, jsx_runtime_1.jsxs)(entitiesListActions_1.EntitiesListActions, {
269
271
  gridType: isMobile ? deviceType_1.DeviceType.Mobile : deviceType_1.DeviceType.Desktop,
270
272
  children: [(0, jsx_runtime_1.jsxs)(entitiesListActions_1.EntitiesListActions.Actions, {
@@ -202,8 +202,10 @@ const TableInner = ({
202
202
  const handleOnTriggerClick = useCallback(() => setSelectMode(prev => !prev), []);
203
203
  const hasPostActions = useMemo(() => columnsPopup || isMobile && selectable || !isMobile && fullscreenButton || isFeedVisible, [columnsPopup, fullscreenButton, isFeedVisible, isMobile, selectable]);
204
204
  const hasToolbar = useMemo(() => bulkActions || feedSortControl || pagination && !isMobile || other.length || columnsPopup || !isMobile && fullscreenButton || isFeedVisible, [bulkActions, columnsPopup, feedSortControl, fullscreenButton, isFeedVisible, isMobile, other.length, pagination]);
205
- const gridAutoHeight = useMemo(() => contentHeight !== undefined ? `${contentHeight}px` : undefined, [contentHeight]);
206
- const gridHeight = useMemo(() => height || gridAutoHeight, [gridAutoHeight, height]);
205
+ const gridAutoHeight = useMemo(() => contentHeight ? `${contentHeight}px` : undefined, [contentHeight]);
206
+ const minHeight = "400px";
207
+ const gridHeight = useMemo(() => height || gridAutoHeight || minHeight, [gridAutoHeight, height]);
208
+ // TODO: disadvantages?
207
209
  const {
208
210
  gridClasses,
209
211
  restClasses
@@ -211,10 +213,10 @@ const TableInner = ({
211
213
  return _jsx(LayoutFullScreen, {
212
214
  className: classNames([...gridClasses]),
213
215
  children: _jsxs("div", {
214
- style: gridHeight ? {
216
+ style: {
215
217
  height: gridHeight
216
- } : undefined,
217
- className: classNames(["zen-table-wrapper", gridHeight ? "" : "zen-table-wrapper--fit-content", hasToolbar ? "zen-table-wrapper--with-toolbar" : "", ...restClasses]),
218
+ },
219
+ className: classNames(["zen-table-wrapper", hasToolbar ? "zen-table-wrapper--with-toolbar" : "", ...restClasses]),
218
220
  children: [hasToolbar ? _jsxs(EntitiesListActions, {
219
221
  gridType: isMobile ? DeviceType.Mobile : DeviceType.Desktop,
220
222
  children: [_jsxs(EntitiesListActions.Actions, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geotab/zenith",
3
- "version": "3.14.0-beta.1",
3
+ "version": "3.14.0-beta.3",
4
4
  "description": "Zenith components library on React",
5
5
  "main": "dist/index.js",
6
6
  "types": "esm/index.d.ts",
@@ -28,8 +28,6 @@
28
28
  "inject-translations": "node build-utils/translations/inject-translations.js",
29
29
  "lint": "npx eslint",
30
30
  "lint-fix": "npm run lint -- --fix",
31
- "lint:less": "stylelint '**/*.less'",
32
- "lint:less:fix": "npm run lint:less -- --fix",
33
31
  "new": "node newComponent.mjs",
34
32
  "prettier": "npx prettier . --config '.prettierrc' --ignore-path '.prettierignore'",
35
33
  "prettier-check": "npm run prettier -- --check",
@@ -85,16 +83,9 @@
85
83
  "less": "^4.1.3",
86
84
  "less-loader": "^12.2.0",
87
85
  "mini-css-extract-plugin": "^2.9.2",
88
- "postcss-less": "^6.0.0",
89
- "postcss-loader": "^8.2.1",
90
- "postcss-rtlcss": "^6.0.0",
91
86
  "prettier": "^3.8.1",
92
87
  "storybook": "^10.4.6",
93
88
  "style-loader": "^4.0.0",
94
- "stylelint": "^17.12.0",
95
- "stylelint-config-standard": "^40.0.0",
96
- "stylelint-less": "^4.2.1",
97
- "stylelint-selector-bem-pattern": "^5.0.0",
98
89
  "typescript": "^5.4.3",
99
90
  "typescript-eslint": "^8.20.0",
100
91
  "webpack": "^5.96.1",