@juspay/svelte-ui-components 2.69.0 → 2.69.1

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.
@@ -272,6 +272,17 @@
272
272
  onopentoggle?.({ open: false });
273
273
  }
274
274
 
275
+ // The trigger toggles: clicking it while the panel is already open dismisses
276
+ // the picker instead of re-opening it onto itself. The open-only handler left
277
+ // a second click feeling dead — the panel could only be closed by clicking away.
278
+ function togglePicker(): void {
279
+ if (isOpen) {
280
+ closePicker();
281
+ } else {
282
+ openPicker();
283
+ }
284
+ }
285
+
275
286
  function openComparePicker(): void {
276
287
  compareFocusReturnEl =
277
288
  document.activeElement instanceof HTMLElement ? document.activeElement : null;
@@ -504,7 +515,7 @@
504
515
  <!-- Trigger wrapper — bind:this here so outside-click detection works -->
505
516
  <div bind:this={triggerRef} class="drp-trigger-wrapper">
506
517
  <Button
507
- onclick={openPicker}
518
+ onclick={togglePicker}
508
519
  ariaLabel="Open date picker"
509
520
  classes="drp-trigger {isOpen ? 'drp-trigger-open' : ''}"
510
521
  >
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/svelte-ui-components",
3
- "version": "2.69.0",
3
+ "version": "2.69.1",
4
4
  "description": "A themeable Svelte 5 UI component library with CSS custom property driven styling",
5
5
  "keywords": [
6
6
  "svelte",