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.
Files changed (158) hide show
  1. package/dist/BgAudio-o-6UyPLQ.js +4 -0
  2. package/dist/DisplayBox-kNQglpGH.js +4 -0
  3. package/dist/EpAlert-DyFkfcBY.js +4 -0
  4. package/dist/EpAudio-D33uLLKW.js +4 -0
  5. package/dist/EpAvatar-VKpJzHex.js +4 -0
  6. package/dist/EpBadge-BZKe8gkM.js +4 -0
  7. package/dist/EpBarChart-DSbJgjP4.js +4 -0
  8. package/dist/{EpBranchingScenario-dEapAg2r.js → EpBranchingScenario-HmQ5tqNL.js} +11 -11
  9. package/dist/EpBtn-eQgJ7t7X.js +4 -0
  10. package/dist/EpCard-DmkbiqF8.js +4 -0
  11. package/dist/EpCardLink-CZktIRDZ.js +4 -0
  12. package/dist/EpChip-CvPvgb7r.js +4 -0
  13. package/dist/EpCodeblock-CWJ6fozJ.js +4 -0
  14. package/dist/EpConclusion-B5-N829f.js +4 -0
  15. package/dist/EpContentSlider-CwCS1urD.js +4 -0
  16. package/dist/{EpDarkmode-DV-fRn1K.js → EpDarkmode-DgXjweO7.js} +1 -1
  17. package/dist/EpDescription-CpkftJ_t.js +4 -0
  18. package/dist/EpDivider-Cm9VAuRM.js +4 -0
  19. package/dist/EpEdu-l9pEISFf.js +4 -0
  20. package/dist/EpFlex-C5fyq8lg.js +4 -0
  21. package/dist/EpFunnelChart-CH_6LUvo.js +4 -0
  22. package/dist/EpHeader-CCvORAE4.js +4 -0
  23. package/dist/EpHover-oFN3yCY9.js +4 -0
  24. package/dist/EpHoverCard-CtASruWi.js +4 -0
  25. package/dist/EpIcon-CbmGlHE2.js +4 -0
  26. package/dist/EpIframe-Dnb7aND_.js +4 -0
  27. package/dist/EpImg-DB5ZMjSu.js +4 -0
  28. package/dist/{EpInput-c9THhDCs.js → EpInput-CaN-TCpG.js} +42 -42
  29. package/dist/EpInstructions-CaWQD2qB.js +4 -0
  30. package/dist/EpIntroduction-CI0_D2yu.js +4 -0
  31. package/dist/EpLineChart-LJX0c0Nf.js +4 -0
  32. package/dist/EpLink-DPB7Nepc.js +4 -0
  33. package/dist/EpLinkVersion-CKWqW5AF.js +4 -0
  34. package/dist/{EpList-CM3b-mLc.js → EpList-DqsIwnA9.js} +1 -1
  35. package/dist/EpModal-B97mL5T-.js +4 -0
  36. package/dist/{EpNothing-DVY_GKL6.js → EpNothing-rOIFtbf1.js} +1 -1
  37. package/dist/EpObjective-rFX5IDy3.js +4 -0
  38. package/dist/EpPieChart-BS4qEe0K.js +4 -0
  39. package/dist/EpQuestion-D1jwZMyZ.js +4 -0
  40. package/dist/EpQuote-C4fI2kxZ.js +4 -0
  41. package/dist/EpRadio-mIf2ff8X.js +4 -0
  42. package/dist/EpRadioSummative-Bx66akYL.js +4 -0
  43. package/dist/EpReading-BFoNTxDy.js +4 -0
  44. package/dist/EpResource-8CZRcYtG.js +4 -0
  45. package/dist/EpScope-DTfD4VEM.js +4 -0
  46. package/dist/EpSection-CcxIByfH.js +4 -0
  47. package/dist/EpSectionCols-t1k3weXM.js +4 -0
  48. package/dist/EpSelect-C10jbOyP.js +33 -0
  49. package/dist/EpSkeleton-BlWjhOMG.js +4 -0
  50. package/dist/EpSoftware-BENDV3kt.js +4 -0
  51. package/dist/EpSpecificObjective-ByRW9R5i.js +4 -0
  52. package/dist/EpSpinner-C6KTvwwF.js +4 -0
  53. package/dist/EpStackedList-CyBiCT2q.js +4 -0
  54. package/dist/EpSummativeTable-7eMF30pz.js +4 -0
  55. package/dist/EpSvg-gHmfbp0I.js +4 -0
  56. package/dist/EpTable-hgRLqA3o.js +4 -0
  57. package/dist/EpTerm-DQhi12a3.js +4 -0
  58. package/dist/EpText-BVr0yeDd.js +4 -0
  59. package/dist/EpTimeLine-CqfJ9LEU.js +4 -0
  60. package/dist/EpVideo-cJCwDUcG.js +4 -0
  61. package/dist/EpVideoPanopto-CslIPs2L.js +4 -0
  62. package/dist/EpWordDef-DiIZxUFD.js +4 -0
  63. package/dist/components/basics/EpCard.vue.d.ts +6 -1
  64. package/dist/components/basics/EpDivider.vue.d.ts +1 -1
  65. package/dist/components/basics/EpHover.vue.d.ts +2 -2
  66. package/dist/components/basics/EpHoverCard.vue.d.ts +5 -5
  67. package/dist/components/basics/EpImg.vue.d.ts +1 -1
  68. package/dist/components/basics/EpStackedList.vue.d.ts +23 -19
  69. package/dist/components/educationals/EpReading.vue.d.ts +2 -2
  70. package/dist/components/forms/EpSelect.vue.d.ts +11 -1
  71. package/dist/components/interactions/EpModal.vue.d.ts +1 -1
  72. package/dist/components/medias/EpCardLink.vue.d.ts +61 -0
  73. package/dist/ep-lib-ts.js +44 -41
  74. package/dist/ep-lib-ts.umd.cjs +238 -239
  75. package/dist/{index-Bw4yzGuc.js → index-BIs_9STK.js} +1 -1
  76. package/dist/{index-CPs4nmaJ.js → index-mAWa7blx.js} +4419 -4114
  77. package/dist/index.d.ts +4 -1
  78. package/dist/{prism-DM8vlN3d.js → prism-EB5WECGI.js} +1 -1
  79. package/dist/types/Hover.d.ts +2 -2
  80. package/dist/types/Medias.d.ts +1 -0
  81. package/dist/types/StackedList.d.ts +8 -15
  82. package/package.json +2 -2
  83. package/src/components/basics/EpCard.vue +32 -11
  84. package/src/components/basics/EpHover.vue +3 -3
  85. package/src/components/basics/EpHoverCard.vue +14 -12
  86. package/src/components/basics/EpStackedList.vue +20 -22
  87. package/src/components/charts/EpFunnelChart.vue +1 -1
  88. package/src/components/charts/EpPieChart.vue +1 -1
  89. package/src/components/educationals/EpEdu.vue +32 -14
  90. package/src/components/educationals/EpReading.vue +4 -2
  91. package/src/components/educationals/EpResource.vue +1 -1
  92. package/src/components/forms/EpSelect.vue +8 -3
  93. package/src/components/interactions/EpQuestion.vue +1 -1
  94. package/src/components/medias/EpAudio.vue +1 -1
  95. package/src/components/medias/EpCardLink.vue +77 -0
  96. package/src/components/medias/EpIframe.vue +1 -1
  97. package/src/components/medias/EpLink.vue +1 -1
  98. package/src/components/medias/EpTimeLine.vue +2 -2
  99. package/src/components/medias/EpVideo.vue +1 -1
  100. package/src/components/medias/EpVideoPanopto.vue +1 -1
  101. package/dist/BgAudio-BDO4Ln5y.js +0 -4
  102. package/dist/DisplayBox-Diko7_uH.js +0 -4
  103. package/dist/EpAlert-iWXSHupC.js +0 -4
  104. package/dist/EpAudio-Bnb1MIw6.js +0 -4
  105. package/dist/EpAvatar-DTfkDxUP.js +0 -4
  106. package/dist/EpAvatar.vue_vue_type_script_setup_true_lang-IeQ9W4tD.js +0 -50
  107. package/dist/EpBadge-BcVkBKJK.js +0 -4
  108. package/dist/EpBarChart-D42B3a97.js +0 -4
  109. package/dist/EpBtn-BtyunWne.js +0 -4
  110. package/dist/EpCard--mtof8hL.js +0 -4
  111. package/dist/EpChip-DitreF_J.js +0 -4
  112. package/dist/EpCodeblock-nBOawE0H.js +0 -4
  113. package/dist/EpConclusion-CcOvoC8e.js +0 -4
  114. package/dist/EpContentSlider-DpIiJmPt.js +0 -4
  115. package/dist/EpDescription-DeVW7LNL.js +0 -4
  116. package/dist/EpDivider-vEs9W9Km.js +0 -4
  117. package/dist/EpEdu-BC4BxjYR.js +0 -4
  118. package/dist/EpFlex-xdVOYg4a.js +0 -4
  119. package/dist/EpFunnelChart-CF1CM2id.js +0 -4
  120. package/dist/EpHeader-BMoXpQdW.js +0 -4
  121. package/dist/EpHover-CwOc7bvn.js +0 -4
  122. package/dist/EpHover.vue_vue_type_script_setup_true_lang-DDLIDTha.js +0 -36
  123. package/dist/EpHoverCard-BTWsiA2z.js +0 -84
  124. package/dist/EpIcon-Cektqqle.js +0 -4
  125. package/dist/EpIframe-CFLSXU7z.js +0 -4
  126. package/dist/EpImg-Ct-KfkRp.js +0 -4
  127. package/dist/EpInstructions-BCFWkov8.js +0 -4
  128. package/dist/EpIntroduction-Cx1Tc920.js +0 -4
  129. package/dist/EpLineChart-BffNNoNj.js +0 -4
  130. package/dist/EpLink-Bx_E9Gjz.js +0 -4
  131. package/dist/EpLinkVersion-6CTPFhT5.js +0 -4
  132. package/dist/EpModal-DLG_mddB.js +0 -4
  133. package/dist/EpObjective-DIWMrap_.js +0 -4
  134. package/dist/EpPieChart-CTDL07vZ.js +0 -4
  135. package/dist/EpQuestion-RzrZk_Op.js +0 -4
  136. package/dist/EpQuote-SaMcAmmL.js +0 -4
  137. package/dist/EpRadio-w5IkZmj5.js +0 -4
  138. package/dist/EpRadioSummative-BeZecHlR.js +0 -4
  139. package/dist/EpReading-CVgr9TGN.js +0 -4
  140. package/dist/EpResource-BEql6U6K.js +0 -4
  141. package/dist/EpScope-BAuTDV_B.js +0 -4
  142. package/dist/EpSection-CESMVDna.js +0 -4
  143. package/dist/EpSectionCols-CacYX-v3.js +0 -4
  144. package/dist/EpSelect-kjH_wTXb.js +0 -32
  145. package/dist/EpSkeleton-CuvqT7PL.js +0 -4
  146. package/dist/EpSoftware-LK_nIUJY.js +0 -4
  147. package/dist/EpSpecificObjective-BTavyAY9.js +0 -4
  148. package/dist/EpSpinner-CZo0f9Nx.js +0 -4
  149. package/dist/EpStackedList-DWkLmrqI.js +0 -75
  150. package/dist/EpSummativeTable-Dlhhgq1A.js +0 -4
  151. package/dist/EpSvg-CG-uua_J.js +0 -4
  152. package/dist/EpTable-DsXZI8Hm.js +0 -4
  153. package/dist/EpTerm-DGTKAJqq.js +0 -4
  154. package/dist/EpText-kB0vb1Da.js +0 -4
  155. package/dist/EpTimeLine-DK_bzCen.js +0 -4
  156. package/dist/EpVideo-CPN6M6cs.js +0 -4
  157. package/dist/EpVideoPanopto-UZckfqS1.js +0 -4
  158. 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 };
