@indielayer/ui 1.15.2 → 1.15.3

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/lib/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "1.15.2";
1
+ declare const _default: "1.15.3";
2
2
  export default _default;
package/lib/version.js CHANGED
@@ -1,4 +1,4 @@
1
- const e = "1.15.2";
1
+ const e = "1.15.3";
2
2
  export {
3
3
  e as default
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indielayer/ui",
3
- "version": "1.15.2",
3
+ "version": "1.15.3",
4
4
  "description": "Indielayer UI Components with Tailwind CSS build for Vue 3",
5
5
  "author": {
6
6
  "name": "João Teixeira",
@@ -41,6 +41,8 @@ const hasTooltip = computed(() => props.tooltip || slots.tooltip)
41
41
  const computedDisabled = computed(() => props.disabled || !hasTooltip.value)
42
42
 
43
43
  const arrowPositionClasses = computed(() => {
44
+ if (computedDisabled.value) return ''
45
+
44
46
  const placements = {
45
47
  top: '-bottom-2.5 left-1/2 -translate-x-1/2 w-3.5',
46
48
  bottom: '-top-2.5 left-1/2 -translate-x-1/2 w-3.5',
@@ -52,6 +54,8 @@ const arrowPositionClasses = computed(() => {
52
54
  })
53
55
 
54
56
  const arrowRotationClasses = computed(() => {
57
+ if (computedDisabled.value) return ''
58
+
55
59
  const placements = {
56
60
  top: '-rotate-45 origin-top-left',
57
61
  bottom: 'rotate-45 origin-bottom-left',
@@ -63,6 +67,8 @@ const arrowRotationClasses = computed(() => {
63
67
  })
64
68
 
65
69
  const animationOriginClasses = computed(() => {
70
+ if (computedDisabled.value) return ''
71
+
66
72
  const origins = {
67
73
  top: 'origin-bottom',
68
74
  bottom: 'origin-top',
@@ -176,32 +182,32 @@ const { classes, className } = useTheme('Tooltip', {}, props)
176
182
  @mouseleave="hideTooltip"
177
183
  >
178
184
  <slot></slot>
179
- </component>
180
185
 
181
- <teleport v-if="!computedDisabled" to="body">
182
- <transition
183
- enter-active-class="transition-opacity duration-150 ease-out"
184
- leave-active-class="transition-opacity duration-150 ease-in"
185
- enter-from-class="opacity-0"
186
- enter-to-class="opacity-100"
187
- leave-from-class="opacity-100"
188
- leave-to-class="opacity-0"
189
- >
190
- <div
191
- v-if="isVisible"
192
- ref="tooltipRef"
193
- :style="tooltipStyle"
194
- class="fixed z-[9999] pointer-events-none"
195
- :class="[
196
- classes.tooltip,
197
- animationOriginClasses
198
- ]"
186
+ <teleport v-if="!computedDisabled" to="body">
187
+ <transition
188
+ enter-active-class="transition-opacity duration-150 ease-out"
189
+ leave-active-class="transition-opacity duration-150 ease-in"
190
+ enter-from-class="opacity-0"
191
+ enter-to-class="opacity-100"
192
+ leave-from-class="opacity-100"
193
+ leave-to-class="opacity-0"
199
194
  >
200
- <slot name="tooltip">{{ tooltip }}</slot>
201
- <div :class="['absolute overflow-hidden shadow-lg z-10', arrowPositionClasses]">
202
- <div :class="['h-2.5 w-2.5 bg-secondary-700 transform border border-secondary-800', arrowRotationClasses]"></div>
195
+ <div
196
+ v-if="isVisible"
197
+ ref="tooltipRef"
198
+ :style="tooltipStyle"
199
+ class="fixed z-[10001] pointer-events-none"
200
+ :class="[
201
+ classes.tooltip,
202
+ animationOriginClasses
203
+ ]"
204
+ >
205
+ <slot name="tooltip">{{ tooltip }}</slot>
206
+ <div :class="['absolute overflow-hidden shadow-lg z-10', arrowPositionClasses]">
207
+ <div :class="['h-2.5 w-2.5 bg-secondary-700 transform border border-secondary-800', arrowRotationClasses]"></div>
208
+ </div>
203
209
  </div>
204
- </div>
205
- </transition>
206
- </teleport>
210
+ </transition>
211
+ </teleport>
212
+ </component>
207
213
  </template>
@@ -1,5 +1,5 @@
1
1
  export { default as XTooltip } from './Tooltip.vue'
2
- export type { TooltipProps, TooltipTheme } from './Tooltip.vue'
2
+ export type { TooltipProps, TooltipPosition, TooltipTheme } from './Tooltip.vue'
3
3
 
4
4
  export { default as XToggleTip } from './ToggleTip.vue'
5
5
  export type { ToggleTipProps } from './ToggleTip.vue'
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export default '1.15.2'
1
+ export default '1.15.3'