@sikka/hawa 0.10.1-next → 0.10.3-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.d.mts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +9 -7
- package/dist/index.mjs +12 -6
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -663,6 +663,7 @@ type ComboboxTypes<T> = {
|
|
|
663
663
|
buttonClassName?: string;
|
|
664
664
|
/** This the same value as the one with the key valueKey */
|
|
665
665
|
defaultValue?: string;
|
|
666
|
+
onChange?: (e: any) => void;
|
|
666
667
|
};
|
|
667
668
|
declare const Combobox: React$1.FC<ComboboxTypes<any>>;
|
|
668
669
|
|
|
@@ -1068,7 +1069,9 @@ type RegisterFormTypes = {
|
|
|
1068
1069
|
isTwitterLoading?: boolean;
|
|
1069
1070
|
/** If true, a loading spinner is displayed within the Github login button. */
|
|
1070
1071
|
isGithubLoading?: boolean;
|
|
1071
|
-
userReferenceOptions
|
|
1072
|
+
userReferenceOptions?: SelectOptionProps[];
|
|
1073
|
+
additionalButtons?: any;
|
|
1074
|
+
additionalInputs?: any;
|
|
1072
1075
|
};
|
|
1073
1076
|
declare const RegisterForm: FC<RegisterFormTypes>;
|
|
1074
1077
|
|
package/dist/index.d.ts
CHANGED
|
@@ -663,6 +663,7 @@ type ComboboxTypes<T> = {
|
|
|
663
663
|
buttonClassName?: string;
|
|
664
664
|
/** This the same value as the one with the key valueKey */
|
|
665
665
|
defaultValue?: string;
|
|
666
|
+
onChange?: (e: any) => void;
|
|
666
667
|
};
|
|
667
668
|
declare const Combobox: React$1.FC<ComboboxTypes<any>>;
|
|
668
669
|
|
|
@@ -1068,7 +1069,9 @@ type RegisterFormTypes = {
|
|
|
1068
1069
|
isTwitterLoading?: boolean;
|
|
1069
1070
|
/** If true, a loading spinner is displayed within the Github login button. */
|
|
1070
1071
|
isGithubLoading?: boolean;
|
|
1071
|
-
userReferenceOptions
|
|
1072
|
+
userReferenceOptions?: SelectOptionProps[];
|
|
1073
|
+
additionalButtons?: any;
|
|
1074
|
+
additionalInputs?: any;
|
|
1072
1075
|
};
|
|
1073
1076
|
declare const RegisterForm: FC<RegisterFormTypes>;
|
|
1074
1077
|
|
package/dist/index.js
CHANGED
|
@@ -5971,10 +5971,10 @@ var Combobox = function(_param) {
|
|
|
5971
5971
|
variant: "combobox",
|
|
5972
5972
|
role: "combobox",
|
|
5973
5973
|
"aria-expanded": open,
|
|
5974
|
-
className: cn("hawa-justify-between hawa-bg-background", buttonClassName)
|
|
5974
|
+
className: cn("hawa-justify-between hawa-bg-background hawa-font-normal", buttonClassName)
|
|
5975
5975
|
}, value ? getProperty(data.find(function(item) {
|
|
5976
5976
|
return item[valueKey] === value;
|
|
5977
|
-
}) || {}, labelKey) : props.placeholder, /* @__PURE__ */ React46.createElement("svg", {
|
|
5977
|
+
}) || {}, labelKey) : props.placeholder || "...", /* @__PURE__ */ React46.createElement("svg", {
|
|
5978
5978
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5979
5979
|
className: "hawa-w-4 hawa-h-4",
|
|
5980
5980
|
viewBox: "0 0 24 24",
|
|
@@ -5996,8 +5996,10 @@ var Combobox = function(_param) {
|
|
|
5996
5996
|
key: getProperty(item, valueKey),
|
|
5997
5997
|
onSelect: function() {
|
|
5998
5998
|
var newValue = getProperty(item, valueKey);
|
|
5999
|
-
console.log("seleelelelele", newValue);
|
|
6000
5999
|
setValue(newValue === value ? "" : newValue);
|
|
6000
|
+
if (props.onChange) {
|
|
6001
|
+
props.onChange(newValue === value ? "" : newValue);
|
|
6002
|
+
}
|
|
6001
6003
|
setOpen(false);
|
|
6002
6004
|
}
|
|
6003
6005
|
}, /* @__PURE__ */ React46.createElement("svg", {
|
|
@@ -7224,7 +7226,7 @@ var RegisterForm = function(props) {
|
|
|
7224
7226
|
value: (_field_value = field.value) !== null && _field_value !== void 0 ? _field_value : ""
|
|
7225
7227
|
});
|
|
7226
7228
|
}
|
|
7227
|
-
}), props.showRefCode && /* @__PURE__ */ import_react37.default.createElement(import_react_hook_form3.Controller, {
|
|
7229
|
+
}), props.additionalInputs, props.showRefCode && /* @__PURE__ */ import_react37.default.createElement(import_react_hook_form3.Controller, {
|
|
7228
7230
|
control: control,
|
|
7229
7231
|
name: "refCode",
|
|
7230
7232
|
render: function(param) /* @__PURE__ */ {
|
|
@@ -7241,7 +7243,7 @@ var RegisterForm = function(props) {
|
|
|
7241
7243
|
onChange: field.onChange
|
|
7242
7244
|
});
|
|
7243
7245
|
}
|
|
7244
|
-
}), props.showUserSource && /* @__PURE__ */ import_react37.default.createElement(
|
|
7246
|
+
}), props.showUserSource && /* @__PURE__ */ import_react37.default.createElement(import_react_hook_form3.Controller, {
|
|
7245
7247
|
control: control,
|
|
7246
7248
|
name: "reference",
|
|
7247
7249
|
render: function(param) {
|
|
@@ -7260,7 +7262,7 @@ var RegisterForm = function(props) {
|
|
|
7260
7262
|
}
|
|
7261
7263
|
});
|
|
7262
7264
|
}
|
|
7263
|
-
})
|
|
7265
|
+
}), /* @__PURE__ */ import_react37.default.createElement("div", {
|
|
7264
7266
|
className: "hawa-flex hawa-flex-col hawa-gap-3"
|
|
7265
7267
|
}, props.showTermsOption && /* @__PURE__ */ import_react37.default.createElement(import_react_hook_form3.Controller, {
|
|
7266
7268
|
control: control,
|
|
@@ -7296,7 +7298,7 @@ var RegisterForm = function(props) {
|
|
|
7296
7298
|
})), /* @__PURE__ */ import_react37.default.createElement(Button, {
|
|
7297
7299
|
className: "hawa-w-full hawa-mt-4",
|
|
7298
7300
|
isLoading: props.isLoading
|
|
7299
|
-
}, props.texts.registerText))), /* @__PURE__ */ import_react37.default.createElement("div", {
|
|
7301
|
+
}, props.texts.registerText), props.additionalButtons)), /* @__PURE__ */ import_react37.default.createElement("div", {
|
|
7300
7302
|
className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-1 hawa-p-3 hawa-text-center hawa-text-sm hawa-font-normal dark:hawa-text-white"
|
|
7301
7303
|
}, /* @__PURE__ */ import_react37.default.createElement("span", null, props.texts.existingUserText), /* @__PURE__ */ import_react37.default.createElement("span", {
|
|
7302
7304
|
onClick: props.onRouteToLogin,
|
package/dist/index.mjs
CHANGED
|
@@ -5663,14 +5663,14 @@ var Combobox = ({
|
|
|
5663
5663
|
role: "combobox",
|
|
5664
5664
|
"aria-expanded": open,
|
|
5665
5665
|
className: cn(
|
|
5666
|
-
"hawa-justify-between hawa-bg-background",
|
|
5666
|
+
"hawa-justify-between hawa-bg-background hawa-font-normal",
|
|
5667
5667
|
buttonClassName
|
|
5668
5668
|
)
|
|
5669
5669
|
},
|
|
5670
5670
|
value ? getProperty(
|
|
5671
5671
|
data.find((item) => item[valueKey] === value) || {},
|
|
5672
5672
|
labelKey
|
|
5673
|
-
) : props.placeholder,
|
|
5673
|
+
) : props.placeholder || "...",
|
|
5674
5674
|
/* @__PURE__ */ React46.createElement(
|
|
5675
5675
|
"svg",
|
|
5676
5676
|
{
|
|
@@ -5691,8 +5691,12 @@ var Combobox = ({
|
|
|
5691
5691
|
key: getProperty(item, valueKey),
|
|
5692
5692
|
onSelect: () => {
|
|
5693
5693
|
const newValue = getProperty(item, valueKey);
|
|
5694
|
-
console.log("seleelelelele", newValue);
|
|
5695
5694
|
setValue(newValue === value ? "" : newValue);
|
|
5695
|
+
if (props.onChange) {
|
|
5696
|
+
props.onChange(
|
|
5697
|
+
newValue === value ? "" : newValue
|
|
5698
|
+
);
|
|
5699
|
+
}
|
|
5696
5700
|
setOpen(false);
|
|
5697
5701
|
}
|
|
5698
5702
|
},
|
|
@@ -7085,6 +7089,7 @@ var RegisterForm = (props) => {
|
|
|
7085
7089
|
)
|
|
7086
7090
|
}
|
|
7087
7091
|
),
|
|
7092
|
+
props.additionalInputs,
|
|
7088
7093
|
props.showRefCode && /* @__PURE__ */ React57.createElement(
|
|
7089
7094
|
Controller3,
|
|
7090
7095
|
{
|
|
@@ -7104,7 +7109,7 @@ var RegisterForm = (props) => {
|
|
|
7104
7109
|
)
|
|
7105
7110
|
}
|
|
7106
7111
|
),
|
|
7107
|
-
props.showUserSource && /* @__PURE__ */ React57.createElement(
|
|
7112
|
+
props.showUserSource && /* @__PURE__ */ React57.createElement(
|
|
7108
7113
|
Controller3,
|
|
7109
7114
|
{
|
|
7110
7115
|
control,
|
|
@@ -7125,7 +7130,7 @@ var RegisterForm = (props) => {
|
|
|
7125
7130
|
}
|
|
7126
7131
|
)
|
|
7127
7132
|
}
|
|
7128
|
-
)
|
|
7133
|
+
),
|
|
7129
7134
|
/* @__PURE__ */ React57.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-3" }, props.showTermsOption && /* @__PURE__ */ React57.createElement(
|
|
7130
7135
|
Controller3,
|
|
7131
7136
|
{
|
|
@@ -7170,7 +7175,8 @@ var RegisterForm = (props) => {
|
|
|
7170
7175
|
isLoading: props.isLoading
|
|
7171
7176
|
},
|
|
7172
7177
|
props.texts.registerText
|
|
7173
|
-
)
|
|
7178
|
+
),
|
|
7179
|
+
props.additionalButtons
|
|
7174
7180
|
)), /* @__PURE__ */ React57.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-1 hawa-p-3 hawa-text-center hawa-text-sm hawa-font-normal dark:hawa-text-white" }, /* @__PURE__ */ React57.createElement("span", null, props.texts.existingUserText), /* @__PURE__ */ React57.createElement("span", { onClick: props.onRouteToLogin, className: "clickable-link" }, props.texts.loginText || "Login")))), props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */ React57.createElement(
|
|
7175
7181
|
CardFooter,
|
|
7176
7182
|
{
|