ep-lib-ts 1.0.30 → 1.0.31

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 (128) hide show
  1. package/dist/BgAudio-BSGmyNCB.js +4 -0
  2. package/dist/DisplayBox-DI-Qz5tz.js +4 -0
  3. package/dist/EpAlert-Bp5iAEc-.js +4 -0
  4. package/dist/EpAudio-BckU6j59.js +4 -0
  5. package/dist/EpBadge-BeOBQMvO.js +4 -0
  6. package/dist/EpBarChart-YrCykWAi.js +4 -0
  7. package/dist/EpBtn-BDUz3Bqr.js +4 -0
  8. package/dist/EpCard-D9kP8gnS.js +4 -0
  9. package/dist/EpChip-UdMP6D8a.js +4 -0
  10. package/dist/EpCodeblock-CYVfnmd4.js +4 -0
  11. package/dist/EpConclusion-DohPemmi.js +4 -0
  12. package/dist/EpContentSlider-Ob87TORl.js +4 -0
  13. package/dist/{EpDarkmode-B7nXz4Nn.js → EpDarkmode-BJMenrL4.js} +1 -1
  14. package/dist/EpDescription-mVMSSmOs.js +4 -0
  15. package/dist/EpDivider-C6WzjjQt.js +4 -0
  16. package/dist/EpEdu-KWh8r4lw.js +4 -0
  17. package/dist/EpFlex-ClPbW3M9.js +4 -0
  18. package/dist/EpFunnelChart-Dqu9fNJt.js +4 -0
  19. package/dist/EpHeader-DArL_UFC.js +4 -0
  20. package/dist/{EpHover-D9iE-KNv.js → EpHover-C0wjWPm7.js} +1 -1
  21. package/dist/EpIcon-BkXqE6JQ.js +4 -0
  22. package/dist/EpIframe-tbeX-0eG.js +4 -0
  23. package/dist/EpImg-BKQjzCz7.js +4 -0
  24. package/dist/{EpInput-BxNPPX9A.js → EpInput-b5Y-jSMn.js} +1 -1
  25. package/dist/EpInstructions-CWKvxuBW.js +4 -0
  26. package/dist/EpIntroduction-4QhdI4hm.js +4 -0
  27. package/dist/EpLineChart-IBoW-Jfx.js +4 -0
  28. package/dist/EpLink-BQVVFf2Q.js +4 -0
  29. package/dist/EpLinkVersion-DZmpMi2b.js +4 -0
  30. package/dist/{EpList-D7EiLwNH.js → EpList-BviUInoF.js} +1 -1
  31. package/dist/EpModal-BJTFBAde.js +4 -0
  32. package/dist/{EpNothing-CN5wC7-y.js → EpNothing-CoXOUpGx.js} +1 -1
  33. package/dist/EpObjective-viQQQFi6.js +4 -0
  34. package/dist/EpPieChart-CUP-uZVo.js +4 -0
  35. package/dist/EpQuestion-BZzHI7y3.js +4 -0
  36. package/dist/EpQuote-Auev7s6r.js +4 -0
  37. package/dist/EpRadio-DnZSlpaj.js +4 -0
  38. package/dist/EpRadioSummative-sCJDLrC3.js +4 -0
  39. package/dist/EpReading-D7u8uoS4.js +4 -0
  40. package/dist/EpResource-DIQaQ7RV.js +4 -0
  41. package/dist/EpScope-BK3f1r-a.js +4 -0
  42. package/dist/EpSection-BwgUDIfl.js +4 -0
  43. package/dist/EpSectionCols-CQurgeGM.js +96 -0
  44. package/dist/EpSkeleton-DzGATWJw.js +4 -0
  45. package/dist/EpSoftware-DF42VE0c.js +4 -0
  46. package/dist/EpSpecificObjective-DTY4gBXx.js +4 -0
  47. package/dist/EpSpinner-BH2M7Ygv.js +4 -0
  48. package/dist/EpSummativeTable-CTFUUefW.js +4 -0
  49. package/dist/EpSvg-BR35j3jl.js +4 -0
  50. package/dist/EpTable-BqlmCw9S.js +4 -0
  51. package/dist/EpTerm-waAVtc41.js +4 -0
  52. package/dist/EpText-Bg9HMZsG.js +4 -0
  53. package/dist/EpTimeLine-CDfah12U.js +4 -0
  54. package/dist/EpVideo-CWn8qb-W.js +4 -0
  55. package/dist/EpVideoPanopto-aj9Pu_ge.js +4 -0
  56. package/dist/EpWordDef-DZJVdDkN.js +4 -0
  57. package/dist/components/basics/EpSection.vue.d.ts +15 -12
  58. package/dist/components/basics/EpSectionCols.vue.d.ts +69 -0
  59. package/dist/components/forms/EpCheckbox.vue.d.ts +1 -1
  60. package/dist/components/forms/EpInput.vue.d.ts +1 -1
  61. package/dist/components/forms/EpRadio.vue.d.ts +1 -1
  62. package/dist/components/forms/EpRadioSummative.vue.d.ts +1 -1
  63. package/dist/components/forms/EpTextarea.vue.d.ts +1 -1
  64. package/dist/components/signages/EpHeader.vue.d.ts +1 -1
  65. package/dist/composables/useCreateUid.d.ts +2 -0
  66. package/dist/ep-lib-ts.js +14 -14
  67. package/dist/ep-lib-ts.umd.cjs +42 -42
  68. package/dist/{index-CjFsNJuq.js → index-BvE7762w.js} +2295 -2286
  69. package/dist/{index-Ch6ky3uk.js → index-CDBcj9DU.js} +1 -1
  70. package/dist/{prism-4vT4ciXB.js → prism-_qpMs5k9.js} +1 -1
  71. package/dist/types/Cols.d.ts +2 -0
  72. package/dist/types/Image.d.ts +1 -0
  73. package/package.json +1 -1
  74. package/src/components/basics/EpImg.vue +3 -19
  75. package/src/components/basics/EpSection.vue +52 -218
  76. package/src/components/basics/EpSectionCols.vue +100 -0
  77. package/src/components/medias/EpSvg.vue +2 -17
  78. package/src/components/signages/EpHeader.vue +1 -1
  79. package/dist/BgAudio-C8683LM2.js +0 -4
  80. package/dist/DisplayBox-qEKoGtQL.js +0 -4
  81. package/dist/EpAlert-l4Q4S63D.js +0 -4
  82. package/dist/EpAudio-Bv7Cb_lE.js +0 -4
  83. package/dist/EpBadge-DUTYlSK6.js +0 -4
  84. package/dist/EpBarChart-D2WMoNS3.js +0 -4
  85. package/dist/EpBtn-CYMGJGv6.js +0 -4
  86. package/dist/EpCard-DMzOL69R.js +0 -4
  87. package/dist/EpChip-k0ewYmQv.js +0 -4
  88. package/dist/EpCodeblock-D_qlRkaA.js +0 -4
  89. package/dist/EpConclusion-98o31XcJ.js +0 -4
  90. package/dist/EpContentSlider-D0cLpcPI.js +0 -4
  91. package/dist/EpDescription-BmkQWMd8.js +0 -4
  92. package/dist/EpDivider-DVqBtmqb.js +0 -4
  93. package/dist/EpEdu-u_tZI9Nr.js +0 -4
  94. package/dist/EpFlex-C0YVu0xx.js +0 -4
  95. package/dist/EpFunnelChart-CtqhL5Qy.js +0 -4
  96. package/dist/EpHeader-BpMwY9Un.js +0 -4
  97. package/dist/EpIcon-CS-tNGJb.js +0 -4
  98. package/dist/EpIframe-BwxkxMc2.js +0 -4
  99. package/dist/EpImg-C659L706.js +0 -4
  100. package/dist/EpInstructions-5kra-vlF.js +0 -4
  101. package/dist/EpIntroduction-ChXioejs.js +0 -4
  102. package/dist/EpLineChart-3uaDlofV.js +0 -4
  103. package/dist/EpLink-CWuo1UYv.js +0 -4
  104. package/dist/EpLinkVersion-dgN7hURw.js +0 -4
  105. package/dist/EpModal-CWML9pUx.js +0 -4
  106. package/dist/EpObjective-BogvA_WI.js +0 -4
  107. package/dist/EpPieChart-Dy3z2Wcs.js +0 -4
  108. package/dist/EpQuestion-qjn1G8ui.js +0 -4
  109. package/dist/EpQuote-DAjmGAse.js +0 -4
  110. package/dist/EpRadio-DzwEqjym.js +0 -4
  111. package/dist/EpRadioSummative-Cvr-1-_R.js +0 -4
  112. package/dist/EpReading-CsykTkxM.js +0 -4
  113. package/dist/EpResource-DkKV6gg8.js +0 -4
  114. package/dist/EpScope-B7dEbcT6.js +0 -4
  115. package/dist/EpSection-Iz0_OVgd.js +0 -4
  116. package/dist/EpSkeleton-qG1U0y_0.js +0 -4
  117. package/dist/EpSoftware-CXIZLT-v.js +0 -4
  118. package/dist/EpSpecificObjective-CsYJZwDh.js +0 -4
  119. package/dist/EpSpinner-CSR9s2Tz.js +0 -4
  120. package/dist/EpSummativeTable-DKhtT7lD.js +0 -4
  121. package/dist/EpSvg-BEmOYoKd.js +0 -4
  122. package/dist/EpTable-UeSP2yPs.js +0 -4
  123. package/dist/EpTerm-CwZo6uEk.js +0 -4
  124. package/dist/EpText-DUXBFv1T.js +0 -4
  125. package/dist/EpTimeLine-Dujz4MTA.js +0 -4
  126. package/dist/EpVideo-Cb076I_Z.js +0 -4
  127. package/dist/EpVideoPanopto-BChv0t4T.js +0 -4
  128. package/dist/EpWordDef-DYBezegI.js +0 -4
