@sikka/hawa 0.0.136 → 0.0.138

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 (32) hide show
  1. package/dist/styles.css +13 -29
  2. package/es/blocks/AuthForms/SignInForm.d.ts +0 -1
  3. package/es/blocks/AuthForms/SignUpForm.d.ts +1 -0
  4. package/es/elements/HawaCheckbox.d.ts +1 -0
  5. package/es/elements/HawaDrawer.d.ts +4 -14
  6. package/es/elements/HawaLogoButton.d.ts +1 -1
  7. package/es/elements/HawaTextField.d.ts +1 -0
  8. package/es/index.es.js +1 -1
  9. package/lib/blocks/AuthForms/SignInForm.d.ts +0 -1
  10. package/lib/blocks/AuthForms/SignUpForm.d.ts +1 -0
  11. package/lib/elements/HawaCheckbox.d.ts +1 -0
  12. package/lib/elements/HawaDrawer.d.ts +4 -14
  13. package/lib/elements/HawaLogoButton.d.ts +1 -1
  14. package/lib/elements/HawaTextField.d.ts +1 -0
  15. package/lib/index.js +1 -1
  16. package/package.json +1 -1
  17. package/src/blocks/AuthForms/SignInForm.tsx +16 -16
  18. package/src/blocks/AuthForms/SignUpForm.tsx +20 -17
  19. package/src/blocks/Payment/CheckoutForm.tsx +2 -11
  20. package/src/elements/HawaCheckbox.tsx +9 -3
  21. package/src/elements/HawaDrawer.tsx +53 -77
  22. package/src/elements/HawaLogoButton.tsx +12 -15
  23. package/src/elements/HawaSelect.tsx +2 -1
  24. package/src/elements/HawaTable.tsx +9 -4
  25. package/src/elements/HawaTextField.tsx +8 -1
  26. package/src/styles.css +13 -29
  27. package/storybook-static/{103.d48f1210.iframe.bundle.js → 103.af0e0958.iframe.bundle.js} +2 -2
  28. package/storybook-static/{103.d48f1210.iframe.bundle.js.LICENSE.txt → 103.af0e0958.iframe.bundle.js.LICENSE.txt} +0 -0
  29. package/storybook-static/iframe.html +1 -1
  30. package/storybook-static/main.18ef859c.iframe.bundle.js +1 -0
  31. package/storybook-static/project.json +1 -1
  32. package/storybook-static/main.237a650d.iframe.bundle.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.0.136",
3
+ "version": "0.0.138",
4
4
  "description": "UI Kit",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.es.js",
@@ -22,7 +22,6 @@ type SignInFormTypes = {
22
22
  usernameLabel?: string
23
23
  usernamePlaceholder?: string
24
24
  usernameRequired?: string
25
- usernameRequiredText?: string
26
25
  phoneRequiredText?: string
27
26
  passwordLabel?: string
28
27
  passwordPlaceholder?: string
@@ -77,8 +76,8 @@ export const SignInForm: React.FunctionComponent<SignInFormTypes> = (props) => {
77
76
  label={props.texts.emailLabel}
78
77
  helperText={errors.email?.message}
79
78
  placeholder={props.texts.emailPlaceholder}
80
- {...field}
81
79
  value={field.value ?? ""}
80
+ onChange={field.onChange}
82
81
  />
83
82
  )}
