@sikka/hawa 0.0.211 → 0.0.213

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.
Files changed (67) hide show
  1. package/dist/styles.css +49 -59
  2. package/es/blocks/Misc/Newsletter.d.ts +1 -0
  3. package/es/blocks/Misc/NotFound.d.ts +5 -0
  4. package/es/blocks/Pricing/ComparingPlans.d.ts +1 -0
  5. package/es/elements/HawaPanelTabs.d.ts +4 -1
  6. package/es/elements/HawaRange.d.ts +1 -1
  7. package/es/elements/HawaSelect.d.ts +5 -5
  8. package/es/elements/HawaSettingsRow.d.ts +1 -1
  9. package/es/elements/HawaSwitch.d.ts +1 -0
  10. package/es/elements/InvoiceAccordion.d.ts +4 -4
  11. package/es/index.es.js +1 -1
  12. package/es/layout/AppSidebar.d.ts +1 -1
  13. package/lib/blocks/Misc/Newsletter.d.ts +1 -0
  14. package/lib/blocks/Misc/NotFound.d.ts +5 -0
  15. package/lib/blocks/Pricing/ComparingPlans.d.ts +1 -0
  16. package/lib/elements/HawaPanelTabs.d.ts +4 -1
  17. package/lib/elements/HawaRange.d.ts +1 -1
  18. package/lib/elements/HawaSelect.d.ts +5 -5
  19. package/lib/elements/HawaSettingsRow.d.ts +1 -1
  20. package/lib/elements/HawaSwitch.d.ts +1 -0
  21. package/lib/elements/InvoiceAccordion.d.ts +4 -4
  22. package/lib/index.js +1 -1
  23. package/lib/layout/AppSidebar.d.ts +1 -1
  24. package/package.json +1 -1
  25. package/src/blocks/AuthForms/CodeConfirmation.tsx +1 -7
  26. package/src/blocks/Misc/EmptyState.tsx +1 -0
  27. package/src/blocks/Misc/Newsletter.tsx +8 -3
  28. package/src/blocks/Misc/NotFound.tsx +11 -3
  29. package/src/blocks/Payment/ChargeWalletForm.tsx +23 -14
  30. package/src/blocks/Payment/CheckoutForm.tsx +1 -14
  31. package/src/blocks/Payment/Confirmation.tsx +0 -1
  32. package/src/blocks/Payment/PayWithWallet.tsx +0 -1
  33. package/src/blocks/Payment/index.ts +6 -20
  34. package/src/blocks/Pricing/ComparingPlans.tsx +15 -10
  35. package/src/blocks/Pricing/PricingPlans.tsx +1 -0
  36. package/src/blocks/Referral/ReferralAccount.tsx +1 -1
  37. package/src/blocks/Referral/ReferralStats.tsx +0 -1
  38. package/src/elements/DragDropImages.tsx +156 -158
  39. package/src/elements/DraggableCard.tsx +2 -1
  40. package/src/elements/HawaAccordion.tsx +1 -1
  41. package/src/elements/HawaChip.tsx +2 -1
  42. package/src/elements/HawaColorPicker.tsx +3 -5
  43. package/src/elements/HawaItemCard.tsx +1 -2
  44. package/src/elements/HawaMenu.tsx +2 -3
  45. package/src/elements/HawaModal.tsx +1 -1
  46. package/src/elements/HawaPanelTabs.tsx +1 -7
  47. package/src/elements/HawaPricingCard.tsx +1 -7
  48. package/src/elements/HawaRadio.tsx +1 -1
  49. package/src/elements/HawaRange.tsx +1 -1
  50. package/src/elements/HawaSelect.tsx +38 -36
  51. package/src/elements/HawaSettingsRow.tsx +7 -5
  52. package/src/elements/HawaSnackbar.tsx +1 -1
  53. package/src/elements/HawaSpinner.tsx +2 -2
  54. package/src/elements/HawaSwitch.tsx +19 -2
  55. package/src/elements/HawaTable.tsx +3 -1
  56. package/src/elements/HawaTabs.tsx +2 -0
  57. package/src/elements/HawaTextField.tsx +1 -0
  58. package/src/elements/HawaTooltip.tsx +1 -3
  59. package/src/elements/InvoiceAccordion.tsx +5 -5
  60. package/src/layout/AppSidebar.tsx +1 -1
  61. package/src/layout/HawaAppLayout.tsx +5 -4
  62. package/src/layout/HawaContainer.tsx +0 -1
  63. package/src/layout/HawaSiteLayout.tsx +1 -3
  64. package/src/layout/SimpleGrid.tsx +2 -3
  65. package/src/styles.css +49 -59
  66. package/src/tailwind.css +4 -8
  67. package/tailwind.config.js +3 -1
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  interface Props {
3
3
  isOpen: boolean;
4
4
  onClose: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.0.211",
3
+ "version": "0.0.213",
4
4
  "description": "SaaS Oriented UI Kit",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.es.js",
@@ -1,11 +1,5 @@
1
1
  import React, { useState } from "react"
2
- import {
3
- HawaTextField,
4
- HawaAlert,
5
- HawaButton,
6
- HawaPinInput,
7
- } from "../../elements"
8
- import { Controller, useForm } from "react-hook-form"
2
+ import { HawaAlert, HawaButton, HawaPinInput } from "../../elements"
9
3
  import { HawaContainer } from "../../layout"
10
4
 
11
5
  type TConfirmation = {
@@ -2,6 +2,7 @@ import React from "react"
2
2
  import { HawaButton } from "../../elements"
3
3
  import { HawaContainer } from "../../layout"
4
4
  import { FaCheck } from "react-icons/fa"
5
+
5
6
  type TEmptyState = {
6
7
  variant?: "outlined" | "contained" | "neobrutalism"
7
8
  }
@@ -7,6 +7,7 @@ type TNewsletter = {
7
7
  texts: {
8
8
  wantToStayUpdated: string
9
9
  subscribeToNewsletter: string
10
+ submit: string
10
11
  }
11
12
  handleNewsletterSub: (e: string) => void
12
13
  }
@@ -19,8 +20,12 @@ export const Newsletter: React.FunctionComponent<TNewsletter> = ({
19
20
  return (
20
21
  <HawaContainer variant={variant} centered={true}>
21
22
  <div className="p-4 pt-0">
22
- <h1 className="font-bold">{texts.wantToStayUpdated}</h1>
23
- <span>{texts.subscribeToNewsletter}</span>
23
+ <h1 className="font-bold">
24
+ {texts.wantToStayUpdated ?? "Want to stay updated?"}
25
+ </h1>
26
+ <span>
27
+ {texts.subscribeToNewsletter ?? "Subscribe to our newsletter"}
28
+ </span>
24
29
  </div>
25
30
  <form
26
31
  className="flex flex-row gap-2"
@@ -37,7 +42,7 @@ export const Newsletter: React.FunctionComponent<TNewsletter> = ({
37
42
  margin="none"
38
43
  />
39
44
  <HawaButton size="full" margins="none">
40
- Submit
45
+ {texts.submit ?? "Submit"}
41
46
  </HawaButton>
42
47
  </form>
43
48
  </HawaContainer>
@@ -4,21 +4,29 @@ import { HawaContainer } from "../../layout"
4
4
 
5
5
  type NotFoundTypes = {
6
6
  variant?: "outlined" | "contained" | "neobrutalism"
7
+ texts?: {
8
+ pageNotFound: string
9
+ ifLost: string
10
+ home: string
11
+ }
7
12
  }
8
13
 
9
14
  export const NotFound: React.FunctionComponent<NotFoundTypes> = ({
10
15
  variant,
16
+ texts,
11
17
  }) => {
12
18
  return (
13
19
  <HawaContainer variant={variant}>
14
20
  <div className="flex flex-col items-center dark:text-white">
15
21
  <div className="text-center text-6xl font-bold ">404</div>
16
- <div className="m-2 text-center text-xl font-bold ">Page Not Found</div>
22
+ <div className="m-2 text-center text-xl font-bold ">
23
+ {texts.pageNotFound ?? "Page Not Found"}
24
+ </div>
17
25
  <div className="text-center ">
18
- If you're lost please contact us help@sikka.io{" "}
26
+ {texts.ifLost ?? "If you're lost please contact us help@sikka.io"}
19
27
  </div>
20
28
  <HawaButton color="primary" width="full">
21
- Home
29
+ {texts.home ?? "Home"}
22
30
  </HawaButton>
23
31
  </div>
24
32
  </HawaContainer>
@@ -1,6 +1,5 @@
1
1
  import React, { useState } from "react"
2
- import { HawaButton, HawaTextField } from "../../elements"
3
- import { Controller, FormProvider, useForm } from "react-hook-form"
2
+ import { HawaButton } from "../../elements"
4
3
  import { HawaContainer } from "../../layout"
5
4
 
6
5
  type ChargeWalletTypes = {
@@ -16,21 +15,28 @@ export const ChargeWalletForm: React.FunctionComponent<ChargeWalletTypes> = (
16
15
  props
17
16
  ) => {
18
17
  const [walletAmount, setWalletAmount] = useState(0)
19
- const methods = useForm()
20
- const {
21
- formState: { errors },
22
- handleSubmit,
23
- control,
24
- } = methods
25
18
 
26
19
  return (
27
20
  <HawaContainer>
28
- {" "}
29
- <div className="text-center text-5xl font-extrabold">
30
- {Number(walletAmount).toLocaleString("en") || "0"}
21
+ <div className="p-4 text-center">
22
+ <div className=" text-5xl font-extrabold">
23
+ {Number(walletAmount).toLocaleString("en") || "0"}
24
+ </div>
31
25
  <div className="text-sm font-normal">{props.currency || "SAR"}</div>
32
26
  </div>
33
- <FormProvider {...methods}>
27
+ <div className="mb-2 flex w-full flex-row gap-2 text-center">
28
+ <div className="w-40 whitespace-nowrap rounded bg-gray-100 p-4">
29
+ 10 SAR
30
+ </div>
31
+ <div className="w-40 whitespace-nowrap rounded bg-gray-100 p-4">
32
+ 100 SAR
33
+ </div>
34
+ <input
35
+ placeholder="Custom"
36
+ className="h-auto rounded bg-gray-100 p-4"
37
+ />
38
+ </div>
39
+ {/* <FormProvider {...methods}>
34
40
  <form onSubmit={handleSubmit(props.handleChargeWallet)}>
35
41
  <Controller
36
42
  control={control}
@@ -67,8 +73,11 @@ export const ChargeWalletForm: React.FunctionComponent<ChargeWalletTypes> = (
67
73
  >
68
74
  {props.texts.chargeWallet}
69
75
  </HawaButton>
70
- </form>
71
- </FormProvider>
76
+ </form>
77
+ </FormProvider> */}
78
+ <HawaButton color="primary" width="full">
79
+ {props.texts.chargeWallet}
80
+ </HawaButton>
72
81
  </HawaContainer>
73
82
  )
74
83
  }
@@ -109,7 +109,6 @@ export const CheckoutForm: React.FunctionComponent<CheckoutFormTypes> = (
109
109
  rules={{ required: props.texts?.required }}
110
110
  render={({ field }) => (
111
111
  <HawaTextField
112
- // inForm
113
112
  width="full"
114
113
  type="text"
115
114
  label={props.texts?.lastNameLabel + " *"}
@@ -125,7 +124,6 @@ export const CheckoutForm: React.FunctionComponent<CheckoutFormTypes> = (
125
124
  name="email"
126
125
  render={({ field }) => (
127
126
  <HawaTextField
128
- // inForm
129
127
  width="full"
130
128
  type="text"
131
129
  label={props.texts?.emailLabel + " *"}
@@ -150,7 +148,6 @@ export const CheckoutForm: React.FunctionComponent<CheckoutFormTypes> = (
150
148
  rules={{ required: props.texts?.required }}
151
149
  render={({ field }) => (
152
150
  <HawaTextField
153
- // inForm
154
151
  width="full"
155
152
  type="text"
156
153
  label={props.texts?.streetAddressLabel + " *"}
@@ -168,7 +165,6 @@ export const CheckoutForm: React.FunctionComponent<CheckoutFormTypes> = (
168
165
  rules={{ required: props.texts?.required }}
169
166
  render={({ field }) => (
170
167
  <HawaTextField
171
- // inForm
172
168
  width="full"
173
169
  type="text"
174
170
  label={props.texts?.buildingNumberLabel + " *"}
@@ -187,7 +183,6 @@ export const CheckoutForm: React.FunctionComponent<CheckoutFormTypes> = (
187
183
  rules={{ required: props.texts?.required }}
188
184
  render={({ field }) => (
189
185
  <HawaTextField
190
- // inForm
191
186
  width="full"
192
187
  type="text"
193
188
  label={props.texts?.stateLabel + " *"}
@@ -205,7 +200,6 @@ export const CheckoutForm: React.FunctionComponent<CheckoutFormTypes> = (
205
200
  rules={{ required: props.texts?.required }}
206
201
  render={({ field }) => (
207
202
  <HawaTextField
208
- // inForm
209
203
  width="full"
210
204
  type="text"
211
205
  label={props.texts?.cityLabel + " *"}
@@ -223,10 +217,8 @@ export const CheckoutForm: React.FunctionComponent<CheckoutFormTypes> = (
223
217
  rules={{ required: props.texts?.required }}
224
218
  render={({ field }) => (
225
219
  <HawaTextField
226
- // inForm
227
220
  width="full"
228
221
  type="number"
229
- // variant="unscrollable"
230
222
  label={props.texts?.zipCodeLabel + " *"}
231
223
  helperText={errors.zipCode?.message}
232
224
  {...field}
@@ -248,7 +240,6 @@ export const CheckoutForm: React.FunctionComponent<CheckoutFormTypes> = (
248
240
  helperText={errors.country?.message}
249
241
  options={countries}
250
242
  getOptionLabel={(countries) => countries.country_label}
251
- // {...field}
252
243
  onChange={(e) => field.onChange(e.country_label)}
253
244
  value={field.value ?? ""}
254
245
  >
@@ -260,11 +251,7 @@ export const CheckoutForm: React.FunctionComponent<CheckoutFormTypes> = (
260
251
  )}
261
252
  />
262
253
  </div>
263
- <HawaButton
264
- color="primary"
265
- // type="submit"
266
- width="full"
267
- >
254
+ <HawaButton color="primary" width="full">
268
255
  {props.texts.payNow}
269
256
  </HawaButton>
270
257
  </form>
@@ -70,7 +70,6 @@ export const ConfirmationPage: React.FunctionComponent<
70
70
  { hidden: false, value: "Price" },
71
71
  ]}
72
72
  rows={props.products}
73
- // end={["Total", props.total]}
74
73
  />
75
74
  )}
76
75
  </div>
@@ -17,7 +17,6 @@ export const PayWithWallet: React.FunctionComponent<PayWithWalletTypes> = (
17
17
  <div className="text-sm font-normal">{props.currency || "SAR"}</div>
18
18
  </div>
19
19
  <HawaButton
20
- // type="submit"
21
20
  width="full"
22
21
  color="primary"
23
22
  onClick={props.handlePayWithWallet}
@@ -1,20 +1,6 @@
1
- // "use strict";
2
-
3
- // var _GooglePay = require("./Gateway/GooglePay");
4
- // var _Payfort = require("./Gateway/Payfort");
5
- // var _Paypal = require("./Gateway/Paypal");
6
- // var _Wallet = require("./Gateway/Wallet");
7
- // var _PaymentMethod = require("./PaymentMethod");
8
-
9
- // exports.GooglePay = _GooglePay.default;
10
- // exports.Payfort = _Payfort.default;
11
- // exports.Paypal = _Paypal.default;
12
- // exports.Wallet = _Wallet.default;
13
- // exports.PaymentMethod = _PaymentMethod.default;
14
-
15
- export * from "./SelectPayment";
16
- export * from "./CreditCardForm";
17
- export * from "./ChargeWalletForm";
18
- export * from "./PayWithWallet";
19
- export * from "./CheckoutForm";
20
- export * from "./Confirmation";
1
+ export * from "./SelectPayment"
2
+ export * from "./CreditCardForm"
3
+ export * from "./ChargeWalletForm"
4
+ export * from "./PayWithWallet"
5
+ export * from "./CheckoutForm"
6
+ export * from "./Confirmation"
@@ -1,5 +1,6 @@
1
1
  import React, { useState } from "react"
2
- import { HawaTabs } from "../../elements"
2
+ import { BsExclamationCircleFill } from "react-icons/bs"
3
+ import { HawaTabs, HawaTooltip } from "../../elements"
3
4
 
4
5
  const CheckMark = () => (
5
6
  <svg
@@ -37,7 +38,7 @@ type ComparingPlansTypes = {
37
38
  plans: [
38
39
  {
39
40
  direction: "rtl" | "ltr"
40
- features: [{ included: boolean; text: string }]
41
+ features: [{ included: boolean; text: string; description?: string }]
41
42
  price: number
42
43
  texts: {
43
44
  title: string
@@ -93,8 +94,8 @@ export const ComparingPlans: React.FunctionComponent<ComparingPlansTypes> = (
93
94
  }}
94
95
  />
95
96
  </div>
96
- <div className="min-w-max overflow-hidden">
97
- <div className="grid grid-cols-4 gap-x-16 border-t border-b border-gray-200 bg-gray-100 p-4 text-sm font-medium text-gray-900 dark:border-gray-700 dark:bg-gray-800 dark:text-white">
97
+ <div className=" overflow-hidden rounded">
98
+ <div className="grid grid-cols-4 gap-x-2 border-t border-b border-gray-200 bg-gray-100 p-4 text-sm font-medium text-gray-900 dark:border-gray-700 dark:bg-gray-800 dark:text-white">
98
99
  <div className="flex items-center"></div>
99
100
  {props.plans.map((plan: any) => (
100
101
  <div>
@@ -125,12 +126,16 @@ export const ComparingPlans: React.FunctionComponent<ComparingPlansTypes> = (
125
126
  return plan.features.map((feature) => {
126
127
  return (
127
128
  <div className="grid grid-cols-4 gap-x-16 border-b border-gray-200 py-5 px-4 text-sm text-gray-700 dark:border-gray-700">
128
- <div className="text-gray-500 dark:text-gray-400">
129
- {feature.text} (
130
- <a href="#" className="text-blue-600 hover:underline">
131
- view demo
132
- </a>
133
- )
129
+ <div className=" flex flex-row items-center gap-2 text-gray-500 dark:text-gray-400">
130
+ {feature.text}
131
+ {feature.description && (
132
+ <HawaTooltip
133
+ position="top-right"
134
+ content={feature.description}
135
+ >
136
+ <BsExclamationCircleFill />
137
+ </HawaTooltip>
138
+ )}
134
139
  </div>
135
140
  <UncheckMark />
136
141
  <CheckMark />
@@ -1,5 +1,6 @@
1
1
  import React, { useState } from "react"
2
2
  import { HawaPricingCard, HawaTabs } from "../../elements"
3
+
3
4
  // TODO: make lang into direction rtl | ltr
4
5
 
5
6
  type PricingPlansTypes = {
@@ -1,6 +1,6 @@
1
1
  import React from "react"
2
2
  import { FaClone } from "react-icons/fa"
3
- import { HawaAlert, HawaButton, HawaTable, HawaTooltip } from "../../elements"
3
+ import { HawaButton } from "../../elements"
4
4
  import { HawaContainer } from "../../layout"
5
5
 
6
6
  type ReferralAccount = {
@@ -1,5 +1,4 @@
1
1
  import React from "react"
2
- import { FaClone } from "react-icons/fa"
3
2
  import { HawaAlert, HawaButton } from "../../elements"
4
3
  import { HawaContainer } from "../../layout"
5
4