@wso2/oxygen-ui 0.8.1 → 0.8.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.
@@ -43,5 +43,5 @@ export interface ListingTableDataGridProps extends Omit<DataGridProps, 'density'
43
43
  * </ListingTable.Provider>
44
44
  * ```
45
45
  */
46
- export declare function ListingTableDataGrid({ density: densityProp, loading: loadingProp, getRowSpacing: getRowSpacingProp, filterModel: filterModelProp, sx, ...props }: ListingTableDataGridProps): ReactElement;
46
+ export declare function ListingTableDataGrid({ density: densityProp, loading: loadingProp, getRowSpacing: getRowSpacingProp, getRowHeight: getRowHeightProp, filterModel: filterModelProp, sx, ...props }: ListingTableDataGridProps): ReactElement;
47
47
  export default ListingTableDataGrid;
package/dist/index.js CHANGED
@@ -130,7 +130,7 @@ var __objRest = (source, exclude) => {
130
130
  // package.json
131
131
  var package_default = {
132
132
  name: "@wso2/oxygen-ui",
133
- version: "0.8.1",
133
+ version: "0.8.2",
134
134
  description: "WSO2 Oxygen UI | Design System - Powered with Material-UI component library with TypeScript support",
135
135
  type: "module",
136
136
  main: "./dist/index.js",
@@ -2423,14 +2423,7 @@ var PageContentInner = styled7(Box3, {
2423
2423
  slot: "Inner",
2424
2424
  shouldForwardProp: (prop) => prop !== "maxWidth" && prop !== "centered" && prop !== "fullWidth" && prop !== "noPadding"
2425
2425
  })(({ theme, maxWidth = "1400px", centered = true, fullWidth = false, noPadding = false }) => __spreadValues(__spreadValues(__spreadValues({
2426
- // Use fit-content so the inner container expands to accommodate children that have a
2427
- // min-width (e.g. responsive data tables). minWidth: 100% ensures it still fills the
2428
- // parent when the content is narrower, preserving the normal full-width layout.
2429
- // Together these mean: width = max(100% of scroll-parent, intrinsic min-content).
2430
- // When content exceeds the viewport, PageContentRoot (overflow:auto) shows a horizontal
2431
- // scrollbar for the entire content area rather than only the inner table element.
2432
- width: "fit-content",
2433
- minWidth: "100%"
2426
+ width: "100%"
2434
2427
  }, !fullWidth && { maxWidth }), centered && { marginLeft: "auto", marginRight: "auto" }), !noPadding && { padding: theme.spacing(8) }));
2435
2428
  var PageContent = (_a) => {
2436
2429
  var _b = _a, {
@@ -3240,11 +3233,10 @@ var HeaderToolbar = styled21(Toolbar, {
3240
3233
  slot: "Toolbar"
3241
3234
  })(({ theme }) => ({
3242
3235
  gap: theme.spacing(1),
3243
- minHeight: 56,
3244
- paddingLeft: theme.spacing(1),
3245
- paddingRight: theme.spacing(1),
3236
+ minHeight: 64,
3237
+ paddingLeft: theme.spacing(2),
3238
+ paddingRight: theme.spacing(2),
3246
3239
  [theme.breakpoints.up("sm")]: {
3247
- minHeight: 64,
3248
3240
  paddingLeft: theme.spacing(2),
3249
3241
  paddingRight: theme.spacing(2)
3250
3242
  }
@@ -5682,6 +5674,7 @@ var useAppShell = (options) => {
5682
5674
  sidebarCollapsedWidth = 64
5683
5675
  } = options || {};
5684
5676
  const isMobile = useMediaQuery2((theme) => theme.breakpoints.down("md"));
5677
+ const isCreateMode = options !== void 0;
5685
5678
  const [state, setState] = React30.useState({
5686
5679
  sidebarCollapsed: initialCollapsed,
5687
5680
  notificationPanelOpen: false,
@@ -5691,10 +5684,10 @@ var useAppShell = (options) => {
5691
5684
  sidebarCollapsedWidth
5692
5685
  });
5693
5686
  React30.useEffect(() => {
5694
- if (options && collapseOnMobile && isMobile) {
5687
+ if (isCreateMode && collapseOnMobile && isMobile) {
5695
5688
  setState((prev) => __spreadProps(__spreadValues({}, prev), { sidebarCollapsed: true }));
5696
5689
  }
5697
- }, [options, collapseOnMobile, isMobile]);
5690
+ }, [isCreateMode, collapseOnMobile, isMobile]);
5698
5691
  const toggleSidebar = React30.useCallback(() => {
5699
5692
  setState((prev) => __spreadProps(__spreadValues({}, prev), { sidebarCollapsed: !prev.sidebarCollapsed }));
5700
5693
  }, []);
@@ -6079,12 +6072,14 @@ function ListingTableDataGrid(_a) {
6079
6072
  density: densityProp,
6080
6073
  loading: loadingProp,
6081
6074
  getRowSpacing: getRowSpacingProp,
6075
+ getRowHeight: getRowHeightProp,
6082
6076
  filterModel: filterModelProp,
6083
6077
  sx
6084
6078
  } = _b, props = __objRest(_b, [
6085
6079
  "density",
6086
6080
  "loading",
6087
6081
  "getRowSpacing",
6082
+ "getRowHeight",
6088
6083
  "filterModel",
6089
6084
  "sx"
6090
6085
  ]);
@@ -6182,6 +6177,7 @@ function ListingTableDataGrid(_a) {
6182
6177
  loading,
6183
6178
  filterModel,
6184
6179
  getRowSpacing: variant === "card" ? getRowSpacingProp != null ? getRowSpacingProp : defaultCardRowSpacing : getRowSpacingProp,
6180
+ getRowHeight: variant === "card" ? getRowHeightProp != null ? getRowHeightProp : (() => "auto") : getRowHeightProp,
6185
6181
  sx: mergedSx
6186
6182
  }, props)
6187
6183
  );