@sikka/hawa 0.13.10-next → 0.13.11-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.
package/dist/index.css CHANGED
@@ -804,12 +804,12 @@ input[type="number"]::-webkit-inner-spin-button,
804
804
  .hawa-top-\[60\%\] {
805
805
  top: 60%;
806
806
  }
807
+ .hawa-top-\[60px\] {
808
+ top: 60px;
809
+ }
807
810
  .hawa-top-\[72px\] {
808
811
  top: 72px;
809
812
  }
810
- .hawa-top-\[88px\] {
811
- top: 88px;
812
- }
813
813
  .hawa-top-full {
814
814
  top: 100%;
815
815
  }
@@ -2754,6 +2754,18 @@ body {
2754
2754
  box-shadow: 0 10px 15px -3px rgba(255, 255, 255, 0.1),
2755
2755
  0 4px 6px -2px rgba(255, 255, 255, 0.05);
2756
2756
  }
2757
+ .selection\:hawa-p-0 *::-moz-selection {
2758
+ padding: 0px;
2759
+ }
2760
+ .selection\:hawa-p-0 *::selection {
2761
+ padding: 0px;
2762
+ }
2763
+ .selection\:hawa-p-0::-moz-selection {
2764
+ padding: 0px;
2765
+ }
2766
+ .selection\:hawa-p-0::selection {
2767
+ padding: 0px;
2768
+ }
2757
2769
  .placeholder\:hawa-text-muted-foreground::-moz-placeholder {
2758
2770
  color: hsl(var(--muted-foreground));
2759
2771
  }
@@ -2857,10 +2869,6 @@ body {
2857
2869
  --tw-bg-opacity: 1;
2858
2870
  background-color: rgb(209 213 219 / var(--tw-bg-opacity));
2859
2871
  }
