|
57 | 57 | selectedRow?: number; |
58 | 58 | withSelection?: boolean; |
59 | 59 | headerHeight?: number; |
60 | | - onMutate: () => Promise<void> | void; |
| 60 | + onMutate?: () => Promise<void> | void; |
61 | 61 | currentPage?: number; |
62 | 62 | totalPages?: number; |
63 | 63 | totalItems?: number; |
|
205 | 205 |
|
206 | 206 | <Table |
207 | 207 | class={cn( |
208 | | - ['relative w-full table-fixed text-left text-sm text-gray-500', restProps.class].join(' ') |
| 208 | + ['relative w-full table-fixed text-left text-sm text-black-700', restProps.class].join(' ') |
209 | 209 | )} |
210 | 210 | > |
211 | | - <TableHead class="sticky top-0 h-[var(--table-header-height)] bg-black"> |
| 211 | + <TableHead class="sticky top-0 h-[var(--table-header-height)] bg-white"> |
212 | 212 | {#if withSelection} |
213 | 213 | <TableHeadCell class="wide:px-5 w-[48px] max-w-[48px] min-w-[48px] rounded-l-2xl p-4"> |
214 | 214 | <Checkbox checked={checkAll} onchange={(e) => toggleCheckAll(e as boolean)} /> |
|
231 | 231 | <Table |
232 | 232 | class={cn( |
233 | 233 | [ |
234 | | - 'relative w-full table-fixed border-separate border-spacing-y-2 text-left text-sm text-gray-500', |
| 234 | + 'relative w-full table-fixed border-separate border-spacing-y-2 text-left text-sm text-black-700', |
235 | 235 | restProps.class |
236 | 236 | ].join(' ') |
237 | 237 | )} |
|
243 | 243 | selectedRow = i; |
244 | 244 | handleSelectedRow && handleSelectedRow(i); |
245 | 245 | }} |
246 | | - class="w-full bg-black/50 select-none hover:bg-white/3 |
247 | | - {selectedRow === i && 'bg-white/6!'}" |
| 246 | + class="w-full bg-white select-none hover:bg-black-300 |
| 247 | + {selectedRow === i && 'bg-black-300!'}" |
248 | 248 | > |
249 | 249 | {#if withSelection} |
250 | 250 | <th class="wide:px-5 w-[48px] max-w-[48px] min-w-[48px] rounded-l-2xl p-4"> |
|
267 | 267 | {@const cellData = tableData[0]?.[heading]} |
268 | 268 | {@const isSortable = cellData && 'sortable' in cellData && cellData.sortable} |
269 | 269 | <TableHeadCell |
270 | | - class="wide:text-sm font-roboto p-0 text-xs font-semibold text-gray-200 normal-case |
| 270 | + class="wide:text-base font-roboto p-0 text-xs font-bold text-black-700 normal-case |
271 | 271 | {i === 0 && !withSelection && 'rounded-l-2xl'} |
272 | 272 | {i === tableHeadings.length - 1 && !isScrollable && 'rounded-r-2xl'} |
273 | 273 | " |
|
309 | 309 |
|
310 | 310 | {#snippet BodyCell(data: Record<string, TableCell>, field: string, i: number)} |
311 | 311 | <TableBodyCell |
312 | | - class="wide:text-base font-roboto overflow-hidden p-2 text-xs font-normal text-ellipsis text-gray-200 |
| 312 | + class="wide:text-base font-roboto overflow-hidden p-2 text-xs font-normal text-ellipsis text-black-700 |
313 | 313 | {i === 0 && !withSelection && 'rounded-s-2xl pl-6'} |
314 | 314 | {i === Object.keys(data).length - 1 && 'rounded-e-2xl'} |
315 | 315 | " |
|
343 | 343 | <!-- PAGINATION --> |
344 | 344 | {#if withPagination} |
345 | 345 | <div |
346 | | - class="sticky bottom-0 z-10 flex h-[var(--pagination-height)] items-center justify-between rounded-2xl bg-black p-3" |
| 346 | + class="sticky bottom-0 z-10 flex h-[var(--pagination-height)] items-center justify-between rounded-2xl bg-white p-3" |
347 | 347 | > |
348 | | - <p class="small text-gray-200"> |
| 348 | + <p class="small text-black-700"> |
349 | 349 | Showing {(currentPage - 1) * pageSize + 1} - {Math.min( |
350 | 350 | currentPage * pageSize, |
351 | 351 | totalItems |
352 | 352 | )} of {totalItems} |
353 | 353 | </p> |
354 | 354 | <div class="flex items-center gap-2"> |
355 | 355 | <!-- Custom Pagination --> |
356 | | - <div class="border-primary-900 flex items-center rounded-lg border bg-white/10"> |
| 356 | + <div class="border-primary-900 flex items-center rounded-lg border bg-white"> |
357 | 357 | <!-- Previous Button --> |
358 | 358 | <button |
359 | | - class=" flex h-8 w-10 items-center justify-center text-gray-300 transition-colors hover:bg-white/10 disabled:cursor-not-allowed disabled:opacity-50" |
| 359 | + class=" flex h-8 w-10 items-center justify-center text-black-700 transition-colors hover:bg-black-300 disabled:cursor-not-allowed disabled:opacity-50" |
360 | 360 | onclick={handlePreviousPage} |
361 | 361 | disabled={currentPage <= 1 || isLoading} |
362 | 362 | > |
|
366 | 366 | <!-- Page Numbers --> |
367 | 367 | {#each generatePageNumbers(currentPage, totalPages) as pageNum} |
368 | 368 | {#if pageNum === '...'} |
369 | | - <span class="flex h-8 w-10 items-center justify-center text-gray-400" |
| 369 | + <span class="flex h-8 w-10 items-center justify-center text-black-700" |
370 | 370 | >...</span |
371 | 371 | > |
372 | 372 | {:else} |
373 | 373 | <button |
374 | 374 | class="outline-primary-900 flex h-8 w-10 items-center justify-center transition-colors |
375 | 375 | {currentPage === pageNum |
376 | | - ? ' bg-black text-white' |
377 | | - : ' text-gray-300 hover:bg-white/10'}" |
| 376 | + ? ' bg-white text-black-700' |
| 377 | + : ' text-black-700 hover:bg-white'}" |
378 | 378 | onclick={() => |
379 | 379 | typeof pageNum === 'number' ? goToPage?.(pageNum) : undefined} |
380 | 380 | disabled={isLoading} |
|
386 | 386 |
|
387 | 387 | <!-- Next Button --> |
388 | 388 | <button |
389 | | - class="flex h-8 w-10 items-center justify-center text-gray-300 transition-colors hover:bg-white/10 disabled:cursor-not-allowed disabled:opacity-50" |
| 389 | + class="flex h-8 w-10 items-center justify-center text-black-700 transition-colors hover:bg-black-300 disabled:cursor-not-allowed disabled:opacity-50" |
390 | 390 | onclick={handleNextPage} |
391 | 391 | disabled={currentPage >= totalPages || isLoading} |
392 | 392 | > |
|
0 commit comments