carbon-components-svelte 0.110.1 → 0.110.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-components-svelte",
3
- "version": "0.110.1",
3
+ "version": "0.110.2",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Svelte implementation of the Carbon Design System",
6
6
  "type": "module",
@@ -420,6 +420,10 @@
420
420
  applyOptionIfChanged("locale", locale, resolveLocale(locale));
421
421
  applyOptionIfChanged("dateFormat", dateFormat);
422
422
  for (const [option, value] of Object.entries(flatpickrProps)) {
423
+ // `static` is decided by `effectivePortalMenu` at creation time
424
+ // (see below); re-applying the default `flatpickrProps.static`
425
+ // here would clobber that on every reactive re-run.
426
+ if (option === "static" && effectivePortalMenu) continue;
423
427
  applyOptionIfChanged(option, value);
424
428
  }
425
429
  return;
@@ -544,6 +548,7 @@
544
548
  }
545
549
  $: if (calendar) {
546
550
  calendar.set("clickOpens", !$readonlyAny);
551
+ calendar.set("allowInput", !$readonlyAny);
547
552
  if ($readonlyAny && calendar.isOpen) calendar.close();
548
553
  }
549
554
 
@@ -822,6 +822,7 @@
822
822
  } else if (event.key === "Escape") {
823
823
  close("escape-key");
824
824
  } else if (event.key === " ") {
825
+ if (readonly) event.preventDefault();
825
826
  if (!open) open = true;
826
827
  } else if (event.key === "Backspace" && value === "") {
827
828
  selectedIds = [];