ep-lib-ts 0.0.7 → 0.0.9
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/components/basics/EpBadge.vue.d.ts +38 -0
- package/dist/components/basics/EpBtn.vue.d.ts +108 -0
- package/dist/components/basics/EpCard.vue.d.ts +95 -0
- package/dist/components/basics/EpChip.vue.d.ts +72 -0
- package/dist/components/basics/EpDivider.vue.d.ts +51 -4
- package/dist/components/basics/EpFlex.vue.d.ts +9 -0
- package/dist/components/basics/EpIcon.vue.d.ts +37 -4
- package/dist/components/basics/EpImg.vue.d.ts +76 -0
- package/dist/components/basics/EpSection.vue.d.ts +84 -0
- package/dist/components/basics/EpSpinner.vue.d.ts +32 -0
- package/dist/components/basics/EpTable.vue.d.ts +24 -0
- package/dist/components/basics/EpText.vue.d.ts +30 -0
- package/dist/components/charts/EpBarChart.vue.d.ts +82 -0
- package/dist/components/charts/EpLineChart.vue.d.ts +82 -0
- package/dist/components/charts/EpPieChart.vue.d.ts +2 -0
- package/dist/components/educationals/EpEdu.vue.d.ts +80 -0
- package/dist/components/educationals/EpReading.vue.d.ts +151 -0
- package/dist/components/educationals/EpScope.vue.d.ts +14 -0
- package/dist/components/interactions/EpAccordeon.vue.d.ts +53 -4
- package/dist/components/interactions/EpContentSlider.vue.d.ts +2 -0
- package/dist/components/interactions/EpModal.vue.d.ts +70 -0
- package/dist/components/interactions/EpQuestion.vue.d.ts +2 -0
- package/dist/components/interactions/EpTabs.vue.d.ts +2 -0
- package/dist/components/medias/EpAudio.vue.d.ts +79 -0
- package/dist/components/medias/EpCarousel.vue.d.ts +32 -0
- package/dist/components/medias/EpIframe.vue.d.ts +58 -0
- package/dist/components/medias/EpKatex.vue.d.ts +52 -0
- package/dist/components/medias/EpLink.vue.d.ts +73 -0
- package/dist/components/medias/EpSoftware.vue.d.ts +88 -0
- package/dist/components/medias/EpSvg.vue.d.ts +2 -0
- package/dist/components/medias/EpTerm.vue.d.ts +80 -0
- package/dist/components/medias/EpTimeLine.vue.d.ts +2 -0
- package/dist/components/medias/EpVideo.vue.d.ts +64 -0
- package/dist/components/medias/EpVideoPanopto.vue.d.ts +64 -0
- package/dist/components/signages/EpAlert.vue.d.ts +63 -4
- package/dist/components/signages/EpHeader.vue.d.ts +101 -0
- package/dist/components/signages/EpQuote.vue.d.ts +39 -0
- package/dist/components/tools/BgAudio.vue.d.ts +14 -0
- package/dist/components/tools/DisplayBox.vue.d.ts +17 -0
- package/dist/ep-lib-ts.js +27411 -0
- package/dist/ep-lib-ts.umd.cjs +1005 -0
- package/dist/index.d.ts +37 -1
- package/dist/style.css +1 -0
- package/package.json +25 -23
- package/src/components/basics/EpBadge.vue +48 -0
- package/src/components/basics/EpBtn.vue +100 -0
- package/src/components/basics/EpCard.vue +95 -0
- package/src/components/basics/EpChip.vue +81 -0
- package/src/components/basics/EpDivider.vue +40 -0
- package/src/components/basics/EpFlex.vue +42 -0
- package/src/components/basics/EpIcon.vue +25 -0
- package/src/components/basics/EpImg.vue +59 -0
- package/src/components/basics/EpSection.vue +238 -0
- package/src/components/basics/EpSpinner.vue +47 -0
- package/src/components/basics/EpTable.vue +33 -0
- package/src/components/basics/EpText.vue +85 -0
- package/src/components/charts/EpBarChart.vue +82 -0
- package/src/components/charts/EpLineChart.vue +92 -0
- package/src/components/charts/EpPieChart.vue +8 -0
- package/src/components/educationals/EpEdu.vue +93 -0
- package/src/components/educationals/EpReading.vue +234 -0
- package/src/components/educationals/EpScope.vue +25 -0
- package/src/components/forms/EpCheckbox.vue +49 -0
- package/src/components/forms/EpInput.vue +178 -0
- package/src/components/forms/EpRadio.vue +72 -0
- package/src/components/forms/EpSelect.vue +145 -0
- package/src/components/forms/EpSwitch.vue +58 -0
- package/src/components/forms/EpTextarea.vue +79 -0
- package/src/components/forms/EpToggle.vue +97 -0
- package/src/components/interactions/EpAccordeon.vue +88 -0
- package/src/components/interactions/EpContentSlider.vue +12 -0
- package/src/components/interactions/EpModal.vue +117 -0
- package/src/components/interactions/EpQuestion.vue +8 -0
- package/src/components/interactions/EpTabs.vue +10 -0
- package/src/components/medias/EpAudio.vue +83 -0
- package/src/components/medias/EpCarousel.vue +84 -0
- package/src/components/medias/EpIframe.vue +57 -0
- package/src/components/medias/EpKatex.vue +75 -0
- package/src/components/medias/EpLink.vue +62 -0
- package/src/components/medias/EpSoftware.vue +89 -0
- package/src/components/medias/EpSvg.vue +8 -0
- package/src/components/medias/EpTerm.vue +145 -0
- package/src/components/medias/EpTimeLine.vue +8 -0
- package/src/components/medias/EpVideo.vue +77 -0
- package/src/components/medias/EpVideoPanopto.vue +62 -0
- package/src/components/signages/EpAlert.vue +70 -0
- package/src/components/signages/EpHeader.vue +223 -0
- package/src/components/signages/EpQuote.vue +48 -0
- package/src/components/tools/BgAudio.vue +51 -0
- package/src/components/tools/DisplayBox.vue +37 -0
- package/dist/components/basics/EpDivider.vue.d.ts.map +0 -1
- package/dist/components/basics/EpIcon.vue.d.ts.map +0 -1
- package/dist/components/index.d.ts +0 -38
- package/dist/components/interactions/EpAccordeon.vue.d.ts.map +0 -1
- package/dist/components/main.d.ts +0 -7
- package/dist/components/signages/EpAlert.vue.d.ts.map +0 -1
- package/dist/ep-lib-ts.cjs.js +0 -1
- package/dist/ep-lib-ts.es.js +0 -392
- package/dist/ep-lib-ts.umd.js +0 -2
- package/dist/index.css +0 -1
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
|
|
3
|
+
import EpBadge from "../basics/EpBadge.vue";
|
|
4
|
+
import { mdiLockOutline } from "@mdi/js";
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
id?: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
modelValue?: string;
|
|
10
|
+
type?:
|
|
11
|
+
| "text"
|
|
12
|
+
| "email"
|
|
13
|
+
| "url"
|
|
14
|
+
| "password"
|
|
15
|
+
| "number"
|
|
16
|
+
| "date"
|
|
17
|
+
| "search"
|
|
18
|
+
| "tel"
|
|
19
|
+
| "time";
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
iconPath?: string;
|
|
22
|
+
iconSize?: string;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
readonly?: boolean;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
28
|
+
id: "0",
|
|
29
|
+
label: "label",
|
|
30
|
+
modelValue: "",
|
|
31
|
+
type: "text",
|
|
32
|
+
placeholder: "",
|
|
33
|
+
iconPath: "",
|
|
34
|
+
iconSize: "",
|
|
35
|
+
disabled: false,
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<template>
|
|
42
|
+
<div class="relative h-10 w-72 min-w-[200px]">
|
|
43
|
+
<select :disabled="disabled" class="
|
|
44
|
+
peer
|
|
45
|
+
h-full
|
|
46
|
+
w-full
|
|
47
|
+
rounded-[7px]
|
|
48
|
+
border
|
|
49
|
+
border-neutral-300
|
|
50
|
+
border-t-transparent
|
|
51
|
+
bg-transparent
|
|
52
|
+
px-3
|
|
53
|
+
py-2.5
|
|
54
|
+
font-sans
|
|
55
|
+
text-sm
|
|
56
|
+
font-normal
|
|
57
|
+
text-blue-gray-700
|
|
58
|
+
outline
|
|
59
|
+
outline-0
|
|
60
|
+
transition-all
|
|
61
|
+
placeholder-shown:border
|
|
62
|
+
placeholder-shown:border-blue-gray-200
|
|
63
|
+
placeholder-shown:border-t-blue-gray-200
|
|
64
|
+
empty:!bg-red-500
|
|
65
|
+
focus:border-2
|
|
66
|
+
focus:border-blue-500
|
|
67
|
+
focus:border-t-transparent
|
|
68
|
+
focus:outline-4
|
|
69
|
+
placeholder-shown:outline-0
|
|
70
|
+
disabled:border-0
|
|
71
|
+
disabled:cursor-not-allowed
|
|
72
|
+
disabled:bg-neutral-200
|
|
73
|
+
focus:ring-0
|
|
74
|
+
">
|
|
75
|
+
<option value="option">Choisissez une option</option>
|
|
76
|
+
<option value="vanderpoel">Van Der Poel</option>
|
|
77
|
+
<option value="vanaert">Van Aert</option>
|
|
78
|
+
<option value="pogacar">Pogacar</option>
|
|
79
|
+
<option value="evenepoel">Evenepoel</option>
|
|
80
|
+
</select>
|
|
81
|
+
<label class="before:content[' ']
|
|
82
|
+
after:content[' ']
|
|
83
|
+
pointer-events-none
|
|
84
|
+
absolute
|
|
85
|
+
left-0
|
|
86
|
+
border-red-500
|
|
87
|
+
-top-1.5
|
|
88
|
+
flex
|
|
89
|
+
h-full
|
|
90
|
+
w-full
|
|
91
|
+
select-none
|
|
92
|
+
text-[11px]
|
|
93
|
+
font-normal
|
|
94
|
+
leading-tight
|
|
95
|
+
text-blue-gray-400
|
|
96
|
+
transition-all
|
|
97
|
+
before:pointer-events-none
|
|
98
|
+
before:mt-[6.5px]
|
|
99
|
+
before:mr-1
|
|
100
|
+
before:box-border
|
|
101
|
+
before:block
|
|
102
|
+
before:h-1.5
|
|
103
|
+
before:w-2.5
|
|
104
|
+
before:rounded-tl-md
|
|
105
|
+
before:border-t
|
|
106
|
+
before:border-l
|
|
107
|
+
before:border-blue-gray-200
|
|
108
|
+
before:transition-all
|
|
109
|
+
after:pointer-events-none
|
|
110
|
+
after:mt-[6.5px]
|
|
111
|
+
after:ml-1
|
|
112
|
+
after:box-border
|
|
113
|
+
after:block
|
|
114
|
+
after:h-1.5
|
|
115
|
+
after:w-2.5
|
|
116
|
+
after:flex-grow
|
|
117
|
+
after:rounded-tr-md
|
|
118
|
+
after:border-t
|
|
119
|
+
after:border-r
|
|
120
|
+
after:border-blue-gray-200
|
|
121
|
+
after:transition-all
|
|
122
|
+
peer-placeholder-shown:text-sm
|
|
123
|
+
peer-placeholder-shown:leading-[3.75]
|
|
124
|
+
peer-placeholder-shown:text-blue-gray-500
|
|
125
|
+
peer-placeholder-shown:before:border-transparent
|
|
126
|
+
peer-placeholder-shown:after:border-transparent
|
|
127
|
+
peer-focus:text-[11px]
|
|
128
|
+
peer-focus:leading-tight
|
|
129
|
+
peer-focus:text-blue-500
|
|
130
|
+
peer-focus:before:border-t-2
|
|
131
|
+
peer-focus:before:border-l-2
|
|
132
|
+
peer-focus:before:border-blue-500
|
|
133
|
+
peer-focus:after:border-t-2
|
|
134
|
+
peer-focus:after:border-r-2
|
|
135
|
+
peer-focus:after:border-blue-500
|
|
136
|
+
peer-disabled:text-transparent
|
|
137
|
+
peer-disabled:before:border-transparent
|
|
138
|
+
peer-disabled:after:border-transparent
|
|
139
|
+
peer-disabled:peer-placeholder-shown:text-blue-gray-500
|
|
140
|
+
">
|
|
141
|
+
Quel est le meilleur cycliste
|
|
142
|
+
</label>
|
|
143
|
+
<EpBadge :iconPath="mdiLockOutline" />
|
|
144
|
+
</div>
|
|
145
|
+
</template>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { toRefs } from "vue";
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
id?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
modelValue?: string;
|
|
8
|
+
type?: string;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
readonly?: boolean;
|
|
12
|
+
checked?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
16
|
+
id: "toggle",
|
|
17
|
+
label: "label",
|
|
18
|
+
modelValue: "",
|
|
19
|
+
type: "checkbox",
|
|
20
|
+
placeholder: "",
|
|
21
|
+
disabled: false,
|
|
22
|
+
readonly: false,
|
|
23
|
+
checked: false,
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const emit = defineEmits<{
|
|
27
|
+
(e: "update:modelValue", modelValue: string): void;
|
|
28
|
+
}>();
|
|
29
|
+
|
|
30
|
+
const {
|
|
31
|
+
id,
|
|
32
|
+
label,
|
|
33
|
+
type,
|
|
34
|
+
modelValue,
|
|
35
|
+
placeholder,
|
|
36
|
+
disabled,
|
|
37
|
+
readonly,
|
|
38
|
+
checked,
|
|
39
|
+
} = toRefs(props);
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<template>
|
|
43
|
+
<div>
|
|
44
|
+
<input
|
|
45
|
+
:id="id"
|
|
46
|
+
:type="type"
|
|
47
|
+
:checked="checked"
|
|
48
|
+
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
|
+
role="switch"
|
|
50
|
+
:disabled="disabled"
|
|
51
|
+
/>
|
|
52
|
+
<label class="inline-block pl-[0.15rem] hover:cursor-pointer" :for="id"
|
|
53
|
+
>Default switch checkbox input</label
|
|
54
|
+
>
|
|
55
|
+
</div>
|
|
56
|
+
</template>
|
|
57
|
+
|
|
58
|
+
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { toRefs } from "vue";
|
|
3
|
+
|
|
4
|
+
import EpIcon from "../basics/EpIcon.vue";
|
|
5
|
+
import EpBadge from "../basics/EpBadge.vue";
|
|
6
|
+
import { mdiLockOutline } from "@mdi/js";
|
|
7
|
+
|
|
8
|
+
interface Props {
|
|
9
|
+
id?: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
modelValue?: string;
|
|
12
|
+
type?:
|
|
13
|
+
| "text"
|
|
14
|
+
| "email"
|
|
15
|
+
| "url"
|
|
16
|
+
| "password"
|
|
17
|
+
| "number"
|
|
18
|
+
| "date"
|
|
19
|
+
| "search"
|
|
20
|
+
| "tel"
|
|
21
|
+
| "time";
|
|
22
|
+
placeholder?: string;
|
|
23
|
+
iconPath?: string;
|
|
24
|
+
iconSize?: string;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
readonly?: boolean;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// text: mdiText
|
|
30
|
+
// email: mdiEmailOutline
|
|
31
|
+
// url: mdiLink
|
|
32
|
+
// password: mdiLockOutline
|
|
33
|
+
// number: mdiNumeric
|
|
34
|
+
// date: mdiCalendarMonthOutline
|
|
35
|
+
// search: mdiMagnify
|
|
36
|
+
// tel: mdiPhoneOutline
|
|
37
|
+
// time: mdiClockOutline
|
|
38
|
+
|
|
39
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
40
|
+
id: "0",
|
|
41
|
+
label: "label",
|
|
42
|
+
modelValue: "",
|
|
43
|
+
type: "text",
|
|
44
|
+
placeholder: "",
|
|
45
|
+
iconPath: "",
|
|
46
|
+
iconSize: "",
|
|
47
|
+
disabled: false,
|
|
48
|
+
readonly: false,
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
const emit = defineEmits<{
|
|
52
|
+
(e: "update:modelValue", modelValue: string): void;
|
|
53
|
+
}>();
|
|
54
|
+
|
|
55
|
+
const {
|
|
56
|
+
id,
|
|
57
|
+
label,
|
|
58
|
+
type,
|
|
59
|
+
modelValue,
|
|
60
|
+
placeholder,
|
|
61
|
+
iconPath,
|
|
62
|
+
disabled,
|
|
63
|
+
readonly,
|
|
64
|
+
} = toRefs(props);
|
|
65
|
+
</script>
|
|
66
|
+
|
|
67
|
+
<template>
|
|
68
|
+
<div class="w-96">
|
|
69
|
+
<div class="relative w-full min-w-[200px]">
|
|
70
|
+
<textarea :disabled="disabled"
|
|
71
|
+
class="peer h-full min-h-[100px] w-full resize-none rounded-[7px] border border-neutral-300 bg-transparent px-3 py-2.5 font-sans text-sm font-normal text-neutral-700 outline outline-0 transition-all placeholder-shown:border placeholder-shown:border-neutral-300 placeholder-shown:border-t-neutral-200 focus:border-2 focus:border-blue-500 focus:border-t-transparent focus:outline-0 disabled:resize-none disabled:border-0 disabled:bg-neutral-100 disabled:cursor-not-allowed disabled:bg-neutral-200 focus:ring-0"
|
|
72
|
+
placeholder=" "></textarea>
|
|
73
|
+
<label
|
|
74
|
+
class="before:content[' '] after:content[' '] pointer-events-none absolute left-0 -top-1.5 flex h-full w-full select-none text-[11px] font-normal leading-tight text-blue-400 transition-all before:pointer-events-none before:mt-[6.5px] before:mr-1 before:box-border before:block before:h-1.5 before:w-2.5 before:rounded-tl-md before:border-t before:border-l before:border-neutral-300 before:transition-all after:pointer-events-none after:mt-[6.5px] after:ml-1 after:box-border after:block after:h-1.5 after:w-2.5 after:flex-grow after:rounded-tr-md after:border-t after:border-r after:border-neutral-300 after:transition-all peer-placeholder-shown:text-sm peer-placeholder-shown:leading-[3.75] peer-placeholder-shown:text-blue-500 peer-placeholder-shown:before:border-transparent peer-placeholder-shown:after:border-transparent peer-focus:text-[11px] peer-focus:leading-tight peer-focus:text-blue-500 peer-focus:before:border-t-2 peer-focus:before:border-l-2 peer-focus:before:border-blue-500 peer-focus:after:border-t-2 peer-focus:after:border-r-2 peer-focus:after:border-blue-500 peer-disabled:text-transparent peer-disabled:before:border-transparent peer-disabled:after:border-transparent peer-disabled:peer-placeholder-shown:text-blue-500">
|
|
75
|
+
Message
|
|
76
|
+
</label>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</template>
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { toRefs } from "vue";
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
id?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
modelValue?: string;
|
|
8
|
+
type?: string;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
readonly?: boolean;
|
|
12
|
+
checked?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
16
|
+
id: "toggle",
|
|
17
|
+
label: "label",
|
|
18
|
+
modelValue: "",
|
|
19
|
+
type: "checkbox",
|
|
20
|
+
placeholder: "",
|
|
21
|
+
disabled: false,
|
|
22
|
+
readonly: false,
|
|
23
|
+
checked: false,
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const emit = defineEmits<{
|
|
27
|
+
(e: "update:modelValue", modelValue: string): void;
|
|
28
|
+
}>();
|
|
29
|
+
|
|
30
|
+
const {
|
|
31
|
+
id,
|
|
32
|
+
label,
|
|
33
|
+
type,
|
|
34
|
+
modelValue,
|
|
35
|
+
placeholder,
|
|
36
|
+
disabled,
|
|
37
|
+
readonly,
|
|
38
|
+
checked,
|
|
39
|
+
} = toRefs(props);
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<template>
|
|
43
|
+
<!-- <div>
|
|
44
|
+
<label :for="id" class="flex items-center cursor-pointer relative mb-4">
|
|
45
|
+
<input :type="type" :id="id" class="sr-only form-checkbox h-6 w-6 text-indigo-600 transition duration-150 ease-in-out checked:bg-indigo-600 checked:border-transparent checked:text-white" :checked="checked" />
|
|
46
|
+
<div
|
|
47
|
+
class="
|
|
48
|
+
toggle-bg
|
|
49
|
+
bg-gray-200
|
|
50
|
+
border-2
|
|
51
|
+
border-gray-200
|
|
52
|
+
h-6
|
|
53
|
+
w-11
|
|
54
|
+
rounded-full
|
|
55
|
+
after:absolute
|
|
56
|
+
after:top-0.5
|
|
57
|
+
after:left-0.5
|
|
58
|
+
after:bg-white
|
|
59
|
+
after:border-gray-400
|
|
60
|
+
after:rounded-full
|
|
61
|
+
after:h-5
|
|
62
|
+
after:w-5
|
|
63
|
+
after:transition
|
|
64
|
+
after:translate-x-0
|
|
65
|
+
after:checked:translate-x-full
|
|
66
|
+
checked:after:border-white
|
|
67
|
+
"
|
|
68
|
+
></div>
|
|
69
|
+
<span class="ml-3 text-gray-900 text-base font-medium">Toggle me</span>
|
|
70
|
+
</label>
|
|
71
|
+
</div> -->
|
|
72
|
+
<div>
|
|
73
|
+
<input
|
|
74
|
+
:id="id"
|
|
75
|
+
:type="type"
|
|
76
|
+
:checked="checked"
|
|
77
|
+
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-['']
|
|
78
|
+
|
|
79
|
+
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-['']
|
|
80
|
+
|
|
81
|
+
hover:cursor-pointer focus:outline-none focus:ring-0
|
|
82
|
+
|
|
83
|
+
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-['']
|
|
84
|
+
|
|
85
|
+
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]
|
|
86
|
+
|
|
87
|
+
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"
|
|
88
|
+
role="switch"
|
|
89
|
+
:disabled="disabled"
|
|
90
|
+
/>
|
|
91
|
+
<label class="inline-block pl-[0.15rem] hover:cursor-pointer" :for="id"
|
|
92
|
+
>Default switch checkbox input</label
|
|
93
|
+
>
|
|
94
|
+
</div>
|
|
95
|
+
</template>
|
|
96
|
+
|
|
97
|
+
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref, toRefs, onMounted, computed } from "vue";
|
|
3
|
+
import EpIcon from "../basics/EpIcon.vue";
|
|
4
|
+
import useColors from "../../composables/useColors";
|
|
5
|
+
///types with Capital letters... object with styles same name in lowercase
|
|
6
|
+
import { TypeAccordeon, typeAccordeon } from "../../types/Accordeon";
|
|
7
|
+
interface Props {
|
|
8
|
+
title?: string|null;
|
|
9
|
+
type?: TypeAccordeon;
|
|
10
|
+
icon?: string|null;
|
|
11
|
+
open?: boolean;
|
|
12
|
+
outlined?:boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
16
|
+
title: 'En savoir plus',
|
|
17
|
+
open: false,
|
|
18
|
+
type:'base',
|
|
19
|
+
outlined:false,
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
const showDiv = ref(props.open);
|
|
24
|
+
const collapsible = ref();
|
|
25
|
+
|
|
26
|
+
const isOutlined = computed(()=>{
|
|
27
|
+
if(props.outlined){
|
|
28
|
+
return 'outlined'
|
|
29
|
+
}
|
|
30
|
+
return 'default'
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
const stylesHeader = computed(()=>{
|
|
34
|
+
return `flex justify-between items-center px-4 py-2 cursor-pointer ${typeAccordeon[props.type]?.[isOutlined.value]}`
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
const contentStyles = computed(()=>{
|
|
38
|
+
return `px-4 ${useColors('bg', props.type + 'light')}`
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
onMounted(() => {
|
|
42
|
+
var content = collapsible.value
|
|
43
|
+
if (props.open) {
|
|
44
|
+
content.style.maxHeight = content.scrollHeight + "px";
|
|
45
|
+
}
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
function toggleDivVisibility() {
|
|
49
|
+
showDiv.value = !showDiv.value;
|
|
50
|
+
var content = collapsible.value
|
|
51
|
+
if (content.style.maxHeight) {
|
|
52
|
+
content.style.maxHeight = null;
|
|
53
|
+
} else {
|
|
54
|
+
content.style.maxHeight = content.scrollHeight + "px";
|
|
55
|
+
}
|
|
56
|
+
//add transition
|
|
57
|
+
if(!content.style.transition){
|
|
58
|
+
content.style.transition = 'max-height 0.2s ease-out';
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
const { title, icon } = toRefs(props)
|
|
64
|
+
</script>
|
|
65
|
+
|
|
66
|
+
<template>
|
|
67
|
+
<div :class="stylesHeader" @click="toggleDivVisibility">
|
|
68
|
+
<h3 class="text-lg"><EpIcon v-if="icon" :icon-path="icon"></EpIcon> {{ title }}</h3>
|
|
69
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
|
|
70
|
+
:class="`mx-4 my-3 h-6 w-6 transition-all duration-200 ${showDiv ? 'rotate-45' : ''}`">
|
|
71
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M12 6v12m6-6H6" />
|
|
72
|
+
</svg>
|
|
73
|
+
</div>
|
|
74
|
+
<div ref="collapsible" :class="`${contentStyles} content`">
|
|
75
|
+
<div class="py-4">
|
|
76
|
+
|
|
77
|
+
<slot></slot>
|
|
78
|
+
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
</template>
|
|
82
|
+
|
|
83
|
+
<style scoped>
|
|
84
|
+
.content {
|
|
85
|
+
max-height: 0;
|
|
86
|
+
overflow: hidden;
|
|
87
|
+
}
|
|
88
|
+
</style>
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, toRefs } from 'vue';
|
|
3
|
+
import EpCard from '../basics/EpCard.vue'
|
|
4
|
+
|
|
5
|
+
const size = {
|
|
6
|
+
compact:"w-[40%]",
|
|
7
|
+
default:"w-[75%]",
|
|
8
|
+
comfortable:"w-[85%]"
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
type Size = keyof typeof size;
|
|
12
|
+
|
|
13
|
+
interface Props {
|
|
14
|
+
modelValue?:boolean;
|
|
15
|
+
title?: string | null;
|
|
16
|
+
subtitle?: string | null;
|
|
17
|
+
icon?: string | null;
|
|
18
|
+
persistent?:boolean;
|
|
19
|
+
size?:Size;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
23
|
+
modelValue:false,
|
|
24
|
+
title: null,
|
|
25
|
+
subtitle: null,
|
|
26
|
+
icon: null,
|
|
27
|
+
persistent:false,
|
|
28
|
+
size:"default"
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
const emit = defineEmits<{
|
|
32
|
+
(e:"update:modelValue", modelValue:boolean):void
|
|
33
|
+
}>()
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
const closeModal = ():void => {
|
|
37
|
+
if(!props.persistent){
|
|
38
|
+
emit('update:modelValue', false)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const sizeModal = computed(()=>{
|
|
43
|
+
return size[props.size];
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
const {title, subtitle, icon} = toRefs(props)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
///const slots = useSlots() // import useSlots
|
|
51
|
+
//console.log(slots)
|
|
52
|
+
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
<template>
|
|
56
|
+
<Teleport to="body">
|
|
57
|
+
<Transition name="modal">
|
|
58
|
+
<div v-if="modelValue" class="modal-mask" @click.self="closeModal">
|
|
59
|
+
<div :class="`modal-container ${sizeModal}`">
|
|
60
|
+
<div class="mx-auto">
|
|
61
|
+
<EpCard :title="title" :subtitle="subtitle" :icon="icon">
|
|
62
|
+
|
|
63
|
+
<slot></slot>
|
|
64
|
+
</EpCard>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
</Transition>
|
|
69
|
+
</Teleport>
|
|
70
|
+
</template>
|
|
71
|
+
|
|
72
|
+
<style>
|
|
73
|
+
.modal-mask {
|
|
74
|
+
position: fixed;
|
|
75
|
+
z-index: 9998;
|
|
76
|
+
top: 0;
|
|
77
|
+
left: 0;
|
|
78
|
+
width: 100%;
|
|
79
|
+
height: 100%;
|
|
80
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
81
|
+
display: flex;
|
|
82
|
+
transition: opacity 0.3s ease;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.modal-container {
|
|
86
|
+
margin: auto;
|
|
87
|
+
transition: all 0.3s ease;
|
|
88
|
+
z-index: 9999;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.modal-header h3 {
|
|
92
|
+
margin-top: 0;
|
|
93
|
+
color: #42b983;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.modal-body {
|
|
97
|
+
margin: 20px 0;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.modal-default-button {
|
|
101
|
+
float: right;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.modal-enter-from {
|
|
105
|
+
opacity: 0;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.modal-leave-to {
|
|
109
|
+
opacity: 0;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.modal-enter-from .modal-container,
|
|
113
|
+
.modal-leave-to .modal-container {
|
|
114
|
+
-webkit-transform: scale(1.1);
|
|
115
|
+
transform: scale(1.1);
|
|
116
|
+
}
|
|
117
|
+
</style>
|