2860
- .hover\:hawa-bg-gray-950:hover {
2861
- --tw-bg-opacity: 1;
2862
- background-color: rgb(3 7 18 / var(--tw-bg-opacity));
2863
- }
2864
2872
  .hover\:hawa-bg-green-300:hover {
2865
2873
  --tw-bg-opacity: 1;
2866
2874
  background-color: rgb(134 239 172 / var(--tw-bg-opacity));
@@ -2903,6 +2911,10 @@ body {
2903
2911
  .hover\:hawa-text-accent-foreground:hover {
2904
2912
  color: hsl(var(--accent-foreground));
2905
2913
  }
2914
+ .hover\:hawa-text-black:hover {
2915
+ --tw-text-opacity: 1;
2916
+ color: rgb(0 0 0 / var(--tw-text-opacity));
2917
+ }
2906
2918
  .hover\:hawa-text-foreground:hover {
2907
2919
  color: hsl(var(--foreground));
2908
2920
  }
@@ -3255,6 +3267,9 @@ body {
3255
3267
  .data-\[disabled\]\:hawa-opacity-50[data-disabled] {
3256
3268
  opacity: 0.5;
3257
3269
  }
3270
+ .data-\[state\=closed\]\:hawa-opacity-0[data-state=closed] {
3271
+ opacity: 0;
3272
+ }
3258
3273
  .data-\[state\=active\]\:hawa-shadow-sm[data-state=active] {
3259
3274
  --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
3260
3275
  --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);
@@ -3755,6 +3770,14 @@ body {
3755
3770
  position: absolute;
3756
3771
  }
3757
3772
 
3773
+ .md\:hawa-flex {
3774
+ display: flex;
3775
+ }
3776
+
3777
+ .md\:hawa-hidden {
3778
+ display: none;
3779
+ }
3780
+
3758
3781
  .md\:hawa-w-\[var\(--radix-navigation-menu-viewport-width\)\] {
3759
3782
  width: var(--radix-navigation-menu-viewport-width);
3760
3783
  }
package/dist/index.d.mts CHANGED
@@ -911,6 +911,8 @@ type NavbarType = {
911
911
  logo?: any;
912
912
  buttons?: any;
913
913
  menuItems?: NavigationMenuItem[];
914
+ handleLogoClick?: () => void;
915
+ backgroundColor?: string;
914
916
  };
915
917
  declare const Navbar: React__default.FC<NavbarType>;
916
918
 
package/dist/index.d.ts CHANGED
@@ -911,6 +911,8 @@ type NavbarType = {
911
911
  logo?: any;
912
912
  buttons?: any;
913
913
  menuItems?: NavigationMenuItem[];
914
+ handleLogoClick?: () => void;
915
+ backgroundColor?: string;
914
916
  };
915
917
  declare const Navbar: React__default.FC<NavbarType>;
916
918
 
package/dist/index.js CHANGED
@@ -6833,51 +6833,98 @@ var Collapsible = CollapsiblePrimitive.Root;
6833
6833
  var CollapsibleTrigger2 = CollapsiblePrimitive.CollapsibleTrigger;
6834
6834
  var CollapsibleContent2 = CollapsiblePrimitive.CollapsibleContent;
6835
6835
  // components/layout/Navbar.tsx
6836
- var Navbar = function(props) {
6837
- var _props_menuItems;
6836
+ var Navbar = function(_param) {
6837
+ var backgroundColor = _param.backgroundColor, logo = _param.logo, handleLogoClick = _param.handleLogoClick, props = _object_without_properties(_param, [
6838
+ "backgroundColor",
6839
+ "logo",
6840
+ "handleLogoClick"
6841
+ ]);
6842
+ var _props_menuItems, _props_menuItems1;
6838
6843
  var _ref = _sliced_to_array((0, import_react35.useState)(false), 2), isOpen = _ref[0], setIsOpen = _ref[1];
6839
6844
  return /* @__PURE__ */ import_react35.default.createElement("nav", {
6840
6845
  className: " hawa-transition-all hawa-sticky hawa-top-2"
6841
6846
  }, /* @__PURE__ */ import_react35.default.createElement(Collapsible, {
6842
- className: "hawa-bg-gray-800 hawa-p-4 hawa-relative hawa-m-2 hawa-rounded"
6847
+ className: "hawa-p-2 hawa-relative hawa-m-2 hawa-rounded",
6848
+ style: {
6849
+ backgroundColor: backgroundColor || "#1f2937"
6850
+ }
6843
6851
  }, /* @__PURE__ */ import_react35.default.createElement("div", {
6844
- className: "hawa-flex hawa-justify-between hawa-items-center"
6852
+ className: "hawa-flex hawa-justify-between hawa-items-center hawa-px-3 "
6845
6853
  }, /* @__PURE__ */ import_react35.default.createElement("div", {
6846
6854
  className: "hawa-flex hawa-items-center"
6847
6855
  }, /* @__PURE__ */ import_react35.default.createElement("div", {
6848
- className: "hawa-text-white hawa-text-xl hawa-font-bold"
6849
- }, /* @__PURE__ */ import_react35.default.createElement(Logos.sikka, {
6850
- color: "#ffffff",
6851
- className: "hawa-h-6 hawa-w-6"
6852
- }))), /* @__PURE__ */ import_react35.default.createElement("div", {
6853
- className: "hawa-md:hawa-hidden"
6856
+ className: "hawa-text-white hawa-text-xl hawa-p-1.5 hawa-font-bold",
6857
+ onClick: function() {
6858
+ if (handleLogoClick) {
6859
+ handleLogoClick();
6860
+ }
6861
+ }
6862
+ }, logo)), /* @__PURE__ */ import_react35.default.createElement("div", {
6863
+ className: "hawa-hidden md:hawa-flex "
6864
+ }, (_props_menuItems = props.menuItems) === null || _props_menuItems === void 0 ? void 0 : _props_menuItems.map(function(item) {
6865
+ return /* @__PURE__ */ import_react35.default.createElement("div", {
6866
+ onClick: item.action,
6867
+ className: "hawa-p-1.5 hawa-px-2 hawa-text-sm hawa-text-center hawa-rounded hawa-text-white hover:hawa-text-black hover:hawa-bg-gray-300 hawa-transition-all hawa-cursor-pointer"
6868
+ }, item.label);
6869
+ })), /* @__PURE__ */ import_react35.default.createElement("div", {
6870
+ className: "md:hawa-hidden hawa-flex hawa-h-fit hawa-p-0 hawa-m-0"
6854
6871
  }, /* @__PURE__ */ import_react35.default.createElement(CollapsibleTrigger2, {
6855
6872
  onClick: function() {
6856
6873
  return setIsOpen(!isOpen);
6857
6874
  },
6858
- className: "hawa-text-white hawa-p-2",
6875
+ className: "hawa-text-white selection:hawa-p-0 hawa-h-full ",
6859
6876
  "aria-label": "Toggle menu"
6860
6877
  }, /* @__PURE__ */ import_react35.default.createElement("svg", {
6861
- className: cn("hawa-w-6 hawa-h-6", isOpen ? "hawa-invisible" : "hawa-visible"),
6878
+ xmlns: "http://www.w3.org/2000/svg",
6879
+ width: "24",
6880
+ height: "24",
6881
+ viewBox: "0 0 24 24",
6862
6882
  fill: "none",
6863
6883
  stroke: "currentColor",
6884
+ "stroke-width": "2",
6885
+ "stroke-linecap": "round",
6886
+ "stroke-linejoin": "round",
6887
+ className: cn("hawa-w-6 hawa-h-6 hawa-fixed", isOpen ? "hawa-invisible" : "hawa-visible")
6888
+ }, /* @__PURE__ */ import_react35.default.createElement("line", {
6889
+ x1: "4",
6890
+ x2: "20",
6891
+ y1: "12",
6892
+ y2: "12"
6893
+ }), /* @__PURE__ */ import_react35.default.createElement("line", {
6894
+ x1: "4",
6895
+ x2: "20",
6896
+ y1: "6",
6897
+ y2: "6"
6898
+ }), /* @__PURE__ */ import_react35.default.createElement("line", {
6899
+ x1: "4",
6900
+ x2: "20",
6901
+ y1: "18",
6902
+ y2: "18"
6903
+ })), /* @__PURE__ */ import_react35.default.createElement("svg", {
6904
+ xmlns: "http://www.w3.org/2000/svg",
6905
+ width: "24",
6906
+ height: "24",
6864
6907
  viewBox: "0 0 24 24",
6865
- xmlns: "http://www.w3.org/2000/svg"
6908
+ fill: "none",
6909
+ stroke: "currentColor",
6910
+ "stroke-width": "2",
6911
+ "stroke-linecap": "round",
6912
+ "stroke-linejoin": "round",
6913
+ className: cn("hawa-w-6 hawa-h-6", !isOpen ? "hawa-invisible" : "hawa-visible")
6866
6914
  }, /* @__PURE__ */ import_react35.default.createElement("path", {
6867
- strokeLinecap: "round",
6868
- strokeLinejoin: "round",
6869
- strokeWidth: "2",
6870
- d: "M4 6h16M4 12h16m-7 6h7"
6915
+ d: "M18 6 6 18"
6916
+ }), /* @__PURE__ */ import_react35.default.createElement("path", {
6917
+ d: "m6 6 12 12"
6871
6918
  }))))), /* @__PURE__ */ import_react35.default.createElement(CollapsibleContent2, {
6872
- className: cn("data-[state=open]:hawa-animate-in", "data-[state=open]:hawa-fade-in-90", "hawa-transition-all hawa-bg-gray-400 hawa-absolute hawa-top-[88px] hawa-flex hawa-flex-col hawa-rounded"),
6919
+ className: cn("data-[state=closed]:hawa-opacity-0", "data-[state=open]:hawa-animate-in", "data-[state=open]:hawa-fade-in-90", "hawa-transition-all hawa-bg-gray-200 hawa-border hawa-absolute hawa-p-1 hawa-left-0 hawa-top-[60px] hawa-flex hawa-flex-col hawa-rounded"),
6873
6920
  style: {
6874
- width: "calc(100% - 32px)",
6921
+ width: "calc(100%)",
6875
6922
  zIndex: -100
6876
6923
  }
6877
- }, (_props_menuItems = props.menuItems) === null || _props_menuItems === void 0 ? void 0 : _props_menuItems.map(function(item) {
6924
+ }, (_props_menuItems1 = props.menuItems) === null || _props_menuItems1 === void 0 ? void 0 : _props_menuItems1.map(function(item) {
6878
6925
  return /* @__PURE__ */ import_react35.default.createElement("div", {
6879
6926
  onClick: item.action,
6880
- className: "hawa-text-white hawa-p-4 hawa-px-10 hover:hawa-bg-gray-950 hawa-transition-all hawa-cursor-pointer"
6927
+ className: "hawa-text-black hawa-p-2 hawa-px-10 hawa-text-center hawa-rounded hover:hawa-bg-gray-300 hawa-transition-all hawa-cursor-pointer"
6881
6928
  }, item.label);
6882
6929
  }))));
6883
6930
  };
package/dist/index.mjs CHANGED
@@ -6667,60 +6667,111 @@ var CollapsibleTrigger2 = CollapsiblePrimitive.CollapsibleTrigger;
6667
6667
  var CollapsibleContent2 = CollapsiblePrimitive.CollapsibleContent;
6668
6668
 
6669
6669
  // components/layout/Navbar.tsx
6670
- var Navbar = (props) => {
6670
+ var Navbar = ({
6671
+ backgroundColor,
6672
+ logo,
6673
+ handleLogoClick,
6674
+ ...props
6675
+ }) => {
6671
6676
  const [isOpen, setIsOpen] = useState22(false);
6672
- return /* @__PURE__ */ React61.createElement("nav", { className: " hawa-transition-all hawa-sticky hawa-top-2" }, /* @__PURE__ */ React61.createElement(Collapsible, { className: "hawa-bg-gray-800 hawa-p-4 hawa-relative hawa-m-2 hawa-rounded" }, /* @__PURE__ */ React61.createElement("div", { className: "hawa-flex hawa-justify-between hawa-items-center" }, /* @__PURE__ */ React61.createElement("div", { className: "hawa-flex hawa-items-center" }, /* @__PURE__ */ React61.createElement("div", { className: "hawa-text-white hawa-text-xl hawa-font-bold" }, /* @__PURE__ */ React61.createElement(Logos.sikka, { color: "#ffffff", className: "hawa-h-6 hawa-w-6" }))), /* @__PURE__ */ React61.createElement("div", { className: "hawa-md:hawa-hidden" }, /* @__PURE__ */ React61.createElement(
6673
- CollapsibleTrigger2,
6677
+ return /* @__PURE__ */ React61.createElement("nav", { className: " hawa-transition-all hawa-sticky hawa-top-2" }, /* @__PURE__ */ React61.createElement(
6678
+ Collapsible,
6674
6679
  {
6675
- onClick: () => setIsOpen(!isOpen),
6676
- className: "hawa-text-white hawa-p-2",
6677
- "aria-label": "Toggle menu"
6680
+ className: "hawa-p-2 hawa-relative hawa-m-2 hawa-rounded",
6681
+ style: { backgroundColor: backgroundColor || "#1f2937" }
6678
6682
  },
6679
- /* @__PURE__ */ React61.createElement(
6680
- "svg",
6683
+ /* @__PURE__ */ React61.createElement("div", { className: "hawa-flex hawa-justify-between hawa-items-center hawa-px-3 " }, /* @__PURE__ */ React61.createElement("div", { className: "hawa-flex hawa-items-center" }, /* @__PURE__ */ React61.createElement(
6684
+ "div",
6681
6685
  {
6682
- className: cn(
6683
- "hawa-w-6 hawa-h-6",
6684
- isOpen ? "hawa-invisible" : "hawa-visible"
6685
- ),
6686
- fill: "none",
6687
- stroke: "currentColor",
6688
- viewBox: "0 0 24 24",
6689
- xmlns: "http://www.w3.org/2000/svg"
6690
- },
6691
- /* @__PURE__ */ React61.createElement(
6692
- "path",
6693
- {
6694
- strokeLinecap: "round",
6695
- strokeLinejoin: "round",
6696
- strokeWidth: "2",
6697
- d: "M4 6h16M4 12h16m-7 6h7"
6686
+ className: "hawa-text-white hawa-text-xl hawa-p-1.5 hawa-font-bold",
6687
+ onClick: () => {
6688
+ if (handleLogoClick) {
6689
+ handleLogoClick();
6690
+ }
6698
6691
  }
6699
- )
6700
- )
6701
- ))), /* @__PURE__ */ React61.createElement(
6702
- CollapsibleContent2,
6703
- {
6704
- className: cn(
6705
- "data-[state=open]:hawa-animate-in",
6706
- "data-[state=open]:hawa-fade-in-90",
6707
- "hawa-transition-all hawa-bg-gray-400 hawa-absolute hawa-top-[88px] hawa-flex hawa-flex-col hawa-rounded"
6708
- // "hawa-transition-all hawa-bg-gray-400 hawa-fixed hawa-left-0 hawa-top-[72px] hawa-w-full hawa-flex hawa-flex-col"
6709
- ),
6710
- style: {
6711
- width: "calc(100% - 32px)",
6712
- zIndex: -100
6713
- }
6714
- },
6715
- props.menuItems?.map((item) => /* @__PURE__ */ React61.createElement(
6692
+ },
6693
+ logo
6694
+ )), /* @__PURE__ */ React61.createElement("div", { className: "hawa-hidden md:hawa-flex " }, props.menuItems?.map((item) => /* @__PURE__ */ React61.createElement(
6716
6695
  "div",
6717
6696
  {
6718
6697
  onClick: item.action,
6719
- className: "hawa-text-white hawa-p-4 hawa-px-10 hover:hawa-bg-gray-950 hawa-transition-all hawa-cursor-pointer"
6698
+ className: "hawa-p-1.5 hawa-px-2 hawa-text-sm hawa-text-center hawa-rounded hawa-text-white hover:hawa-text-black hover:hawa-bg-gray-300 hawa-transition-all hawa-cursor-pointer"
6720
6699
  },
6721
6700
  item.label
6722
- ))
6723
- )));
6701
+ ))), /* @__PURE__ */ React61.createElement("div", { className: "md:hawa-hidden hawa-flex hawa-h-fit hawa-p-0 hawa-m-0" }, /* @__PURE__ */ React61.createElement(
6702
+ CollapsibleTrigger2,
6703
+ {
6704
+ onClick: () => setIsOpen(!isOpen),
6705
+ className: "hawa-text-white selection:hawa-p-0 hawa-h-full ",
6706
+ "aria-label": "Toggle menu"
6707
+ },
6708
+ /* @__PURE__ */ React61.createElement(
6709
+ "svg",
6710
+ {
6711
+ xmlns: "http://www.w3.org/2000/svg",
6712
+ width: "24",
6713
+ height: "24",
6714
+ viewBox: "0 0 24 24",
6715
+ fill: "none",
6716
+ stroke: "currentColor",
6717
+ "stroke-width": "2",
6718
+ "stroke-linecap": "round",
6719
+ "stroke-linejoin": "round",
6720
+ className: cn(
6721
+ "hawa-w-6 hawa-h-6 hawa-fixed",
6722
+ isOpen ? "hawa-invisible" : "hawa-visible"
6723
+ )
6724
+ },
6725
+ /* @__PURE__ */ React61.createElement("line", { x1: "4", x2: "20", y1: "12", y2: "12" }),
6726
+ /* @__PURE__ */ React61.createElement("line", { x1: "4", x2: "20", y1: "6", y2: "6" }),
6727
+ /* @__PURE__ */ React61.createElement("line", { x1: "4", x2: "20", y1: "18", y2: "18" })
6728
+ ),
6729
+ /* @__PURE__ */ React61.createElement(
6730
+ "svg",
6731
+ {
6732
+ xmlns: "http://www.w3.org/2000/svg",
6733
+ width: "24",
6734
+ height: "24",
6735
+ viewBox: "0 0 24 24",
6736
+ fill: "none",
6737
+ stroke: "currentColor",
6738
+ "stroke-width": "2",
6739
+ "stroke-linecap": "round",
6740
+ "stroke-linejoin": "round",
6741
+ className: cn(
6742
+ "hawa-w-6 hawa-h-6",
6743
+ !isOpen ? "hawa-invisible" : "hawa-visible"
6744
+ )
6745
+ },
6746
+ /* @__PURE__ */ React61.createElement("path", { d: "M18 6 6 18" }),
6747
+ /* @__PURE__ */ React61.createElement("path", { d: "m6 6 12 12" })
6748
+ )
6749
+ ))),
6750
+ /* @__PURE__ */ React61.createElement(
6751
+ CollapsibleContent2,
6752
+ {
6753
+ className: cn(
6754
+ "data-[state=closed]:hawa-opacity-0",
6755
+ "data-[state=open]:hawa-animate-in",
6756
+ "data-[state=open]:hawa-fade-in-90",
6757
+ "hawa-transition-all hawa-bg-gray-200 hawa-border hawa-absolute hawa-p-1 hawa-left-0 hawa-top-[60px] hawa-flex hawa-flex-col hawa-rounded"
6758
+ // "hawa-transition-all hawa-bg-gray-400 hawa-fixed hawa-left-0 hawa-top-[72px] hawa-w-full hawa-flex hawa-flex-col"
6759
+ ),
6760
+ style: {
6761
+ width: "calc(100%)",
6762
+ zIndex: -100
6763
+ }
6764
+ },
6765
+ props.menuItems?.map((item) => /* @__PURE__ */ React61.createElement(
6766
+ "div",
6767
+ {
6768
+ onClick: item.action,
6769
+ className: "hawa-text-black hawa-p-2 hawa-px-10 hawa-text-center hawa-rounded hover:hawa-bg-gray-300 hawa-transition-all hawa-cursor-pointer"
6770
+ },
6771
+ item.label
6772
+ ))
6773
+ )
6774
+ ));
6724
6775
  };
6725
6776
 
6726
6777
  // components/layout/AppLayout.tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.13.10-next",
3
+ "version": "0.13.11-next",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {