@invopop/popui 0.0.8 → 0.0.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.
@@ -159,7 +159,12 @@ function selectRange(to) {
159
159
  <!-- if table is selectable we need to add an extra header with a checkbox -->
160
160
  <th scope="col" class="bg-white sticky top-0 z-10 rounded-tr-md">
161
161
  {#if !hideSelectAll}
162
- <label class="pl-5 pr-3 h-[40px] flex items-center" for={undefined}>
162
+ <button
163
+ class="pl-5 pr-3 h-[40px] flex items-center"
164
+ on:click|stopPropagation={() => {
165
+ toggleAllSelected(!selectedRows.length)
166
+ }}
167
+ >
163
168
  <InputCheckbox
164
169
  checked={allChecked}
165
170
  {indeterminate}
@@ -167,7 +172,7 @@ function selectRange(to) {
167
172
  toggleAllSelected(event.detail)
168
173
  }}
169
174
  />
170
- </label>
175
+ </button>
171
176
  {/if}
172
177
  </th>
173
178
  {/if}
@@ -36,15 +36,19 @@ $:
36
36
  >
37
37
  {#if selectable}
38
38
  <td>
39
- <!-- for hack is needed in order to be used with the custom checkbox and silence the linter -->
40
- <label class="pl-5 pr-1.5 h-[40px] flex items-center" for={undefined}>
39
+ <button
40
+ class="pl-5 pr-1.5 h-[40px] flex items-center"
41
+ on:click|stopPropagation={() => {
42
+ dispatch('checked', !checked)
43
+ }}
44
+ >
41
45
  <InputCheckbox
42
46
  {checked}
43
47
  on:change={(event) => {
44
48
  dispatch('checked', event.detail)
45
49
  }}
46
50
  />
47
- </label>
51
+ </button>
48
52
  </td>
49
53
  {/if}
50
54
  {#each fields as field, i (i)}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@invopop/popui",
3
3
  "license": "MIT",
4
- "version": "0.0.8",
4
+ "version": "0.0.10",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
7
7
  "build": "vite build && npm run package",