ep-lib-ts 1.0.36 → 1.0.39
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/dist/BgAudio-BDO4Ln5y.js +4 -0
- package/dist/DisplayBox-Diko7_uH.js +4 -0
- package/dist/Ep360Image-Dmwx7NrY.js +228 -0
- package/dist/Ep360Video-b_stvC2Z.js +235 -0
- package/dist/EpAlert-iWXSHupC.js +4 -0
- package/dist/EpAudio-Bnb1MIw6.js +4 -0
- package/dist/EpAvatar-DTfkDxUP.js +4 -0
- package/dist/{EpAvatar-Dmpg0PFj.js → EpAvatar.vue_vue_type_script_setup_true_lang-IeQ9W4tD.js} +11 -11
- package/dist/EpBadge-BcVkBKJK.js +4 -0
- package/dist/{EpBadge-DqmSNdbi.js → EpBadge-CWIq_C51.js} +2 -2
- package/dist/EpBarChart-D42B3a97.js +4 -0
- package/dist/EpBranchingScenario-dEapAg2r.js +151 -0
- package/dist/EpBtn-BtyunWne.js +4 -0
- package/dist/EpCard--mtof8hL.js +4 -0
- package/dist/{EpCheckbox-_Nt9Bvq3.js → EpCheckbox-D-AiG1k1.js} +10 -10
- package/dist/EpChip-DitreF_J.js +4 -0
- package/dist/EpCodeblock-nBOawE0H.js +4 -0
- package/dist/EpConclusion-CcOvoC8e.js +4 -0
- package/dist/EpContentSlider-DpIiJmPt.js +4 -0
- package/dist/{EpDarkmode-fMMNJbJs.js → EpDarkmode-DV-fRn1K.js} +5 -5
- package/dist/EpDescription-DeVW7LNL.js +4 -0
- package/dist/EpDivider-vEs9W9Km.js +4 -0
- package/dist/EpEdu-BC4BxjYR.js +4 -0
- package/dist/EpFlex-xdVOYg4a.js +4 -0
- package/dist/EpFunnelChart-CF1CM2id.js +4 -0
- package/dist/EpHeader-BMoXpQdW.js +4 -0
- package/dist/{EpHotsPot-DFz_Du9o.js → EpHotsPot-nT87sUMT.js} +6 -6
- package/dist/EpHover-CwOc7bvn.js +4 -0
- package/dist/EpHover.vue_vue_type_script_setup_true_lang-DDLIDTha.js +36 -0
- package/dist/EpHoverCard-BTWsiA2z.js +84 -0
- package/dist/EpIcon-Cektqqle.js +4 -0
- package/dist/EpIframe-CFLSXU7z.js +4 -0
- package/dist/EpImg-Ct-KfkRp.js +4 -0
- package/dist/EpInput-c9THhDCs.js +1095 -0
- package/dist/EpInstructions-BCFWkov8.js +4 -0
- package/dist/EpIntroduction-Cx1Tc920.js +4 -0
- package/dist/EpLineChart-BffNNoNj.js +4 -0
- package/dist/EpLink-Bx_E9Gjz.js +4 -0
- package/dist/EpLinkVersion-6CTPFhT5.js +4 -0
- package/dist/{EpList-B6Q3fXGj.js → EpList-CM3b-mLc.js} +3 -3
- package/dist/{EpListitem-DzQrc-k2.js → EpListitem-DXh4Kniu.js} +4 -4
- package/dist/EpLottieSvg-NNSQLDpl.js +1971 -0
- package/dist/EpModal-DLG_mddB.js +4 -0
- package/dist/EpNothing-DVY_GKL6.js +10 -0
- package/dist/EpObjective-DIWMrap_.js +4 -0
- package/dist/EpPieChart-CTDL07vZ.js +4 -0
- package/dist/EpQuestion-RzrZk_Op.js +4 -0
- package/dist/EpQuote-SaMcAmmL.js +4 -0
- package/dist/EpRadio-w5IkZmj5.js +4 -0
- package/dist/EpRadioSummative-BeZecHlR.js +4 -0
- package/dist/EpReading-CVgr9TGN.js +4 -0
- package/dist/EpResource-BEql6U6K.js +4 -0
- package/dist/EpScope-BAuTDV_B.js +4 -0
- package/dist/EpSection-CESMVDna.js +4 -0
- package/dist/EpSectionCols-CacYX-v3.js +4 -0
- package/dist/{EpSelect-FIb6SyJU.js → EpSelect-kjH_wTXb.js} +3 -3
- package/dist/EpSkeleton-CuvqT7PL.js +4 -0
- package/dist/EpSoftware-LK_nIUJY.js +4 -0
- package/dist/EpSpecificObjective-BTavyAY9.js +4 -0
- package/dist/EpSpinner-CZo0f9Nx.js +4 -0
- package/dist/EpStackedList-DWkLmrqI.js +75 -0
- package/dist/EpSummativeTable-Dlhhgq1A.js +4 -0
- package/dist/EpSvg-CG-uua_J.js +4 -0
- package/dist/{EpSwitch-hdXyzuR1.js → EpSwitch-DtQon_hm.js} +2 -2
- package/dist/EpTable-DsXZI8Hm.js +4 -0
- package/dist/EpTerm-DGTKAJqq.js +4 -0
- package/dist/EpText-kB0vb1Da.js +4 -0
- package/dist/{EpTextarea-D8UCQuga.js → EpTextarea-VJ4pdPV_.js} +2 -2
- package/dist/EpTimeLine-DK_bzCen.js +4 -0
- package/dist/{EpToggle-BDp54LpY.js → EpToggle-BTkTNVEz.js} +2 -2
- package/dist/{EpTooltip-B4s0_PvZ.js → EpTooltip-J6UMMP3d.js} +2 -2
- package/dist/EpVideo-CPN6M6cs.js +4 -0
- package/dist/EpVideoPanopto-UZckfqS1.js +4 -0
- package/dist/EpWordDef-dSnuxRtl.js +4 -0
- package/dist/components/basics/EpHover.vue.d.ts +12 -10
- package/dist/components/basics/EpHoverCard.vue.d.ts +86 -0
- package/dist/components/basics/EpStackedList.vue.d.ts +50 -0
- package/dist/components/educationals/EpBranchingScenario.vue.d.ts +45 -0
- package/dist/components/educationals/EpCodeblock.vue.d.ts +1 -1
- package/dist/components/interactions/Ep360Image.vue.d.ts +16 -0
- package/dist/components/interactions/Ep360Video.vue.d.ts +16 -0
- package/dist/components/medias/EpLottieSvg.vue.d.ts +58 -0
- package/dist/ep-lib-ts.js +23 -23
- package/dist/ep-lib-ts.umd.cjs +5158 -109
- package/dist/{index-D4ekzRdY.js → index-Bw4yzGuc.js} +3999 -3114
- package/dist/{index-7_RFK7FL.js → index-CPs4nmaJ.js} +4684 -4549
- package/dist/index-IdtPmXeP.js +3483 -0
- package/dist/{prism-CZvJL8HS.js → prism-DM8vlN3d.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/testImg.jpg +0 -0
- package/dist/testMaria.jpg +0 -0
- package/dist/three.module-laS36oD-.js +48903 -0
- package/dist/types/Aframe.d.ts +1 -0
- package/dist/types/Component.d.ts +10 -0
- package/dist/types/Hover.d.ts +3 -0
- package/dist/types/StackedList.d.ts +37 -0
- package/dist/types/Three.d.ts +1 -0
- package/dist/types/image360.d.ts +16 -0
- package/dist/types/video360.d.ts +16 -0
- package/package.json +10 -5
- package/src/components/basics/EpHover.vue +32 -28
- package/src/components/basics/EpHoverCard.vue +123 -0
- package/src/components/basics/EpImg.vue +1 -1
- package/src/components/basics/EpListitem.vue +41 -59
- package/src/components/basics/EpStackedList.vue +83 -0
- package/src/components/educationals/EpBranchingScenario.vue +239 -0
- package/src/components/educationals/EpCodeblock.vue +1 -1
- package/src/components/educationals/EpEdu.vue +4 -4
- package/src/components/interactions/Ep360Image.vue +344 -0
- package/src/components/interactions/Ep360Video.vue +339 -0
- package/src/components/medias/EpLottieSvg.vue +79 -0
- package/dist/BgAudio-BpeNw9L4.js +0 -4
- package/dist/DisplayBox-aSVYrDHI.js +0 -4
- package/dist/EpAlert-x0STjaqD.js +0 -4
- package/dist/EpAudio-D7LIG4mf.js +0 -4
- package/dist/EpBadge-Du6v1vQL.js +0 -4
- package/dist/EpBarChart-BoINXvhV.js +0 -4
- package/dist/EpBtn-DE6qTHlW.js +0 -4
- package/dist/EpCard-CNcn4RbZ.js +0 -4
- package/dist/EpChip-DHgdqDEX.js +0 -4
- package/dist/EpCodeblock-CR2LGKR-.js +0 -4
- package/dist/EpConclusion-B9DhTuTc.js +0 -4
- package/dist/EpContentSlider-BdS_KctY.js +0 -4
- package/dist/EpDescription-D1TbwNrX.js +0 -4
- package/dist/EpDivider-DjTTwzGb.js +0 -4
- package/dist/EpEdu-CuI1_N9M.js +0 -4
- package/dist/EpFlex-Dx5C4Gc8.js +0 -4
- package/dist/EpFunnelChart-C6_M1nag.js +0 -4
- package/dist/EpHeader-B5jyGMDA.js +0 -4
- package/dist/EpHover-3fnZrdD6.js +0 -31
- package/dist/EpIcon-DDm9gGfm.js +0 -4
- package/dist/EpIframe-BNz3cawg.js +0 -4
- package/dist/EpImg-CxjLfziE.js +0 -4
- package/dist/EpInput-HmLHpLYh.js +0 -1168
- package/dist/EpInstructions-C0reDzIV.js +0 -4
- package/dist/EpIntroduction-C92mD-hu.js +0 -4
- package/dist/EpLineChart-Cm4W9z14.js +0 -4
- package/dist/EpLink-CGVS8yjO.js +0 -4
- package/dist/EpLinkVersion-CsGN9YS9.js +0 -4
- package/dist/EpModal-DuIZeI6V.js +0 -4
- package/dist/EpNothing-BDqIuSB9.js +0 -10
- package/dist/EpObjective-R1tWBwTe.js +0 -4
- package/dist/EpPieChart-CoTBcaaf.js +0 -4
- package/dist/EpQuestion-DmEcATq1.js +0 -4
- package/dist/EpQuote-BPCJBVbM.js +0 -4
- package/dist/EpRadio-TsUBsVoj.js +0 -4
- package/dist/EpRadioSummative-Cl9dVMJD.js +0 -4
- package/dist/EpReading-vOjzuYW7.js +0 -4
- package/dist/EpResource-Dbq_41hb.js +0 -4
- package/dist/EpScope-DIc4HvYy.js +0 -4
- package/dist/EpSection-Cb18CHq0.js +0 -4
- package/dist/EpSectionCols-B1P8ujg-.js +0 -4
- package/dist/EpSkeleton-vw7gDYoi.js +0 -4
- package/dist/EpSoftware-BAKbJhZg.js +0 -4
- package/dist/EpSpecificObjective-B5L6-OCN.js +0 -4
- package/dist/EpSpinner-rQzI6_Pe.js +0 -4
- package/dist/EpSummativeTable-Djg4DVSn.js +0 -4
- package/dist/EpSvg-DggY9PtW.js +0 -4
- package/dist/EpTable-CvhrvBOq.js +0 -4
- package/dist/EpTerm-C6HSHM0J.js +0 -4
- package/dist/EpText-CftDXaM-.js +0 -4
- package/dist/EpTimeLine-D7ks1LH_.js +0 -4
- package/dist/EpVideo-3MO0ao4H.js +0 -4
- package/dist/EpVideoPanopto-C-hIsXtV.js +0 -4
- package/dist/EpWordDef-BkwqmvfJ.js +0 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module "aframe";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type Animation = "" | "scale" | "translateY" | "translateX";
|
|
2
|
+
export type Size = "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl";
|
|
3
|
+
export type Color = "" | "white" | "black" | "primary" | "secondary" | "accent" | "error" | "warning" | "success" | "info" | "question" | "tip" | "primarydark" | "secondarydark" | "accentdark" | "errordark" | "warningdark" | "successdark" | "infodark" | "questiondark" | "tipdark" | "primarylight" | "secondarylight" | "accentlight" | "errorlight" | "warninglight" | "successlight" | "infolight" | "questionlight" | "tiplight";
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ContentComponents } from './Component';
|
|
2
|
+
type Color = "primary" | "secondary" | "accent" | "error" | "warning" | "success" | "info" | "question" | "tip";
|
|
3
|
+
type Variant = "circle" | "square" | "rounded";
|
|
4
|
+
type Size = "small" | "middle" | "big";
|
|
5
|
+
interface Avatar {
|
|
6
|
+
src: string;
|
|
7
|
+
alt: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ListItem {
|
|
10
|
+
uid?: string;
|
|
11
|
+
avatar?: Avatar;
|
|
12
|
+
title: string;
|
|
13
|
+
description: string;
|
|
14
|
+
component?: ContentComponents;
|
|
15
|
+
}
|
|
16
|
+
export interface ItemStyle {
|
|
17
|
+
avatar?: {
|
|
18
|
+
color?: Color;
|
|
19
|
+
size?: Size;
|
|
20
|
+
variant?: Variant;
|
|
21
|
+
name?: string;
|
|
22
|
+
};
|
|
23
|
+
cropped?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare const roundedType: {
|
|
26
|
+
none: string;
|
|
27
|
+
small: string;
|
|
28
|
+
middle: string;
|
|
29
|
+
big: string;
|
|
30
|
+
};
|
|
31
|
+
type RoundedStyle = keyof typeof roundedType;
|
|
32
|
+
export interface CustomStyle {
|
|
33
|
+
border?: boolean;
|
|
34
|
+
rounded?: RoundedStyle;
|
|
35
|
+
restricted?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module "three";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface Scene {
|
|
2
|
+
id: number;
|
|
3
|
+
skyImage: string;
|
|
4
|
+
pins: Pin[];
|
|
5
|
+
}
|
|
6
|
+
export interface Pin {
|
|
7
|
+
id: number;
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
title: string;
|
|
11
|
+
description: string;
|
|
12
|
+
type: "descriptive" | "action";
|
|
13
|
+
color: string;
|
|
14
|
+
event: "onClick" | "onHover";
|
|
15
|
+
scene: number | null;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface Scene {
|
|
2
|
+
id: number;
|
|
3
|
+
skyVideo: string;
|
|
4
|
+
pins: Pin[];
|
|
5
|
+
}
|
|
6
|
+
export interface Pin {
|
|
7
|
+
id: number;
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
title: string;
|
|
11
|
+
description: string;
|
|
12
|
+
type: "descriptive" | "action";
|
|
13
|
+
color: string;
|
|
14
|
+
event: "onClick" | "onHover";
|
|
15
|
+
scene: number | null;
|
|
16
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ep-lib-ts",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.39",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
7
7
|
"src/components/"
|
|
@@ -26,17 +26,21 @@
|
|
|
26
26
|
"preview": "vite preview"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
+
"@lottiefiles/dotlottie-vue": "^0.5.6",
|
|
29
30
|
"@mdi/js": "^7.4.47",
|
|
31
|
+
"@types/three": "^0.170.0",
|
|
30
32
|
"@vueuse/core": "^10.9.0",
|
|
31
33
|
"@wdns/vue-code-block": "^2.3.3",
|
|
32
|
-
"
|
|
34
|
+
"aframe": "^1.6.0",
|
|
35
|
+
"apexcharts": "3.53.0",
|
|
33
36
|
"katex": "^0.16.11",
|
|
34
37
|
"markdown-it": "^14.1.0",
|
|
35
38
|
"postcss-cli": "^11.0.0",
|
|
39
|
+
"three": "^0.170.0",
|
|
36
40
|
"vee-validate": "^4.13.2",
|
|
37
41
|
"vue": "^3.2.45",
|
|
38
42
|
"vue-router": "^4.4.5",
|
|
39
|
-
"vue3-apexcharts": "
|
|
43
|
+
"vue3-apexcharts": "1.6.0"
|
|
40
44
|
},
|
|
41
45
|
"devDependencies": {
|
|
42
46
|
"@tailwindcss/forms": "^0.5.9",
|
|
@@ -51,7 +55,7 @@
|
|
|
51
55
|
"typescript": "^5.6.2",
|
|
52
56
|
"vite": "^5.4.5",
|
|
53
57
|
"vite-plugin-dts": "^3.9.0",
|
|
54
|
-
"vue-tsc": "^2.2.
|
|
58
|
+
"vue-tsc": "^2.2.2"
|
|
55
59
|
},
|
|
56
60
|
"peerDependencies": {
|
|
57
61
|
"vue": "^3.2.45"
|
|
@@ -59,5 +63,6 @@
|
|
|
59
63
|
"engines": {
|
|
60
64
|
"node": "20.x.x"
|
|
61
65
|
},
|
|
62
|
-
"license": "MIT"
|
|
66
|
+
"license": "MIT",
|
|
67
|
+
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
|
63
68
|
}
|
|
@@ -1,56 +1,60 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { toRefs, computed, ref } from "vue";
|
|
3
3
|
import useColors from '../../composables/useColors'
|
|
4
|
+
import { useRenderText } from '../../composables/useRenderText';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
type Color = ""|"white"|"black"|"primary"|"secondary"|"accent"|"error"|"warning"|"success"|"info"|"question"|"tip"
|
|
7
|
-
|"primarydark"|"secondarydark"|"accentdark"|"errordark"|"warningdark"|"successdark"|"infodark"|"questiondark"|"tipdark"
|
|
8
|
-
|"primarylight"|"secondarylight"|"accentlight"|"errorlight"|"warninglight"|"successlight"|"infolight"|"questionlight"|"tiplight";
|
|
6
|
+
import { Color, Animation, Size } from "../../types/Hover";
|
|
9
7
|
|
|
10
8
|
interface Props {
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
bgColor?: string;
|
|
10
|
+
textColor?:string;
|
|
13
11
|
text?: string;
|
|
14
|
-
animation?:Animation
|
|
12
|
+
animation?:Animation;
|
|
13
|
+
seeThrough?: boolean;
|
|
14
|
+
textSize?: Size;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
const props = withDefaults(defineProps<Props>(), {
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
bgColor: "beige",
|
|
19
|
+
textColor:"black",
|
|
20
20
|
text: "",
|
|
21
|
-
animation:""
|
|
21
|
+
animation:"translateX"
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
return `${useColors('bg', props.bg_color)}`
|
|
28
|
-
}
|
|
29
|
-
})
|
|
25
|
+
const hoverstyle = computed(()=>{
|
|
26
|
+
let css = "";
|
|
30
27
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
if (props.animation=="scale")
|
|
29
|
+
css = `group-hover:scale-105`
|
|
30
|
+
else if (props.animation == "translateY") {
|
|
31
|
+
css = `translate-y-96 group-hover:translate-y-0`
|
|
34
32
|
}
|
|
33
|
+
else if (props.animation == "translateX") {
|
|
34
|
+
css = `translate-x-96 group-hover:translate-x-0`
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
let opacity = (props.seeThrough)? "group-hover:opacity-90" : "group-hover:opacity-100";
|
|
38
|
+
let textSize = (props.textSize)? `text-${props.textSize}` : "text-md";
|
|
39
|
+
|
|
40
|
+
return css + ' ' + opacity + ' ' + textSize;
|
|
35
41
|
})
|
|
36
42
|
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
43
|
+
const styleObject = computed(() => {
|
|
44
|
+
return {
|
|
45
|
+
backgroundColor: props.bgColor,
|
|
46
|
+
color: props.textColor
|
|
47
|
+
}
|
|
42
48
|
})
|
|
43
49
|
|
|
44
50
|
|
|
45
51
|
</script>
|
|
46
52
|
|
|
47
53
|
<template>
|
|
48
|
-
<div class="relative
|
|
54
|
+
<div class="relative group overflow-hidden bg-cover bg-no-repeat">
|
|
49
55
|
<slot ></slot>
|
|
50
|
-
<div :class="`absolute
|
|
51
|
-
|
|
52
|
-
text-4xl ${hoverstyle} ${textcolor}`">
|
|
53
|
-
{{ props.text }}
|
|
56
|
+
<div :style="styleObject" :class="`rounded-t-md absolute bottom-0 left-0 right-0 top-0 max-h-full w-full p-10 dark:text-white box-border whitespace-normal overflow-x-auto overflow-y-auto
|
|
57
|
+
flex flex-col opacity-0 transition duration-1000 ease-in-out ${hoverstyle}`" v-html="useRenderText(text)">
|
|
54
58
|
</div>
|
|
55
59
|
</div>
|
|
56
60
|
</template>
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { computed, toRefs } from 'vue';
|
|
3
|
+
import EpHover from './EpHover.vue';
|
|
4
|
+
import EpIcon from './EpIcon.vue';
|
|
5
|
+
import useColors from '../../composables/useColors'
|
|
6
|
+
//types with capital letter, object styles in lowercase
|
|
7
|
+
import { type Density, density_style } from "../../types/Card";
|
|
8
|
+
|
|
9
|
+
import { Color, Animation, Size } from "../../types/Hover";
|
|
10
|
+
|
|
11
|
+
interface Props {
|
|
12
|
+
title?: string | null;
|
|
13
|
+
subtitle?: string | null;
|
|
14
|
+
outlined?: boolean;
|
|
15
|
+
flat?: boolean;
|
|
16
|
+
icon?: string | null;
|
|
17
|
+
color?: string | null;
|
|
18
|
+
src?: string | null;
|
|
19
|
+
maxWidth?:string;
|
|
20
|
+
density?:Density;
|
|
21
|
+
|
|
22
|
+
hoverContent: string;
|
|
23
|
+
hoverBg?: string;
|
|
24
|
+
hoverAnimation?: Animation;
|
|
25
|
+
seeThrough?: boolean;
|
|
26
|
+
textSize?: Size;
|
|
27
|
+
hoverColor?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
33
|
+
title: null,
|
|
34
|
+
subtitle: null,
|
|
35
|
+
outlined: false,
|
|
36
|
+
flat: false,
|
|
37
|
+
icon: null,
|
|
38
|
+
color: null,
|
|
39
|
+
src:null,
|
|
40
|
+
density:"default",
|
|
41
|
+
maxWidth:"max-w-4xl",
|
|
42
|
+
|
|
43
|
+
hoverBg: "",
|
|
44
|
+
hoverAnimation: "translateY"
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
//styles card
|
|
48
|
+
const shadowCard = computed(() => {
|
|
49
|
+
return !props.flat ? 'shadow-lg' : ''
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
const borderColor = computed(() => {
|
|
53
|
+
if (props.outlined && props.color) {
|
|
54
|
+
return `border solid ${useColors('border', props.color)}`
|
|
55
|
+
}
|
|
56
|
+
if (props.outlined) {
|
|
57
|
+
return 'border solid border-primary dark:border-primary'
|
|
58
|
+
}
|
|
59
|
+
return 'dark:border dark:solid dark:border-primary'
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
const bgColor = computed(() => {
|
|
63
|
+
if(props.color && !props.outlined){
|
|
64
|
+
return `${useColors('bg', props.color)}`
|
|
65
|
+
}
|
|
66
|
+
return `bg-white text-black`
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
const subTitleText = computed(()=>{
|
|
70
|
+
if(props.color && !props.outlined){
|
|
71
|
+
return 'text-white'
|
|
72
|
+
}
|
|
73
|
+
return 'text-gray-600'
|
|
74
|
+
})
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
const density_class = computed(()=> {
|
|
78
|
+
return density_style[props.density]
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
const stylesCard = computed(()=> {
|
|
82
|
+
return `
|
|
83
|
+
${shadowCard.value}
|
|
84
|
+
${borderColor.value}
|
|
85
|
+
${bgColor.value}
|
|
86
|
+
${props.maxWidth}
|
|
87
|
+
rounded-md
|
|
88
|
+
dark:bg-dark
|
|
89
|
+
dark:text-white
|
|
90
|
+
my-4 `
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
const { title, subtitle, icon, src, hoverContent } = toRefs(props)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
</script>
|
|
98
|
+
|
|
99
|
+
<template>
|
|
100
|
+
|
|
101
|
+
<div :class="`${stylesCard} mx-auto`">
|
|
102
|
+
<EpHover :textColor="hoverColor" :textSize="textSize" :seeThrough="seeThrough" :bgColor="hoverBg" :animation="hoverAnimation" :text="hoverContent" v-if="src && hoverContent">
|
|
103
|
+
<img :src="src" class="w-full rounded-t-md" alt="header card">
|
|
104
|
+
</EpHover>
|
|
105
|
+
<div :class="density_class">
|
|
106
|
+
<div v-if="title || subtitle" class="mb-2 flex items-center justify-between dark:text-white">
|
|
107
|
+
<div>
|
|
108
|
+
<h3 class="text-2xl dark:text-white font-bold">{{ title }}</h3>
|
|
109
|
+
<h4 :class="`text-xs dark:text-white ${subTitleText}`">{{ subtitle }}</h4>
|
|
110
|
+
</div>
|
|
111
|
+
<div v-if="icon">
|
|
112
|
+
<EpIcon :icon-path="icon"></EpIcon>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
<slot name="card-header"></slot>
|
|
116
|
+
<div class="dark:text-white">
|
|
117
|
+
<slot></slot>
|
|
118
|
+
</div>
|
|
119
|
+
<div class="dark:text-white max-w-4xl"><slot name="card-actions"></slot></div>
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
|
|
123
|
+
</template>
|
|
@@ -108,7 +108,7 @@ const { src, alt, title, caption, thumbnail, bib, sizeThumbnail } =
|
|
|
108
108
|
<p class="text-gray-500 dark:text-white text-sm mt-4">
|
|
109
109
|
{{ caption }}
|
|
110
110
|
</p>
|
|
111
|
-
<div class="text-right">
|
|
111
|
+
<div class="text-right" v-if="renderBib">
|
|
112
112
|
<EpBtn @click="toggleBib" size="small" type="primary">{{
|
|
113
113
|
labelRef
|
|
114
114
|
}}</EpBtn>
|
|
@@ -1,70 +1,52 @@
|
|
|
1
|
-
|
|
2
1
|
<script setup lang="ts">
|
|
2
|
+
import { computed, SetupContext, useSlots } from "vue";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
type Type = "default" | "nested"
|
|
7
|
-
type Disabled="false"|"true"
|
|
4
|
+
type Type = "default" | "nested";
|
|
5
|
+
type Disabled = "false" | "true";
|
|
8
6
|
|
|
9
7
|
interface Props {
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
type?: Type;
|
|
9
|
+
disabled?: Disabled;
|
|
12
10
|
}
|
|
13
11
|
|
|
14
12
|
const props = withDefaults(defineProps<Props>(), {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
const slots = useSlots()
|
|
20
|
-
console.log(slots)
|
|
21
|
-
const hasLeftContent = computed(()=>{
|
|
22
|
-
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
const hasRigthContent = computed(()=>{
|
|
26
|
-
|
|
27
|
-
})
|
|
28
|
-
const isNested = computed(()=>{
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return "opacity-75 text-slate-500 "
|
|
37
|
-
else
|
|
38
|
-
return "hover:bg-gray-200 active:bg-gray-300"
|
|
39
|
-
})
|
|
13
|
+
type: "default",
|
|
14
|
+
disabled: "false",
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const slots: SetupContext["slots"] = useSlots();
|
|
18
|
+
console.log(slots);
|
|
19
|
+
const hasLeftContent = computed(() => {
|
|
20
|
+
return slots.leftContent ? true : false;
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const hasRigthContent = computed(() => {
|
|
24
|
+
return slots.rightContent ? true : false;
|
|
25
|
+
});
|
|
26
|
+
const isNested = computed(() => {
|
|
27
|
+
if (props.type == "nested") return "px-10";
|
|
28
|
+
else return "";
|
|
29
|
+
});
|
|
30
|
+
const isDisabled = computed(() => {
|
|
31
|
+
if (props.disabled == "true") return "opacity-75 text-slate-500 ";
|
|
32
|
+
else return "hover:bg-gray-200 active:bg-gray-300";
|
|
33
|
+
});
|
|
40
34
|
</script>
|
|
41
35
|
|
|
42
36
|
<template>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
37
|
+
<li
|
|
38
|
+
:class="`flex flex-row flex-nowrap justify-between font-medium items-center py-4 ${isNested} ${isDisabled}`"
|
|
39
|
+
>
|
|
40
|
+
<div class="flex items-center">
|
|
41
|
+
<div v-if="hasLeftContent" class="mr-2 min-w-fit px-2">
|
|
42
|
+
<slot name="leftContent"></slot>
|
|
43
|
+
</div>
|
|
44
|
+
<div>
|
|
45
|
+
<slot></slot>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
<div v-if="hasRigthContent" class="px-2">
|
|
49
|
+
<slot name="rightContent"></slot>
|
|
50
|
+
</div>
|
|
51
|
+
</li>
|
|
57
52
|
</template>
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, defineAsyncComponent } from 'vue';
|
|
3
|
+
import EpAvatar from './EpAvatar.vue';
|
|
4
|
+
import { useRenderText } from '../../composables/useRenderText';
|
|
5
|
+
import type { EpComponent } from '../../types/Component';
|
|
6
|
+
|
|
7
|
+
// Importing the necessary interfaces for the code
|
|
8
|
+
import { type ListItem, type ItemStyle, roundedType, type CustomStyle } from '../../types/StackedList';
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
// Managing the props
|
|
12
|
+
interface Props {
|
|
13
|
+
elements: ListItem[];
|
|
14
|
+
itemStyle?: ItemStyle;
|
|
15
|
+
customStyle?: CustomStyle;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const props = withDefaults(defineProps<Props>(),{
|
|
19
|
+
elements: () => [],
|
|
20
|
+
itemStyle: () => { return {
|
|
21
|
+
cropped: false,
|
|
22
|
+
} },
|
|
23
|
+
customStyle: () => {
|
|
24
|
+
return {
|
|
25
|
+
border: true,
|
|
26
|
+
rounded: "small",
|
|
27
|
+
restricted: false
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
// The style of the wrapper div
|
|
34
|
+
const className = computed(() => {
|
|
35
|
+
|
|
36
|
+
const border = (props.customStyle.border === false)? 'border-0' : 'border';
|
|
37
|
+
const rounded = roundedType[(props.customStyle.rounded)? props.customStyle.rounded : 'small'];
|
|
38
|
+
const padding = (props.customStyle.restricted)? 'p-0' : 'p-4';
|
|
39
|
+
|
|
40
|
+
return `${border} ${rounded} ${padding}`;
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
// The style of the list elements
|
|
45
|
+
const elementSpacing = computed(() => (props.customStyle.restricted)? 'p-6' : 'mx-6 py-6');
|
|
46
|
+
|
|
47
|
+
const elementGrid = (element: Record<string, any>|undefined) => {
|
|
48
|
+
return element?'grid-cols-11' : 'grid-cols-7'
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
//get Component asyncComponent
|
|
52
|
+
const getCompontent = (name:EpComponent|undefined)=> {
|
|
53
|
+
if(!name){
|
|
54
|
+
return defineAsyncComponent(()=>import('../signages/EpNothing.vue'))
|
|
55
|
+
}
|
|
56
|
+
//!IMPORT IN SAME FOLDER PATH!! EpIcon and EpBtn
|
|
57
|
+
return defineAsyncComponent(()=>import(/* @vite-ignore */`./${name}.vue`))
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
</script>
|
|
61
|
+
|
|
62
|
+
<template>
|
|
63
|
+
|
|
64
|
+
<div :class="`${className} border-gray-200 flex flex-col dark:border-slate-700 dark:bg-slate-900 lg:mx-28`">
|
|
65
|
+
<li v-for="elem in elements" :key="elements.indexOf(elem)" :class="`${(elements.indexOf(elem) !== 0)? 'border-t' : ''} list-none ${elementSpacing} grid ${elementGrid(elem.component)} justify-items-center items-center border-gray-200 dark:border-slate-700`">
|
|
66
|
+
<EpAvatar v-if="elem.avatar" :src="elem.avatar?.src" :alt="elem.avatar?.alt" v-bind="itemStyle.avatar" class="col-span-2" />
|
|
67
|
+
<div class="col-span-5 justify-self-start">
|
|
68
|
+
<h3 class="font-semibold">{{ elem.title }}</h3>
|
|
69
|
+
<div :class="`${(itemStyle.cropped)? 'line-clamp-3': ''}`" v-html="useRenderText(elem.description)"></div>
|
|
70
|
+
</div>
|
|
71
|
+
<div v-if="elem.component" class="flex gap-2 items-center col-span-4 justify-self-auto">
|
|
72
|
+
|
|
73
|
+
<!--update component type-->
|
|
74
|
+
<Component :is="getCompontent(elem.component.type)" v-bind="{...elem.component.data}">
|
|
75
|
+
{{ elem.component.data.content }}
|
|
76
|
+
</Component>
|
|
77
|
+
</div>
|
|
78
|
+
</li>
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
</template>
|
|
82
|
+
|
|
83
|
+
|