@sikka/hawa 0.1.82 → 0.1.83

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.
@@ -48,9 +48,8 @@ jobs:
48
48
  node-version: [16.x]
49
49
  steps:
50
50
  - uses: actions/checkout@v2
51
-
52
- - name: Change working directory to ./landing
53
- run: cd ./landing
51
+ with:
52
+ path: deploy-landing-path
54
53
  - name: Use Node.js ${{ matrix.node-version }}
55
54
  uses: actions/setup-node@v2
56
55
  with:
@@ -77,6 +76,8 @@ jobs:
77
76
  node-version: [16.x]
78
77
  steps:
79
78
  - uses: actions/checkout@v2
79
+ with:
80
+ path: build-storybook-path
80
81
  - name: Use Node.js ${{ matrix.node-version }}
81
82
  uses: actions/setup-node@v2
82
83
  with:
@@ -85,6 +86,5 @@ jobs:
85
86
  run: |
86
87
  cd /var/www/html/sikka-software/_work/Hawa/Hawa
87
88
  rm -fr package-lock.json || true
88
- rm -fr node_modules || true
89
89
  npm install
90
90
  npm run build-storybook
package/dist/index.d.mts CHANGED
@@ -1130,6 +1130,7 @@ type SignInFormTypes = {
1130
1130
  currentLanguage?: any;
1131
1131
  handleColorMode?: () => void;
1132
1132
  currentColorMode?: any;
1133
+ logosOnly?: boolean;
1133
1134
  direction?: "rtl" | "ltr";
1134
1135
  showError?: any;
1135
1136
  errorTitle?: string;
@@ -1186,6 +1187,7 @@ type SignUpFormTypes = {
1186
1187
  handleColorMode?: () => void;
1187
1188
  currentColorMode?: any;
1188
1189
  direction?: "rtl" | "ltr";
1190
+ logosOnly?: boolean;
1189
1191
  texts: {
1190
1192
  fullNameLabel: string;
1191
1193
  fullNamePlaceholder: string;
package/dist/index.d.ts CHANGED
@@ -1130,6 +1130,7 @@ type SignInFormTypes = {
1130
1130
  currentLanguage?: any;
1131
1131
  handleColorMode?: () => void;
1132
1132
  currentColorMode?: any;
1133
+ logosOnly?: boolean;
1133
1134
  direction?: "rtl" | "ltr";
1134
1135
  showError?: any;
1135
1136
  errorTitle?: string;
@@ -1186,6 +1187,7 @@ type SignUpFormTypes = {
1186
1187
  handleColorMode?: () => void;
1187
1188
  currentColorMode?: any;
1188
1189
  direction?: "rtl" | "ltr";
1190
+ logosOnly?: boolean;
1189
1191
  texts: {
1190
1192
  fullNameLabel: string;
1191
1193
  fullNamePlaceholder: string;
package/dist/index.js CHANGED
@@ -8640,7 +8640,6 @@ var SignInPhone = function(props) {
8640
8640
  // src/blocks/AuthForms/SignInForm.tsx
8641
8641
  var import_react72 = __toESM(require("react"));
8642
8642
  var import_react_hook_form3 = require("react-hook-form");
8643
- var import_clsx33 = __toESM(require("clsx"));
8644
8643
  // src/elements/Icons.tsx
8645
8644
  var Icons = {
8646
8645
  logo: function(props) {
@@ -8897,7 +8896,7 @@ var SignInForm = function(props) {
8897
8896
  onClick: props.handleForgotPassword,
8898
8897
  className: "mb-3 w-fit cursor-pointer text-xs dark:text-gray-300"
8899
8898
  }, props.texts.forgotPasswordText)), /* @__PURE__ */ import_react72.default.createElement(Button, {
8900
- className: "w-full mt-4",
8899
+ className: "mt-4 w-full",
8901
8900
  isLoading: props.isLoading
8902
8901
  }, props.texts.signInText), !props.withoutSignUp && /* @__PURE__ */ import_react72.default.createElement("div", {
8903
8902
  className: "p-3 text-center text-sm font-semibold dark:text-gray-300"
@@ -8905,23 +8904,26 @@ var SignInForm = function(props) {
8905
8904
  onClick: props.handleRouteToSignUp,
8906
8905
  className: "clickable-link"
8907
8906
  }, props.texts.createAccount)))), props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */ import_react72.default.createElement(CardFooter, {
8908
- className: "grid grid-cols-1 gap-2 "
8907
+ className: cn(props.logosOnly ? "flex flex-row gap-2 justify-center" : "grid grid-cols-1 gap-2")
8909
8908
  }, props.viaGoogle && /* @__PURE__ */ import_react72.default.createElement(Button, {
8909
+ className: "flex flex-row items-center gap-2",
8910
8910
  variant: "outline",
8911
8911
  onClick: props.handleGoogleSignIn
8912
8912
  }, /* @__PURE__ */ import_react72.default.createElement(Icons.google, {
8913
- className: (0, import_clsx33.default)("h-4 w-4", props.direction === "rtl" ? "ml-2" : "mr-2")
8914
- }), props.texts.signInViaGoogleLabel), props.viaGithub && /* @__PURE__ */ import_react72.default.createElement(Button, {
8913
+ className: "h-4 w-4"
8914
+ }), !props.logosOnly && props.texts.signInViaGoogleLabel), props.viaGithub && /* @__PURE__ */ import_react72.default.createElement(Button, {
8915
+ className: "flex flex-row items-center gap-2",
8915
8916
  variant: "outline",
8916
8917
  onClick: props.handleGithubSignIn
8917
8918
  }, /* @__PURE__ */ import_react72.default.createElement(Icons.gitHub, {
8918
- className: (0, import_clsx33.default)("h-4 w-4", props.direction === "rtl" ? "ml-2" : "mr-2")
8919
- }), props.texts.signInViaGithubLabel), props.viaTwitter && /* @__PURE__ */ import_react72.default.createElement(Button, {
8919
+ className: "h-4 w-4"
8920
+ }), !props.logosOnly && props.texts.signInViaGithubLabel), props.viaTwitter && /* @__PURE__ */ import_react72.default.createElement(Button, {
8921
+ className: "flex flex-row items-center gap-2",
8920
8922
  variant: "outline",
8921
8923
  onClick: props.handleTwitterSignIn
8922
8924
  }, /* @__PURE__ */ import_react72.default.createElement(Icons.twitter, {
8923
- className: (0, import_clsx33.default)("h-4 w-4", props.direction === "rtl" ? "ml-2" : "mr-2")
8924
- }), props.texts.signInViaTwitterLabel)) : null), /* @__PURE__ */ import_react72.default.createElement(InterfaceSettings, {
8925
+ className: "h-4 w-4"
8926
+ }), !props.logosOnly && props.texts.signInViaTwitterLabel)) : null), /* @__PURE__ */ import_react72.default.createElement(InterfaceSettings, {
8925
8927
  currentColorMode: props.currentColorMode,
8926
8928
  currentLanguage: props.currentLanguage,
8927
8929
  handleColorMode: props.handleColorMode,
@@ -8978,7 +8980,6 @@ function SignInBlock() {
8978
8980
  // src/blocks/AuthForms/SignUpForm.tsx
8979
8981
  var import_react73 = __toESM(require("react"));
8980
8982
  var import_react_hook_form4 = require("react-hook-form");
8981
- var import_clsx34 = __toESM(require("clsx"));
8982
8983
  var SignUpForm = function(props) {
8983
8984
  var methods = (0, import_react_hook_form4.useForm)();
8984
8985
  var errors = methods.formState.errors, handleSubmit = methods.handleSubmit, control = methods.control;
@@ -9203,23 +9204,26 @@ var SignUpForm = function(props) {
9203
9204
  onClick: props.handleRouteToSignIn,
9204
9205
  className: "clickable-link"
9205
9206
  }, props.texts.signInText)))), props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */ import_react73.default.createElement(CardFooter, {
9206
- className: "grid grid-cols-1 gap-2 "
9207
+ className: cn(props.logosOnly ? "flex flex-row justify-center gap-2" : "grid grid-cols-1 gap-2")
9207
9208
  }, props.viaGoogle && /* @__PURE__ */ import_react73.default.createElement(Button, {
9209
+ className: "flex flex-row items-center gap-2",
9208
9210
  variant: "outline",
9209
9211
  onClick: props.handleGoogleSignUp
9210
9212
  }, /* @__PURE__ */ import_react73.default.createElement(Icons.google, {
9211
- className: (0, import_clsx34.default)("h-4 w-4", props.direction === "rtl" ? "ml-2" : "mr-2")
9212
- }), props.texts.signUpViaGoogleLabel), props.viaGithub && /* @__PURE__ */ import_react73.default.createElement(Button, {
9213
+ className: "h-4 w-4"
9214
+ }), !props.logosOnly && props.texts.signUpViaGoogleLabel), props.viaGithub && /* @__PURE__ */ import_react73.default.createElement(Button, {
9215
+ className: "flex flex-row items-center gap-2",
9213
9216
  variant: "outline",
9214
9217
  onClick: props.handleGithubSignUp
9215
9218
  }, /* @__PURE__ */ import_react73.default.createElement(Icons.gitHub, {
9216
- className: (0, import_clsx34.default)("h-4 w-4", props.direction === "rtl" ? "ml-2" : "mr-2")
9217
- }), props.texts.signUpViaGithubLabel), props.viaTwitter && /* @__PURE__ */ import_react73.default.createElement(Button, {
9219
+ className: "h-4 w-4"
9220
+ }), !props.logosOnly && props.texts.signUpViaGithubLabel), props.viaTwitter && /* @__PURE__ */ import_react73.default.createElement(Button, {
9221
+ className: "flex flex-row items-center gap-2",
9218
9222
  variant: "outline",
9219
9223
  onClick: props.handleTwitterSignUp
9220
9224
  }, /* @__PURE__ */ import_react73.default.createElement(Icons.twitter, {
9221
- className: (0, import_clsx34.default)("h-4 w-4", props.direction === "rtl" ? "ml-2" : "mr-2")
9222
- }), props.texts.signUpViaTwitterLabel)) : null), /* @__PURE__ */ import_react73.default.createElement(InterfaceSettings, {
9225
+ className: "h-4 w-4"
9226
+ }), !props.logosOnly && props.texts.signUpViaTwitterLabel)) : null), /* @__PURE__ */ import_react73.default.createElement(InterfaceSettings, {
9223
9227
  currentColorMode: props.currentColorMode,
9224
9228
  currentLanguage: props.currentLanguage,
9225
9229
  handleColorMode: props.handleColorMode,
@@ -10024,7 +10028,7 @@ var ComparingPlans = function(props) {
10024
10028
  };
10025
10029
  // src/blocks/Pricing/HorizontalPricing.tsx
10026
10030
  var import_react85 = __toESM(require("react"));
10027
- var import_clsx35 = __toESM(require("clsx"));
10031
+ var import_clsx33 = __toESM(require("clsx"));
10028
10032
  var HorizontalPricing = function(props) {
10029
10033
  var _ref = _sliced_to_array((0, import_react85.useState)(null), 2), selectedCard = _ref[0], setSelectedCard = _ref[1];
10030
10034
  var data = [
@@ -10071,7 +10075,7 @@ var HorizontalPricing = function(props) {
10071
10075
  id: d.title,
10072
10076
  className: "peer appearance-none"
10073
10077
  }), /* @__PURE__ */ import_react85.default.createElement("div", {
10074
- className: (0, import_clsx35.default)(selectedCard === d.title ? "peer-checked:border-blue-500" : "", "peer flex cursor-pointer items-center justify-between rounded-xl border bg-background px-5 py-4 shadow dark:text-white peer-checked:[&_.active]:block peer-checked:[&_.default]:hidden")
10078
+ className: (0, import_clsx33.default)(selectedCard === d.title ? "peer-checked:border-blue-500" : "", "peer flex cursor-pointer items-center justify-between rounded-xl border bg-background px-5 py-4 shadow dark:text-white peer-checked:[&_.active]:block peer-checked:[&_.default]:hidden")
10075
10079
  }, /* @__PURE__ */ import_react85.default.createElement("div", {
10076
10080
  className: "peer flex items-center gap-4"
10077
10081
  }, /* @__PURE__ */ import_react85.default.createElement(CheckIcons, null), /* @__PURE__ */ import_react85.default.createElement(CardText, {
package/dist/index.mjs CHANGED
@@ -8993,7 +8993,6 @@ var SignInPhone = (props) => {
8993
8993
  // src/blocks/AuthForms/SignInForm.tsx
8994
8994
  import React86 from "react";
8995
8995
  import { Controller as Controller3, useForm as useForm3 } from "react-hook-form";
8996
- import clsx33 from "clsx";
8997
8996
 
8998
8997
  // src/elements/Icons.tsx
8999
8998
  var Icons = {
@@ -9228,38 +9227,51 @@ var SignInForm = (props) => {
9228
9227
  className: "mb-3 w-fit cursor-pointer text-xs dark:text-gray-300"
9229
9228
  },
9230
9229
  props.texts.forgotPasswordText
9231
- )), /* @__PURE__ */ React86.createElement(Button, { className: "w-full mt-4", isLoading: props.isLoading }, props.texts.signInText), !props.withoutSignUp && /* @__PURE__ */ React86.createElement("div", { className: "p-3 text-center text-sm font-semibold dark:text-gray-300" }, props.texts.newUserText, " ", /* @__PURE__ */ React86.createElement(
9230
+ )), /* @__PURE__ */ React86.createElement(Button, { className: "mt-4 w-full", isLoading: props.isLoading }, props.texts.signInText), !props.withoutSignUp && /* @__PURE__ */ React86.createElement("div", { className: "p-3 text-center text-sm font-semibold dark:text-gray-300" }, props.texts.newUserText, " ", /* @__PURE__ */ React86.createElement(
9232
9231
  "span",
9233
9232
  {
9234
9233
  onClick: props.handleRouteToSignUp,
9235
9234
  className: "clickable-link"
9236
9235
  },
9237
9236
  props.texts.createAccount
9238
- )))), props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */ React86.createElement(CardFooter, { className: "grid grid-cols-1 gap-2 " }, props.viaGoogle && /* @__PURE__ */ React86.createElement(Button, { variant: "outline", onClick: props.handleGoogleSignIn }, /* @__PURE__ */ React86.createElement(
9239
- Icons.google,
9240
- {
9241
- className: clsx33(
9242
- "h-4 w-4",
9243
- props.direction === "rtl" ? "ml-2" : "mr-2"
9244
- )
9245
- }
9246
- ), props.texts.signInViaGoogleLabel), props.viaGithub && /* @__PURE__ */ React86.createElement(Button, { variant: "outline", onClick: props.handleGithubSignIn }, /* @__PURE__ */ React86.createElement(
9247
- Icons.gitHub,
9237
+ )))), props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */ React86.createElement(
9238
+ CardFooter,
9248
9239
  {
9249
- className: clsx33(
9250
- "h-4 w-4",
9251
- props.direction === "rtl" ? "ml-2" : "mr-2"
9252
- )
9253
- }
9254
- ), props.texts.signInViaGithubLabel), props.viaTwitter && /* @__PURE__ */ React86.createElement(Button, { variant: "outline", onClick: props.handleTwitterSignIn }, /* @__PURE__ */ React86.createElement(
9255
- Icons.twitter,
9256
- {
9257
- className: clsx33(
9258
- "h-4 w-4",
9259
- props.direction === "rtl" ? "ml-2" : "mr-2"
9240
+ className: cn(
9241
+ props.logosOnly ? "flex flex-row gap-2 justify-center" : "grid grid-cols-1 gap-2"
9260
9242
  )
9261
- }
9262
- ), props.texts.signInViaTwitterLabel)) : null), /* @__PURE__ */ React86.createElement(
9243
+ },
9244
+ props.viaGoogle && /* @__PURE__ */ React86.createElement(
9245
+ Button,
9246
+ {
9247
+ className: "flex flex-row items-center gap-2",
9248
+ variant: "outline",
9249
+ onClick: props.handleGoogleSignIn
9250
+ },
9251
+ /* @__PURE__ */ React86.createElement(Icons.google, { className: "h-4 w-4" }),
9252
+ !props.logosOnly && props.texts.signInViaGoogleLabel
9253
+ ),
9254
+ props.viaGithub && /* @__PURE__ */ React86.createElement(
9255
+ Button,
9256
+ {
9257
+ className: "flex flex-row items-center gap-2",
9258
+ variant: "outline",
9259
+ onClick: props.handleGithubSignIn
9260
+ },
9261
+ /* @__PURE__ */ React86.createElement(Icons.gitHub, { className: "h-4 w-4" }),
9262
+ !props.logosOnly && props.texts.signInViaGithubLabel
9263
+ ),
9264
+ props.viaTwitter && /* @__PURE__ */ React86.createElement(
9265
+ Button,
9266
+ {
9267
+ className: "flex flex-row items-center gap-2",
9268
+ variant: "outline",
9269
+ onClick: props.handleTwitterSignIn
9270
+ },
9271
+ /* @__PURE__ */ React86.createElement(Icons.twitter, { className: "h-4 w-4" }),
9272
+ !props.logosOnly && props.texts.signInViaTwitterLabel
9273
+ )
9274
+ ) : null), /* @__PURE__ */ React86.createElement(
9263
9275
  InterfaceSettings,
9264
9276
  {
9265
9277
  currentColorMode: props.currentColorMode,
@@ -9278,7 +9290,6 @@ function SignInBlock() {
9278
9290
  // src/blocks/AuthForms/SignUpForm.tsx
9279
9291
  import React87 from "react";
9280
9292
  import { Controller as Controller4, FormProvider as FormProvider2, useForm as useForm4 } from "react-hook-form";
9281
- import clsx34 from "clsx";
9282
9293
  var SignUpForm = (props) => {
9283
9294
  const methods = useForm4();
9284
9295
  const {
@@ -9501,31 +9512,44 @@ var SignUpForm = (props) => {
9501
9512
  className: "clickable-link"
9502
9513
  },
9503
9514
  props.texts.signInText
9504
- )))), props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */ React87.createElement(CardFooter, { className: "grid grid-cols-1 gap-2 " }, props.viaGoogle && /* @__PURE__ */ React87.createElement(Button, { variant: "outline", onClick: props.handleGoogleSignUp }, /* @__PURE__ */ React87.createElement(
9505
- Icons.google,
9515
+ )))), props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */ React87.createElement(
9516
+ CardFooter,
9506
9517
  {
9507
- className: clsx34(
9508
- "h-4 w-4",
9509
- props.direction === "rtl" ? "ml-2" : "mr-2"
9510
- )
9511
- }
9512
- ), props.texts.signUpViaGoogleLabel), props.viaGithub && /* @__PURE__ */ React87.createElement(Button, { variant: "outline", onClick: props.handleGithubSignUp }, /* @__PURE__ */ React87.createElement(
9513
- Icons.gitHub,
9514
- {
9515
- className: clsx34(
9516
- "h-4 w-4",
9517
- props.direction === "rtl" ? "ml-2" : "mr-2"
9518
- )
9519
- }
9520
- ), props.texts.signUpViaGithubLabel), props.viaTwitter && /* @__PURE__ */ React87.createElement(Button, { variant: "outline", onClick: props.handleTwitterSignUp }, /* @__PURE__ */ React87.createElement(
9521
- Icons.twitter,
9522
- {
9523
- className: clsx34(
9524
- "h-4 w-4",
9525
- props.direction === "rtl" ? "ml-2" : "mr-2"
9518
+ className: cn(
9519
+ props.logosOnly ? "flex flex-row justify-center gap-2" : "grid grid-cols-1 gap-2"
9526
9520
  )
9527
- }
9528
- ), props.texts.signUpViaTwitterLabel)) : null), /* @__PURE__ */ React87.createElement(
9521
+ },
9522
+ props.viaGoogle && /* @__PURE__ */ React87.createElement(
9523
+ Button,
9524
+ {
9525
+ className: "flex flex-row items-center gap-2",
9526
+ variant: "outline",
9527
+ onClick: props.handleGoogleSignUp
9528
+ },
9529
+ /* @__PURE__ */ React87.createElement(Icons.google, { className: "h-4 w-4" }),
9530
+ !props.logosOnly && props.texts.signUpViaGoogleLabel
9531
+ ),
9532
+ props.viaGithub && /* @__PURE__ */ React87.createElement(
9533
+ Button,
9534
+ {
9535
+ className: "flex flex-row items-center gap-2",
9536
+ variant: "outline",
9537
+ onClick: props.handleGithubSignUp
9538
+ },
9539
+ /* @__PURE__ */ React87.createElement(Icons.gitHub, { className: "h-4 w-4" }),
9540
+ !props.logosOnly && props.texts.signUpViaGithubLabel
9541
+ ),
9542
+ props.viaTwitter && /* @__PURE__ */ React87.createElement(
9543
+ Button,
9544
+ {
9545
+ className: "flex flex-row items-center gap-2",
9546
+ variant: "outline",
9547
+ onClick: props.handleTwitterSignUp
9548
+ },
9549
+ /* @__PURE__ */ React87.createElement(Icons.twitter, { className: "h-4 w-4" }),
9550
+ !props.logosOnly && props.texts.signUpViaTwitterLabel
9551
+ )
9552
+ ) : null), /* @__PURE__ */ React87.createElement(
9529
9553
  InterfaceSettings,
9530
9554
  {
9531
9555
  currentColorMode: props.currentColorMode,
@@ -10287,7 +10311,7 @@ var ComparingPlans = (props) => {
10287
10311
 
10288
10312
  // src/blocks/Pricing/HorizontalPricing.tsx
10289
10313
  import React99, { useState as useState47 } from "react";
10290
- import clsx35 from "clsx";
10314
+ import clsx33 from "clsx";
10291
10315
  var HorizontalPricing = (props) => {
10292
10316
  const [selectedCard, setSelectedCard] = useState47(null);
10293
10317
  let data = [
@@ -10328,7 +10352,7 @@ var HorizontalPricing = (props) => {
10328
10352
  /* @__PURE__ */ React99.createElement(
10329
10353
  "div",
10330
10354
  {
10331
- className: clsx35(
10355
+ className: clsx33(
10332
10356
  selectedCard === d.title ? "peer-checked:border-blue-500" : "",
10333
10357
  "peer flex cursor-pointer items-center justify-between rounded-xl border bg-background px-5 py-4 shadow dark:text-white peer-checked:[&_.active]:block peer-checked:[&_.default]:hidden"
10334
10358
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.1.82",
3
+ "version": "0.1.83",
4
4
  "description": "Modern UI Kit made with Tailwind & Radix Primitives",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -1,7 +1,5 @@
1
1
  import React, { FC } from "react"
2
2
  import { Controller, useForm } from "react-hook-form"
3
- import clsx from "clsx"
4
-
5
3
  import {
6
4
  HawaTextField,
7
5
  HawaAlert,
@@ -11,6 +9,7 @@ import {
11
9
  import { Card, CardContent, CardFooter } from "../../elements/Card"
12
10
  import { Button } from "../../elements/Button"
13
11
  import { Icons } from "../../elements/Icons"
12
+ import { cn } from "../../util"
14
13
 
15
14
  export const SignInForm: FC<SignInFormTypes> = (props) => {
16
15
  const {
@@ -132,7 +131,7 @@ export const SignInForm: FC<SignInFormTypes> = (props) => {
132
131
  </>
133
132
  )}
134
133
 
135
- <Button className="w-full mt-4" isLoading={props.isLoading}>
134
+ <Button className="mt-4 w-full" isLoading={props.isLoading}>
136
135
  {props.texts.signInText}
137
136
  </Button>
138
137
  {!props.withoutSignUp && (
@@ -151,38 +150,39 @@ export const SignInForm: FC<SignInFormTypes> = (props) => {
151
150
 
152
151
  {/* 3rd Party Sign Auth Buttons */}
153
152
  {props.viaGithub || props.viaGoogle || props.viaTwitter ? (
154
- <CardFooter className="grid grid-cols-1 gap-2 ">
153
+ <CardFooter
154
+ className={cn(
155
+ props.logosOnly ? "flex flex-row gap-2 justify-center" : "grid grid-cols-1 gap-2"
156
+ )}
157
+ >
155
158
  {props.viaGoogle && (
156
- <Button variant="outline" onClick={props.handleGoogleSignIn}>
157
- <Icons.google
158
- className={clsx(
159
- "h-4 w-4",
160
- props.direction === "rtl" ? "ml-2" : "mr-2"
161
- )}
162
- />
163
- {props.texts.signInViaGoogleLabel}
159
+ <Button
160
+ className="flex flex-row items-center gap-2"
161
+ variant="outline"
162
+ onClick={props.handleGoogleSignIn}
163
+ >
164
+ <Icons.google className="h-4 w-4" />
165
+ {!props.logosOnly && props.texts.signInViaGoogleLabel}
164
166
  </Button>
165
167
  )}
166
168
  {props.viaGithub && (
167
- <Button variant="outline" onClick={props.handleGithubSignIn}>
168
- <Icons.gitHub
169
- className={clsx(
170
- "h-4 w-4",
171
- props.direction === "rtl" ? "ml-2" : "mr-2"
172
- )}
173
- />
174
- {props.texts.signInViaGithubLabel}
169
+ <Button
170
+ className="flex flex-row items-center gap-2"
171
+ variant="outline"
172
+ onClick={props.handleGithubSignIn}
173
+ >
174
+ <Icons.gitHub className="h-4 w-4" />
175
+ {!props.logosOnly && props.texts.signInViaGithubLabel}
175
176
  </Button>
176
177
  )}
177
178
  {props.viaTwitter && (
178
- <Button variant="outline" onClick={props.handleTwitterSignIn}>
179
- <Icons.twitter
180
- className={clsx(
181
- "h-4 w-4",
182
- props.direction === "rtl" ? "ml-2" : "mr-2"
183
- )}
184
- />
185
- {props.texts.signInViaTwitterLabel}
179
+ <Button
180
+ className="flex flex-row items-center gap-2"
181
+ variant="outline"
182
+ onClick={props.handleTwitterSignIn}
183
+ >
184
+ <Icons.twitter className="h-4 w-4" />
185
+ {!props.logosOnly && props.texts.signInViaTwitterLabel}
186
186
  </Button>
187
187
  )}
188
188
  </CardFooter>
@@ -203,6 +203,7 @@ type SignInFormTypes = {
203
203
  currentLanguage?: any
204
204
  handleColorMode?: () => void
205
205
  currentColorMode?: any
206
+ logosOnly?: boolean
206
207
  direction?: "rtl" | "ltr"
207
208
  showError?: any
208
209
  errorTitle?: string
@@ -10,7 +10,7 @@ import { Controller, FormProvider, useForm } from "react-hook-form"
10
10
  import { Card, CardContent, CardFooter } from "../../elements/Card"
11
11
  import { Button } from "../../elements/Button"
12
12
  import { Icons } from "../../elements/Icons"
13
- import clsx from "clsx"
13
+ import { cn } from "../../util"
14
14
 
15
15
  type SignUpFormTypes = {
16
16
  handleLanguage?: () => void
@@ -18,6 +18,7 @@ type SignUpFormTypes = {
18
18
  handleColorMode?: () => void
19
19
  currentColorMode?: any
20
20
  direction?: "rtl" | "ltr"
21
+ logosOnly?: boolean
21
22
  texts: {
22
23
  fullNameLabel: string
23
24
  fullNamePlaceholder: string
@@ -307,38 +308,41 @@ export const SignUpForm: FC<SignUpFormTypes> = (props) => {
307
308
  </CardContent>
308
309
 
309
310
  {props.viaGithub || props.viaGoogle || props.viaTwitter ? (
310
- <CardFooter className="grid grid-cols-1 gap-2 ">
311
+ <CardFooter
312
+ className={cn(
313
+ props.logosOnly
314
+ ? "flex flex-row justify-center gap-2"
315
+ : "grid grid-cols-1 gap-2"
316
+ )}
317
+ >
311
318
  {props.viaGoogle && (
312
- <Button variant="outline" onClick={props.handleGoogleSignUp}>
313
- <Icons.google
314
- className={clsx(
315
- "h-4 w-4",
316
- props.direction === "rtl" ? "ml-2" : "mr-2"
317
- )}
318
- />
319
- {props.texts.signUpViaGoogleLabel}
319
+ <Button
320
+ className="flex flex-row items-center gap-2"
321
+ variant="outline"
322
+ onClick={props.handleGoogleSignUp}
323
+ >
324
+ <Icons.google className="h-4 w-4" />
325
+ {!props.logosOnly && props.texts.signUpViaGoogleLabel}
320
326
  </Button>
321
327
  )}
322
328
  {props.viaGithub && (
323
- <Button variant="outline" onClick={props.handleGithubSignUp}>
324
- <Icons.gitHub
325
- className={clsx(
326
- "h-4 w-4",
327
- props.direction === "rtl" ? "ml-2" : "mr-2"
328
- )}
329
- />
330
- {props.texts.signUpViaGithubLabel}
329
+ <Button
330
+ className="flex flex-row items-center gap-2"
331
+ variant="outline"
332
+ onClick={props.handleGithubSignUp}
333
+ >
334
+ <Icons.gitHub className="h-4 w-4" />
335
+ {!props.logosOnly && props.texts.signUpViaGithubLabel}
331
336
  </Button>
332
337
  )}
333
338
  {props.viaTwitter && (
334
- <Button variant="outline" onClick={props.handleTwitterSignUp}>
335
- <Icons.twitter
336
- className={clsx(
337
- "h-4 w-4",
338
- props.direction === "rtl" ? "ml-2" : "mr-2"
339
- )}
340
- />
341
- {props.texts.signUpViaTwitterLabel}
339
+ <Button
340
+ className="flex flex-row items-center gap-2"
341
+ variant="outline"
342
+ onClick={props.handleTwitterSignUp}
343
+ >
344
+ <Icons.twitter className="h-4 w-4" />
345
+ {!props.logosOnly && props.texts.signUpViaTwitterLabel}
342
346
  </Button>
343
347
  )}
344
348
  </CardFooter>