@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 +3 -0
- package/dist/index.d.mts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +38 -23
- package/dist/index.mjs +54 -18
- package/package.json +1 -1
package/dist/index.css
CHANGED
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
|
-
|
|
152
|
-
|
|
153
|
-
|
|
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
|
-
|
|
152
|
-
|
|
153
|
-
|
|
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(
|
|
1541
|
-
|
|
1542
|
-
|
|
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:
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
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 = (
|
|
884
|
-
|
|
883
|
+
var SplitButton = ({
|
|
884
|
+
variant,
|
|
885
|
+
direction = "ltr",
|
|
886
|
+
menuItems = [],
|
|
887
|
+
children,
|
|
888
|
+
...props
|
|
889
|
+
}) => /* @__PURE__ */ React11.createElement(
|
|
890
|
+
"div",
|
|
885
891
|
{
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
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
|
-
|
|
898
|
+
Button,
|
|
893
899
|
{
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
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
|
-
|
|
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
|