@kws3/ui 1.6.3 → 1.6.4

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.
@@ -242,7 +242,6 @@ Default value: `<span>{option[search_key] || option}</span>`
242
242
  * Tooltip text for the Clear All button
243
243
  */
244
244
  export let remove_all_tip = "Remove all";
245
-
246
245
  /**
247
246
  * Where to render the dropdown list.
248
247
  * Can be a DOM element or a `string` with the CSS selector of the element.
@@ -20,6 +20,10 @@ this property of each object will be returned as the value, Default: `"id"`
20
20
  @param {string} [selected_icon="check"] - Icon used to mark selected items in dropdown list, Default: `"check"`
21
21
  @param {string} [no_options_msg="No matching options"] - Message to display when no matching options are found, Default: `"No matching options"`
22
22
  @param {string} [remove_all_tip="Clear Selection"] - Tooltip text for the Clear selection button, Default: `"Clear Selection"`
23
+ @param {HTMLElement|string} [dropdown_portal=undefined] - Where to render the dropdown list.
24
+ Can be a DOM element or a `string` with the CSS selector of the element.
25
+
26
+ By default it renders in a custom container appended to `document.body`., Default: `undefined`
23
27
  @param {string} [class=""] - CSS classes for input container, Default: `""`
24
28
 
25
29
  ### Events
@@ -48,6 +52,7 @@ Default value: `<span>{option[search_key] || option}</span>`
48
52
  {selected_icon}
49
53
  {remove_all_tip}
50
54
  {no_options_msg}
55
+ {dropdown_portal}
51
56
  on:change={change}
52
57
  on:blur={blur}
53
58
  let:option
@@ -67,6 +72,8 @@ Default value: `<span>{option[search_key] || option}</span>`
67
72
 
68
73
  const fire = createEventDispatcher();
69
74
 
75
+ const rootContainerId = "kws-overlay-root";
76
+
70
77
  /**
71
78
  * Value of the Input
72
79
  *
@@ -127,6 +134,15 @@ Default value: `<span>{option[search_key] || option}</span>`
127
134
  * Tooltip text for the Clear selection button
128
135
  */
129
136
  export let remove_all_tip = "Clear Selection";
137
+ /**
138
+ * Where to render the dropdown list.
139
+ * Can be a DOM element or a `string` with the CSS selector of the element.
140
+ *
141
+ * By default it renders in a custom container appended to `document.body`.
142
+ *
143
+ * @type { HTMLElement|string}
144
+ */
145
+ export let dropdown_portal = "#" + rootContainerId;
130
146
 
131
147
  /**
132
148
  * CSS classes for input container
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kws3/ui",
3
- "version": "1.6.3",
3
+ "version": "1.6.4",
4
4
  "description": "UI components for use with Svelte v3 applications.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -29,5 +29,5 @@
29
29
  "text-mask-core": "^5.1.2",
30
30
  "tippy.js": "^6.3.1"
31
31
  },
32
- "gitHead": "a84e962f160c41cdcc6c2b7827b815d1f1b63e05"
32
+ "gitHead": "ffa4c66eba9bcb4efe022f39ac288c3bee9295da"
33
33
  }