ep-lib-ts 1.0.39 → 1.0.40
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-o-6UyPLQ.js +4 -0
- package/dist/DisplayBox-kNQglpGH.js +4 -0
- package/dist/EpAlert-DyFkfcBY.js +4 -0
- package/dist/EpAudio-D33uLLKW.js +4 -0
- package/dist/EpAvatar-VKpJzHex.js +4 -0
- package/dist/EpBadge-BZKe8gkM.js +4 -0
- package/dist/EpBarChart-DSbJgjP4.js +4 -0
- package/dist/{EpBranchingScenario-dEapAg2r.js → EpBranchingScenario-HmQ5tqNL.js} +11 -11
- package/dist/EpBtn-eQgJ7t7X.js +4 -0
- package/dist/EpCard-DmkbiqF8.js +4 -0
- package/dist/EpCardLink-CZktIRDZ.js +4 -0
- package/dist/EpChip-CvPvgb7r.js +4 -0
- package/dist/EpCodeblock-CWJ6fozJ.js +4 -0
- package/dist/EpConclusion-B5-N829f.js +4 -0
- package/dist/EpContentSlider-CwCS1urD.js +4 -0
- package/dist/{EpDarkmode-DV-fRn1K.js → EpDarkmode-DgXjweO7.js} +1 -1
- package/dist/EpDescription-CpkftJ_t.js +4 -0
- package/dist/EpDivider-Cm9VAuRM.js +4 -0
- package/dist/EpEdu-l9pEISFf.js +4 -0
- package/dist/EpFlex-C5fyq8lg.js +4 -0
- package/dist/EpFunnelChart-CH_6LUvo.js +4 -0
- package/dist/EpHeader-CCvORAE4.js +4 -0
- package/dist/EpHover-oFN3yCY9.js +4 -0
- package/dist/EpHoverCard-CtASruWi.js +4 -0
- package/dist/EpIcon-CbmGlHE2.js +4 -0
- package/dist/EpIframe-Dnb7aND_.js +4 -0
- package/dist/EpImg-DB5ZMjSu.js +4 -0
- package/dist/{EpInput-c9THhDCs.js → EpInput-CaN-TCpG.js} +42 -42
- package/dist/EpInstructions-CaWQD2qB.js +4 -0
- package/dist/EpIntroduction-CI0_D2yu.js +4 -0
- package/dist/EpLineChart-LJX0c0Nf.js +4 -0
- package/dist/EpLink-DPB7Nepc.js +4 -0
- package/dist/EpLinkVersion-CKWqW5AF.js +4 -0
- package/dist/{EpList-CM3b-mLc.js → EpList-DqsIwnA9.js} +1 -1
- package/dist/EpModal-B97mL5T-.js +4 -0
- package/dist/{EpNothing-DVY_GKL6.js → EpNothing-rOIFtbf1.js} +1 -1
- package/dist/EpObjective-rFX5IDy3.js +4 -0
- package/dist/EpPieChart-BS4qEe0K.js +4 -0
- package/dist/EpQuestion-D1jwZMyZ.js +4 -0
- package/dist/EpQuote-C4fI2kxZ.js +4 -0
- package/dist/EpRadio-mIf2ff8X.js +4 -0
- package/dist/EpRadioSummative-Bx66akYL.js +4 -0
- package/dist/EpReading-BFoNTxDy.js +4 -0
- package/dist/EpResource-8CZRcYtG.js +4 -0
- package/dist/EpScope-DTfD4VEM.js +4 -0
- package/dist/EpSection-CcxIByfH.js +4 -0
- package/dist/EpSectionCols-t1k3weXM.js +4 -0
- package/dist/EpSelect-C10jbOyP.js +33 -0
- package/dist/EpSkeleton-BlWjhOMG.js +4 -0
- package/dist/EpSoftware-BENDV3kt.js +4 -0
- package/dist/EpSpecificObjective-ByRW9R5i.js +4 -0
- package/dist/EpSpinner-C6KTvwwF.js +4 -0
- package/dist/EpStackedList-CyBiCT2q.js +4 -0
- package/dist/EpSummativeTable-7eMF30pz.js +4 -0
- package/dist/EpSvg-gHmfbp0I.js +4 -0
- package/dist/EpTable-hgRLqA3o.js +4 -0
- package/dist/EpTerm-DQhi12a3.js +4 -0
- package/dist/EpText-BVr0yeDd.js +4 -0
- package/dist/EpTimeLine-CqfJ9LEU.js +4 -0
- package/dist/EpVideo-cJCwDUcG.js +4 -0
- package/dist/EpVideoPanopto-CslIPs2L.js +4 -0
- package/dist/EpWordDef-DiIZxUFD.js +4 -0
- package/dist/components/basics/EpCard.vue.d.ts +6 -1
- package/dist/components/basics/EpDivider.vue.d.ts +1 -1
- package/dist/components/basics/EpHover.vue.d.ts +2 -2
- package/dist/components/basics/EpHoverCard.vue.d.ts +5 -5
- package/dist/components/basics/EpImg.vue.d.ts +1 -1
- package/dist/components/basics/EpStackedList.vue.d.ts +23 -19
- package/dist/components/educationals/EpReading.vue.d.ts +2 -2
- package/dist/components/forms/EpSelect.vue.d.ts +11 -1
- package/dist/components/interactions/EpModal.vue.d.ts +1 -1
- package/dist/components/medias/EpCardLink.vue.d.ts +61 -0
- package/dist/ep-lib-ts.js +44 -41
- package/dist/ep-lib-ts.umd.cjs +238 -239
- package/dist/{index-Bw4yzGuc.js → index-BIs_9STK.js} +1 -1
- package/dist/{index-CPs4nmaJ.js → index-mAWa7blx.js} +4419 -4114
- package/dist/index.d.ts +4 -1
- package/dist/{prism-DM8vlN3d.js → prism-EB5WECGI.js} +1 -1
- package/dist/types/Hover.d.ts +2 -2
- package/dist/types/Medias.d.ts +1 -0
- package/dist/types/StackedList.d.ts +8 -15
- package/package.json +2 -2
- package/src/components/basics/EpCard.vue +32 -11
- package/src/components/basics/EpHover.vue +3 -3
- package/src/components/basics/EpHoverCard.vue +14 -12
- package/src/components/basics/EpStackedList.vue +20 -22
- package/src/components/charts/EpFunnelChart.vue +1 -1
- package/src/components/charts/EpPieChart.vue +1 -1
- package/src/components/educationals/EpEdu.vue +32 -14
- package/src/components/educationals/EpReading.vue +4 -2
- package/src/components/educationals/EpResource.vue +1 -1
- package/src/components/forms/EpSelect.vue +8 -3
- package/src/components/interactions/EpQuestion.vue +1 -1
- package/src/components/medias/EpAudio.vue +1 -1
- package/src/components/medias/EpCardLink.vue +77 -0
- package/src/components/medias/EpIframe.vue +1 -1
- package/src/components/medias/EpLink.vue +1 -1
- package/src/components/medias/EpTimeLine.vue +2 -2
- package/src/components/medias/EpVideo.vue +1 -1
- package/src/components/medias/EpVideoPanopto.vue +1 -1
- package/dist/BgAudio-BDO4Ln5y.js +0 -4
- package/dist/DisplayBox-Diko7_uH.js +0 -4
- package/dist/EpAlert-iWXSHupC.js +0 -4
- package/dist/EpAudio-Bnb1MIw6.js +0 -4
- package/dist/EpAvatar-DTfkDxUP.js +0 -4
- package/dist/EpAvatar.vue_vue_type_script_setup_true_lang-IeQ9W4tD.js +0 -50
- package/dist/EpBadge-BcVkBKJK.js +0 -4
- package/dist/EpBarChart-D42B3a97.js +0 -4
- package/dist/EpBtn-BtyunWne.js +0 -4
- package/dist/EpCard--mtof8hL.js +0 -4
- package/dist/EpChip-DitreF_J.js +0 -4
- package/dist/EpCodeblock-nBOawE0H.js +0 -4
- package/dist/EpConclusion-CcOvoC8e.js +0 -4
- package/dist/EpContentSlider-DpIiJmPt.js +0 -4
- package/dist/EpDescription-DeVW7LNL.js +0 -4
- package/dist/EpDivider-vEs9W9Km.js +0 -4
- package/dist/EpEdu-BC4BxjYR.js +0 -4
- package/dist/EpFlex-xdVOYg4a.js +0 -4
- package/dist/EpFunnelChart-CF1CM2id.js +0 -4
- package/dist/EpHeader-BMoXpQdW.js +0 -4
- package/dist/EpHover-CwOc7bvn.js +0 -4
- package/dist/EpHover.vue_vue_type_script_setup_true_lang-DDLIDTha.js +0 -36
- package/dist/EpHoverCard-BTWsiA2z.js +0 -84
- package/dist/EpIcon-Cektqqle.js +0 -4
- package/dist/EpIframe-CFLSXU7z.js +0 -4
- package/dist/EpImg-Ct-KfkRp.js +0 -4
- package/dist/EpInstructions-BCFWkov8.js +0 -4
- package/dist/EpIntroduction-Cx1Tc920.js +0 -4
- package/dist/EpLineChart-BffNNoNj.js +0 -4
- package/dist/EpLink-Bx_E9Gjz.js +0 -4
- package/dist/EpLinkVersion-6CTPFhT5.js +0 -4
- package/dist/EpModal-DLG_mddB.js +0 -4
- package/dist/EpObjective-DIWMrap_.js +0 -4
- package/dist/EpPieChart-CTDL07vZ.js +0 -4
- package/dist/EpQuestion-RzrZk_Op.js +0 -4
- package/dist/EpQuote-SaMcAmmL.js +0 -4
- package/dist/EpRadio-w5IkZmj5.js +0 -4
- package/dist/EpRadioSummative-BeZecHlR.js +0 -4
- package/dist/EpReading-CVgr9TGN.js +0 -4
- package/dist/EpResource-BEql6U6K.js +0 -4
- package/dist/EpScope-BAuTDV_B.js +0 -4
- package/dist/EpSection-CESMVDna.js +0 -4
- package/dist/EpSectionCols-CacYX-v3.js +0 -4
- package/dist/EpSelect-kjH_wTXb.js +0 -32
- package/dist/EpSkeleton-CuvqT7PL.js +0 -4
- package/dist/EpSoftware-LK_nIUJY.js +0 -4
- package/dist/EpSpecificObjective-BTavyAY9.js +0 -4
- package/dist/EpSpinner-CZo0f9Nx.js +0 -4
- package/dist/EpStackedList-DWkLmrqI.js +0 -75
- package/dist/EpSummativeTable-Dlhhgq1A.js +0 -4
- package/dist/EpSvg-CG-uua_J.js +0 -4
- package/dist/EpTable-DsXZI8Hm.js +0 -4
- package/dist/EpTerm-DGTKAJqq.js +0 -4
- package/dist/EpText-kB0vb1Da.js +0 -4
- package/dist/EpTimeLine-DK_bzCen.js +0 -4
- package/dist/EpVideo-CPN6M6cs.js +0 -4
- package/dist/EpVideoPanopto-UZckfqS1.js +0 -4
- package/dist/EpWordDef-dSnuxRtl.js +0 -4
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ import { default as EpSpinner } from './components/basics/EpSpinner.vue';
|
|
|
11
11
|
import { default as EpFlex } from './components/basics/EpFlex.vue';
|
|
12
12
|
import { default as EpIcon } from './components/basics/EpIcon.vue';
|
|
13
13
|
import { default as EpTable } from './components/basics/EpTable.vue';
|
|
14
|
+
import { default as EpStackedList } from './components/basics/EpStackedList.vue';
|
|
15
|
+
import { default as EpHoverCard } from './components/basics/EpHoverCard.vue';
|
|
14
16
|
import { default as EpBarChart } from './components/charts/EpBarChart.vue';
|
|
15
17
|
import { default as EpLineChart } from './components/charts/EpLineChart.vue';
|
|
16
18
|
import { default as EpPieChart } from './components/charts/EpPieChart.vue';
|
|
@@ -45,9 +47,10 @@ import { default as EpTimeLine } from './components/medias/EpTimeLine.vue';
|
|
|
45
47
|
import { default as EpVideo } from './components/medias/EpVideo.vue';
|
|
46
48
|
import { default as EpVideoPanopto } from './components/medias/EpVideoPanopto.vue';
|
|
47
49
|
import { default as EpWordDef } from './components/medias/EpWordDef.vue';
|
|
50
|
+
import { default as EpCardLink } from './components/medias/EpCardLink.vue';
|
|
48
51
|
import { default as EpAlert } from './components/signages/EpAlert.vue';
|
|
49
52
|
import { default as EpHeader } from './components/signages/EpHeader.vue';
|
|
50
53
|
import { default as EpQuote } from './components/signages/EpQuote.vue';
|
|
51
54
|
import { default as EpSkeleton } from './components/signages/EpSkeleton.vue';
|
|
52
55
|
|
|
53
|
-
export { EpBadge, EpBtn, EpCard, EpChip, EpDivider, EpFlex, EpIcon, EpImg, EpSection, EpSpinner, EpTable, EpBarChart, EpLineChart, EpPieChart, EpFunnelChart, EpText, EpEdu, EpReading, EpResource, EpScope, EpAccordeon, EpContentSlider, EpModal, EpQuestion, EpTabs, EpAudio, EpCarousel, EpIframe, EpKatex, EpLink, EpLinkVersion, EpSoftware, EpSvg, EpTerm, EpTimeLine, EpVideo, EpVideoPanopto, EpAlert, EpHeader, EpQuote, EpSkeleton, EpWordDef, EpSummativeTable, EpObjective, EpSpecificObjective, EpIntroduction, EpInstructions, EpDescription, EpConclusion, EpCodeblock, EpSectionCols };
|
|
56
|
+
export { EpBadge, EpBtn, EpCard, EpChip, EpDivider, EpFlex, EpIcon, EpImg, EpSection, EpSpinner, EpTable, EpBarChart, EpLineChart, EpPieChart, EpFunnelChart, EpText, EpEdu, EpReading, EpResource, EpScope, EpAccordeon, EpContentSlider, EpModal, EpQuestion, EpTabs, EpAudio, EpCarousel, EpIframe, EpKatex, EpLink, EpLinkVersion, EpSoftware, EpSvg, EpTerm, EpTimeLine, EpVideo, EpVideoPanopto, EpAlert, EpHeader, EpQuote, EpSkeleton, EpWordDef, EpSummativeTable, EpObjective, EpSpecificObjective, EpIntroduction, EpInstructions, EpDescription, EpConclusion, EpCodeblock, EpSectionCols, EpCardLink, EpStackedList, EpHoverCard };
|
package/dist/types/Hover.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export type Animation = "" | "scale" | "translateY" | "translateX";
|
|
2
|
-
export type
|
|
3
|
-
export type
|
|
2
|
+
export type TextSize = "text-sm" | "text-lg" | "text-xl" | "text-2xl" | "text-3xl" | "text-4xl" | "text-5xl" | "text-6xl";
|
|
3
|
+
export type MaxWidth = "max-w-xs" | "max-w-sm:" | "max-w-md" | "max-w-lg" | "max-w-xl" | "max-w-2xl";
|
package/dist/types/Medias.d.ts
CHANGED
|
@@ -3,8 +3,9 @@ type Color = "primary" | "secondary" | "accent" | "error" | "warning" | "success
|
|
|
3
3
|
type Variant = "circle" | "square" | "rounded";
|
|
4
4
|
type Size = "small" | "middle" | "big";
|
|
5
5
|
interface Avatar {
|
|
6
|
-
src
|
|
6
|
+
src?: string;
|
|
7
7
|
alt: string;
|
|
8
|
+
name?: string;
|
|
8
9
|
}
|
|
9
10
|
export interface ListItem {
|
|
10
11
|
uid?: string;
|
|
@@ -13,14 +14,11 @@ export interface ListItem {
|
|
|
13
14
|
description: string;
|
|
14
15
|
component?: ContentComponents;
|
|
15
16
|
}
|
|
16
|
-
export interface
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
name?: string;
|
|
22
|
-
};
|
|
23
|
-
cropped?: boolean;
|
|
17
|
+
export interface AvatarStyle {
|
|
18
|
+
color?: Color;
|
|
19
|
+
size?: Size;
|
|
20
|
+
variant?: Variant;
|
|
21
|
+
name?: string;
|
|
24
22
|
}
|
|
25
23
|
export declare const roundedType: {
|
|
26
24
|
none: string;
|
|
@@ -28,10 +26,5 @@ export declare const roundedType: {
|
|
|
28
26
|
middle: string;
|
|
29
27
|
big: string;
|
|
30
28
|
};
|
|
31
|
-
type RoundedStyle = keyof typeof roundedType;
|
|
32
|
-
export interface CustomStyle {
|
|
33
|
-
border?: boolean;
|
|
34
|
-
rounded?: RoundedStyle;
|
|
35
|
-
restricted?: boolean;
|
|
36
|
-
}
|
|
29
|
+
export type RoundedStyle = keyof typeof roundedType;
|
|
37
30
|
export {};
|
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.40",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
7
7
|
"src/components/"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"typescript": "^5.6.2",
|
|
56
56
|
"vite": "^5.4.5",
|
|
57
57
|
"vite-plugin-dts": "^3.9.0",
|
|
58
|
-
"vue-tsc": "^2.2.
|
|
58
|
+
"vue-tsc": "^2.2.4"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"vue": "^3.2.45"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { toRefs, computed } from "vue";
|
|
2
|
+
import { toRefs, computed, useSlots, type Slots } from "vue";
|
|
3
3
|
import EpIcon from './EpIcon.vue';
|
|
4
|
+
import EpSvg from '../medias/EpSvg.vue'
|
|
4
5
|
import useColors from '../../composables/useColors'
|
|
5
6
|
//types with capital letter, object styles in lowercase
|
|
6
7
|
import { type Density, density_style } from "../../types/Card";
|
|
@@ -15,6 +16,8 @@ interface Props {
|
|
|
15
16
|
src?: string | null;
|
|
16
17
|
maxWidth?:string;
|
|
17
18
|
density?:Density;
|
|
19
|
+
svg?:string;
|
|
20
|
+
isLink?:boolean;
|
|
18
21
|
}
|
|
19
22
|
|
|
20
23
|
|
|
@@ -28,7 +31,8 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
28
31
|
color: null,
|
|
29
32
|
src:null,
|
|
30
33
|
density:"default",
|
|
31
|
-
maxWidth:"max-w-full"
|
|
34
|
+
maxWidth:"max-w-full",
|
|
35
|
+
isLink:false
|
|
32
36
|
})
|
|
33
37
|
|
|
34
38
|
//styles card
|
|
@@ -41,9 +45,16 @@ const borderColor = computed(() => {
|
|
|
41
45
|
return `border solid ${useColors('border', props.color)}`
|
|
42
46
|
}
|
|
43
47
|
if (props.outlined) {
|
|
44
|
-
return 'border solid border-primary dark:border-
|
|
48
|
+
return 'border solid border-primary dark:border-white'
|
|
45
49
|
}
|
|
46
|
-
return 'dark:border dark:solid dark:border-
|
|
50
|
+
return 'dark:border dark:solid dark:border-white'
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
const isLinkStyle = computed(()=> {
|
|
54
|
+
if(props.isLink){
|
|
55
|
+
return 'dark:hover:border-white hover:border-primary hover:border hover:border-2 rounded-md cursor-pointer'
|
|
56
|
+
}
|
|
57
|
+
return ''
|
|
47
58
|
})
|
|
48
59
|
|
|
49
60
|
const bgColor = computed(() => {
|
|
@@ -73,19 +84,29 @@ const stylesCard = computed(()=> {
|
|
|
73
84
|
${props.maxWidth}
|
|
74
85
|
rounded-md
|
|
75
86
|
dark:bg-dark
|
|
76
|
-
|
|
77
|
-
|
|
87
|
+
dark:text-white
|
|
88
|
+
`
|
|
78
89
|
})
|
|
79
90
|
|
|
80
91
|
|
|
81
|
-
const { title, subtitle, icon, src } = toRefs(props)
|
|
92
|
+
const { title, subtitle, icon, src, svg } = toRefs(props)
|
|
93
|
+
|
|
94
|
+
const slots: Slots = useSlots();
|
|
95
|
+
|
|
96
|
+
const hasContent = computed(() => {
|
|
97
|
+
return !!slots.default || !!props.title || !!props.subtitle || !!props.icon;
|
|
98
|
+
});
|
|
82
99
|
|
|
83
100
|
</script>
|
|
84
101
|
<template>
|
|
85
|
-
<div :class="`${stylesCard} `">
|
|
86
|
-
<img v-if="src" :src="src" class="w-full rounded-t-md" alt="header card">
|
|
87
|
-
<div
|
|
88
|
-
<
|
|
102
|
+
<div :class="`${stylesCard} ${isLinkStyle}`">
|
|
103
|
+
<img v-if="src" :src="src" :class="`w-full ${hasContent ? 'rounded-t-md':'rounded-md'}`" alt="header card">
|
|
104
|
+
<div v-if="!src && svg" class="w-full rounded-t-md">
|
|
105
|
+
<EpSvg :content="svg"/>
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
<div :class="density_class" v-if="hasContent">
|
|
109
|
+
<div v-if="title || subtitle || icon" class="mb-2 flex items-center justify-between dark:text-white">
|
|
89
110
|
<div>
|
|
90
111
|
<h3 class="text-2xl dark:text-white font-bold">{{ title }}</h3>
|
|
91
112
|
<h4 :class="`text-xs dark:text-white ${subTitleText}`">{{ subtitle }}</h4>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import useColors from '../../composables/useColors'
|
|
4
4
|
import { useRenderText } from '../../composables/useRenderText';
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { Animation, TextSize } from "../../types/Hover";
|
|
7
7
|
|
|
8
8
|
interface Props {
|
|
9
9
|
bgColor?: string;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
text?: string;
|
|
12
12
|
animation?:Animation;
|
|
13
13
|
seeThrough?: boolean;
|
|
14
|
-
textSize?:
|
|
14
|
+
textSize?: TextSize;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
const props = withDefaults(defineProps<Props>(), {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
let opacity = (props.seeThrough)? "group-hover:opacity-90" : "group-hover:opacity-100";
|
|
38
|
-
let textSize = (props.textSize)?
|
|
38
|
+
let textSize = (props.textSize)? props.textSize : "";
|
|
39
39
|
|
|
40
40
|
return css + ' ' + opacity + ' ' + textSize;
|
|
41
41
|
})
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { computed, toRefs } from 'vue';
|
|
2
|
+
import { computed, toRefs, useSlots, type Slots } from 'vue';
|
|
3
3
|
import EpHover from './EpHover.vue';
|
|
4
4
|
import EpIcon from './EpIcon.vue';
|
|
5
5
|
import useColors from '../../composables/useColors'
|
|
6
|
+
|
|
6
7
|
//types with capital letter, object styles in lowercase
|
|
7
8
|
import { type Density, density_style } from "../../types/Card";
|
|
8
9
|
|
|
9
|
-
import {
|
|
10
|
+
import type { Animation, TextSize, MaxWidth } from "../../types/Hover";
|
|
10
11
|
|
|
11
12
|
interface Props {
|
|
12
13
|
title?: string | null;
|
|
@@ -16,14 +17,13 @@ interface Props {
|
|
|
16
17
|
icon?: string | null;
|
|
17
18
|
color?: string | null;
|
|
18
19
|
src?: string | null;
|
|
19
|
-
maxWidth?:
|
|
20
|
+
maxWidth?:MaxWidth;
|
|
20
21
|
density?:Density;
|
|
21
|
-
|
|
22
22
|
hoverContent: string;
|
|
23
23
|
hoverBg?: string;
|
|
24
24
|
hoverAnimation?: Animation;
|
|
25
25
|
seeThrough?: boolean;
|
|
26
|
-
textSize?:
|
|
26
|
+
textSize?: TextSize;
|
|
27
27
|
hoverColor?: string;
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -38,8 +38,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
38
38
|
color: null,
|
|
39
39
|
src:null,
|
|
40
40
|
density:"default",
|
|
41
|
-
maxWidth:"max-w-
|
|
42
|
-
|
|
41
|
+
maxWidth:"max-w-xl",
|
|
43
42
|
hoverBg: "",
|
|
44
43
|
hoverAnimation: "translateY"
|
|
45
44
|
})
|
|
@@ -86,23 +85,26 @@ const stylesCard = computed(()=> {
|
|
|
86
85
|
${props.maxWidth}
|
|
87
86
|
rounded-md
|
|
88
87
|
dark:bg-dark
|
|
89
|
-
dark:text-white
|
|
90
|
-
my-4 `
|
|
88
|
+
dark:text-white`
|
|
91
89
|
})
|
|
92
90
|
|
|
93
91
|
|
|
94
92
|
const { title, subtitle, icon, src, hoverContent } = toRefs(props)
|
|
95
93
|
|
|
94
|
+
const slots: Slots = useSlots();
|
|
95
|
+
|
|
96
|
+
const hasContent = computed(() => {
|
|
97
|
+
return !!slots.default || !!props.title || !!props.subtitle;
|
|
98
|
+
});
|
|
96
99
|
|
|
97
100
|
</script>
|
|
98
101
|
|
|
99
102
|
<template>
|
|
100
|
-
|
|
101
103
|
<div :class="`${stylesCard} mx-auto`">
|
|
102
104
|
<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">
|
|
105
|
+
<img :src="src" :class="`w-full ${hasContent ? 'rounded-t-md':'rounded-md'}`" alt="header card">
|
|
104
106
|
</EpHover>
|
|
105
|
-
<div :class="density_class">
|
|
107
|
+
<div :class="density_class" v-if="hasContent">
|
|
106
108
|
<div v-if="title || subtitle" class="mb-2 flex items-center justify-between dark:text-white">
|
|
107
109
|
<div>
|
|
108
110
|
<h3 class="text-2xl dark:text-white font-bold">{{ title }}</h3>
|
|
@@ -5,44 +5,42 @@ import { useRenderText } from '../../composables/useRenderText';
|
|
|
5
5
|
import type { EpComponent } from '../../types/Component';
|
|
6
6
|
|
|
7
7
|
// Importing the necessary interfaces for the code
|
|
8
|
-
import { type ListItem, type
|
|
8
|
+
import { type ListItem, type AvatarStyle, type RoundedStyle, roundedType } from '../../types/StackedList';
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
// Managing the props
|
|
12
12
|
interface Props {
|
|
13
13
|
elements: ListItem[];
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
border?:boolean;
|
|
15
|
+
rounded?:RoundedStyle;
|
|
16
|
+
restricted?:boolean;
|
|
17
|
+
cropped?:boolean;
|
|
18
|
+
avatarStyle?: AvatarStyle;
|
|
16
19
|
}
|
|
17
20
|
|
|
18
21
|
const props = withDefaults(defineProps<Props>(),{
|
|
19
22
|
elements: () => [],
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
restricted: false
|
|
28
|
-
}
|
|
29
|
-
}
|
|
23
|
+
avatarStyle: () => { return {
|
|
24
|
+
size:"middle"
|
|
25
|
+
}},
|
|
26
|
+
border:true,
|
|
27
|
+
rounded:"small",
|
|
28
|
+
restricted:false,
|
|
29
|
+
cropped:false
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
// The style of the wrapper div
|
|
34
34
|
const className = computed(() => {
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
const padding = (props.customStyle.restricted)? 'p-0' : 'p-4';
|
|
39
|
-
|
|
35
|
+
const border = (props.border === false)? 'border-0' : 'border';
|
|
36
|
+
const rounded = roundedType[(props.rounded)? props.rounded : 'small'];
|
|
37
|
+
const padding = (props.restricted)? 'p-0' : 'p-4';
|
|
40
38
|
return `${border} ${rounded} ${padding}`;
|
|
41
39
|
})
|
|
42
40
|
|
|
43
41
|
|
|
44
42
|
// The style of the list elements
|
|
45
|
-
const elementSpacing = computed(() => (props.
|
|
43
|
+
const elementSpacing = computed(() => (props.restricted)? 'p-6' : 'mx-6 py-6');
|
|
46
44
|
|
|
47
45
|
const elementGrid = (element: Record<string, any>|undefined) => {
|
|
48
46
|
return element?'grid-cols-11' : 'grid-cols-7'
|
|
@@ -62,11 +60,11 @@ const getCompontent = (name:EpComponent|undefined)=> {
|
|
|
62
60
|
<template>
|
|
63
61
|
|
|
64
62
|
<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
|
|
66
|
-
<EpAvatar v-if="elem.avatar" :src="elem.avatar?.src" :alt="elem.avatar?.alt" v-bind="
|
|
63
|
+
<li v-for="elem in elements" :key="elements.indexOf(elem)" :class="`${(elements.indexOf(elem) !== 0)? 'border-t' : ''} list-none ${elementSpacing} grid grid-cols-11 justify-items-center items-center border-gray-200 dark:border-slate-700`">
|
|
64
|
+
<EpAvatar v-if="elem.avatar" :name="elem.avatar?.name" :src="elem.avatar?.src" :alt="elem.avatar?.alt" v-bind="avatarStyle" class="col-span-2" />
|
|
67
65
|
<div class="col-span-5 justify-self-start">
|
|
68
66
|
<h3 class="font-semibold">{{ elem.title }}</h3>
|
|
69
|
-
<div :class="`${(
|
|
67
|
+
<div :class="`${(cropped)? 'line-clamp-3': ''}`" v-html="useRenderText(elem.description)"></div>
|
|
70
68
|
</div>
|
|
71
69
|
<div v-if="elem.component" class="flex gap-2 items-center col-span-4 justify-self-auto">
|
|
72
70
|
|
|
@@ -23,9 +23,9 @@ interface Props {
|
|
|
23
23
|
|
|
24
24
|
const props = withDefaults(defineProps<Props>(), {
|
|
25
25
|
title: null,
|
|
26
|
-
type: "
|
|
26
|
+
type: "neutral",
|
|
27
27
|
hideIcon: false,
|
|
28
|
-
flat:
|
|
28
|
+
flat: true,
|
|
29
29
|
labelIntentions: "",
|
|
30
30
|
});
|
|
31
31
|
|
|
@@ -48,24 +48,43 @@ const renderIcon = computed(() => {
|
|
|
48
48
|
});
|
|
49
49
|
|
|
50
50
|
const topBarStyle = computed(() => {
|
|
51
|
-
return `${mediaVariants[props.type]} text-left
|
|
51
|
+
return `${mediaVariants[props.type]} text-left ${
|
|
52
52
|
props.flat ? "" : "rounded-t-md"
|
|
53
53
|
} flex justify-between items-center `;
|
|
54
54
|
});
|
|
55
55
|
|
|
56
56
|
const bottomBarStyle = computed(() => {
|
|
57
|
-
return `${mediaVariants[props.type]} text-right
|
|
57
|
+
return `${mediaVariants[props.type]} text-right`;
|
|
58
58
|
});
|
|
59
59
|
|
|
60
|
+
const paddingTopStyle = computed(()=> {
|
|
61
|
+
if(props.type != "neutral"){
|
|
62
|
+
return `px-5 py-2`
|
|
63
|
+
}
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
const paddingBottomStyle = computed(()=> {
|
|
67
|
+
if(props.type != "neutral"){
|
|
68
|
+
return `pr-5`
|
|
69
|
+
}
|
|
70
|
+
})
|
|
71
|
+
const boxPaddingStyle = computed(()=> {
|
|
72
|
+
if(props.type != "neutral"){
|
|
73
|
+
return `px-5`
|
|
74
|
+
}
|
|
75
|
+
})
|
|
76
|
+
|
|
60
77
|
const containerStyle = computed(() => {
|
|
61
78
|
if (hasActions.value || hasIntentions.value || props.title) {
|
|
62
|
-
return `
|
|
79
|
+
return ` overflow-hidden ${
|
|
63
80
|
props.flat ? "" : "shadow-md"
|
|
64
|
-
} flex flex-col justify-
|
|
81
|
+
} flex flex-col justify-start h-full`;
|
|
65
82
|
}
|
|
66
83
|
return `flex flex-col justify-between`;
|
|
67
84
|
});
|
|
68
85
|
|
|
86
|
+
|
|
87
|
+
|
|
69
88
|
// type, taxonomyLevel, courseCode, courseTitle, title, subtitle, height, src, color, synchrone
|
|
70
89
|
|
|
71
90
|
const { title, hideIcon } = toRefs(props);
|
|
@@ -74,34 +93,33 @@ const { title, hideIcon } = toRefs(props);
|
|
|
74
93
|
<template>
|
|
75
94
|
<div :class="containerStyle">
|
|
76
95
|
<div
|
|
77
|
-
:class="`${topBarStyle}`"
|
|
78
|
-
class="dark:base-dark"
|
|
96
|
+
:class="`${topBarStyle} ${paddingTopStyle} dark:base-dark`"
|
|
79
97
|
v-if="title || mandateLevel"
|
|
80
98
|
>
|
|
81
99
|
<!-- <EpIcon :size="24" :icon-path="mdiBookOpenVariant"></EpIcon> -->
|
|
82
100
|
<h3>
|
|
83
|
-
<EpIcon v-if="!hideIcon" :iconPath="renderIcon" size="24"></EpIcon>
|
|
101
|
+
<EpIcon v-if="!hideIcon" :iconPath="renderIcon" size="24" class="mr-2"></EpIcon>
|
|
84
102
|
<span class="font-bold align-middle">{{ title }}</span>
|
|
85
103
|
</h3>
|
|
86
104
|
<EpScope v-if="mandateLevel" :mandateLevel="mandateLevel"></EpScope>
|
|
87
105
|
</div>
|
|
88
|
-
<div class="
|
|
89
|
-
<div class="py-
|
|
106
|
+
<div :class="`${boxPaddingStyle} dark:base-dark dark:text-white`">
|
|
107
|
+
<div class="py-4" v-if="hasIntentions">
|
|
90
108
|
<!-- <EpIcon :size="24" :icon-path="mdiInformationOutline"></EpIcon> -->
|
|
91
109
|
<h4
|
|
92
110
|
v-if="labelIntentions"
|
|
93
|
-
class="font-
|
|
111
|
+
class="font-light text-sm pb-1 tracking-wide dark:text-white"
|
|
94
112
|
>
|
|
95
113
|
{{ labelIntentions }}
|
|
96
114
|
</h4>
|
|
97
115
|
<slot name="intentions"></slot>
|
|
98
116
|
<EpDivider />
|
|
99
117
|
</div>
|
|
100
|
-
<div class="
|
|
118
|
+
<div class="pt-2">
|
|
101
119
|
<slot name="content"></slot>
|
|
102
120
|
</div>
|
|
103
121
|
</div>
|
|
104
|
-
<div :class="bottomBarStyle" class="dark:base-dark" v-if="hasActions">
|
|
122
|
+
<div :class="`${bottomBarStyle} ${paddingBottomStyle}`" class="dark:base-dark" v-if="hasActions">
|
|
105
123
|
<slot name="actions"></slot>
|
|
106
124
|
</div>
|
|
107
125
|
</div>
|
|
@@ -45,7 +45,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
45
45
|
icon: "mdiBookmarkBox",
|
|
46
46
|
hideCover: false,
|
|
47
47
|
compact: false,
|
|
48
|
-
type:"
|
|
48
|
+
type:"neutral",
|
|
49
49
|
hideIcon:false,
|
|
50
50
|
labelIn:"dans",
|
|
51
51
|
labelRead:"Lire",
|
|
@@ -152,7 +152,9 @@ const errorImg = (event:Event)=>{
|
|
|
152
152
|
</div>
|
|
153
153
|
</template>
|
|
154
154
|
<template #actions>
|
|
155
|
-
<EpBtn
|
|
155
|
+
<EpBtn text :href="url" v-if="url" type="primary">
|
|
156
|
+
<EpIcon :size="20" :icon-path="mdiOpenInNew" ></EpIcon> {{labelRead}}
|
|
157
|
+
</EpBtn>
|
|
156
158
|
</template>
|
|
157
159
|
</EpEdu>
|
|
158
160
|
</div>
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
type Option = { text: string; value: string };
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
interface Props {
|
|
5
5
|
options: Option[];
|
|
6
6
|
modelValue: string;
|
|
7
|
-
|
|
7
|
+
label?:string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
11
|
+
label:"Select Theme:"
|
|
12
|
+
})
|
|
8
13
|
|
|
9
14
|
const model = defineModel()
|
|
10
15
|
|
|
@@ -12,7 +17,7 @@ const model = defineModel()
|
|
|
12
17
|
|
|
13
18
|
<template>
|
|
14
19
|
<div class="w-full max-w-xs">
|
|
15
|
-
<label class="block text-sm font-medium text-gray-700 mb-1">
|
|
20
|
+
<label class="block text-sm font-medium text-gray-700 mb-1">{{label}}</label>
|
|
16
21
|
<select
|
|
17
22
|
v-model="model"
|
|
18
23
|
class="block w-full bg-white border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import EpCard from '../basics/EpCard.vue';
|
|
4
|
+
import type { MaxWidth } from "../../types/Hover";
|
|
5
|
+
import { mdiChevronRight } from "@mdi/js";
|
|
6
|
+
interface Props {
|
|
7
|
+
title?: string | null;
|
|
8
|
+
subtitle?: string | null;
|
|
9
|
+
outlined?: boolean;
|
|
10
|
+
flat?: boolean;
|
|
11
|
+
color?: string | null;
|
|
12
|
+
src?: string | null;
|
|
13
|
+
svg?: string;
|
|
14
|
+
maxWidth?:MaxWidth;
|
|
15
|
+
center?:boolean;
|
|
16
|
+
content?:string;
|
|
17
|
+
iconlink?:string;
|
|
18
|
+
to?:string;
|
|
19
|
+
nuxtLink?:boolean;
|
|
20
|
+
isExternal?:boolean
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
const props = withDefaults(defineProps<Props>(),{
|
|
25
|
+
//defaults ? ...
|
|
26
|
+
svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>dog</title><path d="M18,4C16.29,4 15.25,4.33 14.65,4.61C13.88,4.23 13,4 12,4C11,4 10.12,4.23 9.35,4.61C8.75,4.33 7.71,4 6,4C3,4 1,12 1,14C1,14.83 2.32,15.59 4.14,15.9C4.78,18.14 7.8,19.85 11.5,20V15.72C10.91,15.35 10,14.68 10,14C10,13 12,13 12,13C12,13 14,13 14,14C14,14.68 13.09,15.35 12.5,15.72V20C16.2,19.85 19.22,18.14 19.86,15.9C21.68,15.59 23,14.83 23,14C23,12 21,4 18,4M4.15,13.87C3.65,13.75 3.26,13.61 3,13.5C3.25,10.73 5.2,6.4 6.05,6C6.59,6 7,6.06 7.37,6.11C5.27,8.42 4.44,12.04 4.15,13.87M9,12A1,1 0 0,1 8,11C8,10.46 8.45,10 9,10A1,1 0 0,1 10,11C10,11.56 9.55,12 9,12M15,12A1,1 0 0,1 14,11C14,10.46 14.45,10 15,10A1,1 0 0,1 16,11C16,11.56 15.55,12 15,12M19.85,13.87C19.56,12.04 18.73,8.42 16.63,6.11C17,6.06 17.41,6 17.95,6C18.8,6.4 20.75,10.73 21,13.5C20.75,13.61 20.36,13.75 19.85,13.87Z" /></svg>',
|
|
27
|
+
maxWidth:"max-w-md",
|
|
28
|
+
center:false,
|
|
29
|
+
iconlink:mdiChevronRight,
|
|
30
|
+
nuxtLink:false,
|
|
31
|
+
to:'/',
|
|
32
|
+
isExternal:false
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
const centerCard = computed(()=> {
|
|
36
|
+
if(props.center){
|
|
37
|
+
return 'mx-auto'
|
|
38
|
+
}
|
|
39
|
+
return ''
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<template>
|
|
46
|
+
<div :class="`${centerCard} ${maxWidth}`">
|
|
47
|
+
<a v-if="isExternal" :href="to" target="_blank" rel="noopener noreferrer">
|
|
48
|
+
<EpCard
|
|
49
|
+
:title="title"
|
|
50
|
+
:subtitle="subtitle"
|
|
51
|
+
:src="src"
|
|
52
|
+
:svg="svg"
|
|
53
|
+
:maxWidth="maxWidth"
|
|
54
|
+
:icon="iconlink"
|
|
55
|
+
isLink
|
|
56
|
+
/>
|
|
57
|
+
</a>
|
|
58
|
+
<component
|
|
59
|
+
:is="nuxtLink ? 'NuxtLink' : 'RouterLink'"
|
|
60
|
+
:to="to"
|
|
61
|
+
v-else
|
|
62
|
+
>
|
|
63
|
+
<EpCard
|
|
64
|
+
:title="title"
|
|
65
|
+
:subtitle="subtitle"
|
|
66
|
+
:src="src"
|
|
67
|
+
:svg="svg"
|
|
68
|
+
:maxWidth="maxWidth"
|
|
69
|
+
:icon="iconlink"
|
|
70
|
+
isLink
|
|
71
|
+
/>
|
|
72
|
+
</component>
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
</template>
|