@sikka/hawa 0.15.13-next → 0.15.14-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.js CHANGED
@@ -7947,46 +7947,67 @@ var AuthButtons = function(props) {
7947
7947
  return /* @__PURE__ */ import_react43.default.createElement("div", {
7948
7948
  className: "hawa-flex hawa-flex-col hawa-gap-4"
7949
7949
  }, props.viaGoogle && /* @__PURE__ */ import_react43.default.createElement(Button, {
7950
+ disabled: props.isGoogleLoading,
7950
7951
  className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
7951
7952
  variant: "outline",
7952
7953
  onClick: props.handleGoogle
7953
- }, /* @__PURE__ */ import_react43.default.createElement(Logos.google, {
7954
+ }, props.isGoogleLoading ? /* @__PURE__ */ import_react43.default.createElement(Loading, {
7955
+ size: "button"
7956
+ }) : /* @__PURE__ */ import_react43.default.createElement(Logos.google, {
7954
7957
  className: "hawa-icon"
7955
7958
  }), (_props_texts_continueWithGoogle = (_props_texts = props.texts) === null || _props_texts === void 0 ? void 0 : _props_texts.continueWithGoogle) !== null && _props_texts_continueWithGoogle !== void 0 ? _props_texts_continueWithGoogle : "Continue With Google"), props.viaGithub && /* @__PURE__ */ import_react43.default.createElement(Button, {
7959
+ disabled: props.isGithubLoading,
7956
7960
  className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
7957
7961
  variant: "outline",
7958
7962
  onClick: props.handleGithub
7959
- }, /* @__PURE__ */ import_react43.default.createElement(Logos.github, {
7963
+ }, props.isGithubLoading ? /* @__PURE__ */ import_react43.default.createElement(Loading, {
7964
+ size: "button"
7965
+ }) : /* @__PURE__ */ import_react43.default.createElement(Logos.github, {
7960
7966
  className: "hawa-icon"
7961
7967
  }), (_props_texts_continueWithGithub = (_props_texts1 = props.texts) === null || _props_texts1 === void 0 ? void 0 : _props_texts1.continueWithGithub) !== null && _props_texts_continueWithGithub !== void 0 ? _props_texts_continueWithGithub : "Continue With Github"), props.viaTwitter && /* @__PURE__ */ import_react43.default.createElement(Button, {
7968
+ disabled: props.isTwitterLoading,
7962
7969
  className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
7963
7970
  variant: "outline",
7964
7971
  onClick: props.handleTwitter
7965
- }, /* @__PURE__ */ import_react43.default.createElement(Logos.twitter, {
7972
+ }, props.isTwitterLoading ? /* @__PURE__ */ import_react43.default.createElement(Loading, {
7973
+ size: "button"
7974
+ }) : /* @__PURE__ */ import_react43.default.createElement(Logos.twitter, {
7966
7975
  className: "hawa-icon"
7967
7976
  }), (_props_texts_continueWithTwitter = (_props_texts2 = props.texts) === null || _props_texts2 === void 0 ? void 0 : _props_texts2.continueWithTwitter) !== null && _props_texts_continueWithTwitter !== void 0 ? _props_texts_continueWithTwitter : "Continue With Twitter"), props.viaApple && /* @__PURE__ */ import_react43.default.createElement(Button, {
7977
+ disabled: props.isAppleLoading,
7968
7978
  className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
7969
7979
  variant: "outline",
7970
7980
  onClick: props.handleApple
7971
- }, /* @__PURE__ */ import_react43.default.createElement(Logos.apple, {
7981
+ }, props.isAppleLoading ? /* @__PURE__ */ import_react43.default.createElement(Loading, {
7982
+ size: "button"
7983
+ }) : /* @__PURE__ */ import_react43.default.createElement(Logos.apple, {
7972
7984
  className: "hawa-icon"
7973
7985
  }), (_props_texts_continueWithApple = (_props_texts3 = props.texts) === null || _props_texts3 === void 0 ? void 0 : _props_texts3.continueWithApple) !== null && _props_texts_continueWithApple !== void 0 ? _props_texts_continueWithApple : "Continue With Apple"), props.viaMicrosoft && /* @__PURE__ */ import_react43.default.createElement(Button, {
7986
+ disabled: props.isMicrosoftLoading,
7974
7987
  className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
7975
7988
  variant: "outline",
7976
7989
  onClick: props.handleMicrosoft
7977
- }, /* @__PURE__ */ import_react43.default.createElement(Logos.microsoft, {
7990
+ }, props.isMicrosoftLoading ? /* @__PURE__ */ import_react43.default.createElement(Loading, {
7991
+ size: "button"
7992
+ }) : /* @__PURE__ */ import_react43.default.createElement(Logos.microsoft, {
7978
7993
  className: "hawa-icon"
7979
7994
  }), (_props_texts_continueWithMicrosoft = (_props_texts4 = props.texts) === null || _props_texts4 === void 0 ? void 0 : _props_texts4.continueWithMicrosoft) !== null && _props_texts_continueWithMicrosoft !== void 0 ? _props_texts_continueWithMicrosoft : "Continue With Microsoft"), props.viaEmail && /* @__PURE__ */ import_react43.default.createElement(Button, {
7995
+ disabled: props.isEmailLoading,
7980
7996
  className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
7981
7997
  variant: "outline",
7982
7998
  onClick: props.handleEmail
7983
- }, /* @__PURE__ */ import_react43.default.createElement(Logos.mail, {
7999
+ }, props.isEmailLoading ? /* @__PURE__ */ import_react43.default.createElement(Loading, {
8000
+ size: "button"
8001
+ }) : /* @__PURE__ */ import_react43.default.createElement(Logos.mail, {
7984
8002
  className: "hawa-icon"
7985
8003
  }), (_props_texts_continueWithEmail = (_props_texts5 = props.texts) === null || _props_texts5 === void 0 ? void 0 : _props_texts5.continueWithEmail) !== null && _props_texts_continueWithEmail !== void 0 ? _props_texts_continueWithEmail : "Continue With Email"), props.viaPhone && /* @__PURE__ */ import_react43.default.createElement(Button, {
8004
+ disabled: props.isPhoneLoading,
7986
8005
  className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
7987
8006
  variant: "outline",
7988
8007
  onClick: props.handlePhone
7989
- }, /* @__PURE__ */ import_react43.default.createElement(Logos.phone, {
8008
+ }, props.isPhoneLoading ? /* @__PURE__ */ import_react43.default.createElement(Loading, {
8009
+ size: "button"
8010
+ }) : /* @__PURE__ */ import_react43.default.createElement(Logos.phone, {
7990
8011
  className: "hawa-icon"
7991
8012
  }), (_props_texts_continueWithPhone = (_props_texts6 = props.texts) === null || _props_texts6 === void 0 ? void 0 : _props_texts6.continueWithPhone) !== null && _props_texts_continueWithPhone !== void 0 ? _props_texts_continueWithPhone : "Continue With Phone"));
7992
8013
  };
@@ -8375,7 +8396,8 @@ var LoginForm = function(_param) {
8375
8396
  }, renderFields(), /* @__PURE__ */ import_react45.default.createElement(Button, {
8376
8397
  className: "hawa-mt-0 hawa-w-full",
8377
8398
  type: "submit",
8378
- isLoading: props.isLoading
8399
+ isLoading: props.isLoading,
8400
+ disabled: props.isLoading
8379
8401
  }, (texts === null || texts === void 0 ? void 0 : texts.loginText) || "Login"), props.additionalButtons, props.allowRegister && /* @__PURE__ */ import_react45.default.createElement("div", {
8380
8402
  className: "hawa-p-3 hawa-text-center hawa-text-sm hawa-font-normal hawa-select-none dark:hawa-text-gray-300"
8381
8403
  }, (texts === null || texts === void 0 ? void 0 : texts.newUserText) || "New user?", " ", /* @__PURE__ */ import_react45.default.createElement("span", {
@@ -8388,6 +8410,9 @@ var LoginForm = function(_param) {
8388
8410
  viaGoogle: props.viaGoogle,
8389
8411
  viaGithub: props.viaGithub,
8390
8412
  viaTwitter: props.viaTwitter,
8413
+ isGoogleLoading: props.isGoogleLoading,
8414
+ isGithubLoading: props.isGithubLoading,
8415
+ isTwitterLoading: props.isTwitterLoading,
8391
8416
  handleGoogle: props.onGoogleLogin,
8392
8417
  handleGithub: props.onGithubLogin,
8393
8418
  handleTwitter: props.onTwitterLogin
@@ -8683,6 +8708,9 @@ var RegisterForm = function(_param) {
8683
8708
  viaGoogle: props.viaGoogle,
8684
8709
  viaGithub: props.viaGithub,
8685
8710
  viaTwitter: props.viaTwitter,
8711
+ isGoogleLoading: props.isGoogleLoading,
8712
+ isGithubLoading: props.isGithubLoading,
8713
+ isTwitterLoading: props.isTwitterLoading,
8686
8714
  handleGoogle: props.onGoogleRegister,
8687
8715
  handleGithub: props.onGithubRegister,
8688
8716
  handleTwitter: props.onTwitterRegister
package/dist/index.mjs CHANGED
@@ -8010,65 +8010,72 @@ var AuthButtons = (props) => {
8010
8010
  return /* @__PURE__ */ React70.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-4" }, props.viaGoogle && /* @__PURE__ */ React70.createElement(
8011
8011
  Button,
8012
8012
  {
8013
+ disabled: props.isGoogleLoading,
8013
8014
  className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
8014
8015
  variant: "outline",
8015
8016
  onClick: props.handleGoogle
8016
8017
  },
8017
- /* @__PURE__ */ React70.createElement(Logos.google, { className: "hawa-icon" }),
8018
+ props.isGoogleLoading ? /* @__PURE__ */ React70.createElement(Loading, { size: "button" }) : /* @__PURE__ */ React70.createElement(Logos.google, { className: "hawa-icon" }),
8018
8019
  props.texts?.continueWithGoogle ?? "Continue With Google"
8019
8020
  ), props.viaGithub && /* @__PURE__ */ React70.createElement(
8020
8021
  Button,
8021
8022
  {
8023
+ disabled: props.isGithubLoading,
8022
8024
  className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
8023
8025
  variant: "outline",
8024
8026
  onClick: props.handleGithub
8025
8027
  },
8026
- /* @__PURE__ */ React70.createElement(Logos.github, { className: "hawa-icon" }),
8028
+ props.isGithubLoading ? /* @__PURE__ */ React70.createElement(Loading, { size: "button" }) : /* @__PURE__ */ React70.createElement(Logos.github, { className: "hawa-icon" }),
8027
8029
  props.texts?.continueWithGithub ?? "Continue With Github"
8028
8030
  ), props.viaTwitter && /* @__PURE__ */ React70.createElement(
8029
8031
  Button,
8030
8032
  {
8033
+ disabled: props.isTwitterLoading,
8031
8034
  className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
8032
8035
  variant: "outline",
8033
8036
  onClick: props.handleTwitter
8034
8037
  },
8035
- /* @__PURE__ */ React70.createElement(Logos.twitter, { className: "hawa-icon" }),
8038
+ props.isTwitterLoading ? /* @__PURE__ */ React70.createElement(Loading, { size: "button" }) : /* @__PURE__ */ React70.createElement(Logos.twitter, { className: "hawa-icon" }),
8036
8039
  props.texts?.continueWithTwitter ?? "Continue With Twitter"
8037
8040
  ), props.viaApple && /* @__PURE__ */ React70.createElement(
8038
8041
  Button,
8039
8042
  {
8043
+ disabled: props.isAppleLoading,
8040
8044
  className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
8041
8045
  variant: "outline",
8042
8046
  onClick: props.handleApple
8043
8047
  },
8044
- /* @__PURE__ */ React70.createElement(Logos.apple, { className: "hawa-icon" }),
8048
+ props.isAppleLoading ? /* @__PURE__ */ React70.createElement(Loading, { size: "button" }) : /* @__PURE__ */ React70.createElement(Logos.apple, { className: "hawa-icon" }),
8045
8049
  props.texts?.continueWithApple ?? "Continue With Apple"
8046
8050
  ), props.viaMicrosoft && /* @__PURE__ */ React70.createElement(
8047
8051
  Button,
8048
8052
  {
8053
+ disabled: props.isMicrosoftLoading,
8049
8054
  className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
8050
8055
  variant: "outline",
8051
8056
  onClick: props.handleMicrosoft
8052
8057
  },
8053
- /* @__PURE__ */ React70.createElement(Logos.microsoft, { className: "hawa-icon" }),
8058
+ props.isMicrosoftLoading ? /* @__PURE__ */ React70.createElement(Loading, { size: "button" }) : /* @__PURE__ */ React70.createElement(Logos.microsoft, { className: "hawa-icon" }),
8054
8059
  props.texts?.continueWithMicrosoft ?? "Continue With Microsoft"
8055
8060
  ), props.viaEmail && /* @__PURE__ */ React70.createElement(
8056
8061
  Button,
8057
8062
  {
8063
+ disabled: props.isEmailLoading,
8058
8064
  className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
8059
8065
  variant: "outline",
8060
8066
  onClick: props.handleEmail
8061
8067
  },
8062
- /* @__PURE__ */ React70.createElement(Logos.mail, { className: "hawa-icon" }),
8068
+ props.isEmailLoading ? /* @__PURE__ */ React70.createElement(Loading, { size: "button" }) : /* @__PURE__ */ React70.createElement(Logos.mail, { className: "hawa-icon" }),
8063
8069
  props.texts?.continueWithEmail ?? "Continue With Email"
8064
8070
  ), props.viaPhone && /* @__PURE__ */ React70.createElement(
8065
8071
  Button,
8066
8072
  {
8073
+ disabled: props.isPhoneLoading,
8067
8074
  className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
8068
8075
  variant: "outline",
8069
8076
  onClick: props.handlePhone
8070
8077
  },
8071
- /* @__PURE__ */ React70.createElement(Logos.phone, { className: "hawa-icon" }),
8078
+ props.isPhoneLoading ? /* @__PURE__ */ React70.createElement(Loading, { size: "button" }) : /* @__PURE__ */ React70.createElement(Logos.phone, { className: "hawa-icon" }),
8072
8079
  props.texts?.continueWithPhone ?? "Continue With Phone"
8073
8080
  ));
8074
8081
  };
@@ -8466,7 +8473,8 @@ var LoginForm = ({
8466
8473
  {
8467
8474
  className: "hawa-mt-0 hawa-w-full",
8468
8475
  type: "submit",
8469
- isLoading: props.isLoading
8476
+ isLoading: props.isLoading,
8477
+ disabled: props.isLoading
8470
8478
  },
8471
8479
  texts?.loginText || "Login"
8472
8480
  ),
@@ -8493,6 +8501,9 @@ var LoginForm = ({
8493
8501
  viaGoogle: props.viaGoogle,
8494
8502
  viaGithub: props.viaGithub,
8495
8503
  viaTwitter: props.viaTwitter,
8504
+ isGoogleLoading: props.isGoogleLoading,
8505
+ isGithubLoading: props.isGithubLoading,
8506
+ isTwitterLoading: props.isTwitterLoading,
8496
8507
  handleGoogle: props.onGoogleLogin,
8497
8508
  handleGithub: props.onGithubLogin,
8498
8509
  handleTwitter: props.onTwitterLogin
@@ -8798,6 +8809,9 @@ var RegisterForm = ({ texts, ...props }) => {
8798
8809
  viaGoogle: props.viaGoogle,
8799
8810
  viaGithub: props.viaGithub,
8800
8811
  viaTwitter: props.viaTwitter,
8812
+ isGoogleLoading: props.isGoogleLoading,
8813
+ isGithubLoading: props.isGithubLoading,
8814
+ isTwitterLoading: props.isTwitterLoading,
8801
8815
  handleGoogle: props.onGoogleRegister,
8802
8816
  handleGithub: props.onGithubRegister,
8803
8817
  handleTwitter: props.onTwitterRegister
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.15.13-next",
3
+ "version": "0.15.14-next",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {