@alaarab/ogrid-core 1.7.1 → 1.7.2

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.
@@ -11,17 +11,23 @@ const borderedContainerStyle = {
11
11
  minHeight: 0,
12
12
  background: 'var(--ogrid-bg, #fff)',
13
13
  };
14
- const toolbarStripStyle = {
14
+ const toolbarStripBase = {
15
15
  display: 'flex',
16
16
  justifyContent: 'space-between',
17
17
  alignItems: 'center',
18
18
  padding: '6px 12px',
19
- borderBottom: '1px solid var(--ogrid-border, #e0e0e0)',
20
19
  background: 'var(--ogrid-header-bg, #f5f5f5)',
21
20
  gap: 8,
22
21
  flexWrap: 'wrap',
23
22
  minHeight: 0,
24
23
  };
24
+ /** Toolbar strip with border-bottom (when it's the only toolbar row). */
25
+ const toolbarStripStyle = {
26
+ ...toolbarStripBase,
27
+ borderBottom: '1px solid var(--ogrid-border, #e0e0e0)',
28
+ };
29
+ /** Toolbar strip without border-bottom (when toolbarBelow follows — it owns the border). */
30
+ const toolbarStripNoBorderStyle = toolbarStripBase;
25
31
  const toolbarSectionStyle = {
26
32
  display: 'flex',
27
33
  alignItems: 'center',
@@ -79,5 +85,5 @@ export function OGridLayout(props) {
79
85
  flexDirection: 'column',
80
86
  height: '100%',
81
87
  };
82
- return (_jsx(Container, { className: className, style: rootStyle, ...containerProps, children: _jsxs("div", { style: borderedContainerStyle, children: [hasToolbar && (_jsxs("div", { style: toolbarStripStyle, children: [_jsx("div", { style: toolbarSectionStyle, children: toolbar }), _jsx("div", { style: toolbarSectionStyle, children: toolbarEnd })] })), toolbarBelow && (_jsx("div", { style: toolbarBelowStyle, children: toolbarBelow })), hasSideBar ? (_jsxs("div", { style: gridAreaFlexStyle, children: [sideBarPosition === 'left' && _jsx(SideBar, { ...sideBar }), _jsx("div", { style: gridChildStyle, children: children }), sideBarPosition !== 'left' && _jsx(SideBar, { ...sideBar })] })) : (_jsx("div", { style: gridAreaSoloStyle, children: children })), pagination && (_jsx("div", { style: footerStripStyle, children: pagination }))] }) }));
88
+ return (_jsx(Container, { className: className, style: rootStyle, ...containerProps, children: _jsxs("div", { style: borderedContainerStyle, children: [hasToolbar && (_jsxs("div", { style: toolbarBelow ? toolbarStripNoBorderStyle : toolbarStripStyle, children: [_jsx("div", { style: toolbarSectionStyle, children: toolbar }), _jsx("div", { style: toolbarSectionStyle, children: toolbarEnd })] })), toolbarBelow && (_jsx("div", { style: toolbarBelowStyle, children: toolbarBelow })), hasSideBar ? (_jsxs("div", { style: gridAreaFlexStyle, children: [sideBarPosition === 'left' && _jsx(SideBar, { ...sideBar }), _jsx("div", { style: gridChildStyle, children: children }), sideBarPosition !== 'left' && _jsx(SideBar, { ...sideBar })] })) : (_jsx("div", { style: gridAreaSoloStyle, children: children })), pagination && (_jsx("div", { style: footerStripStyle, children: pagination }))] }) }));
83
89
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alaarab/ogrid-core",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
4
4
  "description": "OGrid core – framework-agnostic types, hooks, and utilities for OGrid data tables.",
5
5
  "main": "dist/esm/index.js",
6
6
  "module": "dist/esm/index.js",