@portnet/ui 0.1.34 → 0.1.37

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.
@@ -65,9 +65,10 @@ const PuiSearchPage = _ref2 => {
65
65
  onSubmit,
66
66
  children: _children,
67
67
  additionalActions,
68
- collapsibleSearchSection = false // Collapsible by default
68
+ collapsibleSearchSection = true // Collapsible by default
69
69
  } = _ref2;
70
- const [isSearchSectionExpanded, setSearchSectionExpanded] = (0, _react.useState)(true);
70
+ // Start with the section collapsed (not displayed on first render)
71
+ const [isSearchSectionExpanded, setSearchSectionExpanded] = (0, _react.useState)(false);
71
72
  const toggleSearchSection = () => {
72
73
  setSearchSectionExpanded(prev => !prev);
73
74
  };
@@ -87,11 +88,11 @@ const PuiSearchPage = _ref2 => {
87
88
  style: {
88
89
  display: "flex",
89
90
  alignItems: "center",
90
- cursor: "pointer" // Cursor changes to indicate clickability
91
+ cursor: collapsibleSearchSection ? "pointer" : "default" // Clickable only if collapsibleSearchSection is true
91
92
  },
92
- children: [isSearchSectionExpanded ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ExpandLess.default, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ExpandMore.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
93
+ children: [collapsibleSearchSection && (isSearchSectionExpanded ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ExpandLess.default, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ExpandMore.default, {})), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
93
94
  style: {
94
- marginLeft: "8px"
95
+ marginLeft: collapsibleSearchSection ? "8px" : "0px"
95
96
  },
96
97
  children: "Param\xE8tres de recherche"
97
98
  }), " "]
@@ -186,9 +187,25 @@ const PuiSearchPage = _ref2 => {
186
187
  children: _children
187
188
  })
188
189
  })
189
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_PuiTable.default, _objectSpread({
190
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_PuiTable.default, _objectSpread(_objectSpread({
190
191
  paginationMode: "server"
191
- }, tableProps))]
192
+ }, tableProps), {}, {
193
+ sx: {
194
+ '& .MuiDataGrid-columnHeaders': {
195
+ backgroundColor: '#f5f5f5',
196
+ // Light gray background
197
+ fontWeight: 'bold',
198
+ textAlign: 'center',
199
+ padding: '10px 15px'
200
+ },
201
+ '& .MuiDataGrid-cell': {
202
+ padding: '8px 12px' // Adds padding for cells
203
+ },
204
+ '& .numeric-cell': {
205
+ textAlign: 'right' // Aligns numeric values to the right
206
+ }
207
+ }
208
+ }))]
192
209
  });
193
210
  };
194
211
  PuiSearchPage.propTypes = {
@@ -217,6 +234,6 @@ PuiSearchPage.defaultProps = {
217
234
  formik: true,
218
235
  loading: false,
219
236
  additionalActions: [],
220
- collapsibleSearchSection: false // Collapsible by default
237
+ collapsibleSearchSection: true // Collapsible by default is true
221
238
  };
222
239
  var _default = exports.default = PuiSearchPage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@portnet/ui",
3
- "version": "0.1.34",
3
+ "version": "0.1.37",
4
4
  "description": "Portnet UI",
5
5
  "keywords": [
6
6
  "react",