@stubber/form-fields 2.0.14 → 2.0.15

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.
@@ -1,5 +1,4 @@
1
- <script context="module">import { get } from "svelte/store";
2
- export const select_field_param_spec = {
1
+ <script context="module">export const select_field_param_spec = {
3
2
  spec: {
4
3
  fields: {
5
4
  options: {
@@ -95,8 +94,16 @@ const handle_select = (item_key, trigger) => {
95
94
  }
96
95
  closeAndFocusTrigger(trigger);
97
96
  };
97
+ let triggerEl;
98
+ let portalTarget = null;
99
+ $: if (triggerEl && !portalTarget) {
100
+ const root = triggerEl.getRootNode();
101
+ portalTarget = root instanceof ShadowRoot ? root.host : document.body;
102
+ }
98
103
  </script>
99
104
 
105
+ <div class="invisible hidden" bind:this={triggerEl} />
106
+
100
107
  <FieldLabel {fieldStore} />
101
108
  <Popover.Root bind:open let:ids>
102
109
  <Popover.Trigger asChild let:builder>
@@ -1,5 +1,5 @@
1
1
  import { SvelteComponent } from "svelte";
2
- import { type Writable } from "svelte/store";
2
+ import type { Writable } from "svelte/store";
3
3
  import type { IBaseField, IBuiltField, IInitialForm } from "../interfaces";
4
4
  export interface ISelectFieldOption {
5
5
  label: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stubber/form-fields",
3
- "version": "2.0.14",
3
+ "version": "2.0.15",
4
4
  "description": "An automatic form builder based on field specifications",
5
5
  "keywords": [
6
6
  "components",