@juspay/svelte-ui-components 2.98.0 → 2.98.2

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.
@@ -227,7 +227,13 @@
227
227
  return visible;
228
228
  });
229
229
 
230
- let centerBoxSize = $derived(innerR > 0 ? Math.max(0, innerR * 1.3) : 0);
230
+ // The centre snippet (e.g. a currency total like "₹31.24k") is clipped by the
231
+ // foreignObject bounds, so the box must be wide enough for it. The inner hole
232
+ // has diameter 2*innerR; a square of side ~1.9*innerR keeps every edge inside
233
+ // the hole at the text's mid-line while giving the label the room a plain
234
+ // "innerR*1.3" (≈2/3 of the hole) did not — the old value cut the ₹/k off the
235
+ // sides and forced the caption onto two lines.
236
+ let centerBoxSize = $derived(innerR > 0 ? Math.max(0, innerR * 1.9) : 0);
231
237
 
232
238
  // The foreignObject for the center snippet is positioned relative to the <g>
233
239
  // origin (which is at cx, cy in SVG space). The box is always centred on
@@ -201,13 +201,15 @@
201
201
  : null}
202
202
  >
203
203
  <div class="statcard-breakdown-label">{breakdownItem.label}</div>
204
- <div class="statcard-breakdown-value">{breakdownItem.value}</div>
205
- {#if typeof breakdownItem.change === 'number'}
206
- <DeltaIndicator
207
- value={breakdownItem.change}
208
- invertColors={breakdownItem.invertChangeColors ?? false}
209
- />
210
- {/if}
204
+ <div class="statcard-breakdown-value-line">
205
+ <div class="statcard-breakdown-value">{breakdownItem.value}</div>
206
+ {#if typeof breakdownItem.change === 'number'}
207
+ <DeltaIndicator
208
+ value={breakdownItem.change}
209
+ invertColors={breakdownItem.invertChangeColors ?? false}
210
+ />
211
+ {/if}
212
+ </div>
211
213
  </div>
212
214
  {/each}
213
215
  </div>
@@ -488,6 +490,16 @@
488
490
  gap: var(--statcard-breakdown-item-gap, 2px);
489
491
  }
490
492
 
493
+ /* The metric value and its change indicator share one line (label sits above
494
+ as the caption). Previously the delta was a third stacked child, so it
495
+ rendered on its own line beneath the number. */
496
+ .statcard-breakdown-value-line {
497
+ display: flex;
498
+ align-items: baseline;
499
+ gap: var(--statcard-breakdown-value-gap, 6px);
500
+ flex-wrap: wrap;
501
+ }
502
+
491
503
  .statcard-breakdown-label {
492
504
  font-size: var(--statcard-breakdown-label-font-size, 11px);
493
505
  font-weight: var(--statcard-breakdown-label-font-weight, 400);
@@ -165,7 +165,10 @@
165
165
  <span
166
166
  class="builtin-thumb builtin-thumb-placeholder"
167
167
  data-pw={column.testId ? `${column.testId}-thumb-placeholder` : null}
168
- ></span>
168
+ >{typeof data.text1 === 'string' && data.text1
169
+ ? data.text1.charAt(0).toUpperCase()
170
+ : ''}</span
171
+ >
169
172
  {/if}
170
173
  <div class="builtin-two-line {alignmentClass}">
171
174
  <span class="builtin-primary-text">{typeof data.text1 === 'string' ? data.text1 : '-'}</span>
@@ -600,7 +603,15 @@
600
603
  }
601
604
 
602
605
  .builtin-thumb-placeholder {
606
+ display: flex;
607
+ align-items: center;
608
+ justify-content: center;
603
609
  background-color: var(--table-cell-thumb-placeholder-background, #f3f4f6);
610
+ color: var(--table-cell-thumb-placeholder-color, #6b7280);
611
+ font-size: var(--table-cell-thumb-placeholder-font-size, 14px);
612
+ font-weight: 600;
613
+ line-height: 1;
614
+ text-transform: uppercase;
604
615
  }
605
616
 
606
617
  .builtin-tag-array {
@@ -919,6 +919,7 @@
919
919
  }))}
920
920
  value={[String(effectivePageSize)]}
921
921
  disabled={pagination.isLoading ?? false}
922
+ usePortal
922
923
  testId={pagination.testId && `${pagination.testId}-page-size`}
923
924
  onchange={(selectedSizes) => {
924
925
  if (selectedSizes.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/svelte-ui-components",
3
- "version": "2.98.0",
3
+ "version": "2.98.2",
4
4
  "description": "A themeable Svelte 5 UI component library with CSS custom property driven styling",
5
5
  "keywords": [
6
6
  "svelte",