diff --git a/src/presentation/components/Scripts/View/Cards/CardExpansionPanel.vue b/src/presentation/components/Scripts/View/Cards/CardExpansionPanel.vue
new file mode 100644
index 00000000..6900d55d
--- /dev/null
+++ b/src/presentation/components/Scripts/View/Cards/CardExpansionPanel.vue
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+
diff --git a/src/presentation/components/Scripts/View/Cards/CardList.vue b/src/presentation/components/Scripts/View/Cards/CardList.vue
index dd831327..44c7282e 100644
--- a/src/presentation/components/Scripts/View/Cards/CardList.vue
+++ b/src/presentation/components/Scripts/View/Cards/CardList.vue
@@ -7,9 +7,9 @@
@@ -46,6 +47,7 @@ import { injectKey } from '@/presentation/injectionSymbols';
import SizeObserver from '@/presentation/components/Shared/SizeObserver.vue';
import { hasDirective } from './NonCollapsingDirective';
import CardListItem from './CardListItem.vue';
+import { useCardLayout } from './UseCardLayout';
export default defineComponent({
components: {
@@ -61,8 +63,14 @@ export default defineComponent({
const categoryIds = computed(
() => currentState.value.collection.actions.map((category) => category.id),
);
+
const activeCategoryId = ref(undefined);
+ const cardLayout = useCardLayout({
+ containerWidth: computed(() => width.value ?? 0),
+ totalCards: computed(() => categoryIds.value.length),
+ });
+
function onSelected(categoryId: number, isExpanded: boolean) {
activeCategoryId.value = isExpanded ? categoryId : undefined;
}
@@ -101,6 +109,7 @@ export default defineComponent({
width,
categoryIds,
activeCategoryId,
+ cardLayout,
onSelected,
};
},
diff --git a/src/presentation/components/Scripts/View/Cards/CardListItem.vue b/src/presentation/components/Scripts/View/Cards/CardListItem.vue
index 454167f0..7afc289d 100644
--- a/src/presentation/components/Scripts/View/Cards/CardListItem.vue
+++ b/src/presentation/components/Scripts/View/Cards/CardListItem.vue
@@ -29,26 +29,12 @@
/>
-
+
@@ -56,30 +42,32 @@