@fiscozen/card-list 1.0.0
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/CHANGELOG.md +7 -0
- package/LICENSE +21 -0
- package/README.md +59 -0
- package/dist/card-list.js +427 -0
- package/dist/card-list.umd.cjs +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/src/FzCardList.vue.d.ts +18 -0
- package/dist/src/FzCardListItem.vue.d.ts +18 -0
- package/dist/src/components/FzCardActionLink.vue.d.ts +17 -0
- package/dist/src/components/FzCardFooter.vue.d.ts +13 -0
- package/dist/src/components/FzCardHeader.vue.d.ts +13 -0
- package/dist/src/components/FzCardMultiActions.vue.d.ts +18 -0
- package/dist/src/components/FzCardNoAction.vue.d.ts +13 -0
- package/dist/src/components/FzCardTitle.vue.d.ts +13 -0
- package/dist/src/components/types.d.ts +34 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/types.d.ts +64 -0
- package/package.json +49 -0
- package/src/FzCardList.vue +54 -0
- package/src/FzCardListItem.vue +71 -0
- package/src/__tests__/FzCardList.spec.ts +322 -0
- package/src/__tests__/FzCardListItem.spec.ts +458 -0
- package/src/__tests__/__snapshots__/FzCardList.spec.ts.snap +52 -0
- package/src/__tests__/__snapshots__/FzCardListItem.spec.ts.snap +90 -0
- package/src/components/FzCardActionLink.vue +87 -0
- package/src/components/FzCardFooter.vue +13 -0
- package/src/components/FzCardHeader.vue +33 -0
- package/src/components/FzCardMultiActions.vue +75 -0
- package/src/components/FzCardNoAction.vue +29 -0
- package/src/components/FzCardTitle.vue +29 -0
- package/src/components/types.ts +45 -0
- package/src/index.ts +3 -0
- package/src/types.ts +74 -0
- package/tsconfig.json +4 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/vite.config.ts +42 -0
- package/vitest.config.ts +26 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, useId } from "vue";
|
|
3
|
+
import { FzBadge } from "@fiscozen/badge";
|
|
4
|
+
import { FzContainer } from "@fiscozen/container";
|
|
5
|
+
import { FzDivider } from "@fiscozen/divider";
|
|
6
|
+
import { FzIcon } from "@fiscozen/icons";
|
|
7
|
+
import type { FzCardSingleActionEmits, FzCardSingleActionProps } from "./types";
|
|
8
|
+
import FzCardHeader from "./FzCardHeader.vue";
|
|
9
|
+
import FzCardFooter from "./FzCardFooter.vue";
|
|
10
|
+
|
|
11
|
+
const props = defineProps<FzCardSingleActionProps>();
|
|
12
|
+
|
|
13
|
+
const emit = defineEmits<FzCardSingleActionEmits>();
|
|
14
|
+
|
|
15
|
+
const hasTitleOnly = computed(() => !props.badge && !props.value);
|
|
16
|
+
const noAction = computed(() => !props.action);
|
|
17
|
+
|
|
18
|
+
const rowTitleId = useId();
|
|
19
|
+
|
|
20
|
+
function handleRowInteraction(e: MouseEvent | KeyboardEvent) {
|
|
21
|
+
if (noAction.value) return;
|
|
22
|
+
if (e instanceof KeyboardEvent) {
|
|
23
|
+
if (e.key !== "Enter" && e.key !== " ") return;
|
|
24
|
+
e.preventDefault();
|
|
25
|
+
}
|
|
26
|
+
e.stopPropagation();
|
|
27
|
+
emit("fzaction:click", props.action!);
|
|
28
|
+
}
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<template>
|
|
32
|
+
<FzContainer
|
|
33
|
+
gap="xs"
|
|
34
|
+
role="button"
|
|
35
|
+
tabindex="0"
|
|
36
|
+
:aria-labelledby="rowTitleId"
|
|
37
|
+
class="p-8 hover:bg-semantic-info-50 hover:rounded cursor-pointer focus-visible:outline focus-visible:outline-2 focus-visible:outline-blue-200 focus-visible:rounded"
|
|
38
|
+
@click="handleRowInteraction"
|
|
39
|
+
@keydown="handleRowInteraction"
|
|
40
|
+
>
|
|
41
|
+
<!--
|
|
42
|
+
Header row layout:
|
|
43
|
+
- badge present → badge + action
|
|
44
|
+
- hasTitleOnly (no badge, no value) → title + action (inline)
|
|
45
|
+
- value present, no badge → action only; title + value are in the second row
|
|
46
|
+
-->
|
|
47
|
+
<FzContainer horizontal alignItems="center">
|
|
48
|
+
<!-- Badge -->
|
|
49
|
+
<FzBadge v-if="badge" :tone="badge.tone" variant="text">
|
|
50
|
+
{{ badge.text }}
|
|
51
|
+
</FzBadge>
|
|
52
|
+
<!-- Title only (inline with action) -->
|
|
53
|
+
<FzCardHeader
|
|
54
|
+
v-else-if="hasTitleOnly"
|
|
55
|
+
has-title-only
|
|
56
|
+
:show-indicator="showIndicator"
|
|
57
|
+
:title="title"
|
|
58
|
+
:title-id="rowTitleId"
|
|
59
|
+
/>
|
|
60
|
+
<!-- Single action arrow -->
|
|
61
|
+
<FzContainer
|
|
62
|
+
v-if="!noAction"
|
|
63
|
+
horizontal
|
|
64
|
+
gap="xs"
|
|
65
|
+
alignItems="center"
|
|
66
|
+
layout="expand-last"
|
|
67
|
+
class="shrink-0 ml-auto"
|
|
68
|
+
>
|
|
69
|
+
<span class="inline-flex shrink-0 text-inherit" aria-hidden="true">
|
|
70
|
+
<FzIcon name="chevron-right" size="md" variant="fas" v-color:grey />
|
|
71
|
+
</span>
|
|
72
|
+
</FzContainer>
|
|
73
|
+
</FzContainer>
|
|
74
|
+
|
|
75
|
+
<!-- Title + value row (when badge or value is present) -->
|
|
76
|
+
<FzCardHeader
|
|
77
|
+
v-if="!hasTitleOnly"
|
|
78
|
+
:show-indicator="showIndicator"
|
|
79
|
+
:title="title"
|
|
80
|
+
:value="value"
|
|
81
|
+
:title-id="rowTitleId"
|
|
82
|
+
/>
|
|
83
|
+
<FzCardFooter :descriptions="descriptions" />
|
|
84
|
+
</FzContainer>
|
|
85
|
+
|
|
86
|
+
<FzDivider margin="none" />
|
|
87
|
+
</template>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { FzContainer } from "@fiscozen/container";
|
|
3
|
+
import { FzCardListFooterProps } from "./types";
|
|
4
|
+
const props = defineProps<FzCardListFooterProps>();
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<FzContainer v-if="descriptions?.length" gap="none">
|
|
9
|
+
<p v-for="(desc, i) in descriptions" :key="i" v-small v-color:grey>
|
|
10
|
+
{{ desc }}
|
|
11
|
+
</p>
|
|
12
|
+
</FzContainer>
|
|
13
|
+
</template>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { FzContainer } from "@fiscozen/container";
|
|
3
|
+
import FzCardTitle from "./FzCardTitle.vue";
|
|
4
|
+
import { FzCardHeaderProps } from "./types";
|
|
5
|
+
|
|
6
|
+
const props = defineProps<FzCardHeaderProps>();
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<!-- Title Only -->
|
|
11
|
+
<FzContainer
|
|
12
|
+
v-if="hasTitleOnly"
|
|
13
|
+
horizontal
|
|
14
|
+
gap="xs"
|
|
15
|
+
alignItems="center"
|
|
16
|
+
class="min-w-0 flex-1"
|
|
17
|
+
>
|
|
18
|
+
<FzCardTitle :show-indicator="showIndicator" :title="title" :title-id="titleId" />
|
|
19
|
+
</FzContainer>
|
|
20
|
+
<FzContainer
|
|
21
|
+
v-else
|
|
22
|
+
horizontal
|
|
23
|
+
gap="sm"
|
|
24
|
+
alignItems="center"
|
|
25
|
+
layout="space-between"
|
|
26
|
+
>
|
|
27
|
+
<FzCardTitle :show-indicator="showIndicator" :title="title" :title-id="titleId" />
|
|
28
|
+
<!-- Value -->
|
|
29
|
+
<p v-if="value" v-bold v-color:blue class="text-base whitespace-nowrap">
|
|
30
|
+
{{ value }}
|
|
31
|
+
</p>
|
|
32
|
+
</FzContainer>
|
|
33
|
+
</template>
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { FzBadge } from "@fiscozen/badge";
|
|
4
|
+
import { FzContainer } from "@fiscozen/container";
|
|
5
|
+
import { FzDivider } from "@fiscozen/divider";
|
|
6
|
+
import { FzIconDropdown } from "@fiscozen/dropdown";
|
|
7
|
+
import type { FzCardMultiActionsProps, FzCardMultiActionsEmits } from "./types";
|
|
8
|
+
import type { FzActionProps } from "@fiscozen/action";
|
|
9
|
+
import FzCardHeader from "./FzCardHeader.vue";
|
|
10
|
+
import FzCardFooter from "./FzCardFooter.vue";
|
|
11
|
+
|
|
12
|
+
const props = defineProps<FzCardMultiActionsProps>();
|
|
13
|
+
|
|
14
|
+
const emit = defineEmits<FzCardMultiActionsEmits>();
|
|
15
|
+
|
|
16
|
+
const hasTitleOnly = computed(() => !props.badge && !props.value);
|
|
17
|
+
|
|
18
|
+
function emitActionClick(
|
|
19
|
+
actionIndex: number = 0,
|
|
20
|
+
action: FzActionProps = props.actions![0],
|
|
21
|
+
) {
|
|
22
|
+
emit("fzaction:click", actionIndex, action);
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<FzContainer gap="xs" class="p-8 hover:bg-semantic-info-50 hover:rounded">
|
|
28
|
+
<!--
|
|
29
|
+
Header row layout:
|
|
30
|
+
- badge present → badge + actions
|
|
31
|
+
- hasTitleOnly (no badge, no value) → title + actions (inline)
|
|
32
|
+
- value present, no badge → actions only; title + value are in the second row
|
|
33
|
+
-->
|
|
34
|
+
<FzContainer horizontal alignItems="center">
|
|
35
|
+
<!-- Badge -->
|
|
36
|
+
<FzBadge v-if="badge" :tone="badge.tone" variant="text">
|
|
37
|
+
{{ badge.text }}
|
|
38
|
+
</FzBadge>
|
|
39
|
+
<!-- Title only (inline with actions) -->
|
|
40
|
+
<FzCardHeader
|
|
41
|
+
v-else-if="hasTitleOnly"
|
|
42
|
+
has-title-only
|
|
43
|
+
:show-indicator="showIndicator"
|
|
44
|
+
:title="title"
|
|
45
|
+
/>
|
|
46
|
+
<!-- Multiple actions dropdown -->
|
|
47
|
+
<FzContainer
|
|
48
|
+
horizontal
|
|
49
|
+
gap="xs"
|
|
50
|
+
alignItems="center"
|
|
51
|
+
layout="expand-last"
|
|
52
|
+
class="shrink-0 ml-auto"
|
|
53
|
+
>
|
|
54
|
+
<FzIconDropdown
|
|
55
|
+
:actions="actions!"
|
|
56
|
+
iconName="ellipsis-vertical"
|
|
57
|
+
variant="invisible"
|
|
58
|
+
aria-label="Mostra azioni"
|
|
59
|
+
@fzaction:click="emitActionClick"
|
|
60
|
+
/>
|
|
61
|
+
</FzContainer>
|
|
62
|
+
</FzContainer>
|
|
63
|
+
|
|
64
|
+
<!-- Title + value row (when badge or value is present) -->
|
|
65
|
+
<FzCardHeader
|
|
66
|
+
v-if="!hasTitleOnly"
|
|
67
|
+
:show-indicator="showIndicator"
|
|
68
|
+
:title="title"
|
|
69
|
+
:value="value"
|
|
70
|
+
/>
|
|
71
|
+
<FzCardFooter :descriptions="descriptions" />
|
|
72
|
+
</FzContainer>
|
|
73
|
+
|
|
74
|
+
<FzDivider margin="none" />
|
|
75
|
+
</template>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { FzBadge } from "@fiscozen/badge";
|
|
3
|
+
import { FzContainer } from "@fiscozen/container";
|
|
4
|
+
import { FzDivider } from "@fiscozen/divider";
|
|
5
|
+
import type { FzCardNoActionProps } from "./types";
|
|
6
|
+
import FzCardHeader from "./FzCardHeader.vue";
|
|
7
|
+
import FzCardFooter from "./FzCardFooter.vue";
|
|
8
|
+
|
|
9
|
+
const props = defineProps<FzCardNoActionProps>();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<FzContainer gap="xs" class="p-8">
|
|
14
|
+
<FzContainer v-if="badge" horizontal alignItems="center">
|
|
15
|
+
<!-- Badge -->
|
|
16
|
+
<FzBadge :tone="badge.tone" variant="text">
|
|
17
|
+
{{ badge.text }}
|
|
18
|
+
</FzBadge>
|
|
19
|
+
</FzContainer>
|
|
20
|
+
<!-- Title + value row (when badge or value is present) -->
|
|
21
|
+
<FzCardHeader
|
|
22
|
+
:show-indicator="showIndicator"
|
|
23
|
+
:title="title"
|
|
24
|
+
:value="value"
|
|
25
|
+
/>
|
|
26
|
+
<FzCardFooter :descriptions="descriptions" />
|
|
27
|
+
</FzContainer>
|
|
28
|
+
<FzDivider margin="none" />
|
|
29
|
+
</template>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { FzContainer } from '@fiscozen/container';
|
|
3
|
+
import { FzIcon } from '@fiscozen/icons';
|
|
4
|
+
import { FzCardTitleProps } from './types';
|
|
5
|
+
|
|
6
|
+
const props = defineProps<FzCardTitleProps>();
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<!-- Title and indicator -->
|
|
11
|
+
<FzContainer horizontal gap="xs" alignItems="center" class="min-w-0">
|
|
12
|
+
<!-- Indicator -->
|
|
13
|
+
<FzIcon
|
|
14
|
+
v-if="showIndicator"
|
|
15
|
+
name="circle-small"
|
|
16
|
+
size="xs"
|
|
17
|
+
variant="fas"
|
|
18
|
+
v-color:blue
|
|
19
|
+
/>
|
|
20
|
+
<!-- Title -->
|
|
21
|
+
<p
|
|
22
|
+
v-bold
|
|
23
|
+
class="min-w-0 flex-1 truncate"
|
|
24
|
+
:id="titleId"
|
|
25
|
+
>
|
|
26
|
+
{{ title }}
|
|
27
|
+
</p>
|
|
28
|
+
</FzContainer>
|
|
29
|
+
</template>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { FzActionLinkProps, FzActionProps } from "@fiscozen/action";
|
|
2
|
+
import { FzBadgeTone } from "@fiscozen/badge";
|
|
3
|
+
|
|
4
|
+
export type FzCardBadge = {
|
|
5
|
+
text: string;
|
|
6
|
+
tone: FzBadgeTone;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export interface FzCardTitleProps {
|
|
10
|
+
showIndicator?: boolean;
|
|
11
|
+
title: string;
|
|
12
|
+
titleId?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface FzCardHeaderProps extends FzCardTitleProps {
|
|
16
|
+
hasTitleOnly?: boolean;
|
|
17
|
+
value?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface FzCardListFooterProps {
|
|
21
|
+
descriptions?: string[];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface FzCardNoActionProps
|
|
25
|
+
extends FzCardHeaderProps, FzCardListFooterProps {
|
|
26
|
+
badge?: FzCardBadge;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface FzCardSingleActionProps
|
|
30
|
+
extends FzCardHeaderProps, FzCardListFooterProps, FzCardNoActionProps {
|
|
31
|
+
action?: FzActionLinkProps;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface FzCardSingleActionEmits {
|
|
35
|
+
(event: "fzaction:click", action: FzActionLinkProps): void;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface FzCardMultiActionsProps
|
|
39
|
+
extends FzCardHeaderProps, FzCardListFooterProps, FzCardNoActionProps {
|
|
40
|
+
actions: FzActionProps[];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface FzCardMultiActionsEmits {
|
|
44
|
+
(event: "fzaction:click", actionIndex: number, action: FzActionProps): void;
|
|
45
|
+
}
|
package/src/index.ts
ADDED
package/src/types.ts
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { FzActionProps } from "@fiscozen/action";
|
|
2
|
+
import type { FzBadgeTone } from "@fiscozen/badge";
|
|
3
|
+
|
|
4
|
+
export type ActionsMode = "none" | "link" | "actions";
|
|
5
|
+
|
|
6
|
+
export interface FzCardListItemProps {
|
|
7
|
+
/**
|
|
8
|
+
* Badge displayed inside the card at the top-left.
|
|
9
|
+
* When omitted, no badge is displayed.
|
|
10
|
+
*/
|
|
11
|
+
badge?: {
|
|
12
|
+
/**
|
|
13
|
+
* Text of the badge.
|
|
14
|
+
*/
|
|
15
|
+
text: string;
|
|
16
|
+
/**
|
|
17
|
+
* Tone of the badge.
|
|
18
|
+
*/
|
|
19
|
+
tone: FzBadgeTone;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Main title of the item, displayed in bold.
|
|
23
|
+
*/
|
|
24
|
+
title: string;
|
|
25
|
+
/**
|
|
26
|
+
* Value displayed on the right side of the title row (e.g. "0,00 €").
|
|
27
|
+
*/
|
|
28
|
+
value?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Description lines rendered below the title row.
|
|
31
|
+
*/
|
|
32
|
+
descriptions?: string[];
|
|
33
|
+
/**
|
|
34
|
+
* Whether to show the indicator icon before the title.
|
|
35
|
+
*/
|
|
36
|
+
showIndicator?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Row actions. When omitted or `[]`, no trailing control is shown. With one item, an arrow button is shown; with more than one, an ellipsis opens a dropdown.
|
|
39
|
+
*/
|
|
40
|
+
actions?: FzActionProps[];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface FzCardListItemEmits {
|
|
44
|
+
/**
|
|
45
|
+
* Emitted when a row action is chosen: single-arrow click, or an item from the overflow dropdown.
|
|
46
|
+
*/
|
|
47
|
+
(event: "fzaction:click", actionIndex: number, action: FzActionProps): void;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* A single item in the card list when using data-driven rendering.
|
|
52
|
+
* Maps directly to FzCardListItemProps.
|
|
53
|
+
*/
|
|
54
|
+
export type FzCardListItem = FzCardListItemProps;
|
|
55
|
+
|
|
56
|
+
export type FzCardListProps = {
|
|
57
|
+
/**
|
|
58
|
+
* Array of card item data for data-driven rendering.
|
|
59
|
+
* Each item is rendered as an FzCardListItem.
|
|
60
|
+
*/
|
|
61
|
+
items: FzCardListItem[];
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export interface FzCardListEmits {
|
|
65
|
+
/**
|
|
66
|
+
* Emitted when a row action is triggered for an item built from `items`.
|
|
67
|
+
*/
|
|
68
|
+
(
|
|
69
|
+
event: "fzaction:click",
|
|
70
|
+
itemIndex: number,
|
|
71
|
+
actionIndex: number,
|
|
72
|
+
action: FzActionProps,
|
|
73
|
+
): void;
|
|
74
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"program":{"fileNames":["../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/.pnpm/@vue+shared@3.5.26/node_modules/@vue/shared/dist/shared.d.ts","../../node_modules/.pnpm/@vue+reactivity@3.5.26/node_modules/@vue/reactivity/dist/reactivity.d.ts","../../node_modules/.pnpm/@vue+runtime-core@3.5.26/node_modules/@vue/runtime-core/dist/runtime-core.d.ts","../../node_modules/.pnpm/csstype@3.2.3/node_modules/csstype/index.d.ts","../../node_modules/.pnpm/@vue+runtime-dom@3.5.26/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts","../../node_modules/.pnpm/vue@3.5.26_typescript@5.3.3/node_modules/vue/jsx-runtime/index.d.ts","../../node_modules/.pnpm/@babel+types@7.29.0/node_modules/@babel/types/lib/index.d.ts","../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/index.d.ts","../../node_modules/.pnpm/@babel+parser@7.28.6/node_modules/@babel/parser/typings/babel-parser.d.ts","../../node_modules/.pnpm/@vue+compiler-core@3.5.26/node_modules/@vue/compiler-core/dist/compiler-core.d.ts","../../node_modules/.pnpm/@vue+compiler-dom@3.5.26/node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts","../../node_modules/.pnpm/vue@3.5.26_typescript@5.3.3/node_modules/vue/dist/vue.d.mts","../../node_modules/.pnpm/vue@3.5.26_typescript@5.7.3/node_modules/vue/jsx-runtime/index.d.ts","../../node_modules/.pnpm/vue@3.5.26_typescript@5.7.3/node_modules/vue/dist/vue.d.mts","../../node_modules/.pnpm/@fortawesome+fontawesome-common-types@6.7.2/node_modules/@fortawesome/fontawesome-common-types/index.d.ts","../../node_modules/.pnpm/@fortawesome+fontawesome-svg-core@6.7.2/node_modules/@fortawesome/fontawesome-svg-core/index.d.ts","../../node_modules/.pnpm/@awesome.me+kit-8137893ad3@1.0.405/node_modules/@awesome.me/kit-8137893ad3/icons/modules/icon-types.ts","../../node_modules/.pnpm/@awesome.me+kit-8137893ad3@1.0.405/node_modules/@awesome.me/kit-8137893ad3/icons/modules/index.d.ts","../../node_modules/.pnpm/@fortawesome+vue-fontawesome@3.1.3_@fortawesome+fontawesome-svg-core@6.7.2_vue@3.5.26_typescript@5.7.3_/node_modules/@fortawesome/vue-fontawesome/index.d.ts","../icons/src/types.ts","../icons/src/fzicon.vue.ts","../icons/src/fziconbackground.vue.ts","../icons/src/index.ts","../../node_modules/.pnpm/vue-router@4.6.4_vue@3.5.26_typescript@5.7.3_/node_modules/vue-router/dist/router-cwonjprp.d.mts","../../node_modules/.pnpm/vue-router@4.6.4_vue@3.5.26_typescript@5.7.3_/node_modules/vue-router/dist/vue-router.d.mts","../link/src/types.ts","../link/src/fzlink.vue.ts","../link/src/index.ts","../action/src/types.ts","../action/src/composables/useactionclasses.ts","../action/src/fzaction.vue.ts","../action/src/fzactionlist.vue.ts","../action/src/fzactionsection.vue.ts","../action/src/index.ts","../badge/src/types.ts","../badge/src/fzbadge.vue.ts","../badge/src/index.ts","./src/types.ts","../container/src/types.ts","../container/src/fzcontainer.vue.ts","../container/src/index.ts","../divider/src/types.ts","../divider/src/fzdivider.vue.ts","../divider/src/index.ts","./src/components/types.ts","./src/components/fzcardtitle.vue.ts","./src/components/fzcardheader.vue.ts","./src/components/fzcardfooter.vue.ts","./src/components/fzcardactionlink.vue.ts","../button/src/types.ts","../button/src/utils.ts","../button/src/fzbutton.vue.ts","../button/src/fziconbutton.vue.ts","../button/src/fzbuttongroup.vue.ts","../button/src/index.ts","../composables/src/types.ts","../composables/src/utils/number/index.ts","../composables/src/utils/position/index.ts","../composables/src/utils/index.ts","../composables/src/composables/usefloating.ts","../composables/src/composables/usemediaquery.ts","../composables/src/composables/usebreakpoints.ts","../composables/src/composables/useclickoutside.ts","../composables/src/composables/usekeydown.ts","../composables/src/composables/usekeyup.ts","../composables/src/composables/usecurrency.ts","../composables/src/composables/index.ts","../style/src/custom-directives/validation.ts","../style/src/custom-directives/config.ts","../style/src/custom-directives/vbold.ts","../style/tokens.json","../style/safe-colors.json","../style/safe-semantic-colors.json","../style/src/custom-directives/vcolor.ts","../style/src/custom-directives/vsmall.ts","../style/src/custom-directives/index.ts","../style/src/constants.ts","../style/src/index.ts","../composables/src/fzfloating.vue.ts","../composables/src/index.ts","../dropdown/src/types.ts","../dropdown/src/fzdropdown.vue.ts","../dropdown/src/fzicondropdown.vue.ts","../dropdown/src/index.ts","./src/components/fzcardmultiactions.vue.ts","./src/components/fzcardnoaction.vue.ts","./src/fzcardlistitem.vue.ts","./src/fzcardlist.vue.ts","./__vls_types.d.ts","./dist/src/types.d.ts","./dist/src/fzcardlist.vue.d.ts","./dist/src/fzcardlistitem.vue.d.ts","./dist/src/index.d.ts","./dist/index.d.ts","./dist/src/components/types.d.ts","./dist/src/components/fzcardactionlink.vue.d.ts","./dist/src/components/fzcardfooter.vue.d.ts","./dist/src/components/fzcardheader.vue.d.ts","./dist/src/components/fzcardmultiactions.vue.d.ts","./dist/src/components/fzcardnoaction.vue.d.ts","./dist/src/components/fzcardtitle.vue.d.ts","./src/index.ts"],"fileInfos":[{"version":"0","affectsGlobalScope":true},"0","0","0","0","0","0",{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},"0","0",{"version":"0","affectsGlobalScope":true},"0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0",{"version":"0","affectsGlobalScope":true},"0","0","0","0","0","0","0","0","0","0","0","0","0"],"root":[83,[90,94],[130,147]],"options":{"composite":true,"esModuleInterop":true,"jsx":1,"jsxImportSource":"vue","module":99,"noImplicitThis":true,"skipLibCheck":true,"strict":true,"target":99,"useDefineForClassFields":true},"fileIdsList":[[51,60],[62],[53],[60],[57,61,70],[46,52,54],[55],[46],[46,47,48,50],[47,48,49,50],[57,70],[57,69,70],[50,56],[50],[51,57,70,74],[51,57,68,70,73,74,75],[51,74,76,77,78],[51,68,70,73],[51,57,68,70,80],[51,80,81],[51,68],[51,57,68,70,95,96],[51,57,70,86,95,96],[51,57,70,95,96,97],[51,95,97,98,99],[51,57,70,95,97],[51,57,70],[138],[57,70,79,140],[57,70,140],[79,82],[57,70,79,135],[135,136,137],[51,57,68,70,82,86,89,90,92,93],[51,57,70,86,90],[51,57,70,86,90,91],[51,57,70,79,82,86,89,90,92,93,129],[51,57,70,82,86,89,90,92,93],[51,57,68,70,86,90],[51,79,82],[51,57,70,79,83,86,132],[51,57,70,79,83,94,130,131],[51,83,132,133],[51,105,106,107,108,109,110,111],[51,106],[51,101,104],[51,57,70,101,104],[51,57,70,101,112,123],[51,101,104,112,124],[51,102,103],[51],[51,101],[51,57,70,84],[51,84,85],[51,57,70,87],[51,87,88],[51,57,70,79,96,100,125,126],[51,57,70,79,96,100,126,127],[51,126,127,128],[51,57,70,79,100],[51,57,63,64,65,70],[51,57,65,66,70],[51,57,61,63,65,66,67,70],[51,57,70,71],[51,71,72],[51,70],[51,116],[51,113],[51,113,114,115,119,120],[51,57,70,113,114],[51,57,70,113,114,116,117,118],[51,57,70,121,122],[],[51,74],[51,80],[51,95],[51,57,70,95],[57,70,79,143],[57,70,143],[51,101,104,112],[51,84],[51,87],[51,126],[51,57,61,63,65,70],[51,71]],"referencedMap":[[62,1],[63,2],[54,3],[61,4],[64,5],[55,6],[56,7],[47,8],[48,9],[50,10],[69,11],[70,12],[57,13],[51,14],[59,13],[58,14],[75,15],[76,16],[77,15],[78,15],[79,17],[74,18],[81,19],[82,20],[80,21],[97,22],[99,23],[98,24],[100,25],[95,21],[96,26],[134,27],[139,28],[141,29],[142,30],[143,30],[144,29],[145,30],[146,30],[140,31],[136,32],[137,32],[138,33],[135,31],[94,34],[93,35],[92,36],[130,37],[131,38],[91,39],[90,40],[133,41],[132,42],[147,43],[83,40],[112,44],[107,45],[108,27],[111,46],[105,47],[109,27],[110,27],[106,27],[124,48],[125,49],[101,27],[104,50],[102,51],[103,52],[85,53],[86,54],[84,51],[88,55],[89,56],[87,51],[127,57],[128,58],[129,59],[126,60],[66,61],[67,62],[68,63],[65,51],[72,64],[73,65],[71,66],[122,67],[114,68],[121,69],[113,27],[115,70],[119,71],[120,70],[123,72]],"exportedModulesMap":[[62,1],[63,2],[54,3],[53,73],[52,73],[60,73],[61,4],[64,5],[55,6],[56,7],[47,8],[48,9],[50,10],[46,73],[49,73],[44,73],[45,73],[8,73],[9,73],[11,73],[10,73],[2,73],[12,73],[13,73],[14,73],[15,73],[16,73],[17,73],[18,73],[19,73],[3,73],[4,73],[20,73],[24,73],[21,73],[22,73],[23,73],[25,73],[26,73],[27,73],[5,73],[28,73],[29,73],[30,73],[31,73],[6,73],[35,73],[32,73],[33,73],[34,73],[36,73],[7,73],[37,73],[42,73],[43,73],[38,73],[39,73],[40,73],[41,73],[1,73],[69,11],[70,12],[57,13],[51,14],[59,13],[58,14],[75,15],[76,16],[77,15],[78,15],[79,74],[74,18],[81,19],[82,75],[80,21],[97,22],[99,23],[98,24],[100,76],[95,21],[96,77],[134,27],[139,27],[141,27],[142,27],[143,31],[144,78],[145,79],[146,79],[140,27],[136,27],[137,27],[138,27],[135,27],[94,34],[93,35],[92,36],[130,37],[131,38],[91,39],[90,40],[133,41],[132,42],[147,78],[83,40],[112,44],[107,45],[108,27],[111,46],[105,47],[109,27],[110,27],[106,27],[124,48],[125,80],[101,27],[104,50],[102,51],[103,52],[85,53],[86,81],[84,51],[88,55],[89,82],[87,51],[127,57],[128,58],[129,83],[126,60],[66,61],[67,62],[68,84],[65,51],[72,64],[73,85],[71,66],[117,73],[118,73],[122,67],[114,68],[121,69],[113,27],[115,70],[119,71],[120,70],[123,72],[116,73]],"semanticDiagnosticsPerFile":[62,63,54,53,52,60,61,64,55,56,47,48,50,46,49,44,45,8,9,11,10,2,12,13,14,15,16,17,18,19,3,4,20,24,21,22,23,25,26,27,5,28,29,30,31,6,35,32,33,34,36,7,37,42,43,38,39,40,41,1,69,70,57,51,59,58,75,76,77,78,79,74,81,82,80,97,99,98,100,95,96,134,139,141,142,143,144,145,146,140,136,137,138,135,94,93,92,130,131,91,90,133,132,147,83,112,107,108,111,105,109,110,106,124,125,101,104,102,103,85,86,84,88,89,87,127,128,129,126,66,67,68,65,72,73,71,117,118,122,114,121,113,115,119,120,123,116],"affectedFilesPendingEmit":[94,93,92,130,131,91,90,133,132,147,83],"emitSignatures":[83,90,91,92,93,94,130,131,132,133]},"version":"5.3.3"}
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { fileURLToPath, URL } from "node:url";
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
import { defineConfig } from "vite";
|
|
4
|
+
import vue from "@vitejs/plugin-vue";
|
|
5
|
+
import dts from "vite-plugin-dts";
|
|
6
|
+
|
|
7
|
+
export default defineConfig({
|
|
8
|
+
plugins: [
|
|
9
|
+
vue(),
|
|
10
|
+
dts({
|
|
11
|
+
insertTypesEntry: true,
|
|
12
|
+
}),
|
|
13
|
+
],
|
|
14
|
+
resolve: {
|
|
15
|
+
alias: {
|
|
16
|
+
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
build: {
|
|
20
|
+
lib: {
|
|
21
|
+
entry: resolve(__dirname, "./src/index.ts"),
|
|
22
|
+
name: "FzCardList",
|
|
23
|
+
},
|
|
24
|
+
rollupOptions: {
|
|
25
|
+
external: [
|
|
26
|
+
"vue",
|
|
27
|
+
"@fiscozen/icons",
|
|
28
|
+
"@fiscozen/action",
|
|
29
|
+
"@fiscozen/badge",
|
|
30
|
+
"@fiscozen/button",
|
|
31
|
+
"@fiscozen/divider",
|
|
32
|
+
"@fiscozen/dropdown",
|
|
33
|
+
"@fiscozen/container",
|
|
34
|
+
],
|
|
35
|
+
output: {
|
|
36
|
+
globals: {
|
|
37
|
+
vue: "Vue",
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
});
|
package/vitest.config.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { fileURLToPath } from "node:url";
|
|
2
|
+
import { mergeConfig, defineConfig, configDefaults } from "vitest/config";
|
|
3
|
+
import viteConfig from "./vite.config";
|
|
4
|
+
|
|
5
|
+
export default mergeConfig(
|
|
6
|
+
viteConfig,
|
|
7
|
+
defineConfig({
|
|
8
|
+
test: {
|
|
9
|
+
environment: "jsdom",
|
|
10
|
+
exclude: [...configDefaults.exclude, "e2e/*"],
|
|
11
|
+
root: fileURLToPath(new URL("./", import.meta.url)),
|
|
12
|
+
setupFiles: ["../vitest.setup.ts"],
|
|
13
|
+
coverage: {
|
|
14
|
+
provider: "v8",
|
|
15
|
+
include: ["**/src/**"],
|
|
16
|
+
exclude: ["**/index.ts", "**/__tests__/**", "**/*.stories.ts"],
|
|
17
|
+
thresholds: {
|
|
18
|
+
statements: 80,
|
|
19
|
+
branches: 75,
|
|
20
|
+
functions: 80,
|
|
21
|
+
lines: 80,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
}),
|
|
26
|
+
);
|