@bagelink/vue 1.4.155 → 1.4.159

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.
Files changed (32) hide show
  1. package/dist/components/ListItem.vue.d.ts +2 -2
  2. package/dist/components/ListItem.vue.d.ts.map +1 -1
  3. package/dist/components/Loading.vue.d.ts +3 -2
  4. package/dist/components/Loading.vue.d.ts.map +1 -1
  5. package/dist/components/Modal.vue.d.ts.map +1 -1
  6. package/dist/components/form/inputs/ColorInput.vue.d.ts.map +1 -1
  7. package/dist/components/form/inputs/NumberInput.vue.d.ts.map +1 -1
  8. package/dist/components/form/inputs/RichText/index.vue.d.ts.map +1 -1
  9. package/dist/components/layout/TabsNav.vue.d.ts.map +1 -1
  10. package/dist/components/lightbox/Lightbox.vue.d.ts.map +1 -1
  11. package/dist/index.cjs +21 -21
  12. package/dist/index.mjs +21 -21
  13. package/dist/style.css +1 -1
  14. package/dist/types/BtnOptions.d.ts +3 -0
  15. package/dist/types/BtnOptions.d.ts.map +1 -1
  16. package/dist/utils/sizeParsing.d.ts +3 -0
  17. package/dist/utils/sizeParsing.d.ts.map +1 -0
  18. package/package.json +1 -1
  19. package/src/components/ListItem.vue +42 -35
  20. package/src/components/Loading.vue +73 -25
  21. package/src/components/Modal.vue +40 -24
  22. package/src/components/form/inputs/ColorInput.vue +5 -5
  23. package/src/components/form/inputs/NumberInput.vue +2 -2
  24. package/src/components/form/inputs/RichText/index.vue +147 -271
  25. package/src/components/layout/AppSidebar.vue +1 -1
  26. package/src/components/layout/TabsNav.vue +24 -22
  27. package/src/components/lightbox/Lightbox.vue +1 -0
  28. package/src/styles/colors.css +502 -3
  29. package/src/styles/inputs.css +12 -4
  30. package/src/styles/mobileColors.css +4167 -3739
  31. package/src/types/BtnOptions.ts +4 -0
  32. package/src/utils/sizeParsing.ts +26 -0
@@ -35,9 +35,15 @@ function updateIndicator() {
35
35
  if (!tabsWrap.value) return
36
36
  const activeTab = tabs.value.find(tab => tab.classList.contains('active'))
37
37
  if (activeTab) {
38
- const { offsetLeft, offsetWidth } = activeTab
39
- tabsWrap.value.style.setProperty('--indicator-left', `${offsetLeft}px`)
40
- tabsWrap.value.style.setProperty('--indicator-width', `${offsetWidth}px`)
38
+ // Wait a bit more to ensure CSS is fully loaded and elements are properly sized
39
+ setTimeout(() => {
40
+ const { offsetLeft, offsetWidth } = activeTab
41
+ if (offsetLeft >= 0 && offsetWidth > 0) { // Ensure valid measurements
42
+ tabsWrap.value?.style.setProperty('--indicator-left', `${offsetLeft}px`)
43
+ tabsWrap.value?.style.setProperty('--indicator-width', `${offsetWidth}px`)
44
+ tabsWrap.value?.style.setProperty('--indicator-opacity', '1')
45
+ }
46
+ }, 10)
41
47
  }
42
48
  })
43
49
  }
@@ -69,7 +75,12 @@ watch(
69
75
 
70
76
  onMounted(() => {
71
77
  tabs.value = Array.from(tabsWrap.value?.querySelectorAll('.bgl_tab') || [])
72
- updateIndicator()
78
+
79
+ // Wait for the next frame to ensure all CSS and layout calculations are done
80
+ requestAnimationFrame(() => {
81
+ updateIndicator()
82
+ })
83
+
73
84
  window.addEventListener('resize', updateIndicator)
74
85
  })
75
86
 
@@ -86,24 +97,14 @@ onBeforeUnmount(() => {
86
97
  </script>
87
98
 
88
99
  <template>
89
- <div
90
- ref="tabsWrap" class="grid auto-flow-columns relative fit-content bgl_tabs_wrap overflow-hidden"
91
- :class="{ 'bgl_flat-tabs': flat, 'bgl_vertical-tabs': vertical }"
92
- >
93
- <slot name="tabs" v-bind="{ selectTab, isActive, tabLabel, tabs }">
94
- <button
95
- v-for="(tab, i) in props.tabs"
96
- :key="i"
97
- type="button"
98
- :class="{ active: isActive(tab) }"
99
- class="bgl_tab relative z-1"
100
- @click="selectTab(tab)"
101
- >
102
- <Icon v-if="typeof tab !== 'string' && tab.icon" :icon="tab.icon" />
103
- {{ tabLabel(tab) }}
104
- </button>
100
+ <div ref="tabsWrap" class="grid auto-flow-columns relative fit-content bgl_tabs_wrap overflow-hidden" :class="{ 'bgl_flat-tabs': flat, 'bgl_vertical-tabs': vertical }">
101
+ <slot name="tabs" v-bind="{ selectTab, isActive, tabLabel, tabs }">
102
+ <button v-for="(tab, i) in props.tabs" :key="i" type="button" :class="{ active: isActive(tab) }" class="bgl_tab relative z-1" @click="selectTab(tab)">
103
+ <Icon v-if="typeof tab !== 'string' && tab.icon" :icon="tab.icon" />
104
+ {{ tabLabel(tab) }}
105
+ </button>
105
106
  </slot>
106
- </div>
107
+ </div>
107
108
  </template>
108
109
 
109
110
  <style scoped>
@@ -127,7 +128,6 @@ onBeforeUnmount(() => {
127
128
  border-radius: var(--input-border-radius);
128
129
  transition: var(--bgl-transition);
129
130
  color: inherit
130
-
131
131
  }
132
132
 
133
133
  .bgl_tab:hover {
@@ -145,6 +145,8 @@ onBeforeUnmount(() => {
145
145
  border-radius: var(--input-border-radius);
146
146
  transition: var(--bgl-transition);
147
147
  z-index: 0;
148
+ /* Hide indicator initially until position is calculated */
149
+ opacity: var(--indicator-opacity, 0);
148
150
  }
149
151
  .bgl_flat-tabs.bgl_tabs_wrap {
150
152
  background: transparent;
@@ -210,6 +210,7 @@ defineExpose({ open, close })
210
210
  }
211
211
  .lightbox-image{
212
212
  object-fit: contain;
213
+ width: fit-content;
213
214
  }
214
215
 
215
216
  .bgl-lightbox-overlay {