@dosgato/dialog 1.4.4 → 1.4.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.
@@ -13,7 +13,6 @@
13
13
 
14
14
  const tooltipId = randomid()
15
15
  const anchorName = `--tip-${tooltipId}`
16
- let triggerEl: HTMLSpanElement
17
16
  let slotwrapper: HTMLSpanElement
18
17
 
19
18
  let hasFocusableChild = false
@@ -21,8 +20,8 @@
21
20
 
22
21
  async function reactToTip (..._: any[]) {
23
22
  await tick()
24
- if (!triggerEl) return
25
- const focusable = triggerEl.querySelector('a[href], button, input, select, textarea, [tabindex]')
23
+ if (!slotwrapper) return
24
+ const focusable = slotwrapper.querySelector('a[href], button, input, select, textarea, [tabindex]')
26
25
  if (focusable) {
27
26
  hasFocusableChild = true
28
27
  focusable.setAttribute('aria-describedby', tooltipId)
@@ -35,7 +34,7 @@
35
34
 
36
35
  {#if tip}
37
36
  <div class="tooltip-wrapper">
38
- <span bind:this={slotwrapper} class="tooltip-slot" style:anchor-name={anchorName} bind:this={triggerEl}>
37
+ <span bind:this={slotwrapper} class="tooltip-slot">
39
38
  <slot />
40
39
  {#if !hasFocusableChild}<ScreenReaderOnly>tooltip: {tip}</ScreenReaderOnly>{/if}
41
40
  </span>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dosgato/dialog",
3
3
  "description": "A component library for building forms that edit a JSON document.",
4
- "version": "1.4.4",
4
+ "version": "1.4.5",
5
5
  "scripts": {
6
6
  "prepublishOnly": "svelte-package",
7
7
  "dev": "vite dev --force",