hds-web 1.30.1 → 1.30.2
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/package.json
CHANGED
@@ -58,55 +58,25 @@ export default function HomePageCarousel(props) {
|
|
58
58
|
|
59
59
|
const maxVisibleCards = 6;
|
60
60
|
|
61
|
-
const arrowStyle = ' text-2xl z-10 bg-black h-
|
61
|
+
const arrowStyle = ' text-2xl z-10 bg-black h-10 ml-6 w-10 rounded-full bg-purple-200 hover:bg-neutral-0 flex items-center justify-center';
|
62
62
|
|
63
|
-
const
|
64
|
-
if (dir === 'isLeft') {
|
65
|
-
if (current === 0) return true;
|
66
|
-
else return false
|
67
|
-
}
|
68
|
-
|
69
|
-
if (dir === 'isRight') {
|
70
|
-
if (current === 2) return true;
|
71
|
-
else return false
|
72
|
-
}
|
73
|
-
|
74
|
-
|
75
|
-
}
|
76
|
-
|
77
|
-
const sliderLeftControl = () => (
|
63
|
+
const sliderControl = isLeft => (
|
78
64
|
<button
|
79
65
|
type="button"
|
66
|
+
onClick={isLeft ? previousCard : nextCard}
|
67
|
+
className={`flex ${arrowStyle} ${isLeft ? '' : ''}`}
|
80
68
|
|
81
|
-
onClick={() => {
|
82
|
-
|
83
|
-
previousCard();
|
84
|
-
}}
|
85
|
-
className={`flex bg-blue-600 ${arrowStyle} disabled:bg-neutral-200 `}
|
86
|
-
disabled={disableButton(currentCard, 'isLeft')} // Disable the button if it's the last card
|
87
69
|
>
|
88
|
-
<span role="img" aria-label={`Arrow left `}>
|
89
|
-
{
|
90
|
-
<Icon height={'h-6 w-6 stroke-[1.5]'} variant={'arrowleft'} strokeColor='#1F2A37' />
|
91
|
-
)}
|
92
|
-
</span>
|
93
|
-
</button>
|
94
|
-
);
|
95
|
-
const sliderRightControl = () => (
|
96
|
-
<button
|
97
|
-
type="button"
|
70
|
+
<span role="img" aria-label={`Arrow ${isLeft ? 'left' : 'right'}`}>
|
71
|
+
{isLeft ?
|
98
72
|
|
99
|
-
|
73
|
+
<Icon height={'h-6 w-6'} variant={'chevronleft'} strokeColor='#00288E' />
|
100
74
|
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
<span role="img" aria-label={`Arrow right `}>
|
107
|
-
{(
|
108
|
-
<Icon height={'h-6 w-6 stroke-[1.5]'} variant={'arrowright'} strokeColor='#1F2A37' />
|
109
|
-
)}
|
75
|
+
:
|
76
|
+
|
77
|
+
<Icon height={'h-6 w-6'} variant={'chevronright'} strokeColor='#00288E' />
|
78
|
+
|
79
|
+
}
|
110
80
|
</span>
|
111
81
|
</button>
|
112
82
|
);
|
@@ -160,8 +130,8 @@ export default function HomePageCarousel(props) {
|
|
160
130
|
<div className="flex pt-10 justify-center items-center">
|
161
131
|
{/* {slider()} */}
|
162
132
|
<div className="flex">
|
163
|
-
{
|
164
|
-
{
|
133
|
+
{sliderControl(true)}
|
134
|
+
{sliderControl()}
|
165
135
|
</div>
|
166
136
|
</div>
|
167
137
|
<div className="justify-center select-none items-center"
|
@@ -173,18 +143,18 @@ export default function HomePageCarousel(props) {
|
|
173
143
|
>
|
174
144
|
|
175
145
|
{props.cards.map((item, i) => (
|
176
|
-
<div className="snap-center mx-5 shrink-0" key={i} ref={refs[i]}>
|
146
|
+
<div className=" db:snap-center snap-center tb-m:snap-start mx-5 shrink-0" key={i} ref={refs[i]}>
|
177
147
|
<div className="w-full select-none rounded-3xl object-contain">
|
178
148
|
{React.createElement(props.component, item)}
|
179
149
|
</div>
|
180
150
|
|
181
151
|
</div>
|
182
152
|
))}
|
183
|
-
|
153
|
+
<div className="db:snap-center snap-center tb-m:snap-start mx-5 shrink-0" key={totalCards}>
|
184
154
|
<div className="w-full select-none rounded-3xl object-contain">
|
185
155
|
{React.createElement(props.component, props.cards[0])}
|
186
156
|
</div>
|
187
|
-
</div>
|
157
|
+
</div>
|
188
158
|
|
189
159
|
|
190
160
|
</div>
|
@@ -36,7 +36,7 @@ export default function EventAgenda(props) {
|
|
36
36
|
}
|
37
37
|
{
|
38
38
|
list.description && (
|
39
|
-
<Typography textStyle="body1" className="text-neutral-700 [&>p]:pb-1 last:[&>p]:pb-0 [&>ul]:ps-4 [&>ul>li]:list-disc [&>ul>li]:pb-1 last:[&>ul>li]:pb-0 [&>p>a]:text-blue-600 [&>p>a:hover]:text-blue-800">
|
39
|
+
<Typography textStyle="body1" className="text-neutral-700 [&>p]:pb-1 [&>p>img]:my-6 [&>p>img]:max-w-[420px] [&>p>img]:w-full [&>p>img]:rounded-3xl last:[&>p]:pb-0 [&>ul]:ps-4 [&>ul>li]:list-disc [&>ul>li]:pb-1 last:[&>ul>li]:pb-0 [&>p>a]:text-blue-600 [&>p>a:hover]:text-blue-800">
|
40
40
|
<ReactMarkdown>{list.description}</ReactMarkdown>
|
41
41
|
</Typography>
|
42
42
|
)
|