@sikka/hawa 0.1.86 → 0.1.87
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.d.mts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +66 -43
- package/dist/index.mjs +61 -32
- package/dist/styles.css +10 -66
- package/package.json +1 -1
- package/src/blocks/AuthForms/AppLanding.tsx +17 -7
- package/src/blocks/AuthForms/SignInForm.tsx +1 -1
- package/src/blocks/AuthForms/SignUpForm.tsx +1 -1
- package/src/blocks/Payment/CreditCardForm.tsx +20 -19
- package/src/elements/Carousel.tsx +5 -155
- package/src/elements/DropdownMenu.tsx +5 -0
- package/src/layout/Footer.tsx +50 -13
- package/src/styles.css +10 -66
package/dist/styles.css
CHANGED
|
@@ -1078,9 +1078,6 @@ video {
|
|
|
1078
1078
|
.hidden {
|
|
1079
1079
|
display: none;
|
|
1080
1080
|
}
|
|
1081
|
-
.aspect-\[2\/3\] {
|
|
1082
|
-
aspect-ratio: 2/3;
|
|
1083
|
-
}
|
|
1084
1081
|
.aspect-square {
|
|
1085
1082
|
aspect-ratio: 1 / 1;
|
|
1086
1083
|
}
|
|
@@ -1099,9 +1096,6 @@ video {
|
|
|
1099
1096
|
.h-11 {
|
|
1100
1097
|
height: 2.75rem;
|
|
1101
1098
|
}
|
|
1102
|
-
.h-12 {
|
|
1103
|
-
height: 3rem;
|
|
1104
|
-
}
|
|
1105
1099
|
.h-14 {
|
|
1106
1100
|
height: 3.5rem;
|
|
1107
1101
|
}
|
|
@@ -1234,6 +1228,9 @@ video {
|
|
|
1234
1228
|
.min-h-\[80px\] {
|
|
1235
1229
|
min-height: 80px;
|
|
1236
1230
|
}
|
|
1231
|
+
.min-h-screen {
|
|
1232
|
+
min-height: 100vh;
|
|
1233
|
+
}
|
|
1237
1234
|
.w-0 {
|
|
1238
1235
|
width: 0px;
|
|
1239
1236
|
}
|
|
@@ -1315,6 +1312,9 @@ video {
|
|
|
1315
1312
|
.w-\[1\.2rem\] {
|
|
1316
1313
|
width: 1.2rem;
|
|
1317
1314
|
}
|
|
1315
|
+
.w-\[1000px\] {
|
|
1316
|
+
width: 1000px;
|
|
1317
|
+
}
|
|
1318
1318
|
.w-\[12px\] {
|
|
1319
1319
|
width: 12px;
|
|
1320
1320
|
}
|
|
@@ -1351,15 +1351,9 @@ video {
|
|
|
1351
1351
|
.w-\[42px\] {
|
|
1352
1352
|
width: 42px;
|
|
1353
1353
|
}
|
|
1354
|
-
.w-\[500px\] {
|
|
1355
|
-
width: 500px;
|
|
1356
|
-
}
|
|
1357
1354
|
.w-\[64px\] {
|
|
1358
1355
|
width: 64px;
|
|
1359
1356
|
}
|
|
1360
|
-
.w-\[90\%\] {
|
|
1361
|
-
width: 90%;
|
|
1362
|
-
}
|
|
1363
1357
|
.w-\[calc\(1\%\)\] {
|
|
1364
1358
|
width: calc(1%);
|
|
1365
1359
|
}
|
|
@@ -1582,19 +1576,6 @@ video {
|
|
|
1582
1576
|
.snap-x {
|
|
1583
1577
|
scroll-snap-type: x var(--tw-scroll-snap-strictness);
|
|
1584
1578
|
}
|
|
1585
|
-
.snap-mandatory {
|
|
1586
|
-
--tw-scroll-snap-strictness: mandatory;
|
|
1587
|
-
}
|
|
1588
|
-
.snap-start {
|
|
1589
|
-
scroll-snap-align: start;
|
|
1590
|
-
}
|
|
1591
|
-
.snap-always {
|
|
1592
|
-
scroll-snap-stop: always;
|
|
1593
|
-
}
|
|
1594
|
-
.scroll-px-10 {
|
|
1595
|
-
scroll-padding-left: 2.5rem;
|
|
1596
|
-
scroll-padding-right: 2.5rem;
|
|
1597
|
-
}
|
|
1598
1579
|
.appearance-none {
|
|
1599
1580
|
-webkit-appearance: none;
|
|
1600
1581
|
-moz-appearance: none;
|
|
@@ -1775,15 +1756,9 @@ video {
|
|
|
1775
1756
|
.overflow-y-clip {
|
|
1776
1757
|
overflow-y: clip;
|
|
1777
1758
|
}
|
|
1778
|
-
.overflow-x-scroll {
|
|
1779
|
-
overflow-x: scroll;
|
|
1780
|
-
}
|
|
1781
1759
|
.overflow-y-scroll {
|
|
1782
1760
|
overflow-y: scroll;
|
|
1783
1761
|
}
|
|
1784
|
-
.scroll-smooth {
|
|
1785
|
-
scroll-behavior: smooth;
|
|
1786
|
-
}
|
|
1787
1762
|
.truncate {
|
|
1788
1763
|
overflow: hidden;
|
|
1789
1764
|
text-overflow: ellipsis;
|
|
@@ -2033,10 +2008,6 @@ video {
|
|
|
2033
2008
|
--tw-bg-opacity: 1;
|
|
2034
2009
|
background-color: rgb(219 234 254 / var(--tw-bg-opacity));
|
|
2035
2010
|
}
|
|
2036
|
-
.bg-blue-200 {
|
|
2037
|
-
--tw-bg-opacity: 1;
|
|
2038
|
-
background-color: rgb(191 219 254 / var(--tw-bg-opacity));
|
|
2039
|
-
}
|
|
2040
2011
|
.bg-blue-300 {
|
|
2041
2012
|
--tw-bg-opacity: 1;
|
|
2042
2013
|
background-color: rgb(147 197 253 / var(--tw-bg-opacity));
|
|
@@ -2123,10 +2094,6 @@ video {
|
|
|
2123
2094
|
--tw-bg-opacity: 1;
|
|
2124
2095
|
background-color: rgb(220 252 231 / var(--tw-bg-opacity));
|
|
2125
2096
|
}
|
|
2126
|
-
.bg-green-300 {
|
|
2127
|
-
--tw-bg-opacity: 1;
|
|
2128
|
-
background-color: rgb(134 239 172 / var(--tw-bg-opacity));
|
|
2129
|
-
}
|
|
2130
2097
|
.bg-green-500 {
|
|
2131
2098
|
--tw-bg-opacity: 1;
|
|
2132
2099
|
background-color: rgb(34 197 94 / var(--tw-bg-opacity));
|
|
@@ -2144,10 +2111,6 @@ video {
|
|
|
2144
2111
|
.bg-muted {
|
|
2145
2112
|
background-color: hsl(var(--muted));
|
|
2146
2113
|
}
|
|
2147
|
-
.bg-orange-100 {
|
|
2148
|
-
--tw-bg-opacity: 1;
|
|
2149
|
-
background-color: rgb(255 237 213 / var(--tw-bg-opacity));
|
|
2150
|
-
}
|
|
2151
2114
|
.bg-orange-400 {
|
|
2152
2115
|
--tw-bg-opacity: 1;
|
|
2153
2116
|
background-color: rgb(251 146 60 / var(--tw-bg-opacity));
|
|
@@ -2194,10 +2157,6 @@ video {
|
|
|
2194
2157
|
--tw-bg-opacity: 1;
|
|
2195
2158
|
background-color: rgb(127 29 29 / var(--tw-bg-opacity));
|
|
2196
2159
|
}
|
|
2197
|
-
.bg-rose-100 {
|
|
2198
|
-
--tw-bg-opacity: 1;
|
|
2199
|
-
background-color: rgb(255 228 230 / var(--tw-bg-opacity));
|
|
2200
|
-
}
|
|
2201
2160
|
.bg-secondary {
|
|
2202
2161
|
background-color: hsl(var(--secondary));
|
|
2203
2162
|
}
|
|
@@ -2242,17 +2201,9 @@ video {
|
|
|
2242
2201
|
.bg-opacity-80 {
|
|
2243
2202
|
--tw-bg-opacity: 0.8;
|
|
2244
2203
|
}
|
|
2245
|
-
.bg-gradient-to-t {
|
|
2246
|
-
background-image: linear-gradient(to top, var(--tw-gradient-stops));
|
|
2247
|
-
}
|
|
2248
2204
|
.bg-none {
|
|
2249
2205
|
background-image: none;
|
|
2250
2206
|
}
|
|
2251
|
-
.from-black {
|
|
2252
|
-
--tw-gradient-from: #000 var(--tw-gradient-from-position);
|
|
2253
|
-
--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);
|
|
2254
|
-
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
|
|
2255
|
-
}
|
|
2256
2207
|
.bg-cover {
|
|
2257
2208
|
background-size: cover;
|
|
2258
2209
|
}
|
|
@@ -2728,9 +2679,6 @@ video {
|
|
|
2728
2679
|
--tw-text-opacity: 1;
|
|
2729
2680
|
color: rgb(255 255 255 / var(--tw-text-opacity));
|
|
2730
2681
|
}
|
|
2731
|
-
.text-white\/50 {
|
|
2732
|
-
color: rgb(255 255 255 / 0.5);
|
|
2733
|
-
}
|
|
2734
2682
|
.text-yellow-700 {
|
|
2735
2683
|
--tw-text-opacity: 1;
|
|
2736
2684
|
color: rgb(161 98 7 / var(--tw-text-opacity));
|
|
@@ -4071,10 +4019,6 @@ body {
|
|
|
4071
4019
|
display: flex;
|
|
4072
4020
|
}
|
|
4073
4021
|
|
|
4074
|
-
.sm\:w-\[44\%\] {
|
|
4075
|
-
width: 44%;
|
|
4076
|
-
}
|
|
4077
|
-
|
|
4078
4022
|
.sm\:columns-2 {
|
|
4079
4023
|
-moz-columns: 2;
|
|
4080
4024
|
columns: 2;
|
|
@@ -4186,10 +4130,6 @@ body {
|
|
|
4186
4130
|
width: 12rem;
|
|
4187
4131
|
}
|
|
4188
4132
|
|
|
4189
|
-
.md\:w-\[30\%\] {
|
|
4190
|
-
width: 30%;
|
|
4191
|
-
}
|
|
4192
|
-
|
|
4193
4133
|
.md\:w-full {
|
|
4194
4134
|
width: 100%;
|
|
4195
4135
|
}
|
|
@@ -4219,6 +4159,10 @@ body {
|
|
|
4219
4159
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
4220
4160
|
}
|
|
4221
4161
|
|
|
4162
|
+
.md\:grid-cols-3 {
|
|
4163
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
4164
|
+
}
|
|
4165
|
+
|
|
4222
4166
|
.md\:flex-row {
|
|
4223
4167
|
flex-direction: row;
|
|
4224
4168
|
}
|
package/package.json
CHANGED
|
@@ -9,11 +9,15 @@ type AppLandingTypes = {
|
|
|
9
9
|
handleSignUp: () => void
|
|
10
10
|
handleLanguage: () => void
|
|
11
11
|
handleColorMode: () => void
|
|
12
|
-
texts
|
|
12
|
+
texts?: {
|
|
13
13
|
signIn: string
|
|
14
14
|
signUp: string
|
|
15
15
|
lang: string
|
|
16
|
+
newUserText?: string
|
|
17
|
+
createAccount?: string
|
|
16
18
|
}
|
|
19
|
+
withoutSignUp?: boolean
|
|
20
|
+
handleRouteToSignUp?: () => void
|
|
17
21
|
size: "small" | "normal" | "full"
|
|
18
22
|
}
|
|
19
23
|
|
|
@@ -67,12 +71,18 @@ export const AppLanding: FC<AppLandingTypes> = (props) => {
|
|
|
67
71
|
{props.handleSignUp && (
|
|
68
72
|
<Button onClick={props.handleSignUp}>{props.texts.signUp}</Button>
|
|
69
73
|
)} */}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
{!props.withoutSignUp && (
|
|
75
|
+
<div className="p-3 text-center text-sm font-normal dark:text-gray-300">
|
|
76
|
+
{props.texts.newUserText}{" "}
|
|
77
|
+
<span
|
|
78
|
+
onClick={props.handleRouteToSignUp}
|
|
79
|
+
className="clickable-link"
|
|
80
|
+
>
|
|
81
|
+
{props.texts.createAccount}
|
|
82
|
+
</span>
|
|
83
|
+
</div>
|
|
84
|
+
)}
|
|
85
|
+
|
|
76
86
|
</CardContent>
|
|
77
87
|
</Card>
|
|
78
88
|
<div className="mt-6 flex flex-row justify-between">
|
|
@@ -135,7 +135,7 @@ export const SignInForm: FC<SignInFormTypes> = (props) => {
|
|
|
135
135
|
{props.texts.signInText}
|
|
136
136
|
</Button>
|
|
137
137
|
{!props.withoutSignUp && (
|
|
138
|
-
<div className="p-3 text-center text-sm font-
|
|
138
|
+
<div className="p-3 text-center text-sm font-normal dark:text-gray-300">
|
|
139
139
|
{props.texts.newUserText}{" "}
|
|
140
140
|
<span
|
|
141
141
|
onClick={props.handleRouteToSignUp}
|
|
@@ -295,7 +295,7 @@ export const SignUpForm: FC<SignUpFormTypes> = (props) => {
|
|
|
295
295
|
</Button>
|
|
296
296
|
</form>
|
|
297
297
|
</FormProvider>
|
|
298
|
-
<div className="flex flex-row items-center justify-center gap-1 p-3 text-center text-sm font-
|
|
298
|
+
<div className="flex flex-row items-center justify-center gap-1 p-3 text-center text-sm font-normal dark:text-white">
|
|
299
299
|
<span>{props.texts.existingUserText}</span>
|
|
300
300
|
<span
|
|
301
301
|
onClick={props.handleRouteToSignIn}
|
|
@@ -28,30 +28,30 @@ export const CreditCardForm: FC<CreditCardFormTypes> = (props) => {
|
|
|
28
28
|
render={({ field }) => (
|
|
29
29
|
<HawaTextField
|
|
30
30
|
width="full"
|
|
31
|
-
name="
|
|
32
|
-
placeholder="
|
|
33
|
-
type="
|
|
31
|
+
name="cardNumber"
|
|
32
|
+
placeholder="1234 1234 1234 1234"
|
|
33
|
+
type="number"
|
|
34
34
|
label="Card Number"
|
|
35
35
|
helpertext={errors.password?.message}
|
|
36
36
|
/>
|
|
37
37
|
)}
|
|
38
38
|
rules={{
|
|
39
|
-
required: "
|
|
39
|
+
required: "Card Number is rquired",
|
|
40
40
|
}}
|
|
41
41
|
/>
|
|
42
42
|
<div className="w-1/4">
|
|
43
43
|
<Controller
|
|
44
44
|
control={control}
|
|
45
|
-
name="
|
|
45
|
+
name="cardCVC"
|
|
46
46
|
render={({ field }) => (
|
|
47
47
|
<HawaTextField
|
|
48
48
|
width="full"
|
|
49
|
-
name="
|
|
49
|
+
name="cardCVC"
|
|
50
50
|
maxLength="3"
|
|
51
51
|
autoComplete="cc-number"
|
|
52
|
-
placeholder=""
|
|
53
|
-
type="
|
|
54
|
-
label="
|
|
52
|
+
placeholder="CVC"
|
|
53
|
+
type="number"
|
|
54
|
+
label="CVC"
|
|
55
55
|
helpertext={errors.password?.message}
|
|
56
56
|
/>
|
|
57
57
|
)}
|
|
@@ -61,16 +61,17 @@ export const CreditCardForm: FC<CreditCardFormTypes> = (props) => {
|
|
|
61
61
|
/>
|
|
62
62
|
</div>
|
|
63
63
|
</div>
|
|
64
|
+
|
|
64
65
|
<Controller
|
|
65
66
|
control={control}
|
|
66
|
-
name="
|
|
67
|
+
name="cardExpiry"
|
|
67
68
|
render={({ field }) => (
|
|
68
69
|
<HawaTextField
|
|
69
70
|
width="full"
|
|
70
|
-
name="
|
|
71
|
-
placeholder="
|
|
72
|
-
type="
|
|
73
|
-
label="
|
|
71
|
+
name="cardExpiry"
|
|
72
|
+
placeholder="MM / YY"
|
|
73
|
+
type="password"
|
|
74
|
+
label="Expiry Date"
|
|
74
75
|
helpertext={errors.password?.message}
|
|
75
76
|
/>
|
|
76
77
|
)}
|
|
@@ -84,15 +85,15 @@ export const CreditCardForm: FC<CreditCardFormTypes> = (props) => {
|
|
|
84
85
|
render={({ field }) => (
|
|
85
86
|
<HawaTextField
|
|
86
87
|
width="full"
|
|
87
|
-
name="
|
|
88
|
-
placeholder="Enter password"
|
|
89
|
-
type="
|
|
90
|
-
label="
|
|
88
|
+
name="cardName"
|
|
89
|
+
// placeholder="Enter password"
|
|
90
|
+
type="text"
|
|
91
|
+
label="Name on card"
|
|
91
92
|
helpertext={errors.password?.message}
|
|
92
93
|
/>
|
|
93
94
|
)}
|
|
94
95
|
rules={{
|
|
95
|
-
required: "
|
|
96
|
+
required: "Card holder name is rquired",
|
|
96
97
|
}}
|
|
97
98
|
/>
|
|
98
99
|
</CardContent>
|
|
@@ -6,7 +6,7 @@ interface CarouselProps {
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
export const Carousel: React.FC<CarouselProps> = ({ images }) => {
|
|
9
|
-
const imageWidth =
|
|
9
|
+
const imageWidth = 1000 + 16 // Adjust according to your image width
|
|
10
10
|
const {
|
|
11
11
|
containerRef,
|
|
12
12
|
handleMouseDown,
|
|
@@ -17,7 +17,7 @@ export const Carousel: React.FC<CarouselProps> = ({ images }) => {
|
|
|
17
17
|
|
|
18
18
|
return (
|
|
19
19
|
<div
|
|
20
|
-
className="flex cursor-pointer snap-x gap-4 overflow-x-
|
|
20
|
+
className="flex cursor-pointer snap-x gap-4 overflow-x-hidden justify-center items-center"
|
|
21
21
|
onMouseDown={handleMouseDown}
|
|
22
22
|
onMouseLeave={handleMouseLeave}
|
|
23
23
|
onMouseUp={handleMouseUp}
|
|
@@ -25,10 +25,12 @@ export const Carousel: React.FC<CarouselProps> = ({ images }) => {
|
|
|
25
25
|
ref={containerRef}
|
|
26
26
|
>
|
|
27
27
|
{images.map((image, index) => (
|
|
28
|
-
<div key={index} className="
|
|
28
|
+
<div key={index} className="w-[1000px] h-96 flex-shrink-0">
|
|
29
|
+
{/* <div key={index} className="h-40 w-60 flex-shrink-0"> */}
|
|
29
30
|
<img
|
|
30
31
|
src={image}
|
|
31
32
|
alt={`Carousel Image ${index}`}
|
|
33
|
+
width={imageWidth}
|
|
32
34
|
className="h-full w-full rounded-lg object-cover"
|
|
33
35
|
/>
|
|
34
36
|
</div>
|
|
@@ -37,155 +39,3 @@ export const Carousel: React.FC<CarouselProps> = ({ images }) => {
|
|
|
37
39
|
)
|
|
38
40
|
}
|
|
39
41
|
|
|
40
|
-
// import React, { FC, useEffect, useRef } from "react"
|
|
41
|
-
// import clsx from "clsx"
|
|
42
|
-
|
|
43
|
-
// type CarouselTypes = {
|
|
44
|
-
// /** The text inside the chip */
|
|
45
|
-
// label: string
|
|
46
|
-
// /** The small icon before the chip label */
|
|
47
|
-
// icon?: JSX.Element
|
|
48
|
-
// /** The color of the chip, must be a tailwind color */
|
|
49
|
-
// color?: string
|
|
50
|
-
// /** The size of the chip */
|
|
51
|
-
// size?: "small" | "normal" | "large"
|
|
52
|
-
// /** Enable/Disable the dot before the label of the chip */
|
|
53
|
-
// dot?: boolean
|
|
54
|
-
// /** Red/Green dot next to the label of the chip indicating online/offline or available/unavailable */
|
|
55
|
-
// dotType?: "available" | "unavailable"
|
|
56
|
-
// }
|
|
57
|
-
|
|
58
|
-
// export const Carousel: FC<CarouselTypes> = (props) => {
|
|
59
|
-
// const scrollContainer = useRef(null)
|
|
60
|
-
|
|
61
|
-
// useEffect(() => {
|
|
62
|
-
// let isDown = false
|
|
63
|
-
// let startX
|
|
64
|
-
// let scrollLeft
|
|
65
|
-
|
|
66
|
-
// const onMouseDown = (e) => {
|
|
67
|
-
// isDown = true
|
|
68
|
-
// startX = e.pageX
|
|
69
|
-
// scrollLeft = scrollContainer.current.scrollLeft
|
|
70
|
-
// }
|
|
71
|
-
|
|
72
|
-
// const onMouseLeave = () => {
|
|
73
|
-
// isDown = false
|
|
74
|
-
// }
|
|
75
|
-
|
|
76
|
-
// const onMouseUp = () => {
|
|
77
|
-
// isDown = false
|
|
78
|
-
// }
|
|
79
|
-
|
|
80
|
-
// const onMouseMove = (e) => {
|
|
81
|
-
// if (!isDown) return
|
|
82
|
-
// e.preventDefault()
|
|
83
|
-
// const x = e.pageX
|
|
84
|
-
// const walk = x - startX
|
|
85
|
-
// scrollContainer.current.scrollLeft = scrollLeft - walk
|
|
86
|
-
// }
|
|
87
|
-
|
|
88
|
-
// const container = scrollContainer.current
|
|
89
|
-
// container.addEventListener("mousedown", onMouseDown)
|
|
90
|
-
// container.addEventListener("mouseleave", onMouseLeave)
|
|
91
|
-
// container.addEventListener("mouseup", onMouseUp)
|
|
92
|
-
// container.addEventListener("mousemove", onMouseMove)
|
|
93
|
-
|
|
94
|
-
// return () => {
|
|
95
|
-
// container.removeEventListener("mousedown", onMouseDown)
|
|
96
|
-
// container.removeEventListener("mouseleave", onMouseLeave)
|
|
97
|
-
// container.removeEventListener("mouseup", onMouseUp)
|
|
98
|
-
// container.removeEventListener("mousemove", onMouseMove)
|
|
99
|
-
// }
|
|
100
|
-
// }, [])
|
|
101
|
-
// return (
|
|
102
|
-
// <div className="relative flex flex-col items-center justify-center overflow-hidden bg-gray-50">
|
|
103
|
-
// <div className="w-[500px]">
|
|
104
|
-
// <div
|
|
105
|
-
// ref={scrollContainer}
|
|
106
|
-
// className="scrollbar-hide mt-14 flex w-full snap-x snap-mandatory scroll-px-10 gap-10 overflow-x-scroll scroll-smooth px-10"
|
|
107
|
-
// >
|
|
108
|
-
// <div className="md:2/3 relative aspect-[2/3] w-[90%] shrink-0 snap-start snap-always rounded-xl bg-orange-100 sm:w-[44%] md:w-[30%]">
|
|
109
|
-
// <div className="absolute bottom-0 z-10 w-full rounded-xl bg-gradient-to-t from-black px-5 py-3">
|
|
110
|
-
// <h2 className="mt-4 text-xl font-bold text-white">Cangu</h2>
|
|
111
|
-
// <p className="text-sm text-white/50">Indonesia</p>
|
|
112
|
-
// </div>
|
|
113
|
-
// <img
|
|
114
|
-
// src="https://source.unsplash.com/9bp48ITvd00"
|
|
115
|
-
// alt="image"
|
|
116
|
-
// className="h-full w-full rounded-xl object-cover"
|
|
117
|
-
// />
|
|
118
|
-
// </div>
|
|
119
|
-
|
|
120
|
-
// <div className="md:2/3 relative aspect-[2/3] w-[90%] shrink-0 snap-start snap-always rounded-xl bg-orange-100 sm:w-[44%] md:w-[30%]">
|
|
121
|
-
// <div className="absolute bottom-0 z-10 w-full rounded-xl bg-gradient-to-t from-black px-5 py-3">
|
|
122
|
-
// <h2 className="mt-4 text-xl font-bold text-white">New York</h2>
|
|
123
|
-
// <p className="text-sm text-white/50">United States</p>
|
|
124
|
-
// </div>
|
|
125
|
-
// <img
|
|
126
|
-
// src="https://source.unsplash.com/4HG5hlhmZg8"
|
|
127
|
-
// className="h-full w-full rounded-xl object-cover"
|
|
128
|
-
// />
|
|
129
|
-
// </div>
|
|
130
|
-
|
|
131
|
-
// <div className="md:2/3 relative aspect-[2/3] w-[90%] shrink-0 snap-start snap-always rounded-xl bg-blue-100 sm:w-[44%] md:w-[30%]">
|
|
132
|
-
// <div className="absolute bottom-0 z-10 w-full rounded-xl bg-gradient-to-t from-black px-5 py-3">
|
|
133
|
-
// <h2 className="mt-4 text-xl font-bold text-white">London</h2>
|
|
134
|
-
// <p className="text-sm text-white/50">United Kingdom</p>
|
|
135
|
-
// </div>
|
|
136
|
-
// <img
|
|
137
|
-
// src="https://source.unsplash.com/oBmlsTW2pHY"
|
|
138
|
-
// className="h-full w-full rounded-xl object-cover"
|
|
139
|
-
// />
|
|
140
|
-
// </div>
|
|
141
|
-
|
|
142
|
-
// <div className="md:2/3 relative aspect-[2/3] w-[90%] shrink-0 snap-start snap-always rounded-xl bg-green-100 sm:w-[44%] md:w-[30%]">
|
|
143
|
-
// <div className="absolute bottom-0 z-10 w-full rounded-xl bg-gradient-to-t from-black px-5 py-3">
|
|
144
|
-
// <h2 className="mt-4 text-xl font-bold text-white">Bali</h2>
|
|
145
|
-
// <p className="text-sm text-white/50">Indonesia</p>
|
|
146
|
-
// </div>
|
|
147
|
-
// <img
|
|
148
|
-
// src="https://source.unsplash.com/1kdIG_258bU"
|
|
149
|
-
// className="h-full w-full rounded-xl object-cover"
|
|
150
|
-
// />
|
|
151
|
-
// </div>
|
|
152
|
-
|
|
153
|
-
// <div className="md:2/3 relative aspect-[2/3] w-[90%] shrink-0 snap-start snap-always rounded-xl bg-rose-100 sm:w-[44%] md:w-[30%]">
|
|
154
|
-
// <div className="absolute bottom-0 z-10 w-full rounded-xl bg-gradient-to-t from-black px-5 py-3">
|
|
155
|
-
// <h2 className="mt-4 text-xl font-bold text-white">
|
|
156
|
-
// Times Square
|
|
157
|
-
// </h2>
|
|
158
|
-
// <p className="text-sm text-white/50">Singapore</p>
|
|
159
|
-
// </div>
|
|
160
|
-
// <img
|
|
161
|
-
// src="https://source.unsplash.com/l8vKWxhVuts"
|
|
162
|
-
// className="h-full w-full rounded-xl object-cover"
|
|
163
|
-
// />
|
|
164
|
-
// </div>
|
|
165
|
-
|
|
166
|
-
// <div className="md:2/3 relative aspect-[2/3] w-[90%] shrink-0 snap-start snap-always rounded-xl bg-yellow-100 sm:w-[44%] md:w-[30%]">
|
|
167
|
-
// <div className="absolute bottom-0 z-10 w-full rounded-xl bg-gradient-to-t from-black px-5 py-3">
|
|
168
|
-
// <h2 className="mt-4 text-xl font-bold text-white">Bangkok</h2>
|
|
169
|
-
// <p className="text-sm text-white/50">Thailand</p>
|
|
170
|
-
// </div>
|
|
171
|
-
// <img
|
|
172
|
-
// src="https://source.unsplash.com/0LGDmbnk0-U"
|
|
173
|
-
// className="h-full w-full rounded-xl object-cover"
|
|
174
|
-
// />
|
|
175
|
-
// </div>
|
|
176
|
-
|
|
177
|
-
// <div className="md:2/3 relative aspect-[2/3] w-[90%] shrink-0 snap-start snap-always rounded-xl bg-red-100 sm:w-[44%] md:w-[30%]">
|
|
178
|
-
// <div className="absolute bottom-0 z-10 w-full rounded-xl bg-gradient-to-t from-black px-5 py-3">
|
|
179
|
-
// <h2 className="mt-4 text-xl font-bold text-white">Latina</h2>
|
|
180
|
-
// <p className="text-sm text-white/50">South America</p>
|
|
181
|
-
// </div>
|
|
182
|
-
// <img
|
|
183
|
-
// src="https://source.unsplash.com/tVqQSfXQ_SI"
|
|
184
|
-
// className="h-full w-full rounded-xl object-cover"
|
|
185
|
-
// />
|
|
186
|
-
// </div>
|
|
187
|
-
// </div>
|
|
188
|
-
// </div>
|
|
189
|
-
// </div>
|
|
190
|
-
// )
|
|
191
|
-
// }
|
|
@@ -89,6 +89,7 @@ const DropdownMenuItem = React.forwardRef<
|
|
|
89
89
|
}
|
|
90
90
|
>(({ className, inset, ...props }, ref) => (
|
|
91
91
|
<DropdownMenuPrimitive.Item
|
|
92
|
+
disabled={props.disabled}
|
|
92
93
|
ref={ref}
|
|
93
94
|
className={cn(
|
|
94
95
|
"relative flex cursor-pointer select-none items-center justify-between rounded-sm px-2 py-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
@@ -238,6 +239,7 @@ export type SubItem = {
|
|
|
238
239
|
icon?: any
|
|
239
240
|
action?: () => void
|
|
240
241
|
highlighted?: boolean
|
|
242
|
+
disabled?: boolean
|
|
241
243
|
}
|
|
242
244
|
|
|
243
245
|
export type MenuItemType = {
|
|
@@ -249,6 +251,7 @@ export type MenuItemType = {
|
|
|
249
251
|
action?: () => void
|
|
250
252
|
highlighted?: boolean
|
|
251
253
|
subitems?: SubItem[] // Note the use of the optional modifier
|
|
254
|
+
disabled?: boolean
|
|
252
255
|
}
|
|
253
256
|
interface DropdownMenuProps {
|
|
254
257
|
trigger?: any
|
|
@@ -306,6 +309,7 @@ export const DropdownMenu: React.FC<DropdownMenuProps> = ({
|
|
|
306
309
|
<DropdownMenuSubContent>
|
|
307
310
|
{item.subitems.map((subitem, subIndex) => (
|
|
308
311
|
<DropdownMenuItem
|
|
312
|
+
disabled={subitem.disabled}
|
|
309
313
|
className="flex flex-row gap-2"
|
|
310
314
|
onSelect={() => subitem.action()}
|
|
311
315
|
key={subIndex}
|
|
@@ -319,6 +323,7 @@ export const DropdownMenu: React.FC<DropdownMenuProps> = ({
|
|
|
319
323
|
</DropdownMenuSub>
|
|
320
324
|
) : (
|
|
321
325
|
<DropdownMenuItem
|
|
326
|
+
disabled={item.disabled}
|
|
322
327
|
className="flex flex-row gap-2"
|
|
323
328
|
key={index}
|
|
324
329
|
onSelect={(e) => {
|
package/src/layout/Footer.tsx
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { BsInstagram, BsTwitter } from "react-icons/bs"
|
|
2
2
|
import { FaSnapchatGhost, FaTiktok } from "react-icons/fa"
|
|
3
|
+
import { Button } from "../elements"
|
|
4
|
+
import { cn } from "../util"
|
|
3
5
|
|
|
4
6
|
type FooterTypes = {
|
|
5
7
|
logoText?: string
|
|
6
8
|
logoURL?: string
|
|
9
|
+
copyRights?: string
|
|
10
|
+
variation?: "default" | "minimal"
|
|
7
11
|
socialLinks?: {
|
|
8
12
|
twitter?: string
|
|
9
13
|
instagram?: string
|
|
@@ -19,12 +23,45 @@ type FooterTypes = {
|
|
|
19
23
|
}[]
|
|
20
24
|
}
|
|
21
25
|
|
|
22
|
-
export const Footer: React.FunctionComponent<FooterTypes> = ({
|
|
26
|
+
export const Footer: React.FunctionComponent<FooterTypes> = ({
|
|
27
|
+
variation = "default",
|
|
28
|
+
...props
|
|
29
|
+
}) => {
|
|
30
|
+
let variationStyles = {
|
|
31
|
+
default: "rounded border",
|
|
32
|
+
minimal: "border-t",
|
|
33
|
+
}
|
|
23
34
|
return (
|
|
24
|
-
<div
|
|
25
|
-
{
|
|
26
|
-
|
|
27
|
-
|
|
35
|
+
<div
|
|
36
|
+
className={cn(
|
|
37
|
+
"flex w-full flex-row items-center justify-between gap-8 rounded bg-background p-4",
|
|
38
|
+
variationStyles[variation]
|
|
39
|
+
)}
|
|
40
|
+
>
|
|
41
|
+
<div className="flex flex-col items-center gap-2">
|
|
42
|
+
<div className="flex flex-row items-center gap-2">
|
|
43
|
+
{props.logoURL && (
|
|
44
|
+
<div>
|
|
45
|
+
<img className="h-8" src={props.logoURL} />
|
|
46
|
+
</div>
|
|
47
|
+
)}
|
|
48
|
+
{props.logoText && (
|
|
49
|
+
<div>
|
|
50
|
+
<div className="text-2xl font-bold text-primary">
|
|
51
|
+
{props.logoText}
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
)}
|
|
55
|
+
</div>
|
|
56
|
+
{props.copyRights && props.footerLinks && (
|
|
57
|
+
<div className="text-xs text-muted-foreground">
|
|
58
|
+
© {props.copyRights} {new Date().getFullYear()}
|
|
59
|
+
</div>
|
|
60
|
+
)}
|
|
61
|
+
</div>
|
|
62
|
+
{props.copyRights && !props.footerLinks && (
|
|
63
|
+
<div className="text-xs text-muted-foreground">
|
|
64
|
+
© {props.copyRights} {new Date().getFullYear()}
|
|
28
65
|
</div>
|
|
29
66
|
)}
|
|
30
67
|
{props.footerLinks?.map((pagesSection) => (
|
|
@@ -45,24 +82,24 @@ export const Footer: React.FunctionComponent<FooterTypes> = ({ ...props }) => {
|
|
|
45
82
|
{props.socialLinks && (
|
|
46
83
|
<div className="flex flex-row gap-2">
|
|
47
84
|
{props.socialLinks.twitter && (
|
|
48
|
-
<
|
|
85
|
+
<Button size="smallIcon" variant="ghost">
|
|
49
86
|
<BsTwitter />
|
|
50
|
-
</
|
|
87
|
+
</Button>
|
|
51
88
|
)}
|
|
52
89
|
{props.socialLinks.instagram && (
|
|
53
|
-
<
|
|
90
|
+
<Button size="smallIcon" variant="ghost">
|
|
54
91
|
<BsInstagram />
|
|
55
|
-
</
|
|
92
|
+
</Button>
|
|
56
93
|
)}
|
|
57
94
|
{props.socialLinks.tiktok && (
|
|
58
|
-
<
|
|
95
|
+
<Button size="smallIcon" variant="ghost">
|
|
59
96
|
<FaTiktok />
|
|
60
|
-
</
|
|
97
|
+
</Button>
|
|
61
98
|
)}
|
|
62
99
|
{props.socialLinks.snapchat && (
|
|
63
|
-
<
|
|
100
|
+
<Button size="smallIcon" variant="ghost">
|
|
64
101
|
<FaSnapchatGhost />
|
|
65
|
-
</
|
|
102
|
+
</Button>
|
|
66
103
|
)}
|
|
67
104
|
</div>
|
|
68
105
|
)}
|