84
83
  rules={{
@@ -94,19 +93,21 @@ export const SignInForm: React.FunctionComponent<SignInFormTypes> = (props) => {
94
93
  <Controller
95
94
  control={control}
96
95
  name="username"
97
- render={({ field }) => (
98
- <HawaTextField
99
- width="full"
100
- type="text"
101
- label={props.texts.usernameLabel}
102
- helperText={errors.username?.message}
103
- placeholder={props.texts.usernamePlaceholder}
104
- {...field}
105
- value={field.value ?? ""}
106
- />
107
- )}
96
+ render={({ field }) => {
97
+ return (
98
+ <HawaTextField
99
+ width="full"
100
+ type="text"
101
+ label={props.texts.usernameLabel}
102
+ helperText={errors.username?.message}
103
+ placeholder={props.texts.usernamePlaceholder}
104
+ onChange={field.onChange}
105
+ value={field.value ?? ""}
106
+ />
107
+ )
108
+ }}
108
109
  rules={{
109
- required: props.texts.usernameRequiredText,
110
+ required: props.texts.usernameRequired,
110
111
  }}
111
112
  />
112
113
  ) : (
@@ -124,11 +125,10 @@ export const SignInForm: React.FunctionComponent<SignInFormTypes> = (props) => {
124
125
  <HawaTextField
125
126
  width="full"
126
127
  type="password"
127
- defaultValue={field.value ?? ""}
128
128
  label={props.texts.passwordLabel}
129
129
  placeholder={props.texts.passwordPlaceholder}
130
130
  helperText={errors.password?.message}
131
- {...field}
131
+ onChange={field.onChange}
132
132
  value={field.value ?? ""}
133
133
  />
134
134
  )}
@@ -54,6 +54,7 @@ type SignUpFormTypes = {
54
54
  handleGoogleSignUp: () => void
55
55
  handleGithubSignUp: () => void
56
56
  handleTwitterSignUp: () => void
57
+ handleRouteToTOS: () => void
57
58
  showError: any
58
59
  errorTitle: any
59
60
  errorText: any
@@ -89,7 +90,7 @@ export const SignUpForm: React.FunctionComponent<SignUpFormTypes> = (props) => {
89
90
  label={props.texts.fullNameLabel}
90
91
  placeholder={props.texts.fullNamePlaceholder}
91
92
  helperText={errors.fullName?.message}
92
- {...field}
93
+ onChange={field.onChange}
93
94
  value={field.value ?? ""}
94
95
  />
95
96
  )}
@@ -108,7 +109,7 @@ export const SignUpForm: React.FunctionComponent<SignUpFormTypes> = (props) => {
108
109
  label={props.texts.emailLabel}
109
110
  helperText={errors.email?.message}
110
111
  placeholder={props.texts.emailPlaceholder}
111
- {...field}
112
+ onChange={field.onChange}
112
113
  value={field.value ?? ""}
113
114
  />
114
115
  )}
@@ -132,7 +133,7 @@ export const SignUpForm: React.FunctionComponent<SignUpFormTypes> = (props) => {
132
133
  label={props.texts.usernameLabel}
133
134
  helperText={errors.username?.message}
134
135
  placeholder={props.texts.usernamePlaceholder}
135
- {...field}
136
+ onChange={field.onChange}
136
137
  value={field.value ?? ""}
137
138
  />
138
139
  )}
@@ -148,11 +149,11 @@ export const SignUpForm: React.FunctionComponent<SignUpFormTypes> = (props) => {
148
149
  <HawaTextField
149
150
  width="full"
150
151
  type="password"
151
- defaultValue={field.value ?? ""}
152
+ // defaultValue={field.value ?? ""}
152
153
  label={props.texts.passwordLabel}
153
154
  placeholder={props.texts.passwordPlaceholder}
154
155
  helperText={errors.password?.message}
155
- {...field}
156
+ onChange={field.onChange}
156
157
  value={field.value ?? ""}
157
158
  />
158
159
  )}
@@ -165,11 +166,11 @@ export const SignUpForm: React.FunctionComponent<SignUpFormTypes> = (props) => {
165
166
  <HawaTextField
166
167
  width="full"
167
168
  type="password"
168
- defaultValue={field.value ?? ""}
169
+ // defaultValue={field.value ?? ""}
169
170
  label={props.texts.confirmPasswordLabel}
170
171
  placeholder={props.texts.confirmPasswordPlaceholder}
171
172
  helperText={errors.confirm_password?.message}
172
- {...field}
173
+ onChange={field.onChange}
173
174
  value={field.value ?? ""}
174
175
  />
175
176
  )}
@@ -187,8 +188,8 @@ export const SignUpForm: React.FunctionComponent<SignUpFormTypes> = (props) => {
187
188
  label={"Ref Code"}
188
189
  placeholder={props.texts.passwordPlaceholder}
189
190
  helperText={errors.password?.message}
190
- {...field}
191
191
  value={field.value ?? ""}
192
+ onChange={field.onChange}
192
193
  />
193
194
  )}
194
195
  />
@@ -210,11 +211,9 @@ export const SignUpForm: React.FunctionComponent<SignUpFormTypes> = (props) => {
210
211
  { value: "ad", label: "Advertisement" },
211
212
  { value: "other", label: "Other" },
212
213
  ]}
