@sikka/hawa 0.36.1-next → 0.36.2-next

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.
@@ -397,7 +397,7 @@ var DialogContent = React6.forwardRef(({ className, children, persist, hideClose
397
397
  },
398
398
  ref,
399
399
  className: cn(
400
- "hawa-fixed hawa-left-[50%] hawa-top-[50%] hawa-z-50 hawa-grid hawa-w-full hawa-max-w-lg hawa-translate-x-[-50%] hawa-translate-y-[-50%] hawa-gap-4 hawa-border hawa-bg-background hawa-p-6 hawa-shadow-lg hawa-transition-all hawa-duration-200 data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[state=closed]:hawa-slide-out-to-left-1/2 data-[state=closed]:hawa-slide-out-to-top-[48%] data-[state=open]:hawa-slide-in-from-left-1/2 data-[state=open]:hawa-slide-in-from-top-[48%] hawa-rounded md:hawa-w-full",
400
+ "hawa-fixed hawa-left-[50%] hawa-top-[50%] hawa-z-50 hawa-grid hawa-w-[90%] hawa-max-w-lg hawa-translate-x-[-50%] hawa-translate-y-[-50%] hawa-gap-4 hawa-border hawa-bg-background hawa-p-6 hawa-shadow-lg hawa-transition-all hawa-duration-200 data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[state=closed]:hawa-slide-out-to-left-1/2 data-[state=closed]:hawa-slide-out-to-top-[48%] data-[state=open]:hawa-slide-in-from-left-1/2 data-[state=open]:hawa-slide-in-from-top-[48%] hawa-rounded md:hawa-w-full",
401
401
  className
402
402
  ),
403
403
  ...props
package/dist/index.css CHANGED
@@ -1665,6 +1665,9 @@ input[type="number"]::-webkit-inner-spin-button,
1665
1665
  .hawa-w-\[88px\] {
1666
1666
  width: 88px;
1667
1667
  }
1668
+ .hawa-w-\[90\%\] {
1669
+ width: 90%;
1670
+ }
1668
1671
  .hawa-w-auto {
1669
1672
  width: auto;
1670
1673
  }
@@ -2332,6 +2335,9 @@ input[type="number"]::-webkit-inner-spin-button,
2332
2335
  .hawa-bg-foreground\/5 {
2333
2336
  background-color: hsl(var(--foreground) / 0.05);
2334
2337
  }
2338
+ .hawa-bg-foreground\/80 {
2339
+ background-color: hsl(var(--foreground) / 0.8);
2340
+ }
2335
2341
  .hawa-bg-gray-200 {
2336
2342
  --tw-bg-opacity: 1;
2337
2343
  background-color: rgb(229 231 235 / var(--tw-bg-opacity));
package/dist/index.d.mts CHANGED
@@ -1268,8 +1268,6 @@ type AppLayoutTypes$1 = {
1268
1268
  * - 'parent': Inherits width from parent element.
1269
1269
  */
1270
1270
  profileMenuWidth?: "default" | "sm" | "lg" | "parent";
1271
- /** Event handler for drawer expansion. */
1272
- onDrawerExpand?: (e: any) => void;
1273
1271
  /** Specifies additional actions for the drawer footer. */
1274
1272
  DrawerFooterActions?: any;
1275
1273
  /** Specifies the item that was clicked. */
package/dist/index.d.ts CHANGED
@@ -1268,8 +1268,6 @@ type AppLayoutTypes$1 = {
1268
1268
  * - 'parent': Inherits width from parent element.
1269
1269
  */
1270
1270
  profileMenuWidth?: "default" | "sm" | "lg" | "parent";
1271
- /** Event handler for drawer expansion. */
1272
- onDrawerExpand?: (e: any) => void;
1273
1271
  /** Specifies additional actions for the drawer footer. */
1274
1272
  DrawerFooterActions?: any;
1275
1273
  /** Specifies the item that was clicked. */
package/dist/index.js CHANGED
@@ -1966,7 +1966,7 @@ var DialogContent = React14.forwardRef(({ className, children, persist, hideClos
1966
1966
  },
1967
1967
  ref,
1968
1968
  className: cn(
1969
- "hawa-fixed hawa-left-[50%] hawa-top-[50%] hawa-z-50 hawa-grid hawa-w-full hawa-max-w-lg hawa-translate-x-[-50%] hawa-translate-y-[-50%] hawa-gap-4 hawa-border hawa-bg-background hawa-p-6 hawa-shadow-lg hawa-transition-all hawa-duration-200 data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[state=closed]:hawa-slide-out-to-left-1/2 data-[state=closed]:hawa-slide-out-to-top-[48%] data-[state=open]:hawa-slide-in-from-left-1/2 data-[state=open]:hawa-slide-in-from-top-[48%] hawa-rounded md:hawa-w-full",
1969
+ "hawa-fixed hawa-left-[50%] hawa-top-[50%] hawa-z-50 hawa-grid hawa-w-[90%] hawa-max-w-lg hawa-translate-x-[-50%] hawa-translate-y-[-50%] hawa-gap-4 hawa-border hawa-bg-background hawa-p-6 hawa-shadow-lg hawa-transition-all hawa-duration-200 data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[state=closed]:hawa-slide-out-to-left-1/2 data-[state=closed]:hawa-slide-out-to-top-[48%] data-[state=open]:hawa-slide-in-from-left-1/2 data-[state=open]:hawa-slide-in-from-top-[48%] hawa-rounded md:hawa-w-full",
1970
1970
  className
1971
1971
  ),
1972
1972
  ...props
@@ -9238,6 +9238,7 @@ var Navbar = ({
9238
9238
 
9239
9239
  // layout/appLayout/AppLayout.tsx
9240
9240
  var import_react57 = __toESM(require("react"));
9241
+ var Dialog2 = __toESM(require("@radix-ui/react-dialog"));
9241
9242
  var LOCAL_STORAGE_KEY2 = "@sikka/hawa/keep-drawer-open";
9242
9243
  var AppLayout = ({
9243
9244
  profileMenuWidth = "default",
@@ -9255,7 +9256,7 @@ var AppLayout = ({
9255
9256
  ...props
9256
9257
  }) => {
9257
9258
  var _a, _b;
9258
- (0, import_react57.useLayoutEffect)(() => {
9259
+ (0, import_react57.useEffect)(() => {
9259
9260
  let isDrawerOpen = localStorage.getItem(LOCAL_STORAGE_KEY2);
9260
9261
  if (isDrawerOpen === null) {
9261
9262
  localStorage.setItem(LOCAL_STORAGE_KEY2, JSON.stringify(false));
@@ -9280,6 +9281,7 @@ var AppLayout = ({
9280
9281
  const savedState = localStorage.getItem(LOCAL_STORAGE_KEY2);
9281
9282
  return savedState ? JSON.parse(savedState) : false;
9282
9283
  });
9284
+ const [container, setContainer] = import_react57.default.useState(null);
9283
9285
  const [keepDrawerOpen, setKeepDrawerOpen] = (0, import_react57.useState)(() => {
9284
9286
  const savedState = localStorage.getItem(LOCAL_STORAGE_KEY2);
9285
9287
  return savedState ? JSON.parse(savedState) : false;
@@ -9299,6 +9301,8 @@ var AppLayout = ({
9299
9301
  setSize(window.innerWidth);
9300
9302
  if (window.innerWidth > 600) {
9301
9303
  setKeepDrawerOpen(false);
9304
+ } else {
9305
+ localStorage.setItem(LOCAL_STORAGE_KEY2, JSON.stringify(false));
9302
9306
  }
9303
9307
  };
9304
9308
  resize();
@@ -9328,7 +9332,7 @@ var AppLayout = ({
9328
9332
  {
9329
9333
  dir: direction,
9330
9334
  className: cn(
9331
- "hawa-fixed hawa-end-0 hawa-start-0 hawa-top-0 hawa-z-0 hawa-flex hawa-h-14 hawa-w-full hawa-items-center hawa-justify-between hawa-bg-primary-foreground hawa-p-2",
9335
+ "hawa-fixed hawa-end-0 hawa-start-0 hawa-top-0 hawa-z-10 hawa-flex hawa-h-14 hawa-w-full hawa-items-center hawa-justify-between hawa-bg-primary-foreground hawa-p-2",
9332
9336
  bordered && "hawa-border-b-[1px]"
9333
9337
  )
9334
9338
  },
@@ -9356,7 +9360,7 @@ var AppLayout = ({
9356
9360
  "div",
9357
9361
  {
9358
9362
  onClick: () => setOpenSideMenu(true),
9359
- className: "hawa-z-40 hawa-mx-1 hawa-cursor-pointer hawa-rounded hawa-p-2 hawa-transition-all hover:hawa-bg-gray-100"
9363
+ className: "hawa-z-40 hawa-mx-1 hawa-cursor-pointer hawa-rounded hawa-p-2 hawa-transition-all "
9360
9364
  },
9361
9365
  /* @__PURE__ */ import_react57.default.createElement(MenuIcon, null)
9362
9366
  ),
@@ -9401,13 +9405,13 @@ var AppLayout = ({
9401
9405
  )
9402
9406
  }
9403
9407
  ))
9404
- ), /* @__PURE__ */ import_react57.default.createElement(
9408
+ ), /* @__PURE__ */ import_react57.default.createElement("div", { ref: setContainer }, /* @__PURE__ */ import_react57.default.createElement(
9405
9409
  "div",
9406
9410
  {
9407
9411
  className: cn(
9408
- "hawa-fixed hawa-z-0 hawa-flex hawa-flex-col hawa-justify-between hawa-overflow-x-clip hawa-transition-all hawa-top-0 hawa-h-[calc(100dvh)] hawa-bg-primary-foreground",
9412
+ "hawa-fixed hawa-z-40 hawa-flex hawa-flex-col hawa-justify-between hawa-overflow-x-clip hawa-transition-all hawa-top-0 hawa-h-[calc(100dvh)] hawa-bg-primary-foreground",
9409
9413
  isRTL ? "hawa-right-0" : "hawa-left-0",
9410
- bordered ? direction === "rtl" ? "hawa-border-s-[1px]" : "hawa-border-e-[1px]" : ""
9414
+ bordered ? size > 600 ? direction === "rtl" ? "hawa-border-s-[1px]" : "hawa-border-e-[1px]" : "" : ""
9411
9415
  ),
9412
9416
  style: {
9413
9417
  width: size > 600 ? openSideMenu ? `${drawerSizeStyle["opened"][drawerSize]}px` : `${drawerSizeStyle["closed"][drawerSize]}px` : openSideMenu ? `${drawerSizeStyle["opened"][drawerSize]}px` : "0px"
@@ -9547,10 +9551,17 @@ var AppLayout = ({
9547
9551
  )
9548
9552
  ) : null
9549
9553
  )
9554
+ )), /* @__PURE__ */ import_react57.default.createElement(
9555
+ Dialog2.Root,
9556
+ {
9557
+ open: size < 600 && openSideMenu,
9558
+ onOpenChange: setOpenSideMenu
9559
+ },
9560
+ /* @__PURE__ */ import_react57.default.createElement(Dialog2.Portal, { container }, /* @__PURE__ */ import_react57.default.createElement(Dialog2.Overlay, { className: "hawa-fixed hawa-inset-0 hawa-bg-foreground/80 hawa-backdrop-blur-sm data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out hawa-z-10 data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0" }))
9550
9561
  ), /* @__PURE__ */ import_react57.default.createElement(
9551
9562
  "div",
9552
9563
  {
9553
- className: "hawa-fixed -hawa-z-10 hawa-overflow-y-auto hawa-transition-all",
9564
+ className: "hawa-fixed hawa-overflow-y-auto hawa-transition-all hawa-z-0",
9554
9565
  style: isRTL ? {
9555
9566
  left: "0px",
9556
9567
  top: props.topBar ? "56px" : "0px",
package/dist/index.mjs CHANGED
@@ -1727,7 +1727,7 @@ var DialogContent = React14.forwardRef(({ className, children, persist, hideClos
1727
1727
  },
1728
1728
  ref,
1729
1729
  className: cn(
1730
- "hawa-fixed hawa-left-[50%] hawa-top-[50%] hawa-z-50 hawa-grid hawa-w-full hawa-max-w-lg hawa-translate-x-[-50%] hawa-translate-y-[-50%] hawa-gap-4 hawa-border hawa-bg-background hawa-p-6 hawa-shadow-lg hawa-transition-all hawa-duration-200 data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[state=closed]:hawa-slide-out-to-left-1/2 data-[state=closed]:hawa-slide-out-to-top-[48%] data-[state=open]:hawa-slide-in-from-left-1/2 data-[state=open]:hawa-slide-in-from-top-[48%] hawa-rounded md:hawa-w-full",
1730
+ "hawa-fixed hawa-left-[50%] hawa-top-[50%] hawa-z-50 hawa-grid hawa-w-[90%] hawa-max-w-lg hawa-translate-x-[-50%] hawa-translate-y-[-50%] hawa-gap-4 hawa-border hawa-bg-background hawa-p-6 hawa-shadow-lg hawa-transition-all hawa-duration-200 data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[state=closed]:hawa-slide-out-to-left-1/2 data-[state=closed]:hawa-slide-out-to-top-[48%] data-[state=open]:hawa-slide-in-from-left-1/2 data-[state=open]:hawa-slide-in-from-top-[48%] hawa-rounded md:hawa-w-full",
1731
1731
  className
1732
1732
  ),
1733
1733
  ...props
@@ -9013,7 +9013,8 @@ var Navbar = ({
9013
9013
  };
9014
9014
 
9015
9015
  // layout/appLayout/AppLayout.tsx
9016
- import React76, { useEffect as useEffect29, useLayoutEffect as useLayoutEffect2, useState as useState36 } from "react";
9016
+ import React76, { useEffect as useEffect29, useState as useState36 } from "react";
9017
+ import * as Dialog2 from "@radix-ui/react-dialog";
9017
9018
  var LOCAL_STORAGE_KEY2 = "@sikka/hawa/keep-drawer-open";
9018
9019
  var AppLayout = ({
9019
9020
  profileMenuWidth = "default",
@@ -9031,7 +9032,7 @@ var AppLayout = ({
9031
9032
  ...props
9032
9033
  }) => {
9033
9034
  var _a, _b;
9034
- useLayoutEffect2(() => {
9035
+ useEffect29(() => {
9035
9036
  let isDrawerOpen = localStorage.getItem(LOCAL_STORAGE_KEY2);
9036
9037
  if (isDrawerOpen === null) {
9037
9038
  localStorage.setItem(LOCAL_STORAGE_KEY2, JSON.stringify(false));
@@ -9056,6 +9057,7 @@ var AppLayout = ({
9056
9057
  const savedState = localStorage.getItem(LOCAL_STORAGE_KEY2);
9057
9058
  return savedState ? JSON.parse(savedState) : false;
9058
9059
  });
9060
+ const [container, setContainer] = React76.useState(null);
9059
9061
  const [keepDrawerOpen, setKeepDrawerOpen] = useState36(() => {
9060
9062
  const savedState = localStorage.getItem(LOCAL_STORAGE_KEY2);
9061
9063
  return savedState ? JSON.parse(savedState) : false;
@@ -9075,6 +9077,8 @@ var AppLayout = ({
9075
9077
  setSize(window.innerWidth);
9076
9078
  if (window.innerWidth > 600) {
9077
9079
  setKeepDrawerOpen(false);
9080
+ } else {
9081
+ localStorage.setItem(LOCAL_STORAGE_KEY2, JSON.stringify(false));
9078
9082
  }
9079
9083
  };
9080
9084
  resize();
@@ -9104,7 +9108,7 @@ var AppLayout = ({
9104
9108
  {
9105
9109
  dir: direction,
9106
9110
  className: cn(
9107
- "hawa-fixed hawa-end-0 hawa-start-0 hawa-top-0 hawa-z-0 hawa-flex hawa-h-14 hawa-w-full hawa-items-center hawa-justify-between hawa-bg-primary-foreground hawa-p-2",
9111
+ "hawa-fixed hawa-end-0 hawa-start-0 hawa-top-0 hawa-z-10 hawa-flex hawa-h-14 hawa-w-full hawa-items-center hawa-justify-between hawa-bg-primary-foreground hawa-p-2",
9108
9112
  bordered && "hawa-border-b-[1px]"
9109
9113
  )
9110
9114
  },
@@ -9132,7 +9136,7 @@ var AppLayout = ({
9132
9136
  "div",
9133
9137
  {
9134
9138
  onClick: () => setOpenSideMenu(true),
9135
- className: "hawa-z-40 hawa-mx-1 hawa-cursor-pointer hawa-rounded hawa-p-2 hawa-transition-all hover:hawa-bg-gray-100"
9139
+ className: "hawa-z-40 hawa-mx-1 hawa-cursor-pointer hawa-rounded hawa-p-2 hawa-transition-all "
9136
9140
  },
9137
9141
  /* @__PURE__ */ React76.createElement(MenuIcon, null)
9138
9142
  ),
@@ -9177,13 +9181,13 @@ var AppLayout = ({
9177
9181
  )
9178
9182
  }
9179
9183
  ))
9180
- ), /* @__PURE__ */ React76.createElement(
9184
+ ), /* @__PURE__ */ React76.createElement("div", { ref: setContainer }, /* @__PURE__ */ React76.createElement(
9181
9185
  "div",
9182
9186
  {
9183
9187
  className: cn(
9184
- "hawa-fixed hawa-z-0 hawa-flex hawa-flex-col hawa-justify-between hawa-overflow-x-clip hawa-transition-all hawa-top-0 hawa-h-[calc(100dvh)] hawa-bg-primary-foreground",
9188
+ "hawa-fixed hawa-z-40 hawa-flex hawa-flex-col hawa-justify-between hawa-overflow-x-clip hawa-transition-all hawa-top-0 hawa-h-[calc(100dvh)] hawa-bg-primary-foreground",
9185
9189
  isRTL ? "hawa-right-0" : "hawa-left-0",
9186
- bordered ? direction === "rtl" ? "hawa-border-s-[1px]" : "hawa-border-e-[1px]" : ""
9190
+ bordered ? size > 600 ? direction === "rtl" ? "hawa-border-s-[1px]" : "hawa-border-e-[1px]" : "" : ""
9187
9191
  ),
9188
9192
  style: {
9189
9193
  width: size > 600 ? openSideMenu ? `${drawerSizeStyle["opened"][drawerSize]}px` : `${drawerSizeStyle["closed"][drawerSize]}px` : openSideMenu ? `${drawerSizeStyle["opened"][drawerSize]}px` : "0px"
@@ -9323,10 +9327,17 @@ var AppLayout = ({
9323
9327
  )
9324
9328
  ) : null
9325
9329
  )
9330
+ )), /* @__PURE__ */ React76.createElement(
9331
+ Dialog2.Root,
9332
+ {
9333
+ open: size < 600 && openSideMenu,
9334
+ onOpenChange: setOpenSideMenu
9335
+ },
9336
+ /* @__PURE__ */ React76.createElement(Dialog2.Portal, { container }, /* @__PURE__ */ React76.createElement(Dialog2.Overlay, { className: "hawa-fixed hawa-inset-0 hawa-bg-foreground/80 hawa-backdrop-blur-sm data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out hawa-z-10 data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0" }))
9326
9337
  ), /* @__PURE__ */ React76.createElement(
9327
9338
  "div",
9328
9339
  {
9329
- className: "hawa-fixed -hawa-z-10 hawa-overflow-y-auto hawa-transition-all",
9340
+ className: "hawa-fixed hawa-overflow-y-auto hawa-transition-all hawa-z-0",
9330
9341
  style: isRTL ? {
9331
9342
  left: "0px",
9332
9343
  top: props.topBar ? "56px" : "0px",
@@ -141,8 +141,6 @@ type AppLayoutTypes$1 = {
141
141
  * - 'parent': Inherits width from parent element.
142
142
  */
143
143
  profileMenuWidth?: "default" | "sm" | "lg" | "parent";
144
- /** Event handler for drawer expansion. */
145
- onDrawerExpand?: (e: any) => void;
146
144
  /** Specifies additional actions for the drawer footer. */
147
145
  DrawerFooterActions?: any;
148
146
  /** Specifies the item that was clicked. */
@@ -141,8 +141,6 @@ type AppLayoutTypes$1 = {
141
141
  * - 'parent': Inherits width from parent element.
142
142
  */
143
143
  profileMenuWidth?: "default" | "sm" | "lg" | "parent";
144
- /** Event handler for drawer expansion. */
145
- onDrawerExpand?: (e: any) => void;
146
144
  /** Specifies additional actions for the drawer footer. */
147
145
  DrawerFooterActions?: any;
148
146
  /** Specifies the item that was clicked. */
@@ -686,6 +686,9 @@ function useClickOutside(handler, events, nodes) {
686
686
  return ref;
687
687
  }
688
688
 
689
+ // layout/appLayout/AppLayout.tsx
690
+ var Dialog = __toESM(require("@radix-ui/react-dialog"));
691
+
689
692
  // elements/button/Button.tsx
690
693
  var React12 = __toESM(require("react"));
691
694
  var import_class_variance_authority = require("class-variance-authority");
@@ -1534,7 +1537,7 @@ var AppLayout = ({
1534
1537
  ...props
1535
1538
  }) => {
1536
1539
  var _a, _b;
1537
- (0, import_react14.useLayoutEffect)(() => {
1540
+ (0, import_react14.useEffect)(() => {
1538
1541
  let isDrawerOpen = localStorage.getItem(LOCAL_STORAGE_KEY);
1539
1542
  if (isDrawerOpen === null) {
1540
1543
  localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(false));
@@ -1559,6 +1562,7 @@ var AppLayout = ({
1559
1562
  const savedState = localStorage.getItem(LOCAL_STORAGE_KEY);
1560
1563
  return savedState ? JSON.parse(savedState) : false;
1561
1564
  });
1565
+ const [container, setContainer] = import_react14.default.useState(null);
1562
1566
  const [keepDrawerOpen, setKeepDrawerOpen] = (0, import_react14.useState)(() => {
1563
1567
  const savedState = localStorage.getItem(LOCAL_STORAGE_KEY);
1564
1568
  return savedState ? JSON.parse(savedState) : false;
@@ -1578,6 +1582,8 @@ var AppLayout = ({
1578
1582
  setSize(window.innerWidth);
1579
1583
  if (window.innerWidth > 600) {
1580
1584
  setKeepDrawerOpen(false);
1585
+ } else {
1586
+ localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(false));
1581
1587
  }
1582
1588
  };
1583
1589
  resize();
@@ -1607,7 +1613,7 @@ var AppLayout = ({
1607
1613
  {
1608
1614
  dir: direction,
1609
1615
  className: cn(
1610
- "hawa-fixed hawa-end-0 hawa-start-0 hawa-top-0 hawa-z-0 hawa-flex hawa-h-14 hawa-w-full hawa-items-center hawa-justify-between hawa-bg-primary-foreground hawa-p-2",
1616
+ "hawa-fixed hawa-end-0 hawa-start-0 hawa-top-0 hawa-z-10 hawa-flex hawa-h-14 hawa-w-full hawa-items-center hawa-justify-between hawa-bg-primary-foreground hawa-p-2",
1611
1617
  bordered && "hawa-border-b-[1px]"
1612
1618
  )
1613
1619
  },
@@ -1635,7 +1641,7 @@ var AppLayout = ({
1635
1641
  "div",
1636
1642
  {
1637
1643
  onClick: () => setOpenSideMenu(true),
1638
- className: "hawa-z-40 hawa-mx-1 hawa-cursor-pointer hawa-rounded hawa-p-2 hawa-transition-all hover:hawa-bg-gray-100"
1644
+ className: "hawa-z-40 hawa-mx-1 hawa-cursor-pointer hawa-rounded hawa-p-2 hawa-transition-all "
1639
1645
  },
1640
1646
  /* @__PURE__ */ import_react14.default.createElement(MenuIcon, null)
1641
1647
  ),
@@ -1680,13 +1686,13 @@ var AppLayout = ({
1680
1686
  )
1681
1687
  }
1682
1688
  ))
1683
- ), /* @__PURE__ */ import_react14.default.createElement(
1689
+ ), /* @__PURE__ */ import_react14.default.createElement("div", { ref: setContainer }, /* @__PURE__ */ import_react14.default.createElement(
1684
1690
  "div",
1685
1691
  {
1686
1692
  className: cn(
1687
- "hawa-fixed hawa-z-0 hawa-flex hawa-flex-col hawa-justify-between hawa-overflow-x-clip hawa-transition-all hawa-top-0 hawa-h-[calc(100dvh)] hawa-bg-primary-foreground",
1693
+ "hawa-fixed hawa-z-40 hawa-flex hawa-flex-col hawa-justify-between hawa-overflow-x-clip hawa-transition-all hawa-top-0 hawa-h-[calc(100dvh)] hawa-bg-primary-foreground",
1688
1694
  isRTL ? "hawa-right-0" : "hawa-left-0",
1689
- bordered ? direction === "rtl" ? "hawa-border-s-[1px]" : "hawa-border-e-[1px]" : ""
1695
+ bordered ? size > 600 ? direction === "rtl" ? "hawa-border-s-[1px]" : "hawa-border-e-[1px]" : "" : ""
1690
1696
  ),
1691
1697
  style: {
1692
1698
  width: size > 600 ? openSideMenu ? `${drawerSizeStyle["opened"][drawerSize]}px` : `${drawerSizeStyle["closed"][drawerSize]}px` : openSideMenu ? `${drawerSizeStyle["opened"][drawerSize]}px` : "0px"
@@ -1826,10 +1832,17 @@ var AppLayout = ({
1826
1832
  )
1827
1833
  ) : null
1828
1834
  )
1835
+ )), /* @__PURE__ */ import_react14.default.createElement(
1836
+ Dialog.Root,
1837
+ {
1838
+ open: size < 600 && openSideMenu,
1839
+ onOpenChange: setOpenSideMenu
1840
+ },
1841
+ /* @__PURE__ */ import_react14.default.createElement(Dialog.Portal, { container }, /* @__PURE__ */ import_react14.default.createElement(Dialog.Overlay, { className: "hawa-fixed hawa-inset-0 hawa-bg-foreground/80 hawa-backdrop-blur-sm data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out hawa-z-10 data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0" }))
1829
1842
  ), /* @__PURE__ */ import_react14.default.createElement(
1830
1843
  "div",
1831
1844
  {
1832
- className: "hawa-fixed -hawa-z-10 hawa-overflow-y-auto hawa-transition-all",
1845
+ className: "hawa-fixed hawa-overflow-y-auto hawa-transition-all hawa-z-0",
1833
1846
  style: isRTL ? {
1834
1847
  left: "0px",
1835
1848
  top: props.topBar ? "56px" : "0px",
@@ -394,7 +394,8 @@ var Navbar = ({
394
394
  };
395
395
 
396
396
  // layout/appLayout/AppLayout.tsx
397
- import React5, { useEffect, useLayoutEffect, useState as useState2 } from "react";
397
+ import React5, { useEffect, useState as useState2 } from "react";
398
+ import * as Dialog from "@radix-ui/react-dialog";
398
399
  var LOCAL_STORAGE_KEY = "@sikka/hawa/keep-drawer-open";
399
400
  var AppLayout = ({
400
401
  profileMenuWidth = "default",
@@ -412,7 +413,7 @@ var AppLayout = ({
412
413
  ...props
413
414
  }) => {
414
415
  var _a, _b;
415
- useLayoutEffect(() => {
416
+ useEffect(() => {
416
417
  let isDrawerOpen = localStorage.getItem(LOCAL_STORAGE_KEY);
417
418
  if (isDrawerOpen === null) {
418
419
  localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(false));
@@ -437,6 +438,7 @@ var AppLayout = ({
437
438
  const savedState = localStorage.getItem(LOCAL_STORAGE_KEY);
438
439
  return savedState ? JSON.parse(savedState) : false;
439
440
  });
441
+ const [container, setContainer] = React5.useState(null);
440
442
  const [keepDrawerOpen, setKeepDrawerOpen] = useState2(() => {
441
443
  const savedState = localStorage.getItem(LOCAL_STORAGE_KEY);
442
444
  return savedState ? JSON.parse(savedState) : false;
@@ -456,6 +458,8 @@ var AppLayout = ({
456
458
  setSize(window.innerWidth);
457
459
  if (window.innerWidth > 600) {
458
460
  setKeepDrawerOpen(false);
461
+ } else {
462
+ localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(false));
459
463
  }
460
464
  };
461
465
  resize();
@@ -485,7 +489,7 @@ var AppLayout = ({
485
489
  {
486
490
  dir: direction,
487
491
  className: cn(
488
- "hawa-fixed hawa-end-0 hawa-start-0 hawa-top-0 hawa-z-0 hawa-flex hawa-h-14 hawa-w-full hawa-items-center hawa-justify-between hawa-bg-primary-foreground hawa-p-2",
492
+ "hawa-fixed hawa-end-0 hawa-start-0 hawa-top-0 hawa-z-10 hawa-flex hawa-h-14 hawa-w-full hawa-items-center hawa-justify-between hawa-bg-primary-foreground hawa-p-2",
489
493
  bordered && "hawa-border-b-[1px]"
490
494
  )
491
495
  },
@@ -513,7 +517,7 @@ var AppLayout = ({
513
517
  "div",
514
518
  {
515
519
  onClick: () => setOpenSideMenu(true),
516
- className: "hawa-z-40 hawa-mx-1 hawa-cursor-pointer hawa-rounded hawa-p-2 hawa-transition-all hover:hawa-bg-gray-100"
520
+ className: "hawa-z-40 hawa-mx-1 hawa-cursor-pointer hawa-rounded hawa-p-2 hawa-transition-all "
517
521
  },
518
522
  /* @__PURE__ */ React5.createElement(MenuIcon, null)
519
523
  ),
@@ -558,13 +562,13 @@ var AppLayout = ({
558
562
  )
559
563
  }
560
564
  ))
561
- ), /* @__PURE__ */ React5.createElement(
565
+ ), /* @__PURE__ */ React5.createElement("div", { ref: setContainer }, /* @__PURE__ */ React5.createElement(
562
566
  "div",
563
567
  {
564
568
  className: cn(
565
- "hawa-fixed hawa-z-0 hawa-flex hawa-flex-col hawa-justify-between hawa-overflow-x-clip hawa-transition-all hawa-top-0 hawa-h-[calc(100dvh)] hawa-bg-primary-foreground",
569
+ "hawa-fixed hawa-z-40 hawa-flex hawa-flex-col hawa-justify-between hawa-overflow-x-clip hawa-transition-all hawa-top-0 hawa-h-[calc(100dvh)] hawa-bg-primary-foreground",
566
570
  isRTL ? "hawa-right-0" : "hawa-left-0",
567
- bordered ? direction === "rtl" ? "hawa-border-s-[1px]" : "hawa-border-e-[1px]" : ""
571
+ bordered ? size > 600 ? direction === "rtl" ? "hawa-border-s-[1px]" : "hawa-border-e-[1px]" : "" : ""
568
572
  ),
569
573
  style: {
570
574
  width: size > 600 ? openSideMenu ? `${drawerSizeStyle["opened"][drawerSize]}px` : `${drawerSizeStyle["closed"][drawerSize]}px` : openSideMenu ? `${drawerSizeStyle["opened"][drawerSize]}px` : "0px"
@@ -704,10 +708,17 @@ var AppLayout = ({
704
708
  )
705
709
  ) : null
706
710
  )
711
+ )), /* @__PURE__ */ React5.createElement(
712
+ Dialog.Root,
713
+ {
714
+ open: size < 600 && openSideMenu,
715
+ onOpenChange: setOpenSideMenu
716
+ },
717
+ /* @__PURE__ */ React5.createElement(Dialog.Portal, { container }, /* @__PURE__ */ React5.createElement(Dialog.Overlay, { className: "hawa-fixed hawa-inset-0 hawa-bg-foreground/80 hawa-backdrop-blur-sm data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out hawa-z-10 data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0" }))
707
718
  ), /* @__PURE__ */ React5.createElement(
708
719
  "div",
709
720
  {
710
- className: "hawa-fixed -hawa-z-10 hawa-overflow-y-auto hawa-transition-all",
721
+ className: "hawa-fixed hawa-overflow-y-auto hawa-transition-all hawa-z-0",
711
722
  style: isRTL ? {
712
723
  left: "0px",
713
724
  top: props.topBar ? "56px" : "0px",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.36.1-next",
3
+ "version": "0.36.2-next",
4
4
  "description": "Modern UI Kit made with Tailwind",
5
5
  "author": {
6
6
  "name": "Sikka Software",