@humandialog/forms.svelte 1.1.4 → 1.1.5

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.
@@ -26,8 +26,13 @@ afterUpdate(() => {
26
26
  let container_rect = new DOMRect(m, 0, window.innerWidth - 2 * m, window.innerHeight);
27
27
  if (isDeviceSmallerThan("sm")) {
28
28
  const sel = window.getSelection();
29
+ console.log("sel", sel);
29
30
  if (sel && sel.rangeCount > 0 && sel.focusNode && sel.focusNode.nodeType == sel.focusNode.TEXT_NODE) {
30
- container_rect.height -= 300;
31
+ const el = sel.focusNode.parentElement;
32
+ if (el && (el.isContentEditable || el.contentEditable == "true" || el.tagName == "INPUT")) {
33
+ console.log("keyboard visible, move menu 300px up", el);
34
+ container_rect.height -= 300;
35
+ }
31
36
  }
32
37
  }
33
38
  let xShifted = false;
package/desk.svelte CHANGED
@@ -156,10 +156,18 @@
156
156
  }
157
157
 
158
158
  //$: screen.width = innerWidth;
159
+
160
+ $: switchBodyClass($dark_mode_store);
161
+ function switchBodyClass(...args)
162
+ {
163
+ document.body.className = $dark_mode_store;
164
+ }
165
+
159
166
  </script>
160
167
 
161
168
  <svelte:window bind:innerWidth bind:outerWidth bind:innerHeight bind:outerHeight />
162
169
 
170
+
163
171
  <!--AuthorizedView {autoRedirectToSignIn}-->
164
172
 
165
173
  {#key $wholeAppReloader}
@@ -290,6 +298,8 @@
290
298
  /* Track */
291
299
  /* Handle */
292
300
  /* Handle on hover */
301
+ --tw-bg-opacity: 1;
302
+ background-color: rgb(255 255 255/var(--tw-bg-opacity));
293
303
  }
294
304
  #__hd_svelte_layout_root ::-webkit-scrollbar {
295
305
  width: 10px;
@@ -309,6 +319,8 @@
309
319
  /* Track */
310
320
  /* Handle */
311
321
  /* Handle on hover */
322
+ --tw-bg-opacity: 1;
323
+ background-color: rgb(28 25 23/var(--tw-bg-opacity));
312
324
  }
313
325
  #__hd_svelte_layout_root.dark ::-webkit-scrollbar {
314
326
  width: 10px;
@@ -329,7 +341,6 @@
329
341
  background-color: rgb(255 255 255/var(--tw-bg-opacity));
330
342
  }
331
343
 
332
- /* dark:bg-gray-900 */
333
344
  :global(body.dark) {
334
345
  --tw-bg-opacity: 1;
335
346
  background-color: rgb(28 25 23/var(--tw-bg-opacity));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@humandialog/forms.svelte",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "Basic Svelte UI components for Object Reef applications",
5
5
  "devDependencies": {
6
6
  "@playwright/test": "^1.28.1",
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "type": "module",
28
28
  "dependencies": {
29
- "@humandialog/auth.svelte": "^1.8.1",
29
+ "@humandialog/auth.svelte": "^1.8.2",
30
30
  "flowbite-svelte": "^0.44.4",
31
31
  "svelte-icons": "^2.1.0",
32
32
  "svelte-spa-router": "^4.0.1"