do-ui-design-system 1.1.20 → 1.1.22

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.
@@ -6,6 +6,10 @@
6
6
  gap: 1rem;
7
7
  margin-bottom: 1rem;
8
8
 
9
+ .do-table__header__left {
10
+ max-width: 55%;
11
+ }
12
+
9
13
  .do-table__header__left__tags {
10
14
  display: flex;
11
15
  flex-wrap: wrap;
@@ -31,7 +35,7 @@
31
35
  font-size: 0.8rem;
32
36
 
33
37
  h5 {
34
- max-width: 10rem;
38
+ max-width: 12rem;
35
39
  }
36
40
  }
37
41
 
@@ -98,7 +102,7 @@
98
102
  display: grid;
99
103
  grid-template-columns: 1fr min-content;
100
104
  align-items: center;
101
- padding: 0.75rem 1rem;
105
+ padding: 0.5rem 1rem;
102
106
  text-align: left;
103
107
  font-size: 1rem;
104
108
  font-weight: 500;
@@ -145,12 +145,12 @@
145
145
  }
146
146
  } else if (dateConfig.columnFrom) {
147
147
  const from = normalize(String(row[dateConfig.columnFrom]));
148
- if (dateFrom && from < dateFrom) return false;
149
- if (dateTo && from > dateTo) return false;
148
+ if (dateFrom && from > dateFrom) return false;
149
+ if (dateTo && from < dateTo) return false;
150
150
  } else if (dateConfig.columnTo) {
151
151
  const to = normalize(String(row[dateConfig.columnTo]));
152
- if (dateFrom && to < dateFrom) return false;
153
- if (dateTo && to > dateTo) return false;
152
+ if (dateFrom && to > dateFrom) return false;
153
+ if (dateTo && to < dateTo) return false;
154
154
  }
155
155
 
156
156
  return true;
@@ -185,8 +185,11 @@
185
185
  }
186
186
  });
187
187
 
188
- const allSelected = $derived(selected.size === data.length && data.length > 0);
189
- const someSelected = $derived(selected.size > 0 && !allSelected);
188
+ const filteredIds = $derived(new Set(filtered().map((r) => r[idKey])));
189
+ const allSelected = $derived(
190
+ filteredIds.size > 0 && [...filteredIds].every((id) => selected.has(id))
191
+ );
192
+ const someSelected = $derived([...filteredIds].some((id) => selected.has(id)) && !allSelected);
190
193
 
191
194
  const handleSort = (key: string) => {
192
195
  if (sortKey !== key) {
@@ -209,11 +212,17 @@
209
212
 
210
213
  const toggleAll = () => {
211
214
  if (allSelected) {
212
- selected = new Set();
213
- onSelectionChange?.([]);
215
+ // Deselecciona solo los filtrados, mantiene los que no están visibles
216
+ const next = new Set(selected);
217
+ for (const id of filteredIds) next.delete(id);
218
+ selected = next;
219
+ onSelectionChange?.(Array.from(next));
214
220
  } else {
215
- selected = new Set(data.map((r) => r[idKey]));
216
- onSelectionChange?.(Array.from(selected));
221
+ // Selecciona solo los filtrados, suma a los ya seleccionados
222
+ const next = new Set(selected);
223
+ for (const id of filteredIds) next.add(id);
224
+ selected = next;
225
+ onSelectionChange?.(Array.from(next));
217
226
  }
218
227
  };
219
228
 
@@ -321,7 +330,7 @@
321
330
  {#if dateConfig?.columnFrom && dateConfig?.columnTo && !dateError}
322
331
  <label class="do-table__partial-match">
323
332
  <Toggle bind:checked={partialMatch} />
324
- <h5>{dateConfig?.partialMatchLabel ?? 'Incluir coincidencias parciales'}</h5>
333
+ <h5>{dateConfig?.partialMatchLabel ?? 'Incluir datos parcialmente contenidos'}</h5>
325
334
  </label>
326
335
  {/if}
327
336
 
@@ -1 +1 @@
1
- {"version":3,"file":"TableBasic.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/organisms/TableBasic/TableBasic.svelte.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAGV,SAAS,EACT,UAAU,EACV,YAAY,EACZ,eAAe,EACf,SAAS,EAET,MAAM,uBAAuB,CAAC;AAG/B,KAAK,KAAK,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI;IAC3C,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACxB,aAAa,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;IACrC,SAAS,CAAC,EAAE,SAAS,CAAC,CAAC,C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AC,GAAG,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KAAK,IAAI,CAAC;CACvD,CAAC;AAiZH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,QAAA,MAAM,UAAU,gDAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "do-ui-design-system",
3
- "version": "1.1.20",
3
+ "version": "1.1.22",
4
4
  "description": "Design system en Svelte + CSS + Storybook",
5
5
  "author": "Data Observatory",
6
6
  "license": "MIT",