213
- onInputChange={(e: any, o: any) =>
214
- console.log("changing", e)
215
- }
216
- {...field}
217
- onChange={(e: any, o: any) => console.log("chooo", e)}
214
+ onChange={(e: any) => {
215
+ field.onChange(e.value)
216
+ }}
218
217
  />
219
218
  )}
220
219
  />
@@ -227,17 +226,20 @@ export const SignUpForm: React.FunctionComponent<SignUpFormTypes> = (props) => {
227
226
  name="terms_accepted"
228
227
  render={({ field }) => (
229
228
  <HawaCheckbox
229
+ id="terms_accepted"
230
230
  helperText={errors.terms_accepted?.message}
231
- onChange={() => console.log("te")}
231
+ onChange={field.onChange}
232
232
  label={
233
233
  <span>
234
234
  {props.texts.iAcceptText}{" "}
235
- <a className="cursor-pointer text-blue-800">
235
+ <a
236
+ onClick={props.handleRouteToTOS}
237
+ className="cursor-pointer text-blue-800"
238
+ >
236
239
  {props.texts.termsText}
237
240
  </a>
238
241
  </span>
239
242
  }
240
- {...field}
241
243
  />
242
244
  )}
243
245
  rules={{ required: props.texts.termsRequiredText }}
@@ -251,8 +253,9 @@ export const SignUpForm: React.FunctionComponent<SignUpFormTypes> = (props) => {
251
253
  name="newsletter_accepted"
252
254
  render={({ field }) => (
253
255
  <HawaCheckbox
256
+ id="newsletter_accepted"
254
257
  label={props.texts.subscribeToNewsletter}
255
- {...field}
258
+ onChange={field.onChange}
256
259
  />
257
260
  )}
258
261
  />
@@ -238,20 +238,11 @@ export const CheckoutForm: React.FunctionComponent<CheckoutFormTypes> = (
238
238
  fullWidth
239
239
  native
240
240
  label={props.texts?.countryLabel + " *"}
241
- // variant="standard"
242
241
  helperText={errors.country?.message}
243
- // displayEmpty
244
- // disableUnderline
245
- // validators={["required"]}
246
242
  options={countries}
247
243
  getOptionLabel={(countries) => countries.country_label}
248
- // options={[
249
- // { label: "Saudi Arabia", value: "saudi_arabia" },
250
- // { label: "Saudi Arabia", value: "saudi_arabia" },
251
- // { label: "Saudi Arabia", value: "saudi_arabia" },
252
- // { label: "Saudi Arabia", value: "saudi_arabia" },
253
- // ]}
254
- {...field}
244
+ // {...field}
245
+ onChange={(e) => field.onChange(e.country_label)}
255
246
  value={field.value ?? ""}
256
247
  >
257
248
  <option></option>
@@ -1,9 +1,10 @@
1
- import React, { ReactElement } from "react"
1
+ import React from "react"
2
2
 
3
3
  type TCheckBoxTypes = {
4
4
  centered?: boolean
5
5
  label?: any
6
6
  helperText?: any
7
+ id: string
7
8
  onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void
8
9
  }
9
10
 
@@ -17,18 +18,23 @@ export const HawaCheckbox: React.FunctionComponent<TCheckBoxTypes> = (
17
18
  ? "flex h-full items-center justify-center"
18
19
  : "flex h-full items-start"
19
20
  }
21
+ // onClick={(e: any) => props.onChange(e)}
20
22
  >
21
23
  <input
22
24
  type="checkbox"
23
25
  value=""
24
26
  onChange={(e) => props.onChange(e)}
25
27
  className="mt-0.5 rounded border-gray-300 bg-gray-100 text-blue-600 focus:ring-2 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:ring-offset-gray-800 dark:focus:ring-blue-600"
26
- {...props}
28
+ id={props.id}
29
+ aria-label={props.label}
27
30
  />
28
31
  {(props.label || props.helperText) && (
29
32
  <div className=" flex flex-col">
30
33
  {props.label && (
31
- <label className="mx-2 text-sm font-medium text-gray-900 dark:text-gray-300">
34
+ <label
35
+ htmlFor={props.id}
36
+ className="mx-2 text-sm font-medium text-gray-900 dark:text-gray-300"
37
+ >
32
38
  {props.label}
33
39
  </label>
34
40
  )}
@@ -1,5 +1,5 @@
1
1
  import React, { FC, ReactElement, ReactNode, useEffect, useState } from "react"
2
- import { FaDailymotion } from "react-icons/fa"
2
+ import { FaChevronLeft, FaChevronRight } from "react-icons/fa"
3
3
  import clsx from "clsx"
4
4
 
5
5
  type TDrawerTypes = {
@@ -8,6 +8,9 @@ type TDrawerTypes = {
8
8
  position: any
9
9
  heading: any
10
10
  children?: ReactNode
11
+ drawerHeader?: any
12
+ drawerBody?: any
13
+ drawerFooter?: any
11
14
  }
12
15
 
13
16
  export const HawaDrawer: React.FunctionComponent<TDrawerTypes> = ({
@@ -19,53 +22,31 @@ export const HawaDrawer: React.FunctionComponent<TDrawerTypes> = ({
19
22
  ...props
20
23
  }) => {
21
24
  const leftDrawer =
22
- "w-60 z-50 h-full absolute overflow-x-hidden top-0 left-0 border-r bg-white"
25
+ "w-60 z-50 h-full absolute overflow-x-clip top-0 left-0 border-r bg-white"
23
26
  const rightDrawer =
24
- "w-60 z-50 h-full absolute overflow-x-hidden top-0 right-0 border-l bg-white"
25
-
26
- const isFunction = (data: any): data is (...args: any[]) => any =>
27
- typeof data === "function"
28
- // useEffect(() => {
29
- // setOpenDrawer(true);
30
- // }, [open]);
31
-
32
- const childrenWithProps = React.Children.map(children, (child) => {
33
- if (React.isValidElement(child) && isFunction(child.type)) {
34
- switch (child.type.name) {
35
- case "DrawerHeader":
36
- return (
37
- <DrawerHeader setOpen={setOpen} children={child.props.children} />
38
- )
39
-
40
- case "DrawerBody":
41
- return <DrawerBody children={child.props.children} />
42
-
43
- case "DrawerFooter":
44
- return <DrawerFooter children={child.props.children} />
45
- }
46
- return React.cloneElement(child, {
47
- // setOpen: setOpen,
48
- // children: child.props.children,
49
- })
50
- }
51
- })
52
-
53
- // const drawerClass =
54
- // open && position == "left"
55
- // ? clsx("block", leftDrawer)
56
- // : open && position == "right"
57
- // ? clsx("block", rightDrawer)
58
- // : "hidden w-0 "
27
+ "w-60 z-50 h-full absolute overflow-x-clip top-0 right-0 border-l bg-white"
59
28
 
60
29
  return (
61
30
  <div
62
31
  className={clsx(
63
32
  position == "left" ? leftDrawer : rightDrawer,
64
- "overflow-y-clip transition-all",
33
+ position == "left" ? "flex-row-reverse" : "flex-row",
34
+ "overflow-x-clip transition-all",
65
35
  open ? "w-60" : "w-0"
66
36
  )}
67
37
  >
68
- {childrenWithProps}
38
+ {props.drawerHeader && (
39
+ <DrawerHeader direction={position} setOpen={setOpen}>
40
+ {props.drawerHeader}
41
+ </DrawerHeader>
42
+ )}
43
+
44
+ {props.drawerBody && (
45
+ <DrawerBody direction={position}>{props.drawerBody}</DrawerBody>
46
+ )}
47
+ {props.drawerFooter && (
48
+ <DrawerFooter direction={position}>{props.drawerFooter}</DrawerFooter>
49
+ )}
69
50
  </div>
70
51
  )
71
52
  }
@@ -73,11 +54,17 @@ export const HawaDrawer: React.FunctionComponent<TDrawerTypes> = ({
73
54
  type TDrawerHeader = {
74
55
  setOpen: any
75
56
  children: ReactElement
57
+ direction: any
76
58
  }
77
59
 
78
- export const DrawerHeader: FC<TDrawerHeader> = (props) => {
60
+ const DrawerHeader: FC<TDrawerHeader> = (props) => {
79
61
  return (
80
- <div className=" flex w-full flex-row items-center justify-between border-b py-4 px-1">
62
+ <div
63
+ className={clsx(
64
+ "flex w-full flex-row items-center justify-between border-b p-4",
65
+ props.direction == "left" ? "flex-row" : "flex-row-reverse"
66
+ )}
67
+ >
81
68
  {props.children}
82
69
  <div
83
70
  className="justify-self-end rounded border p-1 hover:cursor-pointer"
@@ -86,7 +73,11 @@ export const DrawerHeader: FC<TDrawerHeader> = (props) => {
86
73
  props.setOpen(false)
87
74
  }}
88
75
  >
89
- <FaDailymotion size={20} strokeWidth={2} />
76
+ {props.direction == "left" ? (
77
+ <FaChevronLeft size={20} strokeWidth={2} />
78
+ ) : (
79
+ <FaChevronRight size={20} strokeWidth={2} />
80
+ )}
90
81
  </div>
91
82
  </div>
92
83
  )
@@ -94,50 +85,35 @@ export const DrawerHeader: FC<TDrawerHeader> = (props) => {
94
85
 
95
86
  type TDrawerBody = {
96
87
  children: ReactElement
88
+ direction: any
97
89
  }
98
-
99
- export const DrawerBody = (props: TDrawerBody) => {
100
- return <div className="p-1">{props.children}</div>
101
- }
102
-
103
- type TDrawerFooter = {
104
- children: ReactElement
105
- }
106
-
107
- export const DrawerFooter = (props: TDrawerFooter) => {
90
+ const DrawerBody = (props: TDrawerBody) => {
108
91
  return (
109
- <div className="absolute bottom-0 w-full border-t py-4 px-1">
92
+ <div
93
+ className={clsx(
94
+ "overflow-clip whitespace-nowrap p-4",
95
+ props.direction == "left" ? "flex-row" : "flex-row-reverse text-right"
96
+ )}
97
+ >
110
98
  {props.children}
111
99
  </div>
112
100
  )
113
101
  }
114
102
 
115
- type DrawerItemTypes = {
116
- action: any
117
- icon?: any
118
- text: any
103
+ type TDrawerFooter = {
104
+ children: ReactElement
105
+ direction: any
119
106
  }
120
- const HawaDrawerItem: React.FunctionComponent<DrawerItemTypes> = (props) => {
121
- let withIcon =
122
- "flex items-center p-2 text-base font-normal text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700"
123
- let withoutIcon =
124
- "flex items-center p-2 text-base font-normal text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700"
125
107
 
108
+ const DrawerFooter = (props: TDrawerFooter) => {
126
109
  return (
127
- <li onClick={props.action}>
128
- <div className={props.icon ? withIcon : withoutIcon}>
129
- {/* <svg
130
- aria-hidden="true"
131
- className="w-6 h-6 text-gray-500 transition duration-75 dark:text-gray-400 group-hover:text-gray-900 dark:group-hover:text-white"
132
- fill="currentColor"
133
- viewBox="0 0 20 20"
134
- xmlns="http://www.w3.org/2000/svg"
135
- >
136
- <path d="M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"></path>
137
- <path d="M12 2.252A8.014 8.014 0 0117.748 8H12V2.252z"></path>
138
- </svg> */}
139
- <span className="ml-3">{props.text}</span>
140
- </div>
141
- </li>
110
+ <div
111
+ className={clsx(
112
+ "absolute bottom-0 w-full whitespace-nowrap border-t p-4",
113
+ props.direction == "left" ? "flex-row" : "flex-row-reverse text-right"
114
+ )}
115
+ >
116
+ {props.children}
117
+ </div>
142
118
  )
143
119
  }
@@ -2,19 +2,17 @@ import React from "react"
2
2
 
3
3
  type LogoButtonTypes = {
4
4
  lang?: any
5
- logo?: any
6
- // logo: PropTypes.oneOf([
7
- // "google",
8
- // "github",
9
- // "twitter",
10
- // "wallet",
11
- // "googlepay",
12
- // "applepay",
13
- // "stcpay",
14
- // "visa/master",
15
- // "paypal",
16
- // "mada",
17
- // ]),
5
+ logo?:
6
+ | "google"
7
+ | "github"
8
+ | "twitter"
9
+ | "wallet"
10
+ | "googlepay"
11
+ | "applepay"
12
+ | "stcpay"
13
+ | "visa/master"
14
+ | "paypal"
15
+ | "mada"
18
16
  onClick?: any
19
17
  buttonText?: any
20
18
  }
@@ -145,14 +143,13 @@ export const HawaLogoButton: React.FunctionComponent<LogoButtonTypes> = (
145
143
  </svg>
146
144
  )
147
145
  break
148
-
149
146
  default:
150
147
  break
151
148
  }
152
149
  return (
153
150
  <button
154
151
  style={{ direction: isArabic ? "rtl" : "ltr" }}
155
- {...props}
152
+ onClick={props.onClick}
156
153
  className="my-2 flex h-11 w-full flex-row justify-center rounded-xl bg-white align-middle"
157
154
  >
158
155
  <div className="flex h-full flex-row items-center justify-end">
@@ -109,7 +109,8 @@ export const HawaSelect: React.FunctionComponent<SelectTypes> = (props) => {
109
109
  isMulti={props.isMulti}
110
110
  isSearchable={props.isSearchable}
111
111
  onChange={(newValue: any, action) =>
112
- props.onChange(newValue.label, action)
112
+ // props.onChange(newValue.label, action)
113
+ props.onChange(newValue, action)
113
114
  }
114
115
  components={{
115
116
  Control,
@@ -47,13 +47,14 @@ export const HawaTable: React.FunctionComponent<TableTypes> = ({
47
47
  {props.rows ? (
48
48
  props.rows.map((singleRow: any, j: any) => (
49
49
  <tr
50
- className="border-b bg-white dark:border-gray-700 dark:bg-gray-800"
51
50
  key={j}
51
+ className="border-b bg-white dark:border-gray-700 dark:bg-gray-800"
52
52
  >
53
53
  {singleRow.map((r: any, i: any) => {
54
54
  if (i === 0) {
55
55
  return (
56
56
  <th
57
+ key={i}
57
58
  scope="row"
58
59
  className={clsx(
59
60
  sizeStyles[size],
@@ -64,7 +65,11 @@ export const HawaTable: React.FunctionComponent<TableTypes> = ({
64
65
  </th>
65
66
  )
66
67
  } else {
67
- return <td className={clsx(sizeStyles[size])}>{r}</td>
68
+ return (
69
+ <td key={i} className={clsx(sizeStyles[size])}>
70
+ {r}
71
+ </td>
72
+ )
68
73
  }
69
74
  })}
70
75
  {props.actions && size !== "small" ? (
@@ -74,8 +79,8 @@ export const HawaTable: React.FunctionComponent<TableTypes> = ({
74
79
  className="flex flex-row gap-1"
75
80
  // variant={isArabic ? "borderedRight" : "borderedLeft"}
76
81
  >
77
- {props.actions.map((act: any) => {
78
- return <TableActionButton action={act} />
82
+ {props.actions.map((act: any, s: any) => {
83
+ return <TableActionButton key={s} action={act} />
79
84
  })}
80
85
  </td>
81
86
  ) : null}
@@ -16,6 +16,7 @@ type TextFieldTypes = {
16
16
  name?: any
17
17
  inputProps?: any
18
18
  onChange?: any
19
+ ref?: any
19
20
  }
20
21
 
21
22
  export const HawaTextField: React.FunctionComponent<TextFieldTypes> = ({
@@ -37,6 +38,7 @@ export const HawaTextField: React.FunctionComponent<TextFieldTypes> = ({
37
38
  let defaultStyle = "flex h-fit max-h-fit flex-col justify-center"
38
39
  return (
39
40
  <div
41
+ // ref={props.ref}
40
42
  className={clsx(defaultStyle, marginStyles[margin], widthStyles[width])}
41
43
  >
42
44
  {props.label && (
@@ -67,7 +69,12 @@ export const HawaTextField: React.FunctionComponent<TextFieldTypes> = ({
67
69
  ) : (
68
70
  <div>
69
71
  <input
70
- {...props}
72
+ onChange={props.onChange}
73
+ type={props.type}
74
+ aria-label={props.label}
75
+ placeholder={props.placeholder}
76
+ defaultValue={props.defaultValue}
77
+ value={props.value}
71
78
  className="mb-0 block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500"
72
79
  />
73
80
  </div>