@@ -1,4 +1,4 @@
1
- import { a0 as Ml } from "./index-CjFsNJuq.js";
1
+ import { a2 as Ml } from "./index-BvE7762w.js";
2
2
  function _l(n) {
3
3
  return n instanceof Map ? n.clear = n.delete = n.set = function() {
4
4
  throw new Error("map is read-only");
@@ -1,4 +1,4 @@
1
- import { a0 as V, a1 as W } from "./index-CjFsNJuq.js";
1
+ import { a2 as V, a3 as W } from "./index-BvE7762w.js";
2
2
  function ee(S, P) {
3
3
  for (var i = 0; i < P.length; i++) {
4
4
  const g = P[i];
@@ -0,0 +1,2 @@
1
+ export declare const allowedColWidths: readonly ["w-1/5", "w-2/5", "w-3/5", "w-4/5", "w-full"];
2
+ export type SizeCols = typeof allowedColWidths[number];
@@ -3,4 +3,5 @@ export declare const sizeThumbnailStyle: {
3
3
  medium: string;
4
4
  large: string;
5
5
  };
6
+ export declare const cols_img: string[];
6
7
  export type SizeThumbnail = keyof typeof sizeThumbnailStyle;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ep-lib-ts",
3
3
  "private": false,
4
- "version": "1.0.30",
4
+ "version": "1.0.31",
5
5
  "files": [
6
6
  "dist",
7
7
  "src/components/"
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { toRefs, ref, computed } from "vue";
3
- import { type SizeThumbnail, sizeThumbnailStyle } from "../../types/Image";
3
+ import { type SizeThumbnail, sizeThumbnailStyle, cols_img } from "../../types/Image";
4
4
  import { useImage } from "@vueuse/core";
5
5
  import EpModal from "../interactions/EpModal.vue";
6
6
  import EpIcon from "../basics/EpIcon.vue";
@@ -21,7 +21,7 @@ interface Props {
21
21
  bib?: string;
22
22
  title?: string;
23
23
  noModal?: boolean;
24
- cols?: string | number; //posible type à venir => basis-1/12... basis-11/12 to basis-full
24
+ cols?: string | number; //posible type à venir => basis-1/12... or 1 | "1" | 2 | "2" ...12
25
25
  labelClose?:string;
26
26
  labelRef?:string;
27
27
  labelRefLib?:string;
@@ -39,24 +39,8 @@ const props = withDefaults(defineProps<Props>(), {
39
39
  });
40
40
 
41
41
 
42
- const Cols = [
43
- "basis-6/12",
44
- "basis-1/12",
45
- "basis-2/12",
46
- "basis-3/12",
47
- "basis-4/12",
48
- "basis-5/12",
49
- "basis-6/12",
50
- "basis-7/12",
51
- "basis-8/12",
52
- "basis-9/12",
53
- "basis-10/12",
54
- "basis-11/12",
55
- "basis-full",
56
- ];
57
-
58
42
  const renderCols = computed(() => {
59
- return Cols[+props.cols];
43
+ return cols_img[+props.cols];
60
44
  });
61
45
 
62
46
  const renderBib = computed(() => {
@@ -1,240 +1,74 @@
1
1
  <script setup lang="ts">
2
- import { toRefs } from "vue";
3
- import { useColorMode } from '@vueuse/core';
4
- // import EpCard from "../basics/EpCard.vue";
5
- // import EpDivider from "../basics/EpDivider.vue";
6
- // import EpIcon from "../basics/EpIcon.vue";
2
+ import { computed, ref } from "vue";
3
+ import { useCreateUid } from '../../composables/useCreateUid';
4
+ import { cols_img } from "../../types/Image";
5
+ import EpDivider from "./EpDivider.vue";
6
+ import EpIcon from "./EpIcon.vue";
7
7
 
8
- // import EpChip from "../basics/EpChip.vue";
9
- // import useColors from "../../composables/useColors";
10
- // import { mdiHome } from "@mdi/js";
11
- // import { mdiCast } from "@mdi/js";
12
- // import { mdiTimerOutline } from "@mdi/js";
13
- // import { mdiChairSchool } from "@mdi/js";
8
+ type Haling = "justify-end" | "justify-center" | "justify-start"
14
9
 
15
10
  interface Props {
11
+ uid?:string;
16
12
  title?: string | null;
17
13
  subtitle?: string | null;
18
- prependIcon?: string | null;
19
- iconSize?: string | number;
20
- color?: string | null;
21
- taxonomyLevel?: string | null;
22
- courseCode?: string | null;
23
- courseTitle?: string | null;
24
- height?: string | null;
25
- src?: string | null;
26
- synchrone?: boolean;
14
+ icon?: string | null;
15
+ endIcon?: boolean;
16
+ media?: string;
17
+ colsMedia?: string | number; //posible type à venir => basis-1/12... or 1 | "1" | 2 | "2" ...12
18
+ mediaAling?:Haling
19
+ src?: string;
27
20
  }
28
21
 
29
22
  const props = withDefaults(defineProps<Props>(), {
30
23
  title: null,
31
24
  icon: null,
32
- color: null,
25
+ colsMedia:"6",
26
+ mediaAling:"justify-center",
27
+
33
28
  });
34
29
 
35
- const { title, color, src } = toRefs(props);
36
- const mode = useColorMode();
37
- </script>
38
30
 
39
- <template>
40
- <section :class="{'bg-gray-800 text-white': mode === 'dark', 'bg-white text-black': mode === 'light'}" class="EpSection">
41
- <div class="relative items-center w-full">
42
- <div class="w-full mx-auto text-left">
43
- <div class="relative flex-col items-center m-auto align-middle">
44
- <div class="gap-12 text-left lg:gap-24">
45
- <div class="order-first block w-full mt-12 lg:mt-0">
46
- <img
47
- class="object-cover object-center w-full mx-auto bg-gray-300 border lg:ml-auto"
48
- alt="hero"
49
- :src="src"
50
- v-if="src"
51
- />
52
- </div>
53
- <div class="flex flex-col space-y-20 lg:mt-0">
54
- <div class="border-b">
55
- <div>
56
- <p class="text-2xl font-medium tracking-tight">
57
- {{ title }}
58
- </p>
59
- <p>
60
- {{ subtitle }}
61
- </p>
62
- </div>
63
- </div>
64
- <div class="lg:max-w-7xl">
65
- <slot></slot>
66
- </div>
67
- </div>
68
- </div>
69
- </div>
70
- </div>
71
- </div>
72
- </section>
73
- </template>
31
+ const id = ref(props.uid || useCreateUid());
74
32
 
75
- <!-- <section class="h-screen flex flex-col justify-end">
76
- <div
77
- class="w-full h-full bg-cover bg-center"
78
- :style="{ backgroundImage: 'url(' + src + ')' }"
79
- >
80
- <div class="flex flex-col max-w-1/2 absolute bottom-0 bg-neutral-50 opacity-95 left-0 p-6">
81
- <div class="flex flex-row">
82
- <EpIcon
83
- v-if="prependIcon"
84
- :iconPath="prependIcon"
85
- :size="iconSize"
86
- extraClass="mr-2"
87
- ></EpIcon>
88
- <h2 class="text-4xl font-bold ml-2">{{ title }}</h2>
89
- </div>
90
- <p class="text-base tracking-tight">{{ subtitle }}</p>
91
- <slot></slot>
92
- </div>
93
- <div class="flex justify-end absolute bottom-0 right-0 p-2">
94
- <div class="bg-white text-gray-700 rounded-full py-1 px-2">
95
- <span>chip</span>
96
- </div>
97
- </div>
98
- </div>
99
- </section> -->
33
+ const iconSize = computed(() => {
34
+ if (props.title && props.subtitle)
35
+ return 40
36
+ return 25
37
+ })
100
38
 
101
- <!-- <section class="h-screen flex flex-col">
102
- <div
103
- class="w-full h-full bg-cover bg-center justify-end"
104
- :style="{ backgroundImage: 'url(' + src + ')' }"
105
- >
106
- <div class="flex flex-col container justify-end" >
107
- <div class="flex flex-row">
108
- <EpIcon
109
- v-if="prependIcon"
110
- :iconPath="prependIcon"
111
- :size="iconSize"
112
- extraClass="mr-2"
113
- ></EpIcon>
114
- <h2 class="text-4xl font-bold ml-2">{{ title }}</h2>
115
- </div>
116
- <p class="text-base tracking-tight">{{ subtitle }}</p>
117
- </div>
118
- <div class="flex justify-end p-2">
119
- <div class="bg-white text-gray-700 rounded-full py-1 px-2">
120
- <span>bla</span>
121
- </div>
122
- </div>
123
- </div>
124
- </section> -->
125
- <!-- <section>
126
- <div
127
- class="flex flex-col justify-center flex-1 px-8 py-8 lg:py-36 md:px-12 lg:flex-none lg:px-24"
128
- >
129
- <div>
130
- <div class="items-center gap-12">
131
- <div class="">
132
- <div>
133
- <p class="text-5xl tracking-tighter text-black">
134
- Titre
135
- </p>
136
- </div>
137
- <div
138
- class="flex items-center justify-center w-full pt-8 mx-auto md:pt-6"
139
- >
140
- <slot></slot>
141
- </div>
142
- </div>
143
- </div>
144
- </div>
145
- </div>
146
- </section> -->
147
39
 
148
- <!-- model 1 -->
149
- <!-- <section class="object-top overflow-hidden bg-gray-100 bg-cover">
150
- <div>
151
- <div class="px-4 py-12 sm:px-6 lg:py-16 lg:px-8">
152
- <div class="px-6 py-6 bg-white rounded-3xl md:py-12 md:px-12 lg:px-16">
153
- <div class="">
154
- <p class="text-5xl tracking-tighter text-black">
155
- I am a short heading, not so short
156
- </p>
157
- <p class="max-w-3xl mt-3 text-lg leading-6 text-gray-500">
158
- Sign up for our newsletter to stay up to date.
159
- </p>
160
- </div>
161
- <slot></slot>
162
- </div>
163
- </div>
164
- </div>
165
- </section> -->
40
+ const styleTitle = computed(() => {
41
+ if (props.endIcon) {
42
+ return 'justify-between'
43
+ }
44
+ return ''
45
+ })
46
+
47
+ const renderCols = computed(() => {
48
+ return cols_img[+props.colsMedia];
49
+ });
50
+
51
+ </script>
166
52
 
167
- <!-- model 2 -->
168
- <!-- <div class="flex min-h-screen bg-white">
169
- <div
170
- class="flex flex-col justify-center flex-1 px-4 py-8 sm:px-6 lg:flex-none lg:px-24"
171
- >
172
- <div class="w-full mx-auto lg:max-w-6xl">
173
- <div class="max-w-xl lg:p-10">
174
- <div>
175
- <p
176
- class="text-2xl font-medium tracking-tight text-black sm:text-4xl"
177
- >
178
- I am a short heading
179
- </p>
180
- <p class="max-w-xl mt-4 text-base tracking-tight text-gray-600">
181
- Use this paragraph to share information about your company or
182
- products. Make it engaging and interesting, and showcase your
183
- brand's personality. Thanks for visiting our website!
184
- </p>
185
- </div>
186
- <div class="flex gap-3 mt-10">
187
- <a
188
- class="inline-flex items-center justify-center w-full px-6 py-2.5 text-center text-white duration-200 bg-black border-2 border-black rounded-full hover:bg-transparent hover:border-black hover:text-black focus:outline-none lg:w-auto"
189
- href="#"
190
- >
191
- <svg
192
- xmlns="http://www.w3.org/2000/svg"
193
- fill="currentColor"
194
- class="w-6 h-6"
195
- viewBox="0 0 512 512"
196
- >
197
- <path
198
- d="M99.617 8.057a50.191 50.191 0 00-38.815-6.713l230.932 230.933 74.846-74.846L99.617 8.057zM32.139 20.116c-6.441 8.563-10.148 19.077-10.148 30.199v411.358c0 11.123 3.708 21.636 10.148 30.199l235.877-235.877L32.139 20.116zM464.261 212.087l-67.266-37.637-81.544 81.544 81.548 81.548 67.273-37.64c16.117-9.03 25.738-25.442 25.738-43.908s-9.621-34.877-25.749-43.907zM291.733 279.711L60.815 510.629c3.786.891 7.639 1.371 11.492 1.371a50.275 50.275 0 0027.31-8.07l266.965-149.372-74.849-74.847z"
199
- ></path>
200
- </svg>
201
- <span class="flex flex-col items-start ml-4 leading-none">
202
- <span class="mb-1 text-xs">GET IT ON</span>
203
- <span class="font-medium title-font">Google Play</span>
204
- </span></a
205
- ><a
206
- class="inline-flex items-center justify-center w-full px-6 py-2.5 text-center text-white duration-200 bg-black border-2 border-black rounded-full hover:bg-transparent hover:border-black hover:text-black focus:outline-none lg:w-auto"
207
- href="#"
208
- >
209
- <svg
210
- xmlns="http://www.w3.org/2000/svg"
211
- fill="currentColor"
212
- class="w-6 h-6"
213
- viewBox="0 0 305 305"
214
- >
215
- <path
216
- d="M40.74 112.12c-25.79 44.74-9.4 112.65 19.12 153.82C74.09 286.52 88.5 305 108.24 305c.37 0 .74 0 1.13-.02 9.27-.37 15.97-3.23 22.45-5.99 7.27-3.1 14.8-6.3 26.6-6.3 11.22 0 18.39 3.1 25.31 6.1 6.83 2.95 13.87 6 24.26 5.81 22.23-.41 35.88-20.35 47.92-37.94a168.18 168.18 0 0021-43l.09-.28a2.5 2.5 0 00-1.33-3.06l-.18-.08c-3.92-1.6-38.26-16.84-38.62-58.36-.34-33.74 25.76-51.6 31-54.84l.24-.15a2.5 2.5 0 00.7-3.51c-18-26.37-45.62-30.34-56.73-30.82a50.04 50.04 0 00-4.95-.24c-13.06 0-25.56 4.93-35.61 8.9-6.94 2.73-12.93 5.09-17.06 5.09-4.64 0-10.67-2.4-17.65-5.16-9.33-3.7-19.9-7.9-31.1-7.9l-.79.01c-26.03.38-50.62 15.27-64.18 38.86z"
217
- ></path>
218
- <path
219
- d="M212.1 0c-15.76.64-34.67 10.35-45.97 23.58-9.6 11.13-19 29.68-16.52 48.38a2.5 2.5 0 002.29 2.17c1.06.08 2.15.12 3.23.12 15.41 0 32.04-8.52 43.4-22.25 11.94-14.5 17.99-33.1 16.16-49.77A2.52 2.52 0 00212.1 0z"
220
- ></path>
221
- </svg>
222
- <span class="flex flex-col items-start ml-4 leading-none">
223
- <span class="mb-1 text-xs">Download on the</span>
224
- <span class="font-medium title-font">App Store</span>
225
- </span>
226
- </a>
227
- </div>
228
- </div>
53
+ <template>
54
+ <section class="EpSection" :id="`section-${id}`">
55
+ <div :class="`flex items-center ${styleTitle}`">
56
+ <EpIcon :icon-path="icon" :size="iconSize" v-if="icon && !endIcon"></EpIcon>
57
+ <div :class="`${endIcon ? '' : 'ml-2'}`">
58
+ <h2 class="text-2xl font-semibold dark:text-white">{{ title }}</h2>
59
+ <h3 class="dark:text-white">{{ subtitle }}</h3>
229
60
  </div>
61
+ <EpIcon :icon-path="icon" :size="iconSize" v-if="icon && endIcon"></EpIcon>
230
62
  </div>
231
- <div class="relative flex-1 hidden w-0 lg:block">
232
- <div>
233
- <img
234
- class="absolute inset-0 object-cover w-full h-full overflow-hidden bg-gray-200"
235
- src="https://d33wubrfki0l68.cloudfront.net/41cf01e1154fd7ef6121a544cedd9ba7be6b63ba/e0ab4/images/placeholders/rectangle1.svg"
236
- alt=""
237
- />
63
+ <div :class="`flex ${mediaAling}`" v-if="media || src">
64
+ <div :class="`dark:text-white ${renderCols}`">
65
+ <!--svg s'importe sur l'image src-->
66
+ <div v-html="media" class="w-full" v-if="media"></div>
67
+ <!-- img -->
68
+ <div v-else class="w-full"><img :src="src" :alt="`image section ${title}`"></div>
238
69
  </div>
239
70
  </div>
240
- </div> -->
71
+ <EpDivider v-if="title || subtitle" />
72
+ <slot></slot>
73
+ </section>
74
+ </template>
@@ -0,0 +1,100 @@
1
+ <script setup lang="ts">
2
+ import { computed, ref } from "vue";
3
+ import { useCreateUid } from '../../composables/useCreateUid';
4
+ import { cols_img } from "../../types/Image";
5
+ import {type SizeCols, allowedColWidths} from "../../types/Cols"
6
+ import EpDivider from "./EpDivider.vue";
7
+ import EpIcon from "./EpIcon.vue";
8
+
9
+ type Haling = "justify-end" | "justify-center" | "justify-start"
10
+ type GapCols = "gap-1" | "gap-4" | "gap-6" | "gap-8" | "gap-10" | "gap-12"
11
+
12
+
13
+ interface Props {
14
+ uid?:string;
15
+ title?: string | null;
16
+ subtitle?: string | null;
17
+ icon?: string | null;
18
+ endIcon?: boolean;
19
+ media?: string;
20
+ colsMedia?: string | number; //posible type à venir => basis-1/12... or 1 | "1" | 2 | "2" ...12
21
+ mediaAling?:Haling
22
+ src?: string;
23
+ gap?:GapCols;
24
+ leftCol?:SizeCols;
25
+ }
26
+
27
+ const props = withDefaults(defineProps<Props>(), {
28
+ title: null,
29
+ icon: null,
30
+ colsMedia:"6",
31
+ mediaAling:"justify-center",
32
+ gap:"gap-1",
33
+ leftCol:"w-full",
34
+ id:useCreateUid()
35
+ });
36
+
37
+
38
+ const id = ref(props.uid || useCreateUid());
39
+
40
+ const iconSize = computed(() => {
41
+ if (props.title && props.subtitle)
42
+ return 40
43
+ return 25
44
+ })
45
+
46
+
47
+ const styleTitle = computed(() => {
48
+ if (props.endIcon) {
49
+ return 'justify-between'
50
+ }
51
+ return ''
52
+ })
53
+
54
+ const renderCols = computed(() => {
55
+ return cols_img[+props.colsMedia];
56
+ });
57
+
58
+ const rightCol = computed(() => {
59
+ if (props.leftCol === "w-full") return "w-full";
60
+ const leftIndex = allowedColWidths.indexOf(props.leftCol);
61
+ const rightIndex = allowedColWidths.length - leftIndex - 2;
62
+ return allowedColWidths[rightIndex] || "w-full";
63
+ });
64
+
65
+ </script>
66
+
67
+ <template>
68
+ <section class="EpSection" :id="`section-${id}`">
69
+ <div :class="`flex items-center ${styleTitle}`">
70
+ <EpIcon :icon-path="icon" :size="iconSize" v-if="icon && !endIcon"></EpIcon>
71
+ <div :class="`${endIcon ? '' : 'ml-2'}`">
72
+ <h2 class="text-2xl font-semibold dark:text-white">{{ title }}</h2>
73
+ <h3 class="dark:text-white">{{ subtitle }}</h3>
74
+ </div>
75
+ <EpIcon :icon-path="icon" :size="iconSize" v-if="icon && endIcon"></EpIcon>
76
+ </div>
77
+ <div :class="`flex ${mediaAling}`" v-if="media || src">
78
+ <div :class="`dark:text-white ${renderCols}`">
79
+ <!--svg s'importe sur l'image src-->
80
+ <div v-html="media" class="w-full" v-if="media"></div>
81
+ <!-- img -->
82
+ <div v-else class="w-full"><img :src="src" :alt="`image section ${title}`"></div>
83
+ </div>
84
+ </div>
85
+ <EpDivider v-if="title || subtitle" />
86
+ <!-- Two-column layout -->
87
+ <div :class="`flex ${gap}`">
88
+ <!-- First column slot -->
89
+ <div :class="`${leftCol}`">
90
+ <slot name="left"></slot>
91
+ </div>
92
+ <!-- Second column slot -->
93
+ <div :class="`${rightCol}`">
94
+ <slot name="right"></slot>
95
+ </div>
96
+ </div>
97
+ <!--end layout-->
98
+ </section>
99
+ </template>
100
+
@@ -1,5 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { toRefs, computed } from 'vue';
3
+ import { cols_img } from "../../types/Image";
3
4
  import { type MediaVariants } from "../../types/Medias";
4
5
  import { type MandateLevel } from '../../types/MandateLevel';
5
6
  import { useRenderText } from "../../composables/useRenderText";
@@ -23,26 +24,10 @@ const props = withDefaults(defineProps<Props>(), {
23
24
  cols: "6",
24
25
  })
25
26
 
26
- const Cols = [
27
- 'basis-6/12',
28
- 'basis-1/12',
29
- 'basis-2/12',
30
- 'basis-3/12',
31
- 'basis-4/12',
32
- 'basis-5/12',
33
- 'basis-6/12',
34
- 'basis-7/12',
35
- 'basis-8/12',
36
- 'basis-9/12',
37
- 'basis-10/12',
38
- 'basis-11/12',
39
- 'basis-full',
40
- ]
41
-
42
27
  const renderCols = computed(() => {
43
28
  // console.log(+props.cols)
44
29
  // console.log(Cols[+props.cols])
45
- return Cols[+props.cols]
30
+ return cols_img[+props.cols]
46
31
  })
47
32
 
48
33
  const renderText = computed(()=> {
@@ -11,7 +11,7 @@ import EpChip from "../basics/EpChip.vue";
11
11
 
12
12
  type Arrangement = "imgBg" | "simple" | "sideBy";
13
13
  type Valign = "items-center" | "items-start" | "items-end"
14
- type Haling = "justify-end" | "justify-center" | "justify-start" | "justify-end"
14
+ type Haling = "justify-end" | "justify-center" | "justify-start"
15
15
 
16
16
  interface Props {
17
17
  title: string | null;
@@ -1,4 +0,0 @@
1
- import { Z as f } from "./index-CjFsNJuq.js";
2
- export {
3
- f as default
4
- };
@@ -1,4 +0,0 @@
1
- import { $ as f } from "./index-CjFsNJuq.js";
2
- export {
3
- f as default
4
- };
@@ -1,4 +0,0 @@
1
- import { V as f } from "./index-CjFsNJuq.js";
2
- export {
3
- f as default
4
- };
@@ -1,4 +0,0 @@
1
- import { L as f } from "./index-CjFsNJuq.js";
2
- export {
3
- f as default
4
- };
@@ -1,4 +0,0 @@
1
- import { c as f } from "./index-CjFsNJuq.js";
2
- export {
3
- f as default
4
- };
@@ -1,4 +0,0 @@
1
- import { o } from "./index-CjFsNJuq.js";
2
- export {
3
- o as default
4
- };
@@ -1,4 +0,0 @@
1
- import { d as f } from "./index-CjFsNJuq.js";
2
- export {
3
- f as default
4
- };
@@ -1,4 +0,0 @@
1
- import { e } from "./index-CjFsNJuq.js";
2
- export {
3
- e as default
4
- };
@@ -1,4 +0,0 @@
1
- import { f } from "./index-CjFsNJuq.js";
2
- export {
3
- f as default
4
- };
@@ -1,4 +0,0 @@
1
- import { s } from "./index-CjFsNJuq.js";
2
- export {
3
- s as default
4
- };
@@ -1,4 +0,0 @@
1
- import { t } from "./index-CjFsNJuq.js";
2
- export {
3
- t as default
4
- };
@@ -1,4 +0,0 @@
1
- import { G as f } from "./index-CjFsNJuq.js";
2
- export {
3
- f as default
4
- };
@@ -1,4 +0,0 @@
1
- import { v as f } from "./index-CjFsNJuq.js";
2
- export {
3
- f as default
4
- };
@@ -1,4 +0,0 @@
1
- import { g as f } from "./index-CjFsNJuq.js";
2
- export {
3
- f as default
4
- };
@@ -1,4 +0,0 @@
1
- import { w as f } from "./index-CjFsNJuq.js";
2
- export {
3
- f as default
4
- };
@@ -1,4 +0,0 @@
1
- import { h as f } from "./index-CjFsNJuq.js";
2
- export {
3
- f as default
4
- };
@@ -1,4 +0,0 @@
1
- import { p as f } from "./index-CjFsNJuq.js";
2
- export {
3
- f as default
4
- };
@@ -1,4 +0,0 @@
1
- import { W as f } from "./index-CjFsNJuq.js";
2
- export {
3
- f as default
4
- };
@@ -1,4 +0,0 @@
1
- import { i as f } from "./index-CjFsNJuq.js";
2
- export {
3
- f as default
4
- };
@@ -1,4 +0,0 @@
1
- import { M as f } from "./index-CjFsNJuq.js";
2
- export {
3
- f as default
4
- };
@@ -1,4 +0,0 @@
1
- import { j as f } from "./index-CjFsNJuq.js";
2
- export {
3
- f as default
4
- };
@@ -1,4 +0,0 @@
1
- import { x as f } from "./index-CjFsNJuq.js";
2
- export {
3
- f as default
4
- };
@@ -1,4 +0,0 @@
1
- import { y as f } from "./index-CjFsNJuq.js";
2
- export {
3
- f as default
4
- };