ep-lib-ts 0.1.32 → 0.1.34
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-6ae98417.js → BgAudio-a228cf2d.js} +1 -1
- package/dist/{DisplayBox-3033a4bd.js → DisplayBox-0b5dad43.js} +1 -1
- package/dist/{EpAlert-6e930863.js → EpAlert-6989df03.js} +1 -1
- package/dist/{EpAudio-84ef53c8.js → EpAudio-ebe996a9.js} +1 -1
- package/dist/EpAvatar-1e55fdc7.js +50 -0
- package/dist/EpBadge-de5e90c5.js +6 -0
- package/dist/EpBadge-f5faab43.js +55 -0
- package/dist/{EpBarChart-a1d0bce5.js → EpBarChart-52c346de.js} +1 -1
- package/dist/EpBtn-255af003.js +6 -0
- package/dist/EpCard-6dc99a29.js +6 -0
- package/dist/EpChip-ecaf5fdd.js +6 -0
- package/dist/EpContentSlider-67ee8ff1.js +6 -0
- package/dist/EpDivider-399403ef.js +6 -0
- package/dist/{EpEdu-a55c4620.js → EpEdu-ce928b82.js} +1 -1
- package/dist/EpFlex-ab0b2002.js +6 -0
- package/dist/EpHeader-c1f58215.js +6 -0
- package/dist/{EpIcon-3295a9ac.js → EpIcon-4f8bc342.js} +1 -1
- package/dist/EpIframe-c1451be2.js +6 -0
- package/dist/EpImg-6068534f.js +6 -0
- package/dist/{EpInput-18403969.js → EpInput-c8787b2d.js} +1 -1
- package/dist/EpLineChart-740ffcc2.js +6 -0
- package/dist/EpLink-2414e304.js +6 -0
- package/dist/EpLinkVersion-43c07ab6.js +6 -0
- package/dist/EpList-a99a3dd0.js +13 -0
- package/dist/EpListitem-457e39b7.js +37 -0
- package/dist/EpModal-ef8a63d2.js +6 -0
- package/dist/{EpNothing-6cab5dda.js → EpNothing-acde1df4.js} +1 -1
- package/dist/EpPieChart-9dcb459f.js +6 -0
- package/dist/EpQuestion-aaa1f8bb.js +6 -0
- package/dist/EpQuote-5b4015f4.js +6 -0
- package/dist/EpRadio-227b82c2.js +6 -0
- package/dist/EpReading-58b135fb.js +6 -0
- package/dist/EpResource-10cc639f.js +6 -0
- package/dist/{EpScope-14c4bba6.js → EpScope-3d80861f.js} +1 -1
- package/dist/EpSection-f6695955.js +6 -0
- package/dist/{EpSelect-1b84ad43.js → EpSelect-6089fdcb.js} +1 -1
- package/dist/EpSkeleton-0827c884.js +6 -0
- package/dist/EpSoftware-1f53d7fb.js +6 -0
- package/dist/EpSpinner-7f89aad2.js +6 -0
- package/dist/EpSvg-5d7df4f2.js +6 -0
- package/dist/{EpSwitch-1eaf9d3f.js → EpSwitch-005fe90a.js} +25 -22
- package/dist/EpTable-c8f1f97d.js +6 -0
- package/dist/EpTerm-3d4f8bd2.js +6 -0
- package/dist/EpText-9f05234d.js +6 -0
- package/dist/EpTimeLine-49b8ac13.js +6 -0
- package/dist/EpTooltip-05e1d8fe.js +99 -0
- package/dist/EpVideo-37c08690.js +6 -0
- package/dist/EpVideoPanopto-bd41e61d.js +6 -0
- package/dist/components/basics/EpAvatar.vue.d.ts +51 -0
- package/dist/components/basics/EpBadge.vue.d.ts +33 -34
- package/dist/components/basics/EpBtn.vue.d.ts +54 -94
- package/dist/components/basics/EpCard.vue.d.ts +51 -76
- package/dist/components/basics/EpChip.vue.d.ts +44 -59
- package/dist/components/basics/EpDivider.vue.d.ts +38 -44
- package/dist/components/basics/EpIcon.vue.d.ts +30 -33
- package/dist/components/basics/EpImg.vue.d.ts +40 -73
- package/dist/components/basics/EpList.vue.d.ts +9 -0
- package/dist/components/basics/EpListitem.vue.d.ts +43 -0
- package/dist/components/basics/EpSection.vue.d.ts +39 -73
- package/dist/components/basics/EpSpinner.vue.d.ts +34 -35
- package/dist/components/basics/EpTable.vue.d.ts +22 -22
- package/dist/components/basics/EpText.vue.d.ts +28 -31
- package/dist/components/charts/EpBarChart.vue.d.ts +35 -69
- package/dist/components/charts/EpLineChart.vue.d.ts +35 -69
- package/dist/components/charts/EpPieChart.vue.d.ts +37 -66
- package/dist/components/educationals/EpEdu.vue.d.ts +41 -66
- package/dist/components/educationals/EpReading.vue.d.ts +65 -140
- package/dist/components/educationals/EpResource.vue.d.ts +30 -32
- package/dist/components/educationals/EpScope.vue.d.ts +28 -19
- package/dist/components/forms/EpCheckbox.vue.d.ts +44 -60
- package/dist/components/forms/EpInput.vue.d.ts +51 -84
- package/dist/components/forms/EpRadio.vue.d.ts +46 -59
- package/dist/components/forms/EpSelect.vue.d.ts +47 -73
- package/dist/components/forms/EpSwitch.vue.d.ts +50 -71
- package/dist/components/forms/EpTextarea.vue.d.ts +50 -76
- package/dist/components/forms/EpToggle.vue.d.ts +47 -68
- package/dist/components/interactions/EpAccordeon.vue.d.ts +37 -42
- package/dist/components/interactions/EpContentSlider.vue.d.ts +20 -10
- package/dist/components/interactions/EpModal.vue.d.ts +47 -52
- package/dist/components/interactions/EpQuestion.vue.d.ts +45 -84
- package/dist/components/interactions/EpTooltip.vue.d.ts +48 -0
- package/dist/components/medias/EpAudio.vue.d.ts +41 -68
- package/dist/components/medias/EpCarousel.vue.d.ts +32 -35
- package/dist/components/medias/EpIframe.vue.d.ts +37 -54
- package/dist/components/medias/EpKatex.vue.d.ts +32 -49
- package/dist/components/medias/EpLink.vue.d.ts +41 -68
- package/dist/components/medias/EpLinkVersion.vue.d.ts +27 -27
- package/dist/components/medias/EpSoftware.vue.d.ts +47 -82
- package/dist/components/medias/EpSvg.vue.d.ts +31 -41
- package/dist/components/medias/EpTerm.vue.d.ts +41 -69
- package/dist/components/medias/EpTimeLine.vue.d.ts +22 -24
- package/dist/components/medias/EpVideo.vue.d.ts +38 -60
- package/dist/components/medias/EpVideoPanopto.vue.d.ts +38 -60
- package/dist/components/signages/EpAlert.vue.d.ts +36 -42
- package/dist/components/signages/EpBadge.vue.d.ts +56 -0
- package/dist/components/signages/EpHeader.vue.d.ts +53 -94
- package/dist/components/signages/EpQuote.vue.d.ts +31 -27
- package/dist/components/signages/EpSkeleton.vue.d.ts +40 -1
- package/dist/components/tools/BgAudio.vue.d.ts +26 -11
- package/dist/components/tools/TimelineItem.vue.d.ts +32 -33
- package/dist/ep-lib-ts.js +25 -24
- package/dist/ep-lib-ts.umd.cjs +31 -31
- package/dist/{index-20e915f7.js → index-90cd7bf2.js} +3355 -3317
- package/dist/index.d.ts +2 -1
- package/dist/style.css +1 -1
- package/dist/types/Avatar.d.ts +18 -0
- package/dist/types/Badge.d.ts +23 -0
- package/dist/types/Tooltip.d.ts +75 -0
- package/package.json +2 -2
- package/src/components/basics/EpAvatar.vue +72 -0
- package/src/components/basics/EpList.vue +10 -0
- package/src/components/basics/EpListitem.vue +70 -0
- package/src/components/basics/EpText.vue +1 -1
- package/src/components/educationals/EpEdu.vue +1 -0
- package/src/components/educationals/EpReading.vue +4 -4
- package/src/components/forms/EpSwitch.vue +9 -3
- package/src/components/interactions/EpQuestion.vue +1 -1
- package/src/components/interactions/EpTooltip.vue +164 -0
- package/src/components/medias/EpCarousel.vue +21 -18
- package/src/components/signages/EpBadge.vue +82 -0
- package/src/components/signages/EpHeader.vue +1 -1
- package/src/components/signages/EpQuote.vue +53 -37
- package/src/components/signages/EpSkeleton.vue +36 -9
- package/src/components/tools/TimelineItem.vue +1 -1
- package/dist/EpBadge-93f2b94c.js +0 -6
- package/dist/EpBtn-668f42ba.js +0 -6
- package/dist/EpCard-6093b0ee.js +0 -6
- package/dist/EpChip-caf0d258.js +0 -6
- package/dist/EpContentSlider-bad04488.js +0 -6
- package/dist/EpDivider-75d5d66c.js +0 -6
- package/dist/EpFlex-75a7f492.js +0 -6
- package/dist/EpHeader-a78fa103.js +0 -6
- package/dist/EpIframe-7454aac5.js +0 -6
- package/dist/EpImg-20520265.js +0 -6
- package/dist/EpLineChart-17f12586.js +0 -6
- package/dist/EpLink-880190ed.js +0 -6
- package/dist/EpLinkVersion-ed4fab24.js +0 -6
- package/dist/EpModal-d4218262.js +0 -6
- package/dist/EpPieChart-1a893e73.js +0 -6
- package/dist/EpQuestion-ab29713a.js +0 -6
- package/dist/EpQuote-ffe88c7e.js +0 -6
- package/dist/EpRadio-b3b1094a.js +0 -6
- package/dist/EpReading-e1f2913e.js +0 -6
- package/dist/EpResource-0ea2ee11.js +0 -6
- package/dist/EpSection-317337e3.js +0 -6
- package/dist/EpSkeleton-9542d360.js +0 -10
- package/dist/EpSoftware-f88dae21.js +0 -6
- package/dist/EpSpinner-de7aeb71.js +0 -6
- package/dist/EpSvg-0a1e63ad.js +0 -6
- package/dist/EpTable-dc6c3eff.js +0 -6
- package/dist/EpTerm-b0ebfe20.js +0 -6
- package/dist/EpText-5de02f6c.js +0 -6
- package/dist/EpTimeLine-7703e204.js +0 -6
- package/dist/EpVideo-df8c065a.js +0 -6
- package/dist/EpVideoPanopto-26dd2dd2.js +0 -6
package/dist/index.d.ts
CHANGED
|
@@ -37,4 +37,5 @@ import EpVideoPanopto from './components/medias/EpVideoPanopto.vue';
|
|
|
37
37
|
import EpAlert from './components/signages/EpAlert.vue';
|
|
38
38
|
import EpHeader from './components/signages/EpHeader.vue';
|
|
39
39
|
import EpQuote from './components/signages/EpQuote.vue';
|
|
40
|
-
|
|
40
|
+
import EpSkeleton from './components/signages/EpSkeleton.vue';
|
|
41
|
+
export { EpBadge, EpBtn, EpCard, EpChip, EpDivider, EpFlex, EpIcon, EpImg, EpSection, EpSpinner, EpTable, EpBarChart, EpLineChart, EpPieChart, 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 };
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.content[data-v-ab122c9c]{max-height:0;overflow:hidden}.modal-mask{position:fixed;z-index:9998;top:0;left:0;width:100%;height:100%;background-color:#00000080;display:flex;transition:opacity .3s ease}.modal-container{margin:auto;max-height:95%;transition:all .3s ease;z-index:9999}.modal-header h3{margin-top:0;color:#42b983}.modal-body{margin:20px 0}.modal-default-button{float:right}.modal-enter-from,.modal-leave-to{opacity:0}.modal-enter-from .modal-container,.modal-leave-to .modal-container{transform:scale(1.1)}.custom_index{z-index:9999;position:absolute;right:12rem}.h-custom{height:30rem}.p-custom p{margin-bottom:1em}.v-enter-active[data-v-
|
|
1
|
+
.content[data-v-ab122c9c]{max-height:0;overflow:hidden}.modal-mask{position:fixed;z-index:9998;top:0;left:0;width:100%;height:100%;background-color:#00000080;display:flex;transition:opacity .3s ease}.modal-container{margin:auto;max-height:95%;transition:all .3s ease;z-index:9999}.modal-header h3{margin-top:0;color:#42b983}.modal-body{margin:20px 0}.modal-default-button{float:right}.modal-enter-from,.modal-leave-to{opacity:0}.modal-enter-from .modal-container,.modal-leave-to .modal-container{transform:scale(1.1)}.custom_index{z-index:9999;position:absolute;right:12rem}.h-custom{height:30rem}.p-custom p{margin-bottom:1em}.v-enter-active[data-v-63d168f1],.v-leave-active[data-v-63d168f1]{transition:opacity .5s ease}.v-enter-from[data-v-63d168f1],.v-leave-to[data-v-63d168f1]{opacity:0}.katex[data-v-24ff8b28]{font-size:1.3em}.content[data-v-89d118fb]{max-height:0;overflow:hidden}.list-enter-active,.list-leave-active{transition:all .5s ease}.list-enter-from,.list-leave-to{opacity:0;transform:translate(30px)}.shape{height:var(--5ad0279f);width:var(--6f1de84e)}.arrow-light-top:before{content:" ";position:absolute;top:100%;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:rgba(0,0,0,.2) transparent transparent transparent}.arrow-dark-top:before{content:" ";position:absolute;top:100%;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:black transparent transparent transparent}.arrow-light-bottom:before{content:"";position:absolute;display:inline-block;left:50%;bottom:100%;border-right:7px solid transparent;border-bottom:7px solid #eee;border-left:7px solid transparent;border-bottom-color:#0003}.arrow-dark-bottom:before{content:"";position:absolute;display:inline-block;left:50%;bottom:100%;border-right:7px solid transparent;border-bottom:7px solid black;border-left:7px solid transparent;border-bottom-color:black transparent transparent transparent}.arrow-light-left:before{position:absolute;display:inline-block;left:100%;top:50%;content:"";margin-right:0;border-top:5px solid transparent;border-left:5px solid #eee;border-bottom:5px solid transparent;border-left-color:#0003}.arrow-dark-left:before{position:absolute;display:inline-block;left:100%;top:50%;content:"";margin-right:0;border-top:5px solid transparent;border-left:5px solid black;border-bottom:5px solid transparent;border-left-color:black transparent transparent transparent}.arrow-light-right:before{position:absolute;display:inline-block;right:100%;top:50%;content:"";margin-right:0;border-top:5px solid transparent;border-right:5px solid #eee;border-bottom:5px solid transparent;border-right-color:#0003}.arrow-dark-right:before{position:absolute;display:inline-block;right:100%;top:50%;content:"";margin-right:0;border-top:5px solid transparent;border-right:5px solid black;border-bottom:5px solid transparent;border-right-color:black transparent transparent transparent}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const typeAvatar: {
|
|
2
|
+
circle: {
|
|
3
|
+
small: string;
|
|
4
|
+
middle: string;
|
|
5
|
+
big: string;
|
|
6
|
+
};
|
|
7
|
+
square: {
|
|
8
|
+
small: string;
|
|
9
|
+
middle: string;
|
|
10
|
+
big: string;
|
|
11
|
+
};
|
|
12
|
+
rounded: {
|
|
13
|
+
small: string;
|
|
14
|
+
middle: string;
|
|
15
|
+
big: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export type TypeAvatar = keyof typeof typeAvatar;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const typeBadge: {
|
|
2
|
+
top_left: {
|
|
3
|
+
default: string;
|
|
4
|
+
dot: string;
|
|
5
|
+
hide: string;
|
|
6
|
+
};
|
|
7
|
+
top_right: {
|
|
8
|
+
default: string;
|
|
9
|
+
dot: string;
|
|
10
|
+
hide: string;
|
|
11
|
+
};
|
|
12
|
+
bottom_left: {
|
|
13
|
+
default: string;
|
|
14
|
+
dot: string;
|
|
15
|
+
hide: string;
|
|
16
|
+
};
|
|
17
|
+
bottom_right: {
|
|
18
|
+
default: string;
|
|
19
|
+
dot: string;
|
|
20
|
+
hide: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export type TypeBadge = keyof typeof typeBadge;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export declare const typeTooltip: {
|
|
2
|
+
top: {
|
|
3
|
+
default: string;
|
|
4
|
+
dark: string;
|
|
5
|
+
arrow: string;
|
|
6
|
+
arrowdark: string;
|
|
7
|
+
};
|
|
8
|
+
top_start: {
|
|
9
|
+
default: string;
|
|
10
|
+
dark: string;
|
|
11
|
+
arrow: string;
|
|
12
|
+
arrowdark: string;
|
|
13
|
+
};
|
|
14
|
+
top_end: {
|
|
15
|
+
default: string;
|
|
16
|
+
dark: string;
|
|
17
|
+
arrow: string;
|
|
18
|
+
arrowdark: string;
|
|
19
|
+
};
|
|
20
|
+
bottom: {
|
|
21
|
+
default: string;
|
|
22
|
+
dark: string;
|
|
23
|
+
arrow: string;
|
|
24
|
+
arrowdark: string;
|
|
25
|
+
};
|
|
26
|
+
bottom_start: {
|
|
27
|
+
default: string;
|
|
28
|
+
dark: string;
|
|
29
|
+
arrow: string;
|
|
30
|
+
arrowdark: string;
|
|
31
|
+
};
|
|
32
|
+
bottom_end: {
|
|
33
|
+
default: string;
|
|
34
|
+
dark: string;
|
|
35
|
+
arrow: string;
|
|
36
|
+
arrowdark: string;
|
|
37
|
+
};
|
|
38
|
+
left: {
|
|
39
|
+
default: string;
|
|
40
|
+
dark: string;
|
|
41
|
+
arrow: string;
|
|
42
|
+
arrowdark: string;
|
|
43
|
+
};
|
|
44
|
+
left_start: {
|
|
45
|
+
default: string;
|
|
46
|
+
dark: string;
|
|
47
|
+
arrow: string;
|
|
48
|
+
arrowdark: string;
|
|
49
|
+
};
|
|
50
|
+
left_end: {
|
|
51
|
+
default: string;
|
|
52
|
+
dark: string;
|
|
53
|
+
arrow: string;
|
|
54
|
+
arrowdark: string;
|
|
55
|
+
};
|
|
56
|
+
right: {
|
|
57
|
+
default: string;
|
|
58
|
+
dark: string;
|
|
59
|
+
arrow: string;
|
|
60
|
+
arrowdark: string;
|
|
61
|
+
};
|
|
62
|
+
right_start: {
|
|
63
|
+
default: string;
|
|
64
|
+
dark: string;
|
|
65
|
+
arrow: string;
|
|
66
|
+
arrowdark: string;
|
|
67
|
+
};
|
|
68
|
+
right_end: {
|
|
69
|
+
default: string;
|
|
70
|
+
dark: string;
|
|
71
|
+
arrow: string;
|
|
72
|
+
arrowdark: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
export type TypeTooltip = keyof typeof typeTooltip;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ep-lib-ts",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.34",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
7
7
|
"src/components/"
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"typescript": "^5.2.0-dev.20230801",
|
|
51
51
|
"vite": "^4.1.0",
|
|
52
52
|
"vite-plugin-dts": "^3.5.2",
|
|
53
|
-
"vue-tsc": "^1.8.
|
|
53
|
+
"vue-tsc": "^1.8.25"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"vue": "^3.2.45"
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
|
|
2
|
+
<script setup lang="ts">
|
|
3
|
+
|
|
4
|
+
import { toRefs, computed } from "vue";
|
|
5
|
+
import { TypeAvatar, typeAvatar } from "../../types/Avatar"; //"../../types/Avatar";
|
|
6
|
+
|
|
7
|
+
type Color = "primary"|"secondary"|"accent"|"error"|"warning"|"success"|"info"|"question"|"tip";
|
|
8
|
+
type Variant = "circle"|"square"|"rounded";
|
|
9
|
+
type Size = "small"|"middle"|"big";
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
interface Props {
|
|
13
|
+
src?:string;
|
|
14
|
+
alt?:string;
|
|
15
|
+
color?:Color;
|
|
16
|
+
size?:Size;
|
|
17
|
+
variant?:Variant;
|
|
18
|
+
name?:string
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// define parameter and default valule
|
|
22
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
23
|
+
src:"",
|
|
24
|
+
alt:"",
|
|
25
|
+
color:"primary",
|
|
26
|
+
size:"small",
|
|
27
|
+
variant:"circle" ,
|
|
28
|
+
name:""
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
const style = computed(()=>{
|
|
33
|
+
return props.variant
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
const size = computed(()=>{
|
|
37
|
+
return props.size
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
const final_style = computed(()=>{
|
|
41
|
+
return `${typeAvatar[style.value]?.[size.value]}`
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
const bgcolor = computed(()=>{
|
|
46
|
+
return " bg-"+ props.color
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
const final_name = computed(()=>{
|
|
50
|
+
if (props.name.length>2){
|
|
51
|
+
return props.name.slice(0,2)
|
|
52
|
+
}
|
|
53
|
+
else{
|
|
54
|
+
return props.name
|
|
55
|
+
}
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
</script>
|
|
60
|
+
<template>
|
|
61
|
+
<div >
|
|
62
|
+
<div v-if="props.src != ''">
|
|
63
|
+
<img :src=props.src :alt=props.alt :class="`${final_style} `" >
|
|
64
|
+
</div>
|
|
65
|
+
<div v-else-if="props.src == ''">
|
|
66
|
+
<div :class="`${final_style} ${bgcolor} justify-center font-bold text-white flex items-center` " >
|
|
67
|
+
{{final_name}}
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</template>
|
|
72
|
+
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
|
|
2
|
+
<script setup lang="ts">
|
|
3
|
+
|
|
4
|
+
import { computed, useSlots } from "vue";
|
|
5
|
+
|
|
6
|
+
type Type = "default" | "nested"
|
|
7
|
+
type Disabled="false"|"true"
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
type?: Type;
|
|
11
|
+
disabled?:Disabled;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
15
|
+
type: 'default',
|
|
16
|
+
disabled:'false'
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const slots = useSlots()
|
|
20
|
+
console.log(slots)
|
|
21
|
+
const hasLeftContent = computed(()=>{
|
|
22
|
+
return slots.leftContent?true:false
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
const hasRigthContent = computed(()=>{
|
|
26
|
+
return slots.rightContent?true:false
|
|
27
|
+
})
|
|
28
|
+
const isNested = computed(()=>{
|
|
29
|
+
if (props.type=="nested")
|
|
30
|
+
return "px-10"
|
|
31
|
+
else
|
|
32
|
+
return ""
|
|
33
|
+
})
|
|
34
|
+
const isDisabled = computed(()=>{
|
|
35
|
+
if (props.disabled=="true")
|
|
36
|
+
return "opacity-75 text-slate-500 "
|
|
37
|
+
else
|
|
38
|
+
return "hover:bg-gray-200 active:bg-gray-300"
|
|
39
|
+
})
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<template>
|
|
43
|
+
<li :class="`flex flex-row flex-nowrap justify-between font-medium items-center py-4 ${isNested} ${isDisabled}`">
|
|
44
|
+
<div class="flex items-center">
|
|
45
|
+
<div v-if="hasLeftContent" class="mr-2 min-w-fit">
|
|
46
|
+
<slot name="leftContent"></slot>
|
|
47
|
+
</div>
|
|
48
|
+
<div>
|
|
49
|
+
<slot></slot>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
<div v-if="hasRigthContent" class="px-2 ">
|
|
53
|
+
<slot name="rightContent"></slot>
|
|
54
|
+
</div>
|
|
55
|
+
</li>
|
|
56
|
+
|
|
57
|
+
</template>
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
@@ -78,7 +78,7 @@ const renderText = computed(() => {
|
|
|
78
78
|
//const idsRelation = foundedRelations.map((x) => x.id);
|
|
79
79
|
const termsRelation = foundedRelations.map((x) => x.term);
|
|
80
80
|
const variation = term.variation;
|
|
81
|
-
const hasImge = term.
|
|
81
|
+
const hasImge = term.img ? term.img : "";
|
|
82
82
|
const replaceWord = `<div style="display:inline"><EpTerm term="${term.term}" word="${render_word}" variations="${variation}" graminfo="${term.graminfo}" src="${hasImge}" domain="${term.domain}" relations="${termsRelation}"> ${term.definition}</EpTerm> </div>`;
|
|
83
83
|
//replace output string
|
|
84
84
|
newStr = newStr.replace(word, replaceWord);
|
|
@@ -115,7 +115,7 @@ const {
|
|
|
115
115
|
<div class="flex-1 py-2" v-if="hasDetails">
|
|
116
116
|
<p class="font-medium">
|
|
117
117
|
<span class="text-sm italic pr-1" v-if="author">par</span>
|
|
118
|
-
<span class="font-bold" v-if="author">{{ author }}</span>
|
|
118
|
+
<span class="font-bold mr-1" v-if="author">{{ author }}</span>
|
|
119
119
|
<span v-if="year">({{ year }})</span>
|
|
120
120
|
<span v-if="year && editor">, </span>
|
|
121
121
|
<span v-if="editor">{{ editor }}</span>
|
|
@@ -194,14 +194,14 @@ const {
|
|
|
194
194
|
<div class="flex-1 py-2" v-if="hasDetails">
|
|
195
195
|
<p class="font-medium">
|
|
196
196
|
<span class="text-sm italic pr-1" v-if="author">par</span>
|
|
197
|
-
<span class="font-bold" v-if="author">{{ author }}</span>
|
|
198
|
-
<span v-if="year">({{ year }})</span>
|
|
197
|
+
<span class="font-bold mr-2" v-if="author">{{ author }}</span>
|
|
198
|
+
<span v-if="year"> ({{ year }})</span>
|
|
199
199
|
<span v-if="year && editor">, </span>
|
|
200
200
|
<span v-if="editor">{{ editor }}</span>
|
|
201
201
|
</p>
|
|
202
202
|
<p v-if="container">
|
|
203
203
|
<span class="text-sm italic pr-1">dans</span>
|
|
204
|
-
<span
|
|
204
|
+
<span>{{ container }}</span>
|
|
205
205
|
</p>
|
|
206
206
|
</div>
|
|
207
207
|
<div
|
|
@@ -4,7 +4,7 @@ import { toRefs } from "vue";
|
|
|
4
4
|
interface Props {
|
|
5
5
|
id?: string;
|
|
6
6
|
label?: string;
|
|
7
|
-
modelValue?:
|
|
7
|
+
modelValue?: boolean;
|
|
8
8
|
type?: string;
|
|
9
9
|
placeholder?: string;
|
|
10
10
|
disabled?: boolean;
|
|
@@ -15,7 +15,7 @@ interface Props {
|
|
|
15
15
|
const props = withDefaults(defineProps<Props>(), {
|
|
16
16
|
id: "toggle",
|
|
17
17
|
label: "label",
|
|
18
|
-
modelValue:
|
|
18
|
+
modelValue: false,
|
|
19
19
|
type: "checkbox",
|
|
20
20
|
placeholder: "",
|
|
21
21
|
disabled: false,
|
|
@@ -24,9 +24,14 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
const emit = defineEmits<{
|
|
27
|
-
(e: "update:modelValue", modelValue:
|
|
27
|
+
(e: "update:modelValue", modelValue: boolean): void;
|
|
28
28
|
}>();
|
|
29
29
|
|
|
30
|
+
const onChange = (event:Event) => {
|
|
31
|
+
const target = event.target as HTMLInputElement
|
|
32
|
+
emit('update:modelValue', true)
|
|
33
|
+
}
|
|
34
|
+
|
|
30
35
|
const {
|
|
31
36
|
id,
|
|
32
37
|
label,
|
|
@@ -48,6 +53,7 @@ const {
|
|
|
48
53
|
class="form-checkbox mr-2 mt-[0rem] h-4 w-8 appearance-none rounded-full bg-neutral-200 border-neutral-300 before:pointer-events-none before:absolute before:h-3.5 before:w-3.5 before:rounded-full before:bg-transparent before:content-[''] after:absolute after:z-[2] after:-mt-[0rem] after:h-3.5 after:w-3.5 after:rounded-full after:border-none after:bg-neutral-50 after:shadow-[0_0px_3px_0_rgb(0_0_0_/_7%),_0_2px_2px_0_rgb(0_0_0_/_4%)] after:transition-[background-color_0.2s,transform_0.2s] after:content-[''] checked:bg-none checked:bg-blue-600 checked:after:absolute checked:after:z-[2] checked:after:-mt-[0px] checked:after:ml-[1.0625rem] checked:after:h-3.5 checked:after:w-3.5 checked:after:rounded-full checked:after:border-none checked:after:bg-neutral-100 checked:after:shadow-[0_3px_1px_-2px_rgba(0,0,0,0.2),_0_2px_2px_0_rgba(0,0,0,0.14),_0_1px_5px_0_rgba(0,0,0,0.12)] checked:after:transition-[background-color_0.2s,transform_0.2s] checked:after:content-[''] hover:cursor-pointer focus:outline-none focus:ring-0 focus:before:scale-75 focus:before:opacity-[0.12] focus:before:mt-[0.1rem] focus:before:shadow-[3px_-1px_0px_13px_rgba(0,0,0,0.6)] focus:before:transition-[box-shadow_0.2s,transform_0.2s] focus:after:absolute focus:after:z-[1] focus:after:block focus:after:h-3.5 focus:after:w-3.5 focus:after:-mt-[0rem] focus:after:rounded-full focus:after:content-[''] checked:focus:border-neutral-200 checked:focus:bg-blue-600 checked:focus:before:ml-[1rem] checked:focus:before:mt-[0.1rem] checked:focus:before:scale-75 checked:focus:before:shadow-[3px_-1px_0px_13px_#3b71ca] checked:focus:before:transition-[box-shadow_0.2s,transform_0.2s] dark:bg-neutral-600 dark:after:bg-neutral-400 dark:checked:bg-blue-600 dark:checked:after:bg-blue-600 dark:focus:before:shadow-[3px_-1px_0px_13px_rgba(255,255,255,0.4)] dark:checked:focus:before:shadow-[3px_-1px_0px_13px_#3b71ca] disabled:opacity-40 disabled:cursor-not-allowed"
|
|
49
54
|
role="switch"
|
|
50
55
|
:disabled="disabled"
|
|
56
|
+
@change="onChange"
|
|
51
57
|
/>
|
|
52
58
|
<label class="inline-block pl-[0.15rem] hover:cursor-pointer" :for="id"
|
|
53
59
|
>Default switch checkbox input</label
|
|
@@ -137,7 +137,7 @@ const { title, intentions, hideIcon, question, src } = toRefs(props);
|
|
|
137
137
|
/>
|
|
138
138
|
|
|
139
139
|
<div class="mb-6">
|
|
140
|
-
<ol>
|
|
140
|
+
<ol class="list-none">
|
|
141
141
|
<li v-for="(answer, i) in answers" :key="answer.uid">
|
|
142
142
|
<EpRadio
|
|
143
143
|
:label="`${typeList(i)}. ${answer.text}`"
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
|
|
2
|
+
<script setup lang="ts">
|
|
3
|
+
|
|
4
|
+
import { computed } from "vue";
|
|
5
|
+
import { TypeTooltip, typeTooltip } from "../../types/Tooltip"; //"../../types/Tooltip";
|
|
6
|
+
|
|
7
|
+
type Place = "top_start"|"top"|"top_end"|"bottom_start"|"bottom"|"bottom_end"|"left_start"|"left"|"left_end"|"right_start" | "right"|"right_end";
|
|
8
|
+
type Mode = "light"|"dark";
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
interface Props {
|
|
12
|
+
text:string;
|
|
13
|
+
styles?:Mode;
|
|
14
|
+
placement?:Place
|
|
15
|
+
type: TypeTooltip;
|
|
16
|
+
arrow:string
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// define parameter and default valule
|
|
20
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
21
|
+
styles:'light',
|
|
22
|
+
placement:'top',
|
|
23
|
+
arrow:'none',
|
|
24
|
+
})
|
|
25
|
+
//const { arrowstyle } =toRefs<TypeTooltip>(props)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
const finalType = computed(()=>{
|
|
29
|
+
return props.placement
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
const arrowStyle = computed(()=>{
|
|
33
|
+
if(props.arrow =="arrow"){
|
|
34
|
+
if(props.styles =='dark'){
|
|
35
|
+
return 'arrowdark'
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
return 'arrow'
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
else{
|
|
42
|
+
if(props.styles =='light'){
|
|
43
|
+
return 'default'
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
return 'dark'
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
const finalStyles = computed(()=>{
|
|
52
|
+
return `${typeTooltip[finalType.value]?.[arrowStyle.value]}`
|
|
53
|
+
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
</script>
|
|
58
|
+
<template>
|
|
59
|
+
<div class="group relative w-max ">
|
|
60
|
+
<slot></slot>
|
|
61
|
+
<span :class="`pointer-events-none absolute w-max rounded px-2 py-1 text-sm font-medium opacity-0 shadow transition-opacity group-hover:opacity-100 ${ finalStyles} `" >{{ text }}</span>
|
|
62
|
+
</div>
|
|
63
|
+
</template>
|
|
64
|
+
|
|
65
|
+
<style >
|
|
66
|
+
.arrow-light-top::before {
|
|
67
|
+
content: " ";
|
|
68
|
+
position: absolute;
|
|
69
|
+
top: 100%; /* At the bottom of the tooltip */
|
|
70
|
+
left: 50%;
|
|
71
|
+
margin-left: -5px;
|
|
72
|
+
border-width: 5px;
|
|
73
|
+
border-style: solid;
|
|
74
|
+
border-color: rgba(0, 0, 0, 0.2) transparent transparent transparent ;
|
|
75
|
+
}
|
|
76
|
+
.arrow-dark-top::before {
|
|
77
|
+
content: " ";
|
|
78
|
+
position: absolute;
|
|
79
|
+
top: 100%; /* At the bottom of the tooltip */
|
|
80
|
+
left: 50%;
|
|
81
|
+
margin-left: -5px;
|
|
82
|
+
border-width: 5px;
|
|
83
|
+
border-style: solid;
|
|
84
|
+
border-color: black transparent transparent transparent ;
|
|
85
|
+
}
|
|
86
|
+
.arrow-light-bottom::before {
|
|
87
|
+
content: '';
|
|
88
|
+
position: absolute;
|
|
89
|
+
display: inline-block;
|
|
90
|
+
left: 50%;
|
|
91
|
+
bottom: 100%;
|
|
92
|
+
border-right: 7px solid transparent;
|
|
93
|
+
border-bottom: 7px solid #eee;
|
|
94
|
+
border-left: 7px solid transparent;
|
|
95
|
+
border-bottom-color: rgba(0, 0, 0, 0.2);
|
|
96
|
+
|
|
97
|
+
}
|
|
98
|
+
.arrow-dark-bottom::before {
|
|
99
|
+
content: '';
|
|
100
|
+
position: absolute;
|
|
101
|
+
display: inline-block;
|
|
102
|
+
left: 50%;
|
|
103
|
+
bottom: 100%;
|
|
104
|
+
border-right: 7px solid transparent;
|
|
105
|
+
border-bottom: 7px solid black;
|
|
106
|
+
border-left: 7px solid transparent;
|
|
107
|
+
border-bottom-color:black transparent transparent transparent ;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.arrow-light-left::before {
|
|
111
|
+
position: absolute;
|
|
112
|
+
display: inline-block;
|
|
113
|
+
left:100%;
|
|
114
|
+
top: 50%;
|
|
115
|
+
content: '';
|
|
116
|
+
margin-right: 0px;
|
|
117
|
+
border-top: 5px solid transparent;
|
|
118
|
+
border-left: 5px solid #eee;
|
|
119
|
+
border-bottom: 5px solid transparent;
|
|
120
|
+
border-left-color: rgba(0, 0, 0, 0.2);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.arrow-dark-left::before {
|
|
124
|
+
position: absolute;
|
|
125
|
+
display: inline-block;
|
|
126
|
+
left:100%;
|
|
127
|
+
top: 50%;
|
|
128
|
+
content: '';
|
|
129
|
+
margin-right: 0px;
|
|
130
|
+
border-top: 5px solid transparent;
|
|
131
|
+
border-left: 5px solid black;
|
|
132
|
+
border-bottom: 5px solid transparent;
|
|
133
|
+
border-left-color: black transparent transparent transparent ;
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.arrow-light-right::before {
|
|
139
|
+
position: absolute;
|
|
140
|
+
display: inline-block;
|
|
141
|
+
right:100%;
|
|
142
|
+
top: 50%;
|
|
143
|
+
content: '';
|
|
144
|
+
margin-right: 0px;
|
|
145
|
+
border-top: 5px solid transparent;
|
|
146
|
+
border-right: 5px solid #eee;
|
|
147
|
+
border-bottom: 5px solid transparent;
|
|
148
|
+
border-right-color: rgba(0, 0, 0, 0.2);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.arrow-dark-right::before {
|
|
152
|
+
position: absolute;
|
|
153
|
+
display: inline-block;
|
|
154
|
+
right:100%;
|
|
155
|
+
top: 50%;
|
|
156
|
+
content: '';
|
|
157
|
+
margin-right: 0px;
|
|
158
|
+
border-top: 5px solid transparent;
|
|
159
|
+
border-right: 5px solid black;
|
|
160
|
+
border-bottom: 5px solid transparent;
|
|
161
|
+
border-right-color:black transparent transparent transparent ;
|
|
162
|
+
|
|
163
|
+
}
|
|
164
|
+
</style>
|
|
@@ -9,16 +9,16 @@ import EpModal from "../interactions/EpModal.vue";
|
|
|
9
9
|
import EpImg from "../basics/EpImg.vue";
|
|
10
10
|
|
|
11
11
|
interface Props {
|
|
12
|
-
carrouselImg: MediaCarousel[];
|
|
13
|
-
gallery?:boolean;
|
|
14
|
-
labelRef?:string|null;
|
|
15
|
-
labelClose?:string|null
|
|
12
|
+
carrouselImg: MediaCarousel[];
|
|
13
|
+
gallery?: boolean;
|
|
14
|
+
labelRef?: string | null;
|
|
15
|
+
labelClose?: string | null;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
const props = withDefaults(defineProps<Props>(), {
|
|
19
|
-
labelClose:"Fermer",
|
|
20
|
-
labelRef:"Référence",
|
|
21
|
-
gallery:false
|
|
19
|
+
labelClose: "Fermer",
|
|
20
|
+
labelRef: "Référence",
|
|
21
|
+
gallery: false,
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
const currentIndex = ref<number>(0);
|
|
@@ -50,28 +50,31 @@ const { carrouselImg, labelClose, labelRef } = toRefs(props);
|
|
|
50
50
|
<EpIcon :icon-path="mdiChevronRightCircleOutline"></EpIcon>
|
|
51
51
|
</button>
|
|
52
52
|
</div>
|
|
53
|
-
<div class="bg-white shadow-xl p-4 max-w-[800px] mx-auto border-solid">
|
|
54
|
-
<div class="max-w-[800px] h-[550px] m-auto relative">
|
|
53
|
+
<div class="bg-white shadow-xl p-4 lg:max-w-[800px] mx-auto border-solid">
|
|
54
|
+
<!-- <div class="max-w-[800px] h-[550px] m-auto relative">
|
|
55
55
|
<div
|
|
56
|
-
class="w-full h-full bg-center
|
|
56
|
+
class="w-full h-full bg-center duration-500"
|
|
57
57
|
:style="`background-image:url('${carrouselImg[currentIndex].src}')`"
|
|
58
58
|
></div>
|
|
59
|
-
</div>
|
|
59
|
+
</div> -->
|
|
60
|
+
|
|
61
|
+
<img :src="carrouselImg[currentIndex].src" alt="image" class="rounded-sm" />
|
|
62
|
+
|
|
60
63
|
<div v-if="carrouselImg[currentIndex]?.caption" class="mt-2 text-sm text-gray-800">
|
|
61
64
|
{{ carrouselImg[currentIndex].caption }}
|
|
62
65
|
</div>
|
|
63
|
-
<div v-if="carrouselImg[currentIndex]?.bib" class="flex justify-end">
|
|
64
|
-
<EpBtn
|
|
66
|
+
<div v-if="carrouselImg[currentIndex]?.bib" class="flex justify-end mt-2">
|
|
67
|
+
<EpBtn type="primary" @click="dialog = true" dark>{{ labelRef }}</EpBtn>
|
|
65
68
|
</div>
|
|
66
69
|
</div>
|
|
67
70
|
<EpModal v-model="dialog" title="Référence">
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
<div v-html="carrouselImg[currentIndex].bib"></div>
|
|
72
|
+
<div class="flex justify-end">
|
|
73
|
+
<EpBtn @click="dialog = false" type="primary" dark>{{ labelClose }}</EpBtn>
|
|
74
|
+
</div>
|
|
72
75
|
</EpModal>
|
|
73
76
|
</div>
|
|
74
|
-
<div v-else class="flex">
|
|
77
|
+
<div v-else class="flex flex-wrap">
|
|
75
78
|
<template v-for="image in carrouselImg" :key="`image-${image?.uid}`">
|
|
76
79
|
<EpImg :src="image.src" :bib="image.bib" :caption="image.caption" thumbnail></EpImg>
|
|
77
80
|
</template>
|