@sikka/hawa 0.0.256 → 0.0.258
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/styles.css +44 -4
- package/es/elements/HawaTextField.d.ts +3 -1
- package/es/index.es.js +3 -3
- package/es/stories/ManualStories/BlocksIntroduction.stories.d.ts +1 -0
- package/es/stories/ManualStories/Customization.stories.d.ts +1 -0
- package/es/stories/ManualStories/ElementsIntroduction.stories.d.ts +1 -0
- package/es/stories/ManualStories/Installation.stories.d.ts +1 -0
- package/es/stories/ManualStories/LayoutIntroduction.stories.d.ts +1 -0
- package/es/stories/ManualStories/Overview.stories.d.ts +1 -0
- package/es/stories/ManualStories/Usage.stories.d.ts +1 -0
- package/lib/elements/HawaTextField.d.ts +3 -1
- package/lib/index.js +3 -3
- package/lib/stories/ManualStories/BlocksIntroduction.stories.d.ts +1 -0
- package/lib/stories/ManualStories/Customization.stories.d.ts +1 -0
- package/lib/stories/ManualStories/ElementsIntroduction.stories.d.ts +1 -0
- package/lib/stories/ManualStories/Installation.stories.d.ts +1 -0
- package/lib/stories/ManualStories/LayoutIntroduction.stories.d.ts +1 -0
- package/lib/stories/ManualStories/Overview.stories.d.ts +1 -0
- package/lib/stories/ManualStories/Usage.stories.d.ts +1 -0
- package/package.json +3 -3
- package/src/blocks/Account/UserProfileForm.tsx +4 -4
- package/src/blocks/AuthForms/NewPasswordForm.tsx +4 -2
- package/src/blocks/AuthForms/ResetPasswordForm.tsx +1 -1
- package/src/blocks/AuthForms/SignInForm.tsx +6 -3
- package/src/blocks/AuthForms/SignUpForm.tsx +12 -7
- package/src/blocks/Payment/ChargeWalletForm.tsx +1 -1
- package/src/blocks/Payment/CheckoutForm.tsx +8 -8
- package/src/blocks/Payment/CreditCardForm.tsx +43 -36
- package/src/elements/HawaAlert.tsx +10 -2
- package/src/elements/HawaColorPicker.tsx +4 -0
- package/src/elements/HawaStats.tsx +12 -4
- package/src/elements/HawaTextField.tsx +6 -4
- package/src/styles.css +44 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "../stories-styles.css";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "../stories-styles.css";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "../stories-styles.css";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "../stories-styles.css";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "../stories-styles.css";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "../stories-styles.css";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "../stories-styles.css";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sikka/hawa",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.258",
|
|
4
4
|
"description": "SaaS Oriented UI Kit",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.es.js",
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@babel/core": "^7.12.10",
|
|
37
37
|
"@babel/preset-react": "^7.12.10",
|
|
38
|
-
"@mdx-js/react": "^2.3.0",
|
|
39
38
|
"@rollup/plugin-commonjs": "^21.0.1",
|
|
40
39
|
"@rollup/plugin-node-resolve": "^11.1.1",
|
|
41
40
|
"@storybook/addon-actions": "^6.5.8",
|
|
@@ -88,6 +87,7 @@
|
|
|
88
87
|
"react-dom": "^18.2.0"
|
|
89
88
|
},
|
|
90
89
|
"resolutions": {
|
|
90
|
+
"@storybook/react-docgen-typescript-plugin": "npm:react-docgen-typescript-plugin@1.0.2",
|
|
91
91
|
"@storybook/react/webpack": "^5",
|
|
92
92
|
"@storybook/core-common/webpack": "^5",
|
|
93
93
|
"@storybook/core-server/webpack": "^5",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"react": "^18.2.0",
|
|
100
100
|
"react-dropzone": "^12.0.4",
|
|
101
101
|
"react-hook-form": "^7.28.0",
|
|
102
|
-
"react-icons": "^4.
|
|
102
|
+
"react-icons": "^4.10.1",
|
|
103
103
|
"react-select": "^5.3.2",
|
|
104
104
|
"slate": "^0.94.1",
|
|
105
105
|
"slate-react": "^0.97.1"
|
|
@@ -32,7 +32,7 @@ export const UserProfileForm: FC<UserProfileFormTypes> = (props) => {
|
|
|
32
32
|
type="text"
|
|
33
33
|
label={props.texts.fullNameLabel}
|
|
34
34
|
placeholder={props.texts.fullNamePlaceholder}
|
|
35
|
-
|
|
35
|
+
helpertext={errors.fullName?.message}
|
|
36
36
|
{...field}
|
|
37
37
|
value={field.value ?? ""}
|
|
38
38
|
/>
|
|
@@ -51,7 +51,7 @@ export const UserProfileForm: FC<UserProfileFormTypes> = (props) => {
|
|
|
51
51
|
width="full"
|
|
52
52
|
type="text"
|
|
53
53
|
label={props.texts.emailLabel}
|
|
54
|
-
|
|
54
|
+
helpertext={errors.email?.message}
|
|
55
55
|
placeholder={props.texts.emailPlaceholder}
|
|
56
56
|
{...field}
|
|
57
57
|
value={field.value ?? ""}
|
|
@@ -75,7 +75,7 @@ export const UserProfileForm: FC<UserProfileFormTypes> = (props) => {
|
|
|
75
75
|
type="password"
|
|
76
76
|
label={props.texts.passwordLabel}
|
|
77
77
|
placeholder={props.texts.passwordPlaceholder}
|
|
78
|
-
|
|
78
|
+
helpertext={errors.password?.message}
|
|
79
79
|
{...field}
|
|
80
80
|
value={field.value ?? ""}
|
|
81
81
|
/>
|
|
@@ -93,7 +93,7 @@ export const UserProfileForm: FC<UserProfileFormTypes> = (props) => {
|
|
|
93
93
|
type="password"
|
|
94
94
|
label={props.texts.confirmPasswordLabel}
|
|
95
95
|
placeholder={props.texts.confirmPasswordPlaceholder}
|
|
96
|
-
|
|
96
|
+
helpertext={errors.confirmPassword?.message}
|
|
97
97
|
{...field}
|
|
98
98
|
value={field.value ?? ""}
|
|
99
99
|
/>
|
|
@@ -54,9 +54,10 @@ export const NewPasswordForm: FC<NewPasswordTypes> = (props) => {
|
|
|
54
54
|
<HawaTextField
|
|
55
55
|
width="full"
|
|
56
56
|
type="password"
|
|
57
|
+
autoComplete="new-password"
|
|
57
58
|
label={props.texts.passwordLabel}
|
|
58
59
|
placeholder={props.texts.passwordPlaceholder}
|
|
59
|
-
|
|
60
|
+
helpertext={errors.password?.message}
|
|
60
61
|
{...field}
|
|
61
62
|
value={field.value ?? ""}
|
|
62
63
|
/>
|
|
@@ -72,9 +73,10 @@ export const NewPasswordForm: FC<NewPasswordTypes> = (props) => {
|
|
|
72
73
|
<HawaTextField
|
|
73
74
|
width="full"
|
|
74
75
|
type="password"
|
|
76
|
+
autoComplete="new-password"
|
|
75
77
|
label={props.texts.confirmPasswordLabel}
|
|
76
78
|
placeholder={props.texts.confirmPasswordPlaceholder}
|
|
77
|
-
|
|
79
|
+
helpertext={errors.confirmPassword?.message}
|
|
78
80
|
{...field}
|
|
79
81
|
value={field.value ?? ""}
|
|
80
82
|
/>
|
|
@@ -39,7 +39,7 @@ export const ResetPasswordForm: FC<ResetPasswordType> = (props) => {
|
|
|
39
39
|
width="full"
|
|
40
40
|
type="text"
|
|
41
41
|
label={props.texts.emailLabel}
|
|
42
|
-
|
|
42
|
+
helpertext={errors.email?.message}
|
|
43
43
|
placeholder={props.texts.emailPlaceholder}
|
|
44
44
|
{...field}
|
|
45
45
|
value={field.value ?? ""}
|
|
@@ -34,8 +34,9 @@ export const SignInForm: FC<SignInFormTypes> = (props) => {
|
|
|
34
34
|
<HawaTextField
|
|
35
35
|
width="full"
|
|
36
36
|
type="text"
|
|
37
|
+
autoComplete="email"
|
|
37
38
|
label={props.texts.emailLabel}
|
|
38
|
-
|
|
39
|
+
helpertext={errors.email?.message}
|
|
39
40
|
placeholder={props.texts.emailPlaceholder}
|
|
40
41
|
value={field.value ?? ""}
|
|
41
42
|
onChange={field.onChange}
|
|
@@ -59,8 +60,9 @@ export const SignInForm: FC<SignInFormTypes> = (props) => {
|
|
|
59
60
|
<HawaTextField
|
|
60
61
|
width="full"
|
|
61
62
|
type="text"
|
|
63
|
+
autoComplete="username"
|
|
62
64
|
label={props.texts.usernameLabel}
|
|
63
|
-
|
|
65
|
+
helpertext={errors.username?.message}
|
|
64
66
|
placeholder={props.texts.usernamePlaceholder}
|
|
65
67
|
onChange={field.onChange}
|
|
66
68
|
value={field.value ?? ""}
|
|
@@ -87,10 +89,11 @@ export const SignInForm: FC<SignInFormTypes> = (props) => {
|
|
|
87
89
|
render={({ field }) => (
|
|
88
90
|
<HawaTextField
|
|
89
91
|
width="full"
|
|
92
|
+
autoComplete="current-password"
|
|
90
93
|
type="password"
|
|
91
94
|
label={props.texts.passwordLabel}
|
|
92
95
|
placeholder={props.texts.passwordPlaceholder}
|
|
93
|
-
|
|
96
|
+
helpertext={errors.password?.message}
|
|
94
97
|
onChange={field.onChange}
|
|
95
98
|
value={field.value ?? ""}
|
|
96
99
|
/>
|
|
@@ -84,10 +84,11 @@ export const SignUpForm: FC<SignUpFormTypes> = (props) => {
|
|
|
84
84
|
<FormProvider {...methods}>
|
|
85
85
|
<form onSubmit={handleSubmit((e) => props.handleSignUp(e))}>
|
|
86
86
|
<div>
|
|
87
|
-
{props.signUpFields.map((fld) => {
|
|
87
|
+
{props.signUpFields.map((fld, i) => {
|
|
88
88
|
if (fld === "fullname") {
|
|
89
89
|
return (
|
|
90
90
|
<Controller
|
|
91
|
+
key={i}
|
|
91
92
|
control={control}
|
|
92
93
|
name="fullName"
|
|
93
94
|
render={({ field }) => (
|
|
@@ -96,7 +97,7 @@ export const SignUpForm: FC<SignUpFormTypes> = (props) => {
|
|
|
96
97
|
type="text"
|
|
97
98
|
label={props.texts.fullNameLabel}
|
|
98
99
|
placeholder={props.texts.fullNamePlaceholder}
|
|
99
|
-
|
|
100
|
+
helpertext={errors.fullName?.message}
|
|
100
101
|
onChange={field.onChange}
|
|
101
102
|
value={field.value ?? ""}
|
|
102
103
|
/>
|
|
@@ -116,8 +117,9 @@ export const SignUpForm: FC<SignUpFormTypes> = (props) => {
|
|
|
116
117
|
<HawaTextField
|
|
117
118
|
width="full"
|
|
118
119
|
type="text"
|
|
120
|
+
autoComplete="email"
|
|
119
121
|
label={props.texts.emailLabel}
|
|
120
|
-
|
|
122
|
+
helpertext={errors.email?.message}
|
|
121
123
|
placeholder={props.texts.emailPlaceholder}
|
|
122
124
|
onChange={field.onChange}
|
|
123
125
|
value={field.value ?? ""}
|
|
@@ -143,8 +145,9 @@ export const SignUpForm: FC<SignUpFormTypes> = (props) => {
|
|
|
143
145
|
<HawaTextField
|
|
144
146
|
width="full"
|
|
145
147
|
type="text"
|
|
148
|
+
autoComplete="username"
|
|
146
149
|
label={props.texts.usernameLabel}
|
|
147
|
-
|
|
150
|
+
helpertext={errors.username?.message}
|
|
148
151
|
placeholder={props.texts.usernamePlaceholder}
|
|
149
152
|
onChange={field.onChange}
|
|
150
153
|
value={field.value ?? ""}
|
|
@@ -165,10 +168,11 @@ export const SignUpForm: FC<SignUpFormTypes> = (props) => {
|
|
|
165
168
|
<HawaTextField
|
|
166
169
|
width="full"
|
|
167
170
|
type="password"
|
|
171
|
+
autoComplete="new-password"
|
|
168
172
|
// defaultValue={field.value ?? ""}
|
|
169
173
|
label={props.texts.passwordLabel}
|
|
170
174
|
placeholder={props.texts.passwordPlaceholder}
|
|
171
|
-
|
|
175
|
+
helpertext={errors.password?.message}
|
|
172
176
|
onChange={field.onChange}
|
|
173
177
|
value={field.value ?? ""}
|
|
174
178
|
/>
|
|
@@ -182,10 +186,11 @@ export const SignUpForm: FC<SignUpFormTypes> = (props) => {
|
|
|
182
186
|
<HawaTextField
|
|
183
187
|
width="full"
|
|
184
188
|
type="password"
|
|
189
|
+
autoComplete="new-password"
|
|
185
190
|
// defaultValue={field.value ?? ""}
|
|
186
191
|
label={props.texts.confirmPasswordLabel}
|
|
187
192
|
placeholder={props.texts.confirmPasswordPlaceholder}
|
|
188
|
-
|
|
193
|
+
helpertext={errors.confirm_password?.message}
|
|
189
194
|
onChange={field.onChange}
|
|
190
195
|
value={field.value ?? ""}
|
|
191
196
|
/>
|
|
@@ -203,7 +208,7 @@ export const SignUpForm: FC<SignUpFormTypes> = (props) => {
|
|
|
203
208
|
defaultValue={field.value ?? ""}
|
|
204
209
|
label={props.texts.refCode}
|
|
205
210
|
placeholder={props.texts.passwordPlaceholder}
|
|
206
|
-
|
|
211
|
+
helpertext={errors.password?.message}
|
|
207
212
|
value={field.value ?? ""}
|
|
208
213
|
onChange={field.onChange}
|
|
209
214
|
/>
|
|
@@ -94,7 +94,7 @@ export const CheckoutForm: FC<CheckoutFormTypes> = (props) => {
|
|
|
94
94
|
<HawaTextField
|
|
95
95
|
type="text"
|
|
96
96
|
label={props.texts?.firstNameLabel + " *"}
|
|
97
|
-
|
|
97
|
+
helpertext={errors.firstName?.message}
|
|
98
98
|
{...field}
|
|
99
99
|
value={field.value ?? ""}
|
|
100
100
|
/>
|
|
@@ -111,7 +111,7 @@ export const CheckoutForm: FC<CheckoutFormTypes> = (props) => {
|
|
|
111
111
|
width="full"
|
|
112
112
|
type="text"
|
|
113
113
|
label={props.texts?.lastNameLabel + " *"}
|
|
114
|
-
|
|
114
|
+
helpertext={errors.lastName?.message}
|
|
115
115
|
{...field}
|
|
116
116
|
value={field.value ?? ""}
|
|
117
117
|
/>
|
|
@@ -126,7 +126,7 @@ export const CheckoutForm: FC<CheckoutFormTypes> = (props) => {
|
|
|
126
126
|
width="full"
|
|
127
127
|
type="text"
|
|
128
128
|
label={props.texts?.emailLabel + " *"}
|
|
129
|
-
|
|
129
|
+
helpertext={errors.email?.message}
|
|
130
130
|
{...field}
|
|
131
131
|
value={field.value ?? ""}
|
|
132
132
|
/>
|
|
@@ -150,7 +150,7 @@ export const CheckoutForm: FC<CheckoutFormTypes> = (props) => {
|
|
|
150
150
|
width="full"
|
|
151
151
|
type="text"
|
|
152
152
|
label={props.texts?.streetAddressLabel + " *"}
|
|
153
|
-
|
|
153
|
+
helpertext={errors.streetAddress?.message}
|
|
154
154
|
{...field}
|
|
155
155
|
value={field.value ?? ""}
|
|
156
156
|
/>
|
|
@@ -168,7 +168,7 @@ export const CheckoutForm: FC<CheckoutFormTypes> = (props) => {
|
|
|
168
168
|
width="full"
|
|
169
169
|
type="text"
|
|
170
170
|
label={props.texts?.stateLabel + " *"}
|
|
171
|
-
|
|
171
|
+
helpertext={errors.province?.message}
|
|
172
172
|
{...field}
|
|
173
173
|
value={field.value ?? ""}
|
|
174
174
|
/>
|
|
@@ -185,7 +185,7 @@ export const CheckoutForm: FC<CheckoutFormTypes> = (props) => {
|
|
|
185
185
|
width="full"
|
|
186
186
|
type="text"
|
|
187
187
|
label={props.texts?.cityLabel + " *"}
|
|
188
|
-
|
|
188
|
+
helpertext={errors.city?.message}
|
|
189
189
|
{...field}
|
|
190
190
|
value={field.value ?? ""}
|
|
191
191
|
/>
|
|
@@ -202,7 +202,7 @@ export const CheckoutForm: FC<CheckoutFormTypes> = (props) => {
|
|
|
202
202
|
width="full"
|
|
203
203
|
type="text"
|
|
204
204
|
label={props.texts?.buildingNumberLabel + " *"}
|
|
205
|
-
|
|
205
|
+
helpertext={errors.buildingNumber?.message}
|
|
206
206
|
{...field}
|
|
207
207
|
value={field.value ?? ""}
|
|
208
208
|
/>
|
|
@@ -218,7 +218,7 @@ export const CheckoutForm: FC<CheckoutFormTypes> = (props) => {
|
|
|
218
218
|
width="full"
|
|
219
219
|
type="number"
|
|
220
220
|
label={props.texts?.zipCodeLabel + " *"}
|
|
221
|
-
|
|
221
|
+
helpertext={errors.zipCode?.message}
|
|
222
222
|
{...field}
|
|
223
223
|
value={field.value ?? ""}
|
|
224
224
|
/>
|
|
@@ -20,23 +20,46 @@ export const CreditCardForm: FC<CreditCardFormTypes> = (props) => {
|
|
|
20
20
|
<HawaContainer>
|
|
21
21
|
{" "}
|
|
22
22
|
<form onSubmit={handleSubmit(props.handle)}>
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
23
|
+
<div className="flex flex-row gap-4">
|
|
24
|
+
<Controller
|
|
25
|
+
control={control}
|
|
26
|
+
name="cardName"
|
|
27
|
+
render={({ field }) => (
|
|
28
|
+
<HawaTextField
|
|
29
|
+
width="full"
|
|
30
|
+
name="password"
|
|
31
|
+
placeholder="Enter password"
|
|
32
|
+
type="tel"
|
|
33
|
+
label="Card Number"
|
|
34
|
+
helpertext={errors.password?.message}
|
|
35
|
+
/>
|
|
36
|
+
)}
|
|
37
|
+
rules={{
|
|
38
|
+
required: "Password is rquired",
|
|
39
|
+
}}
|
|
40
|
+
/>
|
|
41
|
+
<div className="w-1/4">
|
|
42
|
+
<Controller
|
|
43
|
+
control={control}
|
|
44
|
+
name="cardName"
|
|
45
|
+
render={({ field }) => (
|
|
46
|
+
<HawaTextField
|
|
47
|
+
width="full"
|
|
48
|
+
name="password"
|
|
49
|
+
maxLength="3"
|
|
50
|
+
autoComplete="cc-number"
|
|
51
|
+
placeholder=""
|
|
52
|
+
type="password"
|
|
53
|
+
label="CCV"
|
|
54
|
+
helpertext={errors.password?.message}
|
|
55
|
+
/>
|
|
56
|
+
)}
|
|
57
|
+
rules={{
|
|
58
|
+
required: "Password is rquired",
|
|
59
|
+
}}
|
|
34
60
|
/>
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
required: "Password is rquired",
|
|
38
|
-
}}
|
|
39
|
-
/>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
40
63
|
<Controller
|
|
41
64
|
control={control}
|
|
42
65
|
name="cardName"
|
|
@@ -45,9 +68,9 @@ export const CreditCardForm: FC<CreditCardFormTypes> = (props) => {
|
|
|
45
68
|
width="full"
|
|
46
69
|
name="password"
|
|
47
70
|
placeholder="Enter password"
|
|
48
|
-
type="
|
|
71
|
+
type="text"
|
|
49
72
|
label="Name On Card"
|
|
50
|
-
|
|
73
|
+
helpertext={errors.password?.message}
|
|
51
74
|
/>
|
|
52
75
|
)}
|
|
53
76
|
rules={{
|
|
@@ -64,30 +87,14 @@ export const CreditCardForm: FC<CreditCardFormTypes> = (props) => {
|
|
|
64
87
|
placeholder="Enter password"
|
|
65
88
|
type="password"
|
|
66
89
|
label="Expiry Date"
|
|
67
|
-
|
|
68
|
-
/>
|
|
69
|
-
)}
|
|
70
|
-
rules={{
|
|
71
|
-
required: "Password is rquired",
|
|
72
|
-
}}
|
|
73
|
-
/>
|
|
74
|
-
<Controller
|
|
75
|
-
control={control}
|
|
76
|
-
name="cardName"
|
|
77
|
-
render={({ field }) => (
|
|
78
|
-
<HawaTextField
|
|
79
|
-
width="full"
|
|
80
|
-
name="password"
|
|
81
|
-
placeholder="Enter password"
|
|
82
|
-
type="password"
|
|
83
|
-
label="CCV"
|
|
84
|
-
helperText={errors.password?.message}
|
|
90
|
+
helpertext={errors.password?.message}
|
|
85
91
|
/>
|
|
86
92
|
)}
|
|
87
93
|
rules={{
|
|
88
94
|
required: "Password is rquired",
|
|
89
95
|
}}
|
|
90
96
|
/>
|
|
97
|
+
|
|
91
98
|
<HawaButton
|
|
92
99
|
// type="submit"
|
|
93
100
|
width="full"
|
|
@@ -54,7 +54,12 @@ export const HawaAlert: React.FunctionComponent<AlertTypes> = ({
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
}, [duration])
|
|
57
|
-
|
|
57
|
+
let closeButtonStyle = {
|
|
58
|
+
info: "hover:bg-blue-300",
|
|
59
|
+
warning: "hover:bg-yellow-300",
|
|
60
|
+
error: "hover:bg-red-300",
|
|
61
|
+
success: "hover:bg-green-300",
|
|
62
|
+
}
|
|
58
63
|
let styleVariant = {
|
|
59
64
|
normal: {
|
|
60
65
|
info: "text-blue-700 bg-blue-100 dark:bg-blue-200 dark:text-blue-800",
|
|
@@ -131,7 +136,10 @@ export const HawaAlert: React.FunctionComponent<AlertTypes> = ({
|
|
|
131
136
|
)}
|
|
132
137
|
<button
|
|
133
138
|
type="button"
|
|
134
|
-
className=
|
|
139
|
+
className={clsx(
|
|
140
|
+
"absolute right-2 top-2 inline-flex h-9 w-9 items-center justify-center rounded p-1.5 text-gray-400 transition-all hover:text-gray-900 focus:ring-2 focus:ring-gray-300 dark:bg-gray-800 dark:text-gray-500 dark:hover:bg-gray-700 dark:hover:text-white",
|
|
141
|
+
closeButtonStyle[props.severity]
|
|
142
|
+
)}
|
|
135
143
|
data-dismiss-target="#alert-default"
|
|
136
144
|
aria-label="Close"
|
|
137
145
|
onClick={() => {
|
|
@@ -28,6 +28,10 @@ export const HawaColorPicker: FC<ColorPickerTypes> = (props) => {
|
|
|
28
28
|
|
|
29
29
|
<input
|
|
30
30
|
type="text"
|
|
31
|
+
onChange={(e) => {
|
|
32
|
+
setSelectedColor(e.target.value)
|
|
33
|
+
props.handleChange(e)
|
|
34
|
+
}}
|
|
31
35
|
value={selectedColor}
|
|
32
36
|
className="w-24 rounded-br-lg rounded-tr-lg pl-2 pr-2"
|
|
33
37
|
/>
|
|
@@ -13,7 +13,8 @@ type StatTypes = {
|
|
|
13
13
|
handleClick?: () => void
|
|
14
14
|
}
|
|
15
15
|
export const HawaStats: FC<StatTypes> = (props) => {
|
|
16
|
-
let defaultStyle =
|
|
16
|
+
let defaultStyle =
|
|
17
|
+
"flex transition-all flex-col gap-1 rounded p-4 text-sm h-fit max-h-fit"
|
|
17
18
|
let statStyles = {
|
|
18
19
|
plain: "",
|
|
19
20
|
contained: "bg-layoutPrimary-500",
|
|
@@ -26,13 +27,18 @@ export const HawaStats: FC<StatTypes> = (props) => {
|
|
|
26
27
|
min: "w-fit",
|
|
27
28
|
normal: "w-full max-w-[200px]",
|
|
28
29
|
}
|
|
30
|
+
|
|
29
31
|
return (
|
|
30
32
|
<div
|
|
31
33
|
onClick={props.handleClick}
|
|
32
34
|
className={clsx(
|
|
33
35
|
defaultStyle,
|
|
34
36
|
widthStyles[props.width],
|
|
35
|
-
statStyles[props.variant]
|
|
37
|
+
statStyles[props.variant],
|
|
38
|
+
props.handleClick ? "cursor-pointer" : "cursor-default",
|
|
39
|
+
props.handleClick && props.variant === "dropshadow"
|
|
40
|
+
? "hover:drop-shadow-lg"
|
|
41
|
+
: ""
|
|
36
42
|
)}
|
|
37
43
|
style={{
|
|
38
44
|
backgroundColor: props.color
|
|
@@ -47,8 +53,10 @@ export const HawaStats: FC<StatTypes> = (props) => {
|
|
|
47
53
|
<HawaSpinner />
|
|
48
54
|
) : (
|
|
49
55
|
<div className="text-2xl font-bold">{props.number}</div>
|
|
50
|
-
)}
|
|
51
|
-
{props.helperText
|
|
56
|
+
)}
|
|
57
|
+
{props.helperText ? (
|
|
58
|
+
<div className="text-xs">{props.helperText}</div>
|
|
59
|
+
) : null}
|
|
52
60
|
</div>
|
|
53
61
|
)
|
|
54
62
|
}
|
|
@@ -12,7 +12,7 @@ type TextFieldTypes = {
|
|
|
12
12
|
/** Disable/Enable multiple line text input field */
|
|
13
13
|
multiline?: boolean
|
|
14
14
|
/** The small red text under the input field to show validation or a hint. */
|
|
15
|
-
|
|
15
|
+
helpertext?: any
|
|
16
16
|
/** The value of the input field */
|
|
17
17
|
value?: any
|
|
18
18
|
props?: PropsWithRef<"input">
|
|
@@ -29,6 +29,8 @@ type TextFieldTypes = {
|
|
|
29
29
|
icon?: any
|
|
30
30
|
/** Boolean to enable/disable editing the input field and using it as a text field */
|
|
31
31
|
preview?: boolean
|
|
32
|
+
autoComplete?: any
|
|
33
|
+
maxLength?: any
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
export const HawaTextField: FC<TextFieldTypes> = ({
|
|
@@ -132,11 +134,11 @@ export const HawaTextField: FC<TextFieldTypes> = ({
|
|
|
132
134
|
</div>
|
|
133
135
|
)}
|
|
134
136
|
|
|
135
|
-
{props.
|
|
137
|
+
{props.helpertext ? (
|
|
136
138
|
<p className="mb-0 mt-1 text-xs text-red-600 dark:text-red-500">
|
|
137
|
-
{props.
|
|
139
|
+
{props.helpertext}
|
|
138
140
|
</p>
|
|
139
|
-
)}
|
|
141
|
+
) : null}
|
|
140
142
|
</>
|
|
141
143
|
)}
|
|
142
144
|
</div>
|
package/src/styles.css
CHANGED
|
@@ -570,6 +570,9 @@ video {
|
|
|
570
570
|
.collapse {
|
|
571
571
|
visibility: collapse;
|
|
572
572
|
}
|
|
573
|
+
.static {
|
|
574
|
+
position: static;
|
|
575
|
+
}
|
|
573
576
|
.fixed {
|
|
574
577
|
position: fixed;
|
|
575
578
|
}
|
|
@@ -1033,6 +1036,9 @@ video {
|
|
|
1033
1036
|
.w-8 {
|
|
1034
1037
|
width: 2rem;
|
|
1035
1038
|
}
|
|
1039
|
+
.w-9 {
|
|
1040
|
+
width: 2.25rem;
|
|
1041
|
+
}
|
|
1036
1042
|
.w-\[32px\] {
|
|
1037
1043
|
width: 32px;
|
|
1038
1044
|
}
|
|
@@ -1121,10 +1127,6 @@ video {
|
|
|
1121
1127
|
--tw-translate-y: -50%;
|
|
1122
1128
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
1123
1129
|
}
|
|
1124
|
-
.translate-y-1 {
|
|
1125
|
-
--tw-translate-y: 0.25rem;
|
|
1126
|
-
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
1127
|
-
}
|
|
1128
1130
|
.translate-y-1\/2 {
|
|
1129
1131
|
--tw-translate-y: 50%;
|
|
1130
1132
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
@@ -1268,6 +1270,11 @@ video {
|
|
|
1268
1270
|
margin-right: calc(0.25rem * var(--tw-space-x-reverse));
|
|
1269
1271
|
margin-left: calc(0.25rem * calc(1 - var(--tw-space-x-reverse)));
|
|
1270
1272
|
}
|
|
1273
|
+
.space-x-4 > :not([hidden]) ~ :not([hidden]) {
|
|
1274
|
+
--tw-space-x-reverse: 0;
|
|
1275
|
+
margin-right: calc(1rem * var(--tw-space-x-reverse));
|
|
1276
|
+
margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse)));
|
|
1277
|
+
}
|
|
1271
1278
|
.space-y-0 > :not([hidden]) ~ :not([hidden]) {
|
|
1272
1279
|
--tw-space-y-reverse: 0;
|
|
1273
1280
|
margin-top: calc(0px * calc(1 - var(--tw-space-y-reverse)));
|
|
@@ -1796,6 +1803,9 @@ video {
|
|
|
1796
1803
|
.pl-3 {
|
|
1797
1804
|
padding-left: 0.75rem;
|
|
1798
1805
|
}
|
|
1806
|
+
.pl-6 {
|
|
1807
|
+
padding-left: 1.5rem;
|
|
1808
|
+
}
|
|
1799
1809
|
.pr-2 {
|
|
1800
1810
|
padding-right: 0.5rem;
|
|
1801
1811
|
}
|
|
@@ -2237,6 +2247,11 @@ body {
|
|
|
2237
2247
|
background-color: rgb(191 219 254 / var(--tw-bg-opacity));
|
|
2238
2248
|
}
|
|
2239
2249
|
|
|
2250
|
+
.hover\:bg-blue-300:hover {
|
|
2251
|
+
--tw-bg-opacity: 1;
|
|
2252
|
+
background-color: rgb(147 197 253 / var(--tw-bg-opacity));
|
|
2253
|
+
}
|
|
2254
|
+
|
|
2240
2255
|
.hover\:bg-blue-500:hover {
|
|
2241
2256
|
--tw-bg-opacity: 1;
|
|
2242
2257
|
background-color: rgb(59 130 246 / var(--tw-bg-opacity));
|
|
@@ -2279,6 +2294,11 @@ body {
|
|
|
2279
2294
|
background-color: rgb(55 65 81 / var(--tw-bg-opacity));
|
|
2280
2295
|
}
|
|
2281
2296
|
|
|
2297
|
+
.hover\:bg-green-300:hover {
|
|
2298
|
+
--tw-bg-opacity: 1;
|
|
2299
|
+
background-color: rgb(134 239 172 / var(--tw-bg-opacity));
|
|
2300
|
+
}
|
|
2301
|
+
|
|
2282
2302
|
.hover\:bg-layoutPrimary-300:hover {
|
|
2283
2303
|
background-color: var(--layout-primary-300);
|
|
2284
2304
|
}
|
|
@@ -2291,6 +2311,16 @@ body {
|
|
|
2291
2311
|
background-color: var(--layout-primary-700);
|
|
2292
2312
|
}
|
|
2293
2313
|
|
|
2314
|
+
.hover\:bg-red-300:hover {
|
|
2315
|
+
--tw-bg-opacity: 1;
|
|
2316
|
+
background-color: rgb(252 165 165 / var(--tw-bg-opacity));
|
|
2317
|
+
}
|
|
2318
|
+
|
|
2319
|
+
.hover\:bg-yellow-300:hover {
|
|
2320
|
+
--tw-bg-opacity: 1;
|
|
2321
|
+
background-color: rgb(253 224 71 / var(--tw-bg-opacity));
|
|
2322
|
+
}
|
|
2323
|
+
|
|
2294
2324
|
.hover\:font-bold:hover {
|
|
2295
2325
|
font-weight: 700;
|
|
2296
2326
|
}
|
|
@@ -2353,6 +2383,11 @@ body {
|
|
|
2353
2383
|
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
2354
2384
|
}
|
|
2355
2385
|
|
|
2386
|
+
.hover\:drop-shadow-lg:hover {
|
|
2387
|
+
--tw-drop-shadow: drop-shadow(0 10px 8px rgb(0 0 0 / 0.04)) drop-shadow(0 4px 3px rgb(0 0 0 / 0.1));
|
|
2388
|
+
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
2389
|
+
}
|
|
2390
|
+
|
|
2356
2391
|
.focus\:border-blue-500:focus {
|
|
2357
2392
|
--tw-border-opacity: 1;
|
|
2358
2393
|
border-color: rgb(59 130 246 / var(--tw-border-opacity));
|
|
@@ -2683,6 +2718,11 @@ body {
|
|
|
2683
2718
|
|
|
2684
2719
|
@media (min-width: 640px) {
|
|
2685
2720
|
|
|
2721
|
+
.sm\:text-base {
|
|
2722
|
+
font-size: 1rem;
|
|
2723
|
+
line-height: 1.5rem;
|
|
2724
|
+
}
|
|
2725
|
+
|
|
2686
2726
|
.sm\:after\:inline-block::after {
|
|
2687
2727
|
content: var(--tw-content);
|
|
2688
2728
|
display: inline-block;
|