@sikka/hawa 0.30.23-next → 0.30.25-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/{DropdownMenu-sSnQc6fT.d.ts → DropdownMenu-o_-MnT5h.d.mts} +6 -6
- package/dist/{DropdownMenu-arqV1gRt.d.mts → DropdownMenu-p-Ha-y2R.d.ts} +6 -6
- package/dist/appLayout/index.d.mts +8 -1
- package/dist/appLayout/index.d.ts +8 -1
- package/dist/appLayout/index.js +31 -0
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs +35 -4
- package/dist/appLayout/index.mjs.map +1 -1
- package/dist/appTopbar/index.d.mts +5 -2
- package/dist/appTopbar/index.d.ts +5 -2
- package/dist/appTopbar/index.js +31 -0
- package/dist/appTopbar/index.js.map +1 -1
- package/dist/appTopbar/index.mjs +31 -0
- package/dist/appTopbar/index.mjs.map +1 -1
- package/dist/blocks/index.d.mts +1 -1
- package/dist/blocks/index.d.ts +1 -1
- package/dist/blocks/index.js +31 -0
- package/dist/blocks/index.mjs +2 -2
- package/dist/blocks/pricing/index.mjs +3 -3
- package/dist/breadcrumb/index.d.mts +7 -5
- package/dist/breadcrumb/index.d.ts +7 -5
- package/dist/breadcrumb/index.js +36 -12
- package/dist/breadcrumb/index.js.map +1 -1
- package/dist/breadcrumb/index.mjs +36 -12
- package/dist/breadcrumb/index.mjs.map +1 -1
- package/dist/{chunk-CXBN42TF.mjs → chunk-7LAUVLVZ.mjs} +1 -1
- package/dist/{chunk-HOE4FCIF.mjs → chunk-DGOT2FVH.mjs} +30 -0
- package/dist/{chunk-MH5K6NEO.mjs → chunk-TKSAYWDH.mjs} +1 -1
- package/dist/combobox/index.js +44 -35
- package/dist/combobox/index.js.map +1 -1
- package/dist/combobox/index.mjs +44 -35
- package/dist/combobox/index.mjs.map +1 -1
- package/dist/commonTypes-52DloiYq.d.mts +7 -0
- package/dist/commonTypes-52DloiYq.d.ts +7 -0
- package/dist/dataTable/index.js +31 -0
- package/dist/dataTable/index.js.map +1 -1
- package/dist/dataTable/index.mjs +31 -0
- package/dist/dataTable/index.mjs.map +1 -1
- package/dist/docsLayout/index.d.mts +1 -1
- package/dist/docsLayout/index.d.ts +1 -1
- package/dist/dropdownMenu/index.d.mts +9 -5
- package/dist/dropdownMenu/index.d.ts +9 -5
- package/dist/dropdownMenu/index.js +30 -0
- package/dist/dropdownMenu/index.js.map +1 -1
- package/dist/dropdownMenu/index.mjs +30 -0
- package/dist/dropdownMenu/index.mjs.map +1 -1
- package/dist/elements/index.d.mts +8 -6
- package/dist/elements/index.d.ts +8 -6
- package/dist/elements/index.js +101 -47
- package/dist/elements/index.mjs +74 -50
- package/dist/index.d.mts +12 -10
- package/dist/index.d.ts +12 -10
- package/dist/index.js +101 -47
- package/dist/index.mjs +206 -152
- package/dist/layout/index.d.mts +1 -1
- package/dist/layout/index.d.ts +1 -1
- package/dist/layout/index.js +31 -0
- package/dist/layout/index.mjs +2 -2
- package/dist/splitButton/index.d.mts +8 -1
- package/dist/splitButton/index.d.ts +8 -1
- package/dist/splitButton/index.js +31 -0
- package/dist/splitButton/index.js.map +1 -1
- package/dist/splitButton/index.mjs +31 -0
- package/dist/splitButton/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -892,6 +892,9 @@ var DropdownMenu = ({
|
|
|
892
892
|
default: "hawa-px-2 hawa-py-3 ",
|
|
893
893
|
sm: "hawa-text-xs hawa-px-1.5 hawa-py-1.5 "
|
|
894
894
|
};
|
|
895
|
+
let [values, setValues] = React5.useState(
|
|
896
|
+
items.map((item) => item.currentOption)
|
|
897
|
+
);
|
|
895
898
|
return /* @__PURE__ */ React5.createElement(
|
|
896
899
|
DropdownMenuRoot,
|
|
897
900
|
{
|
|
@@ -919,11 +922,38 @@ var DropdownMenu = ({
|
|
|
919
922
|
},
|
|
920
923
|
header && header,
|
|
921
924
|
items && items.map((item, index) => {
|
|
925
|
+
var _a;
|
|
922
926
|
const ItemLinkComponent = item.slug ? LinkComponent : "a";
|
|
923
927
|
if (item.itemType === "separator") {
|
|
924
928
|
return /* @__PURE__ */ React5.createElement(DropdownMenuSeparator, { key: index });
|
|
925
929
|
} else if (item.itemType === "label") {
|
|
926
930
|
return /* @__PURE__ */ React5.createElement(DropdownMenuLabel, { key: index }, item.label);
|
|
931
|
+
} else if (item.itemType === "radio") {
|
|
932
|
+
let dd = item.currentOption;
|
|
933
|
+
return /* @__PURE__ */ React5.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React5.createElement(
|
|
934
|
+
DropdownMenuSubTrigger,
|
|
935
|
+
{
|
|
936
|
+
dir: direction,
|
|
937
|
+
className: cn(sizeStyles2[size])
|
|
938
|
+
},
|
|
939
|
+
item.icon && item.icon,
|
|
940
|
+
item.label && item.label
|
|
941
|
+
), /* @__PURE__ */ React5.createElement(DropdownMenuSubContent, null, /* @__PURE__ */ React5.createElement(
|
|
942
|
+
DropdownMenuRadioGroup,
|
|
943
|
+
{
|
|
944
|
+
value: values[index],
|
|
945
|
+
onValueChange: (e) => {
|
|
946
|
+
let newValues = [...values];
|
|
947
|
+
newValues[index] = e;
|
|
948
|
+
setValues(newValues);
|
|
949
|
+
console.log("changing to ", e);
|
|
950
|
+
if (item.onOptionChange) {
|
|
951
|
+
item.onOptionChange(e);
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
},
|
|
955
|
+
(_a = item.options) == null ? void 0 : _a.map((opt, i) => /* @__PURE__ */ React5.createElement(DropdownMenuRadioItem, { key: i, value: opt.value }, opt.label))
|
|
956
|
+
)));
|
|
927
957
|
} else if (item.itemType === "custom") {
|
|
928
958
|
return /* @__PURE__ */ React5.createElement("div", { key: index }, item.content);
|
|
929
959
|
} else {
|
|
@@ -3771,46 +3801,55 @@ var Combobox = React27.forwardRef(
|
|
|
3771
3801
|
}
|
|
3772
3802
|
),
|
|
3773
3803
|
/* @__PURE__ */ React27.createElement(CommandEmpty, null, ((_c = props.texts) == null ? void 0 : _c.noItems) || "No items found."),
|
|
3774
|
-
/* @__PURE__ */ React27.createElement(CommandList, null, /* @__PURE__ */ React27.createElement(
|
|
3775
|
-
|
|
3804
|
+
/* @__PURE__ */ React27.createElement(CommandList, null, /* @__PURE__ */ React27.createElement(
|
|
3805
|
+
CommandGroup,
|
|
3776
3806
|
{
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3807
|
+
className: cn(
|
|
3808
|
+
"hawa-max-h-[200px]",
|
|
3809
|
+
data.length > 0 && "hawa-overflow-y-scroll"
|
|
3810
|
+
)
|
|
3811
|
+
},
|
|
3812
|
+
data.map((item, i) => /* @__PURE__ */ React27.createElement(
|
|
3813
|
+
CommandItem,
|
|
3814
|
+
{
|
|
3815
|
+
key: i,
|
|
3816
|
+
onSelect: () => {
|
|
3817
|
+
const newValue = getProperty(item, valueKey);
|
|
3818
|
+
setValue(
|
|
3785
3819
|
newValue === value ? "" : newValue
|
|
3786
3820
|
);
|
|
3821
|
+
if (props.onChange) {
|
|
3822
|
+
props.onChange(
|
|
3823
|
+
newValue === value ? "" : newValue
|
|
3824
|
+
);
|
|
3825
|
+
}
|
|
3826
|
+
setOpen(false);
|
|
3787
3827
|
}
|
|
3788
|
-
setOpen(false);
|
|
3789
|
-
}
|
|
3790
|
-
},
|
|
3791
|
-
/* @__PURE__ */ React27.createElement(
|
|
3792
|
-
"svg",
|
|
3793
|
-
{
|
|
3794
|
-
"aria-label": "Check Icon",
|
|
3795
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
3796
|
-
width: "24",
|
|
3797
|
-
height: "24",
|
|
3798
|
-
viewBox: "0 0 24 24",
|
|
3799
|
-
fill: "none",
|
|
3800
|
-
stroke: "currentColor",
|
|
3801
|
-
strokeWidth: "2",
|
|
3802
|
-
strokeLinecap: "round",
|
|
3803
|
-
strokeLinejoin: "round",
|
|
3804
|
-
className: cn(
|
|
3805
|
-
"hawa-icon",
|
|
3806
|
-
value === getProperty(item, valueKey) ? "hawa-opacity-100" : "hawa-opacity-0"
|
|
3807
|
-
),
|
|
3808
|
-
style: { marginInlineEnd: "0.5rem" }
|
|
3809
3828
|
},
|
|
3810
|
-
/* @__PURE__ */ React27.createElement(
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3829
|
+
/* @__PURE__ */ React27.createElement(
|
|
3830
|
+
"svg",
|
|
3831
|
+
{
|
|
3832
|
+
"aria-label": "Check Icon",
|
|
3833
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3834
|
+
width: "24",
|
|
3835
|
+
height: "24",
|
|
3836
|
+
viewBox: "0 0 24 24",
|
|
3837
|
+
fill: "none",
|
|
3838
|
+
stroke: "currentColor",
|
|
3839
|
+
strokeWidth: "2",
|
|
3840
|
+
strokeLinecap: "round",
|
|
3841
|
+
strokeLinejoin: "round",
|
|
3842
|
+
className: cn(
|
|
3843
|
+
"hawa-icon",
|
|
3844
|
+
value === getProperty(item, valueKey) ? "hawa-opacity-100" : "hawa-opacity-0"
|
|
3845
|
+
),
|
|
3846
|
+
style: { marginInlineEnd: "0.5rem" }
|
|
3847
|
+
},
|
|
3848
|
+
/* @__PURE__ */ React27.createElement("polyline", { points: "20 6 9 17 4 12" })
|
|
3849
|
+
),
|
|
3850
|
+
renderOption ? renderOption(item) : getProperty(item, labelKey)
|
|
3851
|
+
))
|
|
3852
|
+
))
|
|
3814
3853
|
)
|
|
3815
3854
|
))
|
|
3816
3855
|
);
|
|
@@ -4657,24 +4696,39 @@ Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
|
4657
4696
|
var import_react15 = __toESM(require("react"));
|
|
4658
4697
|
var Breadcrumb = ({
|
|
4659
4698
|
breadcrumbLinks,
|
|
4660
|
-
separator = ">"
|
|
4699
|
+
separator = ">",
|
|
4700
|
+
size = "normal"
|
|
4661
4701
|
}) => {
|
|
4662
|
-
|
|
4702
|
+
const textStyles = {
|
|
4703
|
+
normal: "",
|
|
4704
|
+
small: "hawa-text-sm",
|
|
4705
|
+
xs: "hawa-text-xs"
|
|
4706
|
+
};
|
|
4707
|
+
return /* @__PURE__ */ import_react15.default.createElement(
|
|
4663
4708
|
"div",
|
|
4664
4709
|
{
|
|
4665
|
-
|
|
4666
|
-
|
|
4710
|
+
className: cn(
|
|
4711
|
+
"hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 hawa-text-sm",
|
|
4712
|
+
textStyles[size]
|
|
4713
|
+
)
|
|
4667
4714
|
},
|
|
4668
|
-
/* @__PURE__ */ import_react15.default.createElement(
|
|
4669
|
-
"
|
|
4715
|
+
breadcrumbLinks.map((singleBreadcrumbLink, index) => /* @__PURE__ */ import_react15.default.createElement(
|
|
4716
|
+
"div",
|
|
4670
4717
|
{
|
|
4671
|
-
|
|
4672
|
-
className:
|
|
4718
|
+
key: index,
|
|
4719
|
+
className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2"
|
|
4673
4720
|
},
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4721
|
+
/* @__PURE__ */ import_react15.default.createElement(
|
|
4722
|
+
"a",
|
|
4723
|
+
{
|
|
4724
|
+
href: singleBreadcrumbLink.href,
|
|
4725
|
+
className: index + 1 === breadcrumbLinks.length ? "hawa-pointer-events-none" : "hawa-underline-offset-4 hawa-transition-all hover:hawa-text-primary hover:hawa-underline hover:hawa-decoration-2"
|
|
4726
|
+
},
|
|
4727
|
+
singleBreadcrumbLink.label
|
|
4728
|
+
),
|
|
4729
|
+
index != breadcrumbLinks.length - 1 ? typeof separator == "string" ? /* @__PURE__ */ import_react15.default.createElement("div", null, separator) : /* @__PURE__ */ import_react15.default.createElement("div", null, separator) : null
|
|
4730
|
+
))
|
|
4731
|
+
);
|
|
4678
4732
|
};
|
|
4679
4733
|
|
|
4680
4734
|
// elements/appStores/AppStores.tsx
|