@@ -1,4 +1,4 @@
1
- import { a4 as V, a5 as W } from "./index-CPs4nmaJ.js";
1
+ import { a7 as V, a8 as W } from "./index-mAWa7blx.js";
2
2
  function ee(S, P) {
3
3
  for (var i = 0; i < P.length; i++) {
4
4
  const g = P[i];
@@ -1,3 +1,3 @@
1
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";
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";
@@ -1,4 +1,5 @@
1
1
  export declare const mediaVariants: {
2
+ neutral: string;
2
3
  base: string;
3
4
  primary: string;
4
5
  secondary: string;
@@ -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: string;
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 ItemStyle {
17
- avatar?: {
18
- color?: Color;
19
- size?: Size;
20
- variant?: Variant;
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.39",
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.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-primary'
48
+ return 'border solid border-primary dark:border-white'
45
49
  }
46
- return 'dark:border dark:solid dark:border-primary'
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
- datk:text-white
77
- my-4 `
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 :class="density_class">
88
- <div v-if="title || subtitle" class="mb-2 flex items-center justify-between dark:text-white">
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 { Color, Animation, Size } from "../../types/Hover";
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?: Size;
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)? `text-${props.textSize}` : "text-md";
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 { Color, Animation, Size } from "../../types/Hover";
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?:string;
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?: Size;
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-4xl",
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 ItemStyle, roundedType, type CustomStyle } from '../../types/StackedList';
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
- itemStyle?: ItemStyle;
15
- customStyle?: CustomStyle;
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
- itemStyle: () => { return {
21
- cropped: false,
22
- } },
23
- customStyle: () => {
24
- return {
25
- border: true,
26
- rounded: "small",
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 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
-
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.customStyle.restricted)? 'p-6' : 'mx-6 py-6');
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 ${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" />
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="`${(itemStyle.cropped)? 'line-clamp-3': ''}`" v-html="useRenderText(elem.description)"></div>
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
 
@@ -39,7 +39,7 @@ interface Props {
39
39
 
40
40
  const props = withDefaults(defineProps<Props>(), {
41
41
  center: true,
42
- type: 'base',
42
+ type: 'neutral',
43
43
  width: "800",
44
44
  height: 350,
45
45
  isFunnel: true,
@@ -41,7 +41,7 @@ interface Props {
41
41
 
42
42
  const props = withDefaults(defineProps<Props>(), {
43
43
  center: true,
44
- type:'base',
44
+ type:'neutral',
45
45
  width:"500",
46
46
  dataNoDisponible:"Data no disponible"
47
47
 
@@ -23,9 +23,9 @@ interface Props {
23
23
 
24
24
  const props = withDefaults(defineProps<Props>(), {
25
25
  title: null,
26
- type: "base",
26
+ type: "neutral",
27
27
  hideIcon: false,
28
- flat: false,
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 px-5 py-2 ${
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 pr-5`;
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 `rounded-lg overflow-hidden ${
79
+ return ` overflow-hidden ${
63
80
  props.flat ? "" : "shadow-md"
64
- } flex flex-col justify-between h-full`;
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="px-5 dark:base-dark dark:text-white">
89
- <div class="py-2" v-if="hasIntentions">
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-semibold mb-2 text-sm uppercase tracking-wide text-gray-500 dark:text-white"
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="py-2">
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:"base",
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 :color="type=='base'?'text-gray-700':'text-white dark:text-black'" :type="type" :href="url" v-if="url">{{labelRead}}</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>
@@ -11,7 +11,7 @@ interface Props {
11
11
  }
12
12
 
13
13
  const props = withDefaults(defineProps<Props>(), {
14
- type:'base'
14
+ type:'neutral'
15
15
  })
16
16
 
17
17
  const resourceInfo = computed(()=>{
@@ -1,10 +1,15 @@
1
1
  <script setup lang="ts">
2
2
  type Option = { text: string; value: string };
3
3
 
4
- const props = defineProps<{
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">Select Theme:</label>
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"
@@ -32,7 +32,7 @@ interface Props {
32
32
  }
33
33
 
34
34
  const props = withDefaults(defineProps<Props>(), {
35
- type: "base",
35
+ type: "neutral",
36
36
  hideIcon: false,
37
37
  shuffle: false,
38
38
  before: false,
@@ -26,7 +26,7 @@ interface Props {
26
26
  }
27
27
 
28
28
  const props = withDefaults(defineProps<Props>(), {
29
- type: 'base',
29
+ type: 'neutral',
30
30
  hideIcon: false,
31
31
  labelIntentions: "Intentions d'écoute",
32
32
  messageError:"Mauvais url"
@@ -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>
@@ -20,7 +20,7 @@ interface Props {
20
20
  }
21
21
 
22
22
  const props = withDefaults(defineProps<Props>(), {
23
- type:'base',
23
+ type:'neutral',
24
24
  big: false,
25
25
  hideIcon:false
26
26
  });