@sikka/hawa 0.12.2-next → 0.12.4-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
@@ -1792,6 +1792,9 @@ input[type="number"]::-webkit-inner-spin-button,
1792
1792
  .hawa-border-r {
1793
1793
  border-right-width: 1px;
1794
1794
  }
1795
+ .hawa-border-r-0 {
1796
+ border-right-width: 0px;
1797
+ }
1795
1798
  .hawa-border-t {
1796
1799
  border-top-width: 1px;
1797
1800
  }
package/dist/index.d.mts CHANGED
@@ -148,10 +148,11 @@ interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, V
148
148
  }
149
149
  declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
150
150
 
151
- declare const SplitButton: {
152
- (props: any): React$1.JSX.Element;
153
- displayName: string;
154
- };
151
+ interface SplitButtonProps extends ButtonProps {
152
+ direction?: "ltr" | "rtl";
153
+ menuItems?: MenuItemType[];
154
+ }
155
+ declare const SplitButton: React$1.FC<SplitButtonProps>;
155
156
 
156
157
  declare const Dialog: React$1.FC<SheetPrimitive.DialogProps>;
157
158
  declare const DialogTrigger: React$1.ForwardRefExoticComponent<SheetPrimitive.DialogTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
package/dist/index.d.ts CHANGED
@@ -148,10 +148,11 @@ interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, V
148
148
  }
149
149
  declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
150
150
 
151
- declare const SplitButton: {
152
- (props: any): React$1.JSX.Element;
153
- displayName: string;
154
- };
151
+ interface SplitButtonProps extends ButtonProps {
152
+ direction?: "ltr" | "rtl";
153
+ menuItems?: MenuItemType[];
154
+ }
155
+ declare const SplitButton: React$1.FC<SplitButtonProps>;
155
156
 
156
157
  declare const Dialog: React$1.FC<SheetPrimitive.DialogProps>;
157
158
  declare const DialogTrigger: React$1.ForwardRefExoticComponent<SheetPrimitive.DialogTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
package/dist/index.js CHANGED
@@ -1537,30 +1537,45 @@ var LandingCard = function(props) {
1537
1537
  };
1538
1538
  // components/elements/SplitButton.tsx
1539
1539
  var React11 = __toESM(require("react"));
1540
- var SplitButton = function(props) {
1541
- return /* @__PURE__ */ React11.createElement("div", {
1542
- className: " hawa-h-fit hawa-flex hawa-flex-row hawa-justify-center "
1540
+ var SplitButton = function(_param) /* @__PURE__ */ {
1541
+ var variant = _param.variant, _param_direction = _param.direction, direction = _param_direction === void 0 ? "ltr" : _param_direction, _param_menuItems = _param.menuItems, menuItems = _param_menuItems === void 0 ? [] : _param_menuItems, children = _param.children, props = _object_without_properties(_param, [
1542
+ "variant",
1543
+ "direction",
1544
+ "menuItems",
1545
+ "children"
1546
+ ]);
1547
+ return React11.createElement("div", {
1548
+ className: cn("hawa-h-fit hawa-flex hawa-justify-center", direction === "rtl" ? "hawa-flex-row-reverse" : "hawa-flex-row")
1543
1549
  }, /* @__PURE__ */ React11.createElement(Button, {
1544
- variant: props.variant,
1545
- className: "hawa-rounded-r-none"
1546
- }, "something"), /* @__PURE__ */ React11.createElement(Button, {
1547
- asChild: true,
1548
- variant: props.variant,
1549
- size: "icon",
1550
- className: "hawa-rounded-l-none hawa-h-10 hawa-w-fit hawa-px-1 hawa-border-l-0"
1551
- }, /* @__PURE__ */ React11.createElement("svg", {
1552
- xmlns: "http://www.w3.org/2000/svg",
1553
- width: "18",
1554
- height: "18",
1555
- viewBox: "0 0 24 24",
1556
- fill: "none",
1557
- stroke: "currentColor",
1558
- strokeWidth: "2",
1559
- strokeLinecap: "round",
1560
- strokeLinejoin: "round"
1561
- }, /* @__PURE__ */ React11.createElement("path", {
1562
- d: "m6 9 6 6 6-6"
1563
- }))));
1550
+ variant: variant,
1551
+ onClick: function() {
1552
+ return console.log("btn clicked");
1553
+ },
1554
+ className: direction === "rtl" ? "hawa-rounded-l-none" : "hawa-rounded-r-none"
1555
+ }, children), /* @__PURE__ */ React11.createElement(DropdownMenu, {
1556
+ size: "sm",
1557
+ width: "sm",
1558
+ direction: direction,
1559
+ items: menuItems,
1560
+ trigger: /* @__PURE__ */ React11.createElement(Button, {
1561
+ asChild: true,
1562
+ variant: variant,
1563
+ size: "icon",
1564
+ className: cn("hawa-h-10 hawa-w-fit hawa-px-1", direction === "rtl" ? "hawa-rounded-r-none hawa-border-r-0" : "hawa-border-l-0 hawa-rounded-l-none")
1565
+ }, /* @__PURE__ */ React11.createElement("svg", {
1566
+ xmlns: "http://www.w3.org/2000/svg",
1567
+ width: "18",
1568
+ height: "18",
1569
+ viewBox: "0 0 24 24",
1570
+ fill: "none",
1571
+ stroke: "currentColor",
1572
+ strokeWidth: "2",
1573
+ strokeLinecap: "round",
1574
+ strokeLinejoin: "round"
1575
+ }, /* @__PURE__ */ React11.createElement("path", {
1576
+ d: "m6 9 6 6 6-6"
1577
+ })))
1578
+ }));
1564
1579
  };
1565
1580
  SplitButton.displayName = "SplitButton";
1566
1581
  // components/elements/Dialog.tsx
package/dist/index.mjs CHANGED
@@ -880,30 +880,66 @@ var LandingCard = (props) => {
880
880
 
881
881
  // components/elements/SplitButton.tsx
882
882
  import * as React11 from "react";
883
- var SplitButton = (props) => /* @__PURE__ */ React11.createElement("div", { className: " hawa-h-fit hawa-flex hawa-flex-row hawa-justify-center " }, /* @__PURE__ */ React11.createElement(Button, { variant: props.variant, className: "hawa-rounded-r-none" }, "something"), /* @__PURE__ */ React11.createElement(
884
- Button,
883
+ var SplitButton = ({
884
+ variant,
885
+ direction = "ltr",
886
+ menuItems = [],
887
+ children,
888
+ ...props
889
+ }) => /* @__PURE__ */ React11.createElement(
890
+ "div",
885
891
  {
886
- asChild: true,
887
- variant: props.variant,
888
- size: "icon",
889
- className: "hawa-rounded-l-none hawa-h-10 hawa-w-fit hawa-px-1 hawa-border-l-0"
892
+ className: cn(
893
+ "hawa-h-fit hawa-flex hawa-justify-center",
894
+ direction === "rtl" ? "hawa-flex-row-reverse" : "hawa-flex-row"
895
+ )
890
896
  },
891
897
  /* @__PURE__ */ React11.createElement(
892
- "svg",
898
+ Button,
893
899
  {
894
- xmlns: "http://www.w3.org/2000/svg",
895
- width: "18",
896
- height: "18",
897
- viewBox: "0 0 24 24",
898
- fill: "none",
899
- stroke: "currentColor",
900
- strokeWidth: "2",
901
- strokeLinecap: "round",
902
- strokeLinejoin: "round"
900
+ variant,
901
+ onClick: () => console.log("btn clicked"),
902
+ className: direction === "rtl" ? "hawa-rounded-l-none" : "hawa-rounded-r-none"
903
903
  },
904
- /* @__PURE__ */ React11.createElement("path", { d: "m6 9 6 6 6-6" })
904
+ children
905
+ ),
906
+ /* @__PURE__ */ React11.createElement(
907
+ DropdownMenu,
908
+ {
909
+ size: "sm",
910
+ width: "sm",
911
+ direction,
912
+ items: menuItems,
913
+ trigger: /* @__PURE__ */ React11.createElement(
914
+ Button,
915
+ {
916
+ asChild: true,
917
+ variant,
918
+ size: "icon",
919
+ className: cn(
920
+ "hawa-h-10 hawa-w-fit hawa-px-1",
921
+ direction === "rtl" ? "hawa-rounded-r-none hawa-border-r-0" : "hawa-border-l-0 hawa-rounded-l-none"
922
+ )
923
+ },
924
+ /* @__PURE__ */ React11.createElement(
925
+ "svg",
926
+ {
927
+ xmlns: "http://www.w3.org/2000/svg",
928
+ width: "18",
929
+ height: "18",
930
+ viewBox: "0 0 24 24",
931
+ fill: "none",
932
+ stroke: "currentColor",
933
+ strokeWidth: "2",
934
+ strokeLinecap: "round",
935
+ strokeLinejoin: "round"
936
+ },
937
+ /* @__PURE__ */ React11.createElement("path", { d: "m6 9 6 6 6-6" })
938
+ )
939
+ )
940
+ }
905
941
  )
906
- ));
942
+ );
907
943
  SplitButton.displayName = "SplitButton";
908
944
 
909
945
  // components/elements/Dialog.tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.12.2-next",
3
+ "version": "0.12.4-next",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {