@ozdao/martyrs 0.2.456 → 0.2.458

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 (156) hide show
  1. package/dist/{Media-1oukRVfv.js → Media-B9V7fmz-.js} +1 -1
  2. package/dist/{Media-q-XJSM_H.mjs → Media-Df1hO2ZT.mjs} +1 -1
  3. package/dist/{main-yXkgrjj8.mjs → main-DbrX42CV.mjs} +99 -95
  4. package/dist/{main-C7jGMDJC.js → main-DviXUDiB.js} +1 -1
  5. package/dist/martyrs/src/components/EditImages/EditImages.vue.cjs +0 -93
  6. package/dist/martyrs/src/components/EditImages/EditImages.vue.cjs.map +1 -1
  7. package/dist/martyrs/src/components/EditImages/EditImages.vue.js +1 -94
  8. package/dist/martyrs/src/components/EditImages/EditImages.vue.js.map +1 -1
  9. package/dist/martyrs/src/components/EditImages/EditImages.vue2.cjs +93 -0
  10. package/dist/martyrs/src/components/EditImages/EditImages.vue2.cjs.map +1 -1
  11. package/dist/martyrs/src/components/EditImages/EditImages.vue2.js +94 -1
  12. package/dist/martyrs/src/components/EditImages/EditImages.vue2.js.map +1 -1
  13. package/dist/martyrs/src/components/Tab/{Tab.vue.cjs → Tab.vue2.cjs} +2 -2
  14. package/dist/martyrs/src/components/Tab/Tab.vue2.cjs.map +1 -0
  15. package/dist/martyrs/src/components/Tab/{Tab.vue.js → Tab.vue2.js} +2 -2
  16. package/dist/martyrs/src/components/Tab/{Tab.vue.cjs.map → Tab.vue2.js.map} +1 -1
  17. package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.cjs +1 -1
  18. package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.js +1 -1
  19. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +1 -1
  20. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +1 -1
  21. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.cjs +1 -1
  22. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
  23. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileBlogposts.vue.cjs +1 -1
  24. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileBlogposts.vue.js +1 -1
  25. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs +1 -1
  26. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js +1 -1
  27. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +1 -1
  28. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +1 -1
  29. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.cjs +1 -1
  30. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +1 -1
  31. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.cjs +1 -1
  32. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +1 -1
  33. package/dist/martyrs/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  34. package/dist/martyrs/src/modules/backoffice/components/pages/Dashboard.vue.cjs.map +1 -1
  35. package/dist/martyrs/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  36. package/dist/martyrs/src/modules/backoffice/components/pages/Dashboard.vue.js.map +1 -1
  37. package/dist/martyrs/src/modules/community/community.client.js +27 -27
  38. package/dist/martyrs/src/modules/community/community.client.js.map +1 -1
  39. package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.cjs +6 -5
  40. package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.cjs.map +1 -1
  41. package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.js +6 -5
  42. package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.js.map +1 -1
  43. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  44. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  45. package/dist/martyrs/src/modules/events/components/pages/Events.vue.cjs +1 -1
  46. package/dist/martyrs/src/modules/events/components/pages/Events.vue.cjs.map +1 -1
  47. package/dist/martyrs/src/modules/events/components/pages/Events.vue.js +1 -1
  48. package/dist/martyrs/src/modules/events/components/pages/Events.vue.js.map +1 -1
  49. package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.cjs +1 -1
  50. package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.js +1 -1
  51. package/dist/martyrs/src/modules/events/components/sections/SelectDate.vue.cjs +1 -1
  52. package/dist/martyrs/src/modules/events/components/sections/SelectDate.vue.cjs.map +1 -1
  53. package/dist/martyrs/src/modules/events/components/sections/SelectDate.vue.js +1 -1
  54. package/dist/martyrs/src/modules/events/components/sections/SelectDate.vue.js.map +1 -1
  55. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +2 -2
  56. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs.map +1 -1
  57. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  58. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js.map +1 -1
  59. package/dist/martyrs/src/modules/globals/views/components/layouts/App.vue.cjs +14 -6
  60. package/dist/martyrs/src/modules/globals/views/components/layouts/App.vue.cjs.map +1 -1
  61. package/dist/martyrs/src/modules/globals/views/components/layouts/App.vue.js +14 -6
  62. package/dist/martyrs/src/modules/globals/views/components/layouts/App.vue.js.map +1 -1
  63. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +15 -2
  64. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs.map +1 -1
  65. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +15 -2
  66. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js.map +1 -1
  67. package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.cjs +23 -28
  68. package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.cjs.map +1 -1
  69. package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.js +24 -29
  70. package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.js.map +1 -1
  71. package/dist/martyrs/src/modules/globals/views/components/partials/Sidebar.vue.cjs +1 -3
  72. package/dist/martyrs/src/modules/globals/views/components/partials/Sidebar.vue.cjs.map +1 -1
  73. package/dist/martyrs/src/modules/globals/views/components/partials/Sidebar.vue.js +1 -3
  74. package/dist/martyrs/src/modules/globals/views/components/partials/Sidebar.vue.js.map +1 -1
  75. package/dist/martyrs/src/modules/globals/views/components/sections/SectionPageTitle.vue.cjs +1 -1
  76. package/dist/martyrs/src/modules/globals/views/components/sections/SectionPageTitle.vue.js +1 -1
  77. package/dist/martyrs/src/modules/landing/components/sections/SectionFeatures.vue.cjs +1 -1
  78. package/dist/martyrs/src/modules/landing/components/sections/SectionFeatures.vue.cjs.map +1 -1
  79. package/dist/martyrs/src/modules/landing/components/sections/SectionFeatures.vue.js +1 -1
  80. package/dist/martyrs/src/modules/landing/components/sections/SectionFeatures.vue.js.map +1 -1
  81. package/dist/martyrs/src/modules/landing/components/sections/SectionFeaturesImages.vue.cjs +2 -2
  82. package/dist/martyrs/src/modules/landing/components/sections/SectionFeaturesImages.vue.cjs.map +1 -1
  83. package/dist/martyrs/src/modules/landing/components/sections/SectionFeaturesImages.vue.js +2 -2
  84. package/dist/martyrs/src/modules/landing/components/sections/SectionFeaturesImages.vue.js.map +1 -1
  85. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  86. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
  87. package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.cjs +2 -2
  88. package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.cjs.map +1 -1
  89. package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.js +2 -2
  90. package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.js.map +1 -1
  91. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  92. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
  93. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  94. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +1 -1
  95. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  96. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  97. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  98. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
  99. package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  100. package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  101. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  102. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
  103. package/dist/martyrs/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  104. package/dist/martyrs/src/modules/products/components/pages/Leftovers.vue.js +1 -1
  105. package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +1 -1
  106. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +1 -1
  107. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +2 -2
  108. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
  109. package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs +1 -1
  110. package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +1 -1
  111. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  112. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  113. package/dist/martyrs/src/modules/rents/views/components/pages/GanttChart.vue.cjs +1 -1
  114. package/dist/martyrs/src/modules/rents/views/components/pages/GanttChart.vue.js +1 -1
  115. package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.cjs +1 -1
  116. package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.js +1 -1
  117. package/dist/martyrs/src/modules/reports/components/pages/BackofficeReports.vue.cjs +1 -1
  118. package/dist/martyrs/src/modules/reports/components/pages/BackofficeReports.vue.cjs.map +1 -1
  119. package/dist/martyrs/src/modules/reports/components/pages/BackofficeReports.vue.js +1 -1
  120. package/dist/martyrs/src/modules/reports/components/pages/BackofficeReports.vue.js.map +1 -1
  121. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
  122. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +1 -1
  123. package/dist/martyrs/src/modules/wallet/views/components/pages/Payments.vue.cjs +1 -1
  124. package/dist/martyrs/src/modules/wallet/views/components/pages/Payments.vue.cjs.map +1 -1
  125. package/dist/martyrs/src/modules/wallet/views/components/pages/Payments.vue.js +1 -1
  126. package/dist/martyrs/src/modules/wallet/views/components/pages/Payments.vue.js.map +1 -1
  127. package/dist/martyrs.cjs.js +1 -1
  128. package/dist/martyrs.css +1 -1
  129. package/dist/martyrs.es.js +1 -1
  130. package/dist/style.css +87 -113
  131. package/package.json +1 -1
  132. package/src/components/Slider/Slider.vue +35 -11
  133. package/src/modules/backoffice/components/admin/Users.vue +1 -1
  134. package/src/modules/backoffice/components/pages/Dashboard.vue +1 -1
  135. package/src/modules/community/components/sections/HotPosts.vue +5 -5
  136. package/src/modules/events/components/pages/Events.vue +1 -1
  137. package/src/modules/events/components/sections/SelectDate.vue +1 -1
  138. package/src/modules/gallery/components/sections/BackofficeGallery.vue +1 -1
  139. package/src/modules/globals/views/components/layouts/App.vue +16 -7
  140. package/src/modules/globals/views/components/layouts/Client.vue +17 -1
  141. package/src/modules/globals/views/components/partials/Footer.vue +2 -2
  142. package/src/modules/globals/views/components/partials/Navigation.vue +19 -65
  143. package/src/modules/globals/views/components/partials/Sidebar.vue +1 -11
  144. package/src/modules/landing/components/sections/SectionFeatures.vue +1 -1
  145. package/src/modules/landing/components/sections/SectionFeaturesImages.vue +1 -1
  146. package/src/modules/orders/components/pages/Orders.vue +1 -1
  147. package/src/modules/reports/components/pages/BackofficeReports.vue +1 -1
  148. package/src/modules/wallet/views/components/pages/Payments.vue +1 -1
  149. package/src/modules/wallet/views/components/pages/Wallet.vue +2 -2
  150. package/src/styles/config.scss +11 -0
  151. package/src/styles/responsive.scss +1 -1
  152. package/dist/martyrs/src/components/Slider/Slider.vue.cjs +0 -110
  153. package/dist/martyrs/src/components/Slider/Slider.vue.cjs.map +0 -1
  154. package/dist/martyrs/src/components/Slider/Slider.vue.js +0 -110
  155. package/dist/martyrs/src/components/Slider/Slider.vue.js.map +0 -1
  156. package/dist/martyrs/src/components/Tab/Tab.vue.js.map +0 -1
@@ -5,16 +5,6 @@ import { useRouter } from 'vue-router'
5
5
  import * as globals from '@martyrs/src/modules/globals/views/store/globals'
6
6
  import * as auth from '@martyrs/src/modules/auth/views/store/auth'
7
7
 
8
- // Import icons
9
- import IconProducts from '@martyrs/src/modules/icons/entities/IconProducts.vue'
10
- import IconPayments from '@martyrs/src/modules/icons/entities/IconPayments.vue'
11
- import IconEvents from '@martyrs/src/modules/icons/entities/IconEvents.vue'
12
- import IconGroups from '@martyrs/src/modules/icons/entities/IconGroups.vue'
13
- import IconCommunity from '@martyrs/src/modules/icons/entities/IconCommunity.vue'
14
- import IconGallery from '@martyrs/src/modules/icons/entities/IconGallery.vue'
15
- import IconOrders from '@martyrs/src/modules/icons/entities/IconOrders.vue'
16
- import IconLeftovers from '@martyrs/src/modules/icons/entities/IconLeftovers.vue'
17
-
18
8
  const router = useRouter()
19
9
 
20
10
  import Dropdown from '@martyrs/src/components/Dropdown/Dropdown.vue'
@@ -36,19 +26,18 @@ const props = defineProps({
36
26
  }
37
27
  })
38
28
 
39
- const emit = defineEmits([
29
+ const emits = defineEmits([
40
30
  'closeSidebar'
41
31
  ])
42
32
 
43
33
  const expandedSections = ref([])
44
34
 
45
35
  // Use navigationItems from props instead of nagigationItems
46
- const menuItems = computed(() => props.navigationItems || [])
47
36
 
48
37
  const toggleSection = (title) => {
49
38
  if (!props.stateSidebar) {
50
39
  if (menuItems.value.flatMap(section => section.items).find(item => item.title === title && item.subItems)) {
51
- emit('closeSidebar')
40
+ emits('closeSidebar')
52
41
  setTimeout(() => {
53
42
  expandedSections.value.push(title)
54
43
  }, 50)
@@ -93,17 +82,16 @@ const processRoute = (route) => {
93
82
  ]"
94
83
  >
95
84
  <div
96
- v-for="section in menuItems"
85
+ v-for="section in props.navigationItems"
97
86
  v-show="!section.visible || (typeof section.visible === 'function' ? section.visible(auth.state) : true)"
98
87
  :key="section.category"
99
88
  :class="[
100
89
  horizontal ? 'w-max flex-child-default flex flex-nowrap' : '',
101
90
  stateSidebar && !horizontal ? 'mn-t-medium' : '',
102
91
  ]"
103
- class=""
104
92
  >
105
93
  <div
106
- class="sidebar-category"
94
+ class="uppercase t-medium t-transp p-small"
107
95
  :class="{
108
96
  'hidden': !stateSidebar || horizontal,
109
97
  'visible': stateSidebar && !horizontal,
@@ -121,17 +109,16 @@ const processRoute = (route) => {
121
109
  >
122
110
  <li
123
111
  v-for="item in section.items"
124
- :key="item.title"
125
112
  v-show="!item.visible || (typeof item.visible === 'function' ? item.visible(auth.state) : true)"
126
113
  class="flex-center"
127
114
  :class="[
128
- stateSidebar ? '' : '',
129
115
  horizontal ? 'w-100 flex flex-nowrap' : '',
130
116
  stateSidebar && !horizontal ? '' : 'aspect-1x1'
131
117
  ]"
118
+ :key="item.title"
132
119
  >
133
120
  <button
134
- @click="item.route ? (isPhone ? (stateSidebar = false) : null, router.push(processRoute(item.route))) : null"
121
+ @click="item.route ? (isPhone ? (stateSidebar = false) : null, $route.path !== processRoute(item.route) ? router.push(processRoute(item.route)) : stateSidebar = false) : null"
135
122
  class="flex-child-default flex-center gap-thin flex sidebar-item-btn"
136
123
  :class="[
137
124
  stateSidebar || horizontal ? 'expanded-item pd-thin' : 'w-100 h-100 justify-center',
@@ -146,7 +133,12 @@ const processRoute = (route) => {
146
133
  class="i-medium flex-child-default"
147
134
  :fill="globals.state.theme.darkmode || theme === 'dark' ? 'rgba(255,255,255,0.7)' : 'rgba(0,0,0,0.25)'"
148
135
  />
149
- <span v-if="!item.iconComponent && !horizontal" class="i-medium sidebar-item-icon t-lh-1 flex-child-default">{{ item.icon }}</span>
136
+ <span
137
+ v-if="!item.iconComponent && !horizontal"
138
+ class="i-medium sidebar-item-icon t-lh-1 flex-child-default"
139
+ >
140
+ {{ item.icon }}
141
+ </span>
150
142
 
151
143
  <span
152
144
  class="w-100 t-left sidebar-item-title"
@@ -163,39 +155,7 @@ const processRoute = (route) => {
163
155
  >
164
156
 
165
157
  </span>
166
-
167
- <div v-if="item.route && $route.path === processRoute(item.route) && !horizontal" class="sidebar-highlight-indicator" />
168
- <Dropdown
169
- v-if="false"
170
- :label="hello"
171
- :align="'right'"
172
- class="cursor-pointer pos-absolute pos-r-regular pos-t-regular pd-thin radius-extra "
173
- >
174
- <ul
175
- v-if="item.subItems"
176
- class="sidebar-submenu"
177
- >
178
- <li v-for="subItem in item.subItems" :key="subItem.title">
179
- <a
180
- @click="subItem.route && router.push(subItem.route)"
181
- href="#"
182
- class="sidebar-subitem-link"
183
- >
184
- <component
185
- v-if="subItem.iconComponent"
186
- :is="subItem.iconComponent"
187
- class="sidebar-subitem-icon i-medium"
188
- :fill="globals.state.theme.darkmode || theme === 'dark' ? 'rgba(255,255,255,0.7)' : 'rgba(0,0,0,0.25)'"
189
- />
190
- <span v-else class="sidebar-subitem-icon">{{ subItem.icon }}</span>
191
- <span class="sidebar-subitem-title">{{ subItem.title }}</span>
192
- </a>
193
- </li>
194
- </ul>
195
- </Dropdown>
196
158
  </button>
197
- <!-- { component: IconEllipsis, class: 'i-regular t-transp' } -->
198
-
199
159
 
200
160
  <transition
201
161
  enter-active-class="dropdown-enter"
@@ -211,9 +171,13 @@ const processRoute = (route) => {
211
171
  >
212
172
  <li v-for="subItem in item.subItems" :key="subItem.title">
213
173
  <a
214
- @click="subItem.route && router.push(subItem.route)"
174
+ @click="subItem.route && (this.$route.path !== subItem.route ? router.push(subItem.route) : (isPhone ? stateSidebar = false : null))"
215
175
  href="#"
216
176
  class="sidebar-subitem-link flex flex-nowrap gap-thin pd-thin radius-small"
177
+ :class="[
178
+ subItem.route && $route.path === processRoute(subItem.route) ? theme === 'light' ? 'bg-light' : 'bg-dark' : '',
179
+ theme === 'light' ? 'hover-bg-light' : 'hover-bg-dark'
180
+ ]"
217
181
  >
218
182
  <component
219
183
  v-if="subItem.iconComponent"
@@ -280,16 +244,6 @@ const processRoute = (route) => {
280
244
 
281
245
 
282
246
 
283
- .sidebar-category {
284
- font-size: 0.75rem;
285
- font-weight: 600;
286
- text-transform: uppercase;
287
- letter-spacing: 0.05em;
288
- padding-left: var(--regular);
289
- padding-right: var(--regular);
290
- transition: opacity 0.2s;
291
- color: var(--grey-medium);
292
- }
293
247
 
294
248
  .sidebar-highlight-indicator {
295
249
  position: absolute;
@@ -333,13 +287,13 @@ const processRoute = (route) => {
333
287
  }
334
288
 
335
289
  .hidden {
336
- opacity: 0;
290
+ /* opacity: 0;*/
337
291
  width: 0;
338
292
  display: none;
339
293
  }
340
294
 
341
295
  .visible {
342
- opacity: 1;
296
+ /* opacity: 1;*/
343
297
  display: block;
344
298
  }
345
299
 
@@ -46,10 +46,8 @@ router.beforeEach((to, from) => {
46
46
 
47
47
  <template>
48
48
  <aside
49
- class="transition-linear w-min-0 o-hidden flex-child-default z-index-2 br-r br-solid flex flex-column h-100"
49
+ class="transition-linear w-min-0 o-hidden flex-child-default z-index-2 br-r br-solid flex flex-column h-100"
50
50
  :class="[
51
- 'sidebar-container',
52
- //
53
51
  stateSidebar
54
52
  ? `${width} w-min-10 tablet:w-min-100 tablet:w-100 mobile:w-min-100 mobile:w-100`
55
53
  : `${widthHidden} mobile:w-0 br-zero`,
@@ -94,14 +92,6 @@ router.beforeEach((to, from) => {
94
92
  </template>
95
93
 
96
94
  <style scoped>
97
- /* Base sidebar styling */
98
- .sidebar-container {
99
- position: relative;
100
- left: 0;
101
- top: 0;
102
- transition: all 0.3s ease-in-out;
103
- }
104
-
105
95
  .dark-mode-toggle {
106
96
  align-items: center;
107
97
  width: 100%;
@@ -2,7 +2,7 @@
2
2
  <section id="howtobuy">
3
3
  <h2 class="w-100 mn-b-small"><span class="d-inline-block w-max-50r" v-html="t('title')"/></h2>
4
4
 
5
- <div class="cols-3 gap-thin">
5
+ <div class="cols-3 mobile:cols-1 gap-thin">
6
6
  <div
7
7
  v-for="feature in tm('features')"
8
8
  :key="feature.title"
@@ -8,7 +8,7 @@
8
8
  </p>
9
9
  </div>
10
10
 
11
- <div class="cols-3 gap-thin">
11
+ <div class="cols-3 mobile:cols-1 gap-thin">
12
12
 
13
13
  <div
14
14
  v-for="feature in tm('features')"
@@ -52,7 +52,7 @@
52
52
  v-slot="{
53
53
  items
54
54
  }"
55
- class="gap-thin cols-3"
55
+ class="gap-thin cols-3 mobile:cols-1"
56
56
  >
57
57
  <router-link
58
58
  v-if="route.meta.context !== 'user'"
@@ -4,7 +4,7 @@
4
4
  <h3 class="mn-r-medium">Reports</h3> <!-- Updated this line -->
5
5
  </div>
6
6
 
7
- <div class="cols-3 gap-thin">
7
+ <div class="cols-3 mobile:cols-1 gap-thin">
8
8
  <div
9
9
  v-for="report in state.all"
10
10
  :key="report._id"
@@ -38,7 +38,7 @@
38
38
  v-slot="{
39
39
  items
40
40
  }"
41
- class="gap-thin cols-3"
41
+ class="gap-thin cols-3 mobile:cols-1"
42
42
  >
43
43
  <div
44
44
  v-for="payment in items"
@@ -89,7 +89,7 @@
89
89
 
90
90
  <h2 class="mn-b-small" v-if="state.rewards.length > 0">Latest Rewards </h2>
91
91
 
92
- <section class="cols-3 gap-thin">
92
+ <section class="cols-3 mobile:cols-1 gap-thin">
93
93
  <div
94
94
  class="radius-medium bg-light"
95
95
  v-for="income in state.rewards"
@@ -113,7 +113,7 @@
113
113
 
114
114
  <h2 class="mn-b-small" v-if="state.rewards.length > 0">Activity</h2>
115
115
 
116
- <section class="cols-3 gap-thin">
116
+ <section class="cols-3 mobile:cols-1 gap-thin">
117
117
  <div
118
118
  class="radius-medium bg-grey"
119
119
  v-for="income in state.rewards"
@@ -306,6 +306,15 @@ $order: (
306
306
  '10': 10
307
307
  );
308
308
 
309
+ $cols: (
310
+ '1': 1fr,
311
+ '2': 1fr 1fr,
312
+ '3': 1fr 1fr 1fr,
313
+ '4': 1fr 1fr 1fr 1fr,
314
+ '5': 1fr 1fr 1fr 1fr 1fr,
315
+ '6': 1fr 1fr 1fr 1fr 1fr 1fr,
316
+ );
317
+
309
318
  body {
310
319
  @include generate-utility-classes('pd', 'padding', $modifiers, $combined, $breakpoints);
311
320
  @include generate-utility-classes('mn', 'margin', $modifiers, $combined, $breakpoints);
@@ -336,6 +345,8 @@ body {
336
345
  @include generate-utility-classes('flex', 'align-items', null, $align-items, $breakpoints);
337
346
  @include generate-utility-classes('flex', 'flex-direction', null, $flex-direction, $breakpoints);
338
347
  @include generate-utility-classes('order', 'order', null, $order, $breakpoints);
348
+
349
+ @include generate-utility-classes('cols', 'grid-template-columns', null, $cols, $breakpoints);
339
350
 
340
351
  @include generate-bg-classes('bg-main', 'main');
341
352
  @include generate-bg-classes('bg-second', 'second');
@@ -65,7 +65,7 @@ $xxl-desktop-min: 1921px;
65
65
  }
66
66
 
67
67
  // Cols
68
- .cols-1, .cols-2, .cols-3, .cols-4, .cols-2-2_1, .cols-2-1_2, .cols-2-1_3, .cols-2-golden-ration { display: grid !important; grid-template-columns: 1fr !important; }
68
+ .cols-1, .cols-2, .cols-4, .cols-2-2_1, .cols-2-1_2, .cols-2-1_3, .cols-2-golden-ration { display: grid !important; grid-template-columns: 1fr !important; }
69
69
  .cols-4.no-responsive { grid-template-columns: 1fr 1fr 1fr 1fr !important }
70
70
  .cols-2 { >.col { width: 100% !important; } }
71
71
 
@@ -1,110 +0,0 @@
1
- "use strict";
2
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const vue = require("vue");
4
- const vueRouter = require("vue-router");
5
- const vueI18n = require("vue-i18n");
6
- const emblaCarouselVue_esm = require("../../../../node_modules/.pnpm/embla-carousel-vue@8.6.0_vue@3.5.13_typescript@5.8.3_/node_modules/embla-carousel-vue/esm/embla-carousel-vue.esm.cjs");
7
- const emblaCarouselAutoplay_esm = require("../../../../node_modules/.pnpm/embla-carousel-autoplay@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.cjs");
8
- const Loader = require("../Loader/Loader.vue2.cjs");
9
- const _pluginVue_exportHelper = require("../../../../_virtual/_plugin-vue_export-helper.cjs");
10
- const _hoisted_1 = { class: "pos-relative" };
11
- const _hoisted_2 = {
12
- key: 0,
13
- class: "h-20r radius-semi pos-relative w-100 bg-light"
14
- };
15
- const _hoisted_3 = {
16
- key: 1,
17
- class: "bg-light radius-semi flex flex-center w-100 h-20r"
18
- };
19
- const _hoisted_4 = { class: "text-gray-500" };
20
- const _hoisted_5 = { class: "embla__container" };
21
- const _sfc_main = {
22
- __name: "Slider",
23
- props: {
24
- store: Object,
25
- options: Object,
26
- text: Object,
27
- user: Object
28
- },
29
- setup(__props) {
30
- const props = __props;
31
- vueRouter.useRouter();
32
- const entitiesState = vue.ref([]);
33
- const isLoading = vue.ref(true);
34
- const selectedIndex = vue.ref(0);
35
- const autoplayOptions = {
36
- delay: 2e3,
37
- jump: false,
38
- stopOnInteraction: false,
39
- stopOnMouseEnter: false,
40
- stopOnFocusIn: true,
41
- stopOnLastSnap: false,
42
- rootNode: (emblaRoot) => emblaRoot.parentElement
43
- };
44
- const [emblaNode, emblaApi] = emblaCarouselVue_esm.default(
45
- { loop: true },
46
- [
47
- emblaCarouselAutoplay_esm.default(autoplayOptions)
48
- ]
49
- );
50
- const onSelect = (embla) => selectedIndex.value = emblaApi.value.selectedScrollSnap() || [];
51
- const { t } = vueI18n.useI18n({
52
- messages: props.text
53
- });
54
- vue.onMounted(async () => {
55
- try {
56
- entitiesState.value = await props.store.read(props.options);
57
- } catch (error) {
58
- console.error("Error loading entities:", error);
59
- entitiesState.value = [];
60
- } finally {
61
- isLoading.value = false;
62
- }
63
- if (entitiesState.value.length) {
64
- onSelect();
65
- emblaApi.value.on("reInit", onSelect);
66
- emblaApi.value.on("select", onSelect);
67
- }
68
- });
69
- return (_ctx, _cache) => {
70
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
71
- isLoading.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
72
- vue.createVNode(Loader.default)
73
- ])) : !entitiesState.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [
74
- vue.createElementVNode("p", _hoisted_4, vue.toDisplayString(vue.unref(t)("title")), 1)
75
- ])) : (vue.openBlock(), vue.createElementBlock("div", {
76
- key: 2,
77
- class: "embla",
78
- ref_key: "emblaNode",
79
- ref: emblaNode
80
- }, [
81
- vue.createElementVNode("div", _hoisted_5, [
82
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(entitiesState.value, (entity, key, index) => {
83
- return vue.openBlock(), vue.createElementBlock("div", {
84
- class: "embla__slide pd-nano",
85
- key
86
- }, [
87
- vue.createVNode(vue.Transition, {
88
- name: "fade",
89
- mode: "out-in",
90
- appear: ""
91
- }, {
92
- default: vue.withCtx(() => [
93
- vue.renderSlot(_ctx.$slots, "default", {
94
- item: entity,
95
- user: __props.user
96
- }, void 0, true)
97
- ]),
98
- _: 2
99
- }, 1024)
100
- ]);
101
- }), 128))
102
- ])
103
- ], 512))
104
- ]);
105
- };
106
- }
107
- };
108
- const Slider = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-c1c01dd7"]]);
109
- exports.default = Slider;
110
- //# sourceMappingURL=Slider.vue.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Slider.vue.cjs","sources":["../../../../../src/components/Slider/Slider.vue"],"sourcesContent":["<template>\n <div class=\"pos-relative\">\n <!-- Loading State -->\n <div v-if=\"isLoading\" class=\"h-20r radius-semi pos-relative w-100 bg-light\">\n <Loader />\n </div>\n\n <!-- Empty State -->\n <div v-else-if=\"!entitiesState.length\" class=\"bg-light radius-semi flex flex-center w-100 h-20r\">\n <p class=\"text-gray-500\">{{t('title')}}</p>\n </div>\n\n <!-- Carousel -->\n <div v-else class=\"embla\" ref=\"emblaNode\">\n <div class=\"embla__container\">\n <div \n class=\"embla__slide pd-nano\" \n v-for=\"(entity, key, index) in entitiesState\" \n :key=\"key\"\n >\n <transition name=\"fade\" mode=\"out-in\" appear>\n <slot\n :item=\"entity\"\n :user=\"user\"\n ></slot>\n </transition>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { ref, onMounted } from 'vue'\nimport { useRouter } from 'vue-router'\nimport { useI18n } from 'vue-i18n'\n\nimport emblaCarouselVue from 'embla-carousel-vue'\nimport Autoplay from 'embla-carousel-autoplay'\n\nimport Loader from '@martyrs/src/components/Loader/Loader.vue'\n\n// Props for customization\nconst props = defineProps({\n store: Object,\n options: Object,\n text: Object,\n user: Object\n});\n\nconst router = useRouter()\nconst entitiesState = ref([])\nconst isLoading = ref(true);\nconst selectedIndex = ref(0);\n\nconst autoplayOptions = {\n delay: 2000,\n jump: false,\n stopOnInteraction: false,\n stopOnMouseEnter: false,\n stopOnFocusIn: true,\n stopOnLastSnap: false,\n rootNode: (emblaRoot) => emblaRoot.parentElement\n}\n\nconst [emblaNode, emblaApi] = emblaCarouselVue(\n { loop: true }, \n [\n Autoplay(autoplayOptions)\n ]\n)\n\nconst scrollTo = (index) => emblaApi.value && emblaApi.value.scrollTo(index);\nconst onSelect = (embla) => selectedIndex.value = emblaApi.value.selectedScrollSnap() || [];\n\nconst { t } = useI18n({\n messages: props.text\n})\n\nonMounted(async() => {\n try {\n entitiesState.value = await props.store.read(props.options);\n } catch (error) {\n console.error('Error loading entities:', error);\n entitiesState.value = [];\n } finally {\n isLoading.value = false;\n }\n \n if (entitiesState.value.length) {\n onSelect(emblaApi);\n emblaApi.value.on('reInit', onSelect);\n emblaApi.value.on('select', onSelect);\n }\n});\n\n</script>\n\n<style scoped>\n.fade-enter-active,\n.fade-leave-active {\n transition: opacity 0.3s ease;\n}\n\n.fade-enter-from,\n.fade-leave-to {\n opacity: 0;\n}\n</style>"],"names":["useRouter","ref","emblaCarouselVue","Autoplay","useI18n","onMounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,UAAM,QAAQ;AAOCA,cAAS,UAAA;AACxB,UAAM,gBAAgBC,IAAG,IAAC,CAAE,CAAA;AAC5B,UAAM,YAAYA,IAAG,IAAC,IAAI;AAC1B,UAAM,gBAAgBA,IAAG,IAAC,CAAC;AAE3B,UAAM,kBAAkB;AAAA,MACtB,OAAO;AAAA,MACP,MAAM;AAAA,MACN,mBAAmB;AAAA,MACnB,kBAAkB;AAAA,MAClB,eAAe;AAAA,MACf,gBAAgB;AAAA,MAChB,UAAU,CAAC,cAAc,UAAU;AAAA,IACrC;AAEA,UAAM,CAAC,WAAW,QAAQ,IAAIC,qBAAgB;AAAA,MAC5C,EAAE,MAAM,KAAM;AAAA,MACd;AAAA,QACEC,0BAAAA,QAAS,eAAe;AAAA,MAC5B;AAAA,IACA;AAGA,UAAM,WAAW,CAAC,UAAU,cAAc,QAAQ,SAAS,MAAM,mBAAkB,KAAM,CAAE;AAE3F,UAAM,EAAE,EAAG,IAAGC,gBAAQ;AAAA,MACpB,UAAU,MAAM;AAAA,IAClB,CAAC;AAEDC,QAAAA,UAAU,YAAW;AACnB,UAAI;AACF,sBAAc,QAAQ,MAAM,MAAM,MAAM,KAAK,MAAM,OAAO;AAAA,MAC3D,SAAQ,OAAO;AACd,gBAAQ,MAAM,2BAA2B,KAAK;AAC9C,sBAAc,QAAQ,CAAE;AAAA,MAC5B,UAAY;AACR,kBAAU,QAAQ;AAAA,MACtB;AAEE,UAAI,cAAc,MAAM,QAAQ;AAC9B,iBAAiB;AACjB,iBAAS,MAAM,GAAG,UAAU,QAAQ;AACpC,iBAAS,MAAM,GAAG,UAAU,QAAQ;AAAA,MACxC;AAAA,IACA,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,110 +0,0 @@
1
- import { ref, onMounted, createElementBlock, openBlock, createVNode, createElementVNode, toDisplayString, unref, Fragment, renderList, Transition, withCtx, renderSlot } from "vue";
2
- import { useRouter } from "vue-router";
3
- import { useI18n } from "vue-i18n";
4
- import emblaCarouselVue from "../../../../node_modules/.pnpm/embla-carousel-vue@8.6.0_vue@3.5.13_typescript@5.8.3_/node_modules/embla-carousel-vue/esm/embla-carousel-vue.esm.js";
5
- import Autoplay from "../../../../node_modules/.pnpm/embla-carousel-autoplay@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js";
6
- import Loader from "../Loader/Loader.vue2.js";
7
- import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.js";
8
- const _hoisted_1 = { class: "pos-relative" };
9
- const _hoisted_2 = {
10
- key: 0,
11
- class: "h-20r radius-semi pos-relative w-100 bg-light"
12
- };
13
- const _hoisted_3 = {
14
- key: 1,
15
- class: "bg-light radius-semi flex flex-center w-100 h-20r"
16
- };
17
- const _hoisted_4 = { class: "text-gray-500" };
18
- const _hoisted_5 = { class: "embla__container" };
19
- const _sfc_main = {
20
- __name: "Slider",
21
- props: {
22
- store: Object,
23
- options: Object,
24
- text: Object,
25
- user: Object
26
- },
27
- setup(__props) {
28
- const props = __props;
29
- useRouter();
30
- const entitiesState = ref([]);
31
- const isLoading = ref(true);
32
- const selectedIndex = ref(0);
33
- const autoplayOptions = {
34
- delay: 2e3,
35
- jump: false,
36
- stopOnInteraction: false,
37
- stopOnMouseEnter: false,
38
- stopOnFocusIn: true,
39
- stopOnLastSnap: false,
40
- rootNode: (emblaRoot) => emblaRoot.parentElement
41
- };
42
- const [emblaNode, emblaApi] = emblaCarouselVue(
43
- { loop: true },
44
- [
45
- Autoplay(autoplayOptions)
46
- ]
47
- );
48
- const onSelect = (embla) => selectedIndex.value = emblaApi.value.selectedScrollSnap() || [];
49
- const { t } = useI18n({
50
- messages: props.text
51
- });
52
- onMounted(async () => {
53
- try {
54
- entitiesState.value = await props.store.read(props.options);
55
- } catch (error) {
56
- console.error("Error loading entities:", error);
57
- entitiesState.value = [];
58
- } finally {
59
- isLoading.value = false;
60
- }
61
- if (entitiesState.value.length) {
62
- onSelect();
63
- emblaApi.value.on("reInit", onSelect);
64
- emblaApi.value.on("select", onSelect);
65
- }
66
- });
67
- return (_ctx, _cache) => {
68
- return openBlock(), createElementBlock("div", _hoisted_1, [
69
- isLoading.value ? (openBlock(), createElementBlock("div", _hoisted_2, [
70
- createVNode(Loader)
71
- ])) : !entitiesState.value.length ? (openBlock(), createElementBlock("div", _hoisted_3, [
72
- createElementVNode("p", _hoisted_4, toDisplayString(unref(t)("title")), 1)
73
- ])) : (openBlock(), createElementBlock("div", {
74
- key: 2,
75
- class: "embla",
76
- ref_key: "emblaNode",
77
- ref: emblaNode
78
- }, [
79
- createElementVNode("div", _hoisted_5, [
80
- (openBlock(true), createElementBlock(Fragment, null, renderList(entitiesState.value, (entity, key, index) => {
81
- return openBlock(), createElementBlock("div", {
82
- class: "embla__slide pd-nano",
83
- key
84
- }, [
85
- createVNode(Transition, {
86
- name: "fade",
87
- mode: "out-in",
88
- appear: ""
89
- }, {
90
- default: withCtx(() => [
91
- renderSlot(_ctx.$slots, "default", {
92
- item: entity,
93
- user: __props.user
94
- }, void 0, true)
95
- ]),
96
- _: 2
97
- }, 1024)
98
- ]);
99
- }), 128))
100
- ])
101
- ], 512))
102
- ]);
103
- };
104
- }
105
- };
106
- const Slider = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c1c01dd7"]]);
107
- export {
108
- Slider as default
109
- };
110
- //# sourceMappingURL=Slider.vue.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Slider.vue.js","sources":["../../../../../src/components/Slider/Slider.vue"],"sourcesContent":["<template>\n <div class=\"pos-relative\">\n <!-- Loading State -->\n <div v-if=\"isLoading\" class=\"h-20r radius-semi pos-relative w-100 bg-light\">\n <Loader />\n </div>\n\n <!-- Empty State -->\n <div v-else-if=\"!entitiesState.length\" class=\"bg-light radius-semi flex flex-center w-100 h-20r\">\n <p class=\"text-gray-500\">{{t('title')}}</p>\n </div>\n\n <!-- Carousel -->\n <div v-else class=\"embla\" ref=\"emblaNode\">\n <div class=\"embla__container\">\n <div \n class=\"embla__slide pd-nano\" \n v-for=\"(entity, key, index) in entitiesState\" \n :key=\"key\"\n >\n <transition name=\"fade\" mode=\"out-in\" appear>\n <slot\n :item=\"entity\"\n :user=\"user\"\n ></slot>\n </transition>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { ref, onMounted } from 'vue'\nimport { useRouter } from 'vue-router'\nimport { useI18n } from 'vue-i18n'\n\nimport emblaCarouselVue from 'embla-carousel-vue'\nimport Autoplay from 'embla-carousel-autoplay'\n\nimport Loader from '@martyrs/src/components/Loader/Loader.vue'\n\n// Props for customization\nconst props = defineProps({\n store: Object,\n options: Object,\n text: Object,\n user: Object\n});\n\nconst router = useRouter()\nconst entitiesState = ref([])\nconst isLoading = ref(true);\nconst selectedIndex = ref(0);\n\nconst autoplayOptions = {\n delay: 2000,\n jump: false,\n stopOnInteraction: false,\n stopOnMouseEnter: false,\n stopOnFocusIn: true,\n stopOnLastSnap: false,\n rootNode: (emblaRoot) => emblaRoot.parentElement\n}\n\nconst [emblaNode, emblaApi] = emblaCarouselVue(\n { loop: true }, \n [\n Autoplay(autoplayOptions)\n ]\n)\n\nconst scrollTo = (index) => emblaApi.value && emblaApi.value.scrollTo(index);\nconst onSelect = (embla) => selectedIndex.value = emblaApi.value.selectedScrollSnap() || [];\n\nconst { t } = useI18n({\n messages: props.text\n})\n\nonMounted(async() => {\n try {\n entitiesState.value = await props.store.read(props.options);\n } catch (error) {\n console.error('Error loading entities:', error);\n entitiesState.value = [];\n } finally {\n isLoading.value = false;\n }\n \n if (entitiesState.value.length) {\n onSelect(emblaApi);\n emblaApi.value.on('reInit', onSelect);\n emblaApi.value.on('select', onSelect);\n }\n});\n\n</script>\n\n<style scoped>\n.fade-enter-active,\n.fade-leave-active {\n transition: opacity 0.3s ease;\n}\n\n.fade-enter-from,\n.fade-leave-to {\n opacity: 0;\n}\n</style>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,UAAM,QAAQ;AAOC,cAAS;AACxB,UAAM,gBAAgB,IAAI,CAAE,CAAA;AAC5B,UAAM,YAAY,IAAI,IAAI;AAC1B,UAAM,gBAAgB,IAAI,CAAC;AAE3B,UAAM,kBAAkB;AAAA,MACtB,OAAO;AAAA,MACP,MAAM;AAAA,MACN,mBAAmB;AAAA,MACnB,kBAAkB;AAAA,MAClB,eAAe;AAAA,MACf,gBAAgB;AAAA,MAChB,UAAU,CAAC,cAAc,UAAU;AAAA,IACrC;AAEA,UAAM,CAAC,WAAW,QAAQ,IAAI;AAAA,MAC5B,EAAE,MAAM,KAAM;AAAA,MACd;AAAA,QACE,SAAS,eAAe;AAAA,MAC5B;AAAA,IACA;AAGA,UAAM,WAAW,CAAC,UAAU,cAAc,QAAQ,SAAS,MAAM,mBAAkB,KAAM,CAAE;AAE3F,UAAM,EAAE,EAAG,IAAG,QAAQ;AAAA,MACpB,UAAU,MAAM;AAAA,IAClB,CAAC;AAED,cAAU,YAAW;AACnB,UAAI;AACF,sBAAc,QAAQ,MAAM,MAAM,MAAM,KAAK,MAAM,OAAO;AAAA,MAC3D,SAAQ,OAAO;AACd,gBAAQ,MAAM,2BAA2B,KAAK;AAC9C,sBAAc,QAAQ,CAAE;AAAA,MAC5B,UAAY;AACR,kBAAU,QAAQ;AAAA,MACtB;AAEE,UAAI,cAAc,MAAM,QAAQ;AAC9B,iBAAiB;AACjB,iBAAS,MAAM,GAAG,UAAU,QAAQ;AACpC,iBAAS,MAAM,GAAG,UAAU,QAAQ;AAAA,MACxC;AAAA,IACA,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Tab.vue.js","sources":["../../../../../src/components/Tab/Tab.vue"],"sourcesContent":["<template>\n <div class=\"flex-nowrap flex-v-center flex pos-relative\">\n <button \n v-for=\"(tab, index) in tabs\" \n :key=\"index\" \n @click=\"handleTabClick(index, tab)\" \n class=\"z-index-1 t-center cursor-pointer\"\n :style=\"isSelected(index, tab) ? 'background: rgb(var(--main)) !important' : ''\"\n :class=\"[\n isSelected(index, tab) ? 'bg-main' : '',\n tabClass ? tabClass : 'pd-small pd-r-medium pd-l-medium w-max pd-small radius-small'\n ]\"\n >\n {{tab.name || tab.label}}\n </button>\n </div>\n</template>\n\n<script setup>\nimport { ref, computed, watch } from 'vue'\n\nconst emit = defineEmits(['update:selected', 'tab-click']);\n\nconst props = defineProps({\n tabs: Array,\n tabClass: String,\n selected: [String, Number],\n modelValue: [String, Number],\n callback: Function\n})\n\nconst selectedTab = ref(0)\n\n// Handle both v-model and selected prop for backward compatibility\nconst updateSelectedIndex = () => {\n if (props.modelValue !== undefined) {\n const selectedIndex = props.tabs.findIndex(tab => tab.value === props.modelValue)\n if (selectedIndex !== -1) {\n selectedTab.value = selectedIndex\n }\n } else if (props.selected !== undefined) {\n const selectedIndex = props.tabs.findIndex(tab => tab.value === props.selected)\n if (selectedIndex !== -1) {\n selectedTab.value = selectedIndex\n }\n }\n}\n\n// Initial setup\nupdateSelectedIndex()\n\n// Watch for changes in selected or modelValue props\nwatch(() => props.selected, updateSelectedIndex)\nwatch(() => props.modelValue, updateSelectedIndex)\n\n// Check if tab is selected\nconst isSelected = (index, tab) => {\n if (props.modelValue !== undefined) {\n return tab.value === props.modelValue\n } else if (props.selected !== undefined) {\n return tab.value === props.selected\n }\n return index === selectedTab.value\n}\n\n// Handle tab click\nfunction handleTabClick(index, tab) {\n selectedTab.value = index\n \n // Emit both events for flexibility\n emit('update:selected', tab.value)\n emit('tab-click', { index, tab })\n \n // For v-model support\n if (props.modelValue !== undefined) {\n emit('update:modelValue', tab.value)\n }\n \n // Call callback if provided\n if (props.callback) props.callback(tab)\n}\n</script>\n\n<style lang=\"scss\">\n.tab-selector {\n position: absolute;\n width: 50%;\n height: 100%;\n left: 0;\n top: 0;\n z-index: 0;\n transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n}\n</style>"],"names":[],"mappings":";;;;;;;;;;;;;;;AAqBA,UAAM,OAAO;AAEb,UAAM,QAAQ;AAQd,UAAM,cAAc,IAAI,CAAC;AAGzB,UAAM,sBAAsB,MAAM;AAChC,UAAI,MAAM,eAAe,QAAW;AAClC,cAAM,gBAAgB,MAAM,KAAK,UAAU,SAAO,IAAI,UAAU,MAAM,UAAU;AAChF,YAAI,kBAAkB,IAAI;AACxB,sBAAY,QAAQ;AAAA,QAC1B;AAAA,MACA,WAAa,MAAM,aAAa,QAAW;AACvC,cAAM,gBAAgB,MAAM,KAAK,UAAU,SAAO,IAAI,UAAU,MAAM,QAAQ;AAC9E,YAAI,kBAAkB,IAAI;AACxB,sBAAY,QAAQ;AAAA,QAC1B;AAAA,MACA;AAAA,IACA;AAGA,wBAAmB;AAGnB,UAAM,MAAM,MAAM,UAAU,mBAAmB;AAC/C,UAAM,MAAM,MAAM,YAAY,mBAAmB;AAGjD,UAAM,aAAa,CAAC,OAAO,QAAQ;AACjC,UAAI,MAAM,eAAe,QAAW;AAClC,eAAO,IAAI,UAAU,MAAM;AAAA,MAC/B,WAAa,MAAM,aAAa,QAAW;AACvC,eAAO,IAAI,UAAU,MAAM;AAAA,MAC/B;AACE,aAAO,UAAU,YAAY;AAAA,IAC/B;AAGA,aAAS,eAAe,OAAO,KAAK;AAClC,kBAAY,QAAQ;AAGpB,WAAK,mBAAmB,IAAI,KAAK;AACjC,WAAK,aAAa,EAAE,OAAO,IAAK,CAAA;AAGhC,UAAI,MAAM,eAAe,QAAW;AAClC,aAAK,qBAAqB,IAAI,KAAK;AAAA,MACvC;AAGE,UAAI,MAAM,SAAU,OAAM,SAAS,GAAG;AAAA,IACxC;;;;;;;;;;;;;;;;;;"}