@kikiloaw/simple-table 1.0.4 → 1.0.5

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/README.md CHANGED
@@ -459,9 +459,9 @@ SimpleTable supports three data modes:
459
459
  | Prop | Type | Default | Description |
460
460
  |------|------|---------|-------------|
461
461
  | `queryParams` | Object | `{}` | Additional parameters for every request |
462
- | `oddRowColor` | String | `'bg-background'` | Tailwind class for odd rows |
463
- | `evenRowColor` | String | `'bg-background'` | Tailwind class for even rows |
464
- | `hoverColor` | String | `'hover:bg-muted/50'` | Tailwind class for row hover |
462
+ | `oddRowColor` | String | `'bg-white'` | Tailwind class for odd rows |
463
+ | `evenRowColor` | String | `'bg-stone-100'` | Tailwind class for even rows |
464
+ | `hoverColor` | String | `'hover:bg-stone-200'` | Tailwind class for row hover |
465
465
 
466
466
  ---
467
467
 
@@ -1097,7 +1097,8 @@ const beforeRender = (rows) => {
1097
1097
  #### 3. Action Buttons
1098
1098
 
1099
1099
  ```vue
1100
- <SimpleTable :columns="columns" :data="data">
1100
+ <SimpleTable :columns="
1101
+ " :data="data">
1101
1102
  <template #cell-actions="{ row }">
1102
1103
  <div v-if="!row._isGroupHeader" class="flex gap-2">
1103
1104
  <Button variant="outline" size="sm" @click="edit(row)">Edit</Button>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kikiloaw/simple-table",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "A lightweight, dependency-light DataTable component for Vue 3 with Tailwind CSS",
5
5
  "main": "src/index.js",
6
6
  "module": "src/index.js",
@@ -62,9 +62,9 @@ const props = withDefaults(defineProps<Props>(), {
62
62
  perPage: 10,
63
63
  pageSizes: () => [10, 20, 30, 50, 100],
64
64
  rowHeight: 38,
65
- oddRowColor: 'bg-background',
66
- evenRowColor: 'bg-background',
67
- hoverColor: 'hover:bg-muted/50'
65
+ oddRowColor: 'bg-white',
66
+ evenRowColor: 'bg-stone-100',
67
+ hoverColor: 'hover:bg-stone-200'
68
68
  })
69
69
 
70
70
  // ...
@@ -720,7 +720,7 @@ function getCellStyle(col: any) {
720
720
  <select
721
721
  :value="currentPerPage"
722
722
  @change="(e: any) => handlePageSizeChange(e.target.value)"
723
- class="h-10 w-[80px] appearance-none rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer"
723
+ class="h-10 w-[80px] appearance-none border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer"
724
724
  >
725
725
  <option
726
726
  v-for="pageSize in normalizedPageSizes"
@@ -741,7 +741,7 @@ function getCellStyle(col: any) {
741
741
  v-model="searchQuery"
742
742
  type="text"
743
743
  placeholder="Search..."
744
- class="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 pl-8 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"
744
+ class="flex h-10 w-full border border-input bg-background px-3 py-2 pl-8 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"
745
745
  />
746
746
  </div>
747
747
  </div>
@@ -751,7 +751,7 @@ function getCellStyle(col: any) {
751
751
  </div>
752
752
 
753
753
  <!-- Table -->
754
- <div class="rounded-md border bg-background overflow-x-auto relative">
754
+ <div class="border bg-background overflow-x-auto relative">
755
755
  <!-- We add min-w-full to Table to ensure it stretches -->
756
756
  <Table class="min-w-full table-fixed">
757
757
  <TableHeader>
@@ -21,7 +21,7 @@ const delegatedProps = computed(() => {
21
21
  cn(
22
22
  props.height || 'h-[38px]',
23
23
  props.padding || 'px-2',
24
- 'text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0',
24
+ 'text-left align-middle font-bold text-muted-foreground [&:has([role=checkbox])]:pr-0',
25
25
  props.class,
26
26
  )
27
27
  "
@@ -17,7 +17,7 @@ const delegatedProps = computed(() => {
17
17
  <tr
18
18
  :class="
19
19
  cn(
20
- 'border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted',
20
+ 'border-b border-stone-300 transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted',
21
21
  props.class,
22
22
  )
23
23
  "