@juspay/svelte-ui-components 2.98.1 → 2.99.0

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.
@@ -244,7 +244,12 @@
244
244
  }
245
245
 
246
246
  .overlay-active {
247
- background-color: var(--background-color, #00000066);
247
+ /* Prefer the modal-specific token; fall back to the legacy generic
248
+ --background-color (kept for backward compatibility), then the default.
249
+ The generic name collides with app-level --background-color tokens, which
250
+ silently override the overlay; --modal-overlay-background-color lets a
251
+ consumer theme the backdrop without that collision. */
252
+ background-color: var(--modal-overlay-background-color, var(--background-color, #00000066));
248
253
  backdrop-filter: var(--modal-overlay-backdrop-filter, none);
249
254
  -webkit-backdrop-filter: var(--modal-overlay-backdrop-filter, none);
250
255
  pointer-events: auto;
@@ -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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/svelte-ui-components",
3
- "version": "2.98.1",
3
+ "version": "2.99.0",
4
4
  "description": "A themeable Svelte 5 UI component library with CSS custom property driven styling",
5
5
  "keywords": [
6
6
  "svelte",