@invopop/popui 0.0.9 → 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,10 +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
- <!-- svelte-ignore a11y-click-events-have-key-events -->
163
- <!-- svelte-ignore a11y-label-has-associated-control -->
164
- <!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
165
- <label class="pl-5 pr-3 h-[40px] flex items-center" on:click|stopPropagation>
162
+ <button
163
+ class="pl-5 pr-3 h-[40px] flex items-center"
164
+ on:click|stopPropagation={() => {
165
+ toggleAllSelected(!selectedRows.length)
166
+ }}
167
+ >
166
168
  <InputCheckbox
167
169
  checked={allChecked}
168
170
  {indeterminate}
@@ -170,7 +172,7 @@ function selectRange(to) {
170
172
  toggleAllSelected(event.detail)
171
173
  }}
172
174
  />
173
- </label>
175
+ </button>
174
176
  {/if}
175
177
  </th>
176
178
  {/if}
@@ -17,7 +17,6 @@ declare const __propDef: {
17
17
  hideSelectAll?: boolean | undefined;
18
18
  };
19
19
  events: {
20
- click: MouseEvent;
21
20
  orderBy: CustomEvent<any>;
22
21
  action: CustomEvent<any>;
23
22
  copied: CustomEvent<any>;
@@ -36,17 +36,19 @@ $:
36
36
  >
37
37
  {#if selectable}
38
38
  <td>
39
- <!-- svelte-ignore a11y-click-events-have-key-events -->
40
- <!-- svelte-ignore a11y-label-has-associated-control -->
41
- <!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
42
- <label class="pl-5 pr-1.5 h-[40px] flex items-center" on:click|stopPropagation>
39
+ <button
40
+ class="pl-5 pr-1.5 h-[40px] flex items-center"
41
+ on:click|stopPropagation={() => {
42
+ dispatch('checked', !checked)
43
+ }}
44
+ >
43
45
  <InputCheckbox
44
46
  {checked}
45
47
  on:change={(event) => {
46
48
  dispatch('checked', event.detail)
47
49
  }}
48
50
  />
49
- </label>
51
+ </button>
50
52
  </td>
51
53
  {/if}
52
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.9",
4
+ "version": "0.0.10",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
7
7
  "build": "vite build && npm run package",