@abdellatifui/react 3.2.88 → 3.2.90

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.
package/dist/nextgen.d.ts CHANGED
@@ -922,7 +922,8 @@ declare interface PanelProps_2 {
922
922
  bodyClassName?: string;
923
923
  headerClassName?: string;
924
924
  defaultClose: string;
925
- maximizeButton: boolean;
925
+ maximizeButton?: boolean;
926
+ defaultMaximized?: boolean;
926
927
  ref: MutableRefObject<any>;
927
928
  }
928
929
 
@@ -1130,7 +1131,7 @@ export declare interface SubHeaderProps extends HeadlineProps {
1130
1131
  description?: string;
1131
1132
  }
1132
1133
 
1133
- export declare const SwapIconButton: default_2.ForwardRefExoticComponent<default_2.RefAttributes<unknown>>;
1134
+ export declare const SwapIconButton: (props: SwapIconButtonProps) => JSX.Element;
1134
1135
 
1135
1136
  export declare interface SwapIconButtonProps extends ButtonProps {
1136
1137
  icon1: default_2.ReactNode;
package/dist/nextgen.js CHANGED
@@ -19769,7 +19769,7 @@ const Tooltip = ({
19769
19769
  alignOffset: xOffset,
19770
19770
  sideOffset: yOffset,
19771
19771
  className: cn(
19772
- "p-2 border shadow rounded-xs font-aptos text-sm",
19772
+ "p-2 border shadow rounded-xs font-aptos text-sm z-501",
19773
19773
  variant == "primary" && "bg-white text-gray-700 ",
19774
19774
  variant == "secondary" && "bg-accent border-2 text-accent-foreground",
19775
19775
  variant == "outline" && "bg-white text-gray-700 border-2 border-gray-300 shadow-none",
@@ -24406,13 +24406,20 @@ const PanelHeader = (props) => {
24406
24406
  iconsOrder,
24407
24407
  tooltipOrder,
24408
24408
  maximizeButton,
24409
+ defaultMaximized,
24409
24410
  ref
24410
24411
  } = props;
24412
+ const buttonRef = useRef();
24411
24413
  const { closeModel } = useContext(ModelContext);
24412
24414
  const [maxIconOrader, setMaxIconOrder] = useState([
24413
24415
  /* @__PURE__ */ jsxRuntimeExports.jsx(Maximize2, {}),
24414
24416
  /* @__PURE__ */ jsxRuntimeExports.jsx(Minimize2, {})
24415
24417
  ]);
24418
+ useEffect(() => {
24419
+ if (defaultMaximized) {
24420
+ buttonRef?.current?.click?.();
24421
+ }
24422
+ }, [defaultMaximized]);
24416
24423
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative flex space-x-2", children: [
24417
24424
  moreInfo && /* @__PURE__ */ jsxRuntimeExports.jsx(
24418
24425
  IconButton2,
@@ -24425,6 +24432,7 @@ const PanelHeader = (props) => {
24425
24432
  maximizeButton && /* @__PURE__ */ jsxRuntimeExports.jsx(
24426
24433
  SwapIconButton,
24427
24434
  {
24435
+ ref: buttonRef,
24428
24436
  icon1: maxIconOrader[0],
24429
24437
  icon2: maxIconOrader[1],
24430
24438
  tooltip1: "Maximize",
@@ -24475,6 +24483,7 @@ const Panel = (props) => {
24475
24483
  maximizeButton,
24476
24484
  description,
24477
24485
  style: style2,
24486
+ defaultMaximized,
24478
24487
  ref = useRef()
24479
24488
  } = props;
24480
24489
  const [iconsOrder, setIconOrder] = useState([
@@ -24527,7 +24536,8 @@ const Panel = (props) => {
24527
24536
  close: closeButton,
24528
24537
  iconsOrder,
24529
24538
  tooltipOrder,
24530
- maximizeButton
24539
+ maximizeButton,
24540
+ defaultMaximized
24531
24541
  }
24532
24542
  )
24533
24543
  ]
@@ -24543,7 +24553,7 @@ const Panel = (props) => {
24543
24553
  }
24544
24554
  );
24545
24555
  };
24546
- const SwapIconButton = forwardRef((props, ref) => {
24556
+ const SwapIconButton = (props) => {
24547
24557
  const [icon, setIcon] = useState([]);
24548
24558
  const [state, setState] = useState("");
24549
24559
  const [stateIndex, setStateIndex] = useState(1);
@@ -24553,19 +24563,21 @@ const SwapIconButton = forwardRef((props, ref) => {
24553
24563
  tooltip1,
24554
24564
  tooltip2,
24555
24565
  onClick,
24566
+ ref,
24556
24567
  ripple = true
24557
24568
  } = props;
24558
24569
  useEffect(() => {
24559
24570
  setIcon(icon1);
24560
24571
  setState(tooltip1);
24561
24572
  }, []);
24562
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
24573
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
24563
24574
  IconButton2,
24564
24575
  {
24565
24576
  ...props,
24566
24577
  icon,
24567
24578
  ripple,
24568
24579
  tooltip: state,
24580
+ ref,
24569
24581
  onClick: () => {
24570
24582
  setIcon((prev) => {
24571
24583
  return stateIndex == 1 ? icon2 : icon1;
@@ -24578,8 +24590,8 @@ const SwapIconButton = forwardRef((props, ref) => {
24578
24590
  }
24579
24591
  }
24580
24592
  }
24581
- ) });
24582
- });
24593
+ );
24594
+ };
24583
24595
  const AppContext = createContext({});
24584
24596
  const DialogPanel = (props) => {
24585
24597
  const {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@abdellatifui/react",
3
3
  "private": false,
4
- "version": "3.2.88",
4
+ "version": "3.2.90",
5
5
  "type": "module",
6
6
  "types": "dist/nextgen.d.ts",
7
7
  "files": [