@sikka/hawa 0.34.1-next → 0.34.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.
@@ -466,12 +466,12 @@ var AppLayout = ({
466
466
  setOpenSideMenu(false);
467
467
  }
468
468
  }, [size]);
469
- return /* @__PURE__ */ React5.createElement("div", { className: "hawa-fixed hawa-left-0" }, props.topBar && /* @__PURE__ */ React5.createElement(
469
+ return /* @__PURE__ */ React5.createElement("div", { className: "hawa-fixed hawa-start-0" }, props.topBar && /* @__PURE__ */ React5.createElement(
470
470
  "div",
471
471
  {
472
+ dir: direction,
472
473
  className: cn(
473
- "hawa-fixed hawa-left-0 hawa-right-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",
474
- isRTL ? "hawa-flex-row-reverse" : "hawa-flex-row",
474
+ "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",
475
475
  bordered && "hawa-border-b-[1px]"
476
476
  )
477
477
  },
@@ -480,18 +480,10 @@ var AppLayout = ({
480
480
  {
481
481
  className: cn(
482
482
  "dark:hawa-text-white",
483
- isRTL ? [
484
- size > 600 ? "hawa-mr-14" : "hawa-mr-2",
485
- keepDrawerOpen ? "hawa-mr-40" : ""
486
- ] : [
487
- size > 600 ? "hawa-ml-14" : "hawa-ml-2",
488
- keepDrawerOpen ? "hawa-ml-40" : ""
489
- ]
483
+ size > 600 ? "hawa-ms-14" : "hawa-ms-2"
490
484
  ),
491
- style: isRTL ? {
492
- marginRight: `${drawerSizeStyle[keepDrawerOpen ? "opened" : "closed"][drawerSize]}px`
493
- } : {
494
- marginLeft: `${drawerSizeStyle[keepDrawerOpen ? "opened" : "closed"][drawerSize]}px`
485
+ style: {
486
+ marginInlineStart: `${drawerSizeStyle[keepDrawerOpen ? "opened" : "closed"][drawerSize] + 10}px`
495
487
  }
496
488
  },
497
489
  props.pageTitle
@@ -514,71 +506,51 @@ var AppLayout = ({
514
506
  props.pageTitle ? /* @__PURE__ */ React5.createElement("div", { className: "hawa-text-sm" }, props.pageTitle) : /* @__PURE__ */ React5.createElement("div", null)
515
507
  )
516
508
  ),
517
- /* @__PURE__ */ React5.createElement(
518
- "div",
509
+ /* @__PURE__ */ React5.createElement("div", { className: cn("hawa-flex hawa-gap-2 dark:hawa-text-white") }, size > 600 ? /* @__PURE__ */ React5.createElement("div", { className: "hawa-text-end hawa-text-xs" }, /* @__PURE__ */ React5.createElement("div", { className: "hawa-font-bold" }, props.username), " ", /* @__PURE__ */ React5.createElement("div", null, props.email)) : null, /* @__PURE__ */ React5.createElement(
510
+ DropdownMenu,
519
511
  {
520
- className: cn(
521
- "hawa-flex hawa-gap-2 dark:hawa-text-white",
522
- isRTL ? "hawa-flex-row-reverse" : "hawa-flex-row"
523
- )
524
- },
525
- size > 600 ? /* @__PURE__ */ React5.createElement(
526
- "div",
527
- {
528
- className: isRTL ? "hawa-text-left hawa-text-xs" : "hawa-text-right hawa-text-xs"
529
- },
530
- /* @__PURE__ */ React5.createElement("div", { className: "hawa-font-bold" }, props.username),
531
- " ",
532
- /* @__PURE__ */ React5.createElement("div", null, props.email)
533
- ) : null,
534
- /* @__PURE__ */ React5.createElement(
535
- DropdownMenu,
536
- {
537
- LinkComponent: MenuLinkComponent,
538
- triggerClassname: "hawa-mx-2",
539
- align: "end",
540
- alignOffset: 8,
541
- side: "bottom",
542
- sideOffset: 5,
543
- width: profileMenuWidth,
544
- direction: isRTL ? "rtl" : "ltr",
545
- items: props.profileMenuItems || [],
546
- onItemSelect: (e) => console.log("selecting item ", e),
547
- trigger: /* @__PURE__ */ React5.createElement(
548
- "div",
512
+ LinkComponent: MenuLinkComponent,
513
+ triggerClassname: "hawa-mx-2",
514
+ align: "end",
515
+ alignOffset: 8,
516
+ side: "bottom",
517
+ sideOffset: 5,
518
+ width: profileMenuWidth,
519
+ direction,
520
+ items: props.profileMenuItems || [],
521
+ onItemSelect: (e) => console.log("selecting item ", e),
522
+ trigger: /* @__PURE__ */ React5.createElement(
523
+ "div",
524
+ {
525
+ onClick: onAvatarClick,
526
+ className: "hawa-relative hawa-h-8 hawa-w-8 hawa-cursor-pointer hawa-overflow-clip hawa-rounded hawa-ring-1 hawa-ring-primary/30 dark:hawa-bg-gray-600"
527
+ },
528
+ props.avatarImage ? /* @__PURE__ */ React5.createElement("img", { src: props.avatarImage, alt: "User Avatar" }) : /* @__PURE__ */ React5.createElement(
529
+ "svg",
549
530
  {
550
- onClick: onAvatarClick,
551
- className: "hawa-relative hawa-h-8 hawa-w-8 hawa-cursor-pointer hawa-overflow-clip hawa-rounded hawa-ring-1 hawa-ring-primary/30 dark:hawa-bg-gray-600"
531
+ "aria-label": "Avatar Icon",
532
+ className: "hawa-absolute hawa--start-1 hawa-h-10 hawa-w-10 hawa-text-gray-400",
533
+ fill: "currentColor",
534
+ viewBox: "0 0 20 20"
552
535
  },
553
- props.avatarImage ? /* @__PURE__ */ React5.createElement("img", { src: props.avatarImage, alt: "User Avatar" }) : /* @__PURE__ */ React5.createElement(
554
- "svg",
536
+ /* @__PURE__ */ React5.createElement(
537
+ "path",
555
538
  {
556
- "aria-label": "Avatar Icon",
557
- className: "hawa-absolute hawa--left-1 hawa-h-10 hawa-w-10 hawa-text-gray-400",
558
- fill: "currentColor",
559
- viewBox: "0 0 20 20"
560
- },
561
- /* @__PURE__ */ React5.createElement(
562
- "path",
563
- {
564
- fillRule: "evenodd",
565
- d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
566
- clipRule: "evenodd"
567
- }
568
- )
539
+ fillRule: "evenodd",
540
+ d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
541
+ clipRule: "evenodd"
542
+ }
569
543
  )
570
544
  )
571
- }
572
- )
573
- )
545
+ )
546
+ }
547
+ ))
574
548
  ), /* @__PURE__ */ React5.createElement(
575
549
  "div",
576
550
  {
577
551
  className: cn(
578
- "hawa-fixed hawa-z-0 hawa-flex hawa-flex-col hawa-justify-between hawa-overflow-x-clip hawa-transition-all hawa-bg-blue-500",
579
- isRTL ? "hawa-right-0 hawa-top-0 hawa-h-14" : "hawa-left-0 hawa-top-0 hawa-h-14",
580
- "hawa-h-[calc(100dvh)]",
581
- "hawa-bg-primary-foreground",
552
+ "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",
553
+ isRTL ? "hawa-right-0" : "hawa-left-0",
582
554
  bordered ? direction === "rtl" ? "hawa-border-s-[1px]" : "hawa-border-e-[1px]" : ""
583
555
  ),
584
556
  style: {
@@ -620,7 +592,7 @@ var AppLayout = ({
620
592
  "img",
621
593
  {
622
594
  className: cn(
623
- "hawa-h-9 hawa-opacity-0 hawa-transition-all",
595
+ "hawa-h-9 hawa-opacity-0 hawa-transition-all",
624
596
  !openSideMenu ? "hawa-invisible hawa-opacity-0" : "hawa-visible hawa-opacity-100",
625
597
  classNames == null ? void 0 : classNames.fullLogoImg
626
598
  ),
@@ -631,8 +603,7 @@ var AppLayout = ({
631
603
  "img",
632
604
  {
633
605
  className: cn(
634
- "hawa-fixed hawa-h-9 hawa-transition-all",
635
- isRTL ? "hawa-right-2.5 hawa-top-2.5" : "hawa-left-2.5 hawa-top-2.5",
606
+ "hawa-fixed hawa-h-9 hawa-transition-all hawa-start-2.5 hawa-top-2.5",
636
607
  openSideMenu ? "hawa-invisible hawa-opacity-0" : "hawa-visible hawa-opacity-100",
637
608
  classNames == null ? void 0 : classNames.symbolLogoImg
638
609
  ),
@@ -691,21 +662,21 @@ var AppLayout = ({
691
662
  {
692
663
  side: "left",
693
664
  delayDuration: 500,
694
- content: keepDrawerOpen ? ((_a = props.texts) == null ? void 0 : _a.collapseSidebar) || "Collapse Sidebar" : ((_b = props.texts) == null ? void 0 : _b.expandSidebar) || "Expand Sidebar",
695
- triggerProps: { asChild: true }
665
+ triggerProps: { asChild: true },
666
+ content: keepDrawerOpen ? ((_a = props.texts) == null ? void 0 : _a.collapseSidebar) || "Collapse Sidebar" : ((_b = props.texts) == null ? void 0 : _b.expandSidebar) || "Expand Sidebar"
696
667
  },
697
668
  /* @__PURE__ */ React5.createElement(
698
669
  Button,
699
670
  {
700
671
  variant: "outline",
672
+ size: "smallIcon",
701
673
  onClick: () => {
702
674
  const newKeepOpenState = !keepDrawerOpen;
703
675
  if (props.onDrawerExpand) {
704
676
  props.onDrawerExpand(newKeepOpenState);
705
677
  }
706
678
  setKeepDrawerOpen(newKeepOpenState);
707
- },
708
- size: "smallIcon"
679
+ }
709
680
  },
710
681
  /* @__PURE__ */ React5.createElement(
711
682
  "svg",
@@ -734,15 +705,15 @@ var AppLayout = ({
734
705
  {
735
706
  className: "hawa-fixed -hawa-z-10 hawa-overflow-y-auto hawa-transition-all",
736
707
  style: isRTL ? {
737
- height: `calc(100% - ${props.topBar ? "56" : "0"}px)`,
738
- width: `calc(100% - ${drawerSizeCondition}px)`,
739
708
  left: "0px",
740
- top: props.topBar ? "56px" : "0px"
741
- } : {
742
- height: `calc(100% - ${props.topBar ? "56" : "0"}px)`,
709
+ top: props.topBar ? "56px" : "0px",
743
710
  width: `calc(100% - ${drawerSizeCondition}px)`,
711
+ height: `calc(100% - ${props.topBar ? "56" : "0"}px)`
712
+ } : {
744
713
  left: `${drawerSizeCondition}px`,
745
- top: props.topBar ? "56px" : "0px"
714
+ top: props.topBar ? "56px" : "0px",
715
+ width: `calc(100% - ${drawerSizeCondition}px)`,
716
+ height: `calc(100% - ${props.topBar ? "56" : "0"}px)`
746
717
  }
747
718
  },
748
719
  props.children
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.34.1-next",
3
+ "version": "0.34.2-next",
4
4
  "description": "Modern UI Kit made with Tailwind",
5
5
  "author": {
6
6
  "name": "Sikka Software",