@sikka/hawa 0.1.88 → 0.1.90
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.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3581 -2569
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +20 -9
- package/dist/index.mjs.map +1 -0
- package/package.json +1 -1
- package/src/blocks/AuthForms/ResetPasswordForm.tsx +9 -9
- package/src/elements/DropdownMenu.tsx +12 -2
- package/src/elements/HawaTable.tsx +4 -1
- package/tsup.config.js +7 -0
package/dist/index.mjs
CHANGED
|
@@ -1158,6 +1158,7 @@ var DropdownMenu = ({
|
|
|
1158
1158
|
triggerClassname,
|
|
1159
1159
|
align,
|
|
1160
1160
|
alignOffset,
|
|
1161
|
+
selectCallback,
|
|
1161
1162
|
width = "default"
|
|
1162
1163
|
}) => {
|
|
1163
1164
|
const widthStyles2 = {
|
|
@@ -1181,7 +1182,10 @@ var DropdownMenu = ({
|
|
|
1181
1182
|
{
|
|
1182
1183
|
disabled: subitem.disabled,
|
|
1183
1184
|
className: "flex flex-row gap-2",
|
|
1184
|
-
onSelect: () =>
|
|
1185
|
+
onSelect: () => {
|
|
1186
|
+
subitem.action();
|
|
1187
|
+
selectCallback(subitem.value);
|
|
1188
|
+
},
|
|
1185
1189
|
key: subIndex
|
|
1186
1190
|
},
|
|
1187
1191
|
subitem.icon && subitem.icon,
|
|
@@ -1196,7 +1200,12 @@ var DropdownMenu = ({
|
|
|
1196
1200
|
if (item.presist) {
|
|
1197
1201
|
e.preventDefault();
|
|
1198
1202
|
}
|
|
1199
|
-
item.action
|
|
1203
|
+
if (item.action) {
|
|
1204
|
+
item.action();
|
|
1205
|
+
selectCallback(item.value);
|
|
1206
|
+
} else {
|
|
1207
|
+
selectCallback(item.value);
|
|
1208
|
+
}
|
|
1200
1209
|
},
|
|
1201
1210
|
end: item.end
|
|
1202
1211
|
},
|
|
@@ -1437,6 +1446,7 @@ var HawaTable = ({
|
|
|
1437
1446
|
direction,
|
|
1438
1447
|
side: "right",
|
|
1439
1448
|
items: props.actions,
|
|
1449
|
+
selectCallback: (e) => props.handleActionClick(e, singleRow),
|
|
1440
1450
|
trigger: /* @__PURE__ */ React20.createElement("div", { className: "flex w-fit cursor-pointer items-center justify-center rounded p-2 hover:bg-gray-200 dark:hover:bg-gray-600" }, /* @__PURE__ */ React20.createElement(
|
|
1441
1451
|
"svg",
|
|
1442
1452
|
{
|
|
@@ -9791,29 +9801,29 @@ var ResetPasswordForm = (props) => {
|
|
|
9791
9801
|
{
|
|
9792
9802
|
width: "full",
|
|
9793
9803
|
type: "text",
|
|
9794
|
-
label: props.texts
|
|
9804
|
+
label: props.texts?.emailLabel,
|
|
9795
9805
|
helpertext: errors.email?.message,
|
|
9796
|
-
placeholder: props.texts
|
|
9806
|
+
placeholder: props.texts?.emailPlaceholder,
|
|
9797
9807
|
...field,
|
|
9798
9808
|
value: field.value ?? ""
|
|
9799
9809
|
}
|
|
9800
9810
|
),
|
|
9801
9811
|
rules: {
|
|
9802
|
-
required: props.texts
|
|
9812
|
+
required: props.texts?.emailRequiredText,
|
|
9803
9813
|
pattern: {
|
|
9804
9814
|
value: /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
|
|
9805
|
-
message: props.texts
|
|
9815
|
+
message: props.texts?.emailInvalidText
|
|
9806
9816
|
}
|
|
9807
9817
|
}
|
|
9808
9818
|
}
|
|
9809
|
-
), /* @__PURE__ */ React90.createElement("div", { className: " pb-2 text-left text-sm dark:text-gray-300" }, props.texts
|
|
9819
|
+
), /* @__PURE__ */ React90.createElement("div", { className: " pb-2 text-left text-sm dark:text-gray-300" }, props.texts?.dontHaveAccount ?? "Don't have an account? ", /* @__PURE__ */ React90.createElement(
|
|
9810
9820
|
"span",
|
|
9811
9821
|
{
|
|
9812
9822
|
onClick: props.handleRouteToSignUp,
|
|
9813
9823
|
className: "clickable-link"
|
|
9814
9824
|
},
|
|
9815
|
-
props.texts
|
|
9816
|
-
))), /* @__PURE__ */ React90.createElement(CardFooter, null, /* @__PURE__ */ React90.createElement(Button, { type: "submit", className: "w-full" }, props.texts
|
|
9825
|
+
props.texts?.signUpText ?? "Sign Up"
|
|
9826
|
+
))), /* @__PURE__ */ React90.createElement(CardFooter, null, /* @__PURE__ */ React90.createElement(Button, { type: "submit", className: "w-full" }, props.texts?.resetPassword)))) : /* @__PURE__ */ React90.createElement(CardContent, { headless: true }, /* @__PURE__ */ React90.createElement("div", { className: "text-center" }, props.texts?.emailSentText)));
|
|
9817
9827
|
};
|
|
9818
9828
|
|
|
9819
9829
|
// src/blocks/AuthForms/CodeConfirmation.tsx
|
|
@@ -11008,3 +11018,4 @@ export {
|
|
|
11008
11018
|
toast,
|
|
11009
11019
|
useToast
|
|
11010
11020
|
};
|
|
11021
|
+
//# sourceMappingURL=index.mjs.map
|