@rpg-engine/long-bow 0.7.8 → 0.7.10

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpg-engine/long-bow",
3
- "version": "0.7.8",
3
+ "version": "0.7.10",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -130,6 +130,7 @@ export const ChatRevamp: React.FC<IChatRevampProps> = ({
130
130
  </Ellipsis>
131
131
  </ListElement>
132
132
  <CloseButton
133
+ className="close-button"
133
134
  onPointerDown={() => onRemoveRecentChatCharacter?.(character)}
134
135
  >
135
136
  <RxCross2 size={16} />
@@ -184,7 +185,7 @@ export const ChatRevamp: React.FC<IChatRevampProps> = ({
184
185
  {renderRecentChatTopBar()}
185
186
  {renderRecentChatList()}
186
187
  </RecentChatTabContainer>
187
- {renderChatContent()}
188
+ <ChatWrapper>{renderChatContent()}</ChatWrapper>
188
189
  </PrivateChatContainer>
189
190
  </>
190
191
  );
@@ -212,15 +213,15 @@ const Tab = styled.button<{ active: boolean }>`
212
213
 
213
214
  background-color: ${props =>
214
215
  props.active ? uiColors.orange : 'rgba(0, 0, 0, 0.2)'};
215
- color: ${props => (props.active ? 'white' : uiColors.gray)};
216
+ color: ${props => (props.active ? 'white' : uiColors.darkGray)};
216
217
  `;
217
218
 
218
219
  const PrivateChatContainer = styled.div<{ width: string; height: string }>`
219
220
  width: ${({ width }) => width};
220
- min-height: ${({ height }) => height} !important;
221
+ height: ${({ height }) => height};
222
+
221
223
  padding: 10px;
222
224
  background-color: rgba(0, 0, 0, 0.2);
223
- height: auto;
224
225
  display: flex;
225
226
  gap: 10px;
226
227
  `;
@@ -238,6 +239,7 @@ const RecentChatTabContainer = styled.div<{
238
239
  min-width: ${props => (props.isOpen ? '180px' : '30px')};
239
240
  transition: all 0.3s ease-in-out;
240
241
  overflow: hidden;
242
+ height: 100%;
241
243
  @media (max-width: 768px) {
242
244
  width: ${props => (props.isOpen ? '50%' : '30px')};
243
245
  min-width: ${props => (props.isOpen ? '150px' : '30px')};
@@ -249,6 +251,7 @@ const RecentChatTopBar = styled.div`
249
251
  align-items: center;
250
252
  justify-content: space-between;
251
253
  height: 30px;
254
+ flex-shrink: 0;
252
255
  `;
253
256
 
254
257
  const SearchButton = styled.button`
@@ -292,16 +295,41 @@ const BurgerLineIcon = styled.span`
292
295
  `;
293
296
 
294
297
  const RecentChatLogContainer = styled.div<{ isOpen: boolean }>`
295
- border: none;
296
- list-style: none;
297
- display: flex;
298
+ display: ${props => (props.isOpen ? 'flex' : 'none')};
298
299
  opacity: ${props => (props.isOpen ? 1 : 0)};
299
300
  flex-direction: column;
300
301
  gap: 0.5rem;
301
302
  transition: opacity 0.3s ease-in-out;
302
303
  padding: 0;
303
304
  margin: 0;
304
- flex: 1;
305
+ overflow-y: auto;
306
+ flex-grow: 1;
307
+ height: 0;
308
+
309
+ /* Firefox */
310
+ scrollbar-width: thin;
311
+ scrollbar-color: rgba(51, 51, 51, 0.4) rgba(30, 30, 30, 0.4);
312
+
313
+ /* WebKit and Chromium-based browsers */
314
+ &::-webkit-scrollbar {
315
+ width: 8px;
316
+ height: 8px;
317
+ }
318
+
319
+ &::-webkit-scrollbar-track {
320
+ background: rgba(30, 30, 30, 0.2);
321
+ border-radius: 4px;
322
+ }
323
+
324
+ &::-webkit-scrollbar-thumb {
325
+ background-color: rgba(255, 102, 0, 0.5);
326
+ border-radius: 4px;
327
+ border: 2px solid rgba(30, 30, 30, 0.2);
328
+ }
329
+
330
+ &::-webkit-scrollbar-thumb:hover {
331
+ background-color: rgba(255, 102, 0, 0.7);
332
+ }
305
333
  `;
306
334
 
307
335
  const ListElementContainer = styled.div`
@@ -325,7 +353,7 @@ const ListElement = styled.button<{ active: boolean }>`
325
353
  &:hover {
326
354
  color: #ff0;
327
355
  }
328
- max-width: calc(100% - 24px); // Adjust for close button width
356
+ max-width: calc(100% - 24px);
329
357
  overflow: hidden;
330
358
  text-overflow: ellipsis;
331
359
  white-space: nowrap;
@@ -348,8 +376,21 @@ const CloseButton = styled.button`
348
376
  transition: all 0.2s ease-in-out;
349
377
  background-color: ${uiColors.red};
350
378
  color: ${uiColors.white};
379
+ width: 16px;
380
+ height: 16px;
381
+ border-radius: 50%;
382
+ display: flex;
383
+ justify-content: center;
384
+ align-items: center;
351
385
  &:hover {
352
386
  background-color: ${uiColors.white};
353
387
  color: ${uiColors.red};
354
388
  }
355
389
  `;
390
+
391
+ const ChatWrapper = styled.div`
392
+ flex-grow: 1;
393
+ overflow: hidden;
394
+ display: flex;
395
+ flex-direction: column;
396
+ `;
@@ -208,6 +208,14 @@ const tabsMock = [
208
208
  const recentPrivateChatCharactersMock = [
209
209
  { _id: 'someid', name: 'Guilhermexxxxxxxxxxxx' },
210
210
  { _id: 'someid2', name: 'Guilherme2' },
211
+ { _id: 'someid2', name: 'Guilherme2' },
212
+ { _id: 'someid2', name: 'Guilherme2' },
213
+ { _id: 'someid2', name: 'Guilherme2' },
214
+ { _id: 'someid2', name: 'Guilherme2' },
215
+ { _id: 'someid2', name: 'Guilherme2' },
216
+ { _id: 'someid2', name: 'Guilherme2' },
217
+ { _id: 'someid2', name: 'Guilherme2' },
218
+ { _id: 'someid2', name: 'Guilherme2' },
211
219
  ];
212
220
 
213
221
  const Template: Story<IChatRevampProps> = args => (