@icvdeveloper/common-module 0.0.122 → 0.0.124

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 (94) hide show
  1. package/README.md +6 -6
  2. package/dist/module.json +1 -1
  3. package/dist/runtime/assets/svg/answer.svg +14 -14
  4. package/dist/runtime/assets/svg/avatar.svg +1 -1
  5. package/dist/runtime/assets/svg/bell-icon.svg +3 -3
  6. package/dist/runtime/assets/svg/checkmark-icon.svg +1 -1
  7. package/dist/runtime/assets/svg/close-icon.svg +1 -1
  8. package/dist/runtime/assets/svg/icon-avatar.svg +1 -1
  9. package/dist/runtime/assets/svg/icon-chevron.svg +4 -4
  10. package/dist/runtime/assets/svg/icon-circle-plus.svg +1 -1
  11. package/dist/runtime/assets/svg/icon-close.svg +1 -1
  12. package/dist/runtime/assets/svg/icon-info.svg +2 -2
  13. package/dist/runtime/assets/svg/icon-new-window.svg +11 -11
  14. package/dist/runtime/assets/svg/icon-offline.svg +3 -3
  15. package/dist/runtime/assets/svg/icon-online.svg +3 -3
  16. package/dist/runtime/assets/svg/icon-person.svg +2 -2
  17. package/dist/runtime/assets/svg/icon-play.svg +2 -2
  18. package/dist/runtime/assets/svg/icon-star-filled.svg +29 -29
  19. package/dist/runtime/assets/svg/icon-star.svg +24 -24
  20. package/dist/runtime/assets/svg/icon-video-chat.svg +14 -14
  21. package/dist/runtime/assets/svg/icon-website.svg +2 -2
  22. package/dist/runtime/assets/svg/icon-zoom.svg +10 -10
  23. package/dist/runtime/assets/svg/notification-icon.svg +32 -32
  24. package/dist/runtime/assets/svg/offline-icon.svg +1 -1
  25. package/dist/runtime/assets/svg/online-icon.svg +3 -3
  26. package/dist/runtime/assets/svg/peer2peer.svg +3 -3
  27. package/dist/runtime/assets/svg/phone.svg +1 -1
  28. package/dist/runtime/assets/svg/plus-icon.svg +1 -1
  29. package/dist/runtime/assets/svg/red-icon.svg +3 -3
  30. package/dist/runtime/assets/svg/reject.svg +14 -14
  31. package/dist/runtime/assets/svg/search-icon.svg +3 -3
  32. package/dist/runtime/components/affiliates/AffiliatePage.vue +17 -17
  33. package/dist/runtime/components/agenda/AgendaList.vue +259 -259
  34. package/dist/runtime/components/agenda/AgendaTabbed.vue +305 -305
  35. package/dist/runtime/components/agenda/components/AgendaListAccordion.vue +67 -67
  36. package/dist/runtime/components/agenda/components/Calendar.vue +67 -67
  37. package/dist/runtime/components/agenda/components/InfoLink.vue +56 -56
  38. package/dist/runtime/components/agenda/components/PlayIcon.vue +49 -49
  39. package/dist/runtime/components/agenda/components/PresentationLink.vue +137 -137
  40. package/dist/runtime/components/agenda/components/Sponsor.vue +132 -132
  41. package/dist/runtime/components/auth/LoginFullWidth.vue +78 -78
  42. package/dist/runtime/components/auth/PasswordReset.vue +60 -60
  43. package/dist/runtime/components/auth/Registration.vue +27 -27
  44. package/dist/runtime/components/auth/Ucc.vue +129 -129
  45. package/dist/runtime/components/core/Accordion.vue +97 -97
  46. package/dist/runtime/components/core/CountdownTimer.vue +336 -336
  47. package/dist/runtime/components/core/DynamicHtml.vue +1 -1
  48. package/dist/runtime/components/core/Modal.vue +111 -111
  49. package/dist/runtime/components/core/Navbar.vue +154 -154
  50. package/dist/runtime/components/core/SvgIcon.vue +157 -157
  51. package/dist/runtime/components/core/ZoomModal.vue +37 -37
  52. package/dist/runtime/components/events/EventHeader.vue +133 -133
  53. package/dist/runtime/components/events/ListEvents.vue +554 -554
  54. package/dist/runtime/components/forms/AlertBox.vue +21 -21
  55. package/dist/runtime/components/forms/ErrorField.vue +17 -17
  56. package/dist/runtime/components/forms/Message.vue +27 -27
  57. package/dist/runtime/components/forms/SearchInput.vue +38 -38
  58. package/dist/runtime/components/forms/SupportForm.vue +112 -112
  59. package/dist/runtime/components/forms/SwitchInput.vue +42 -42
  60. package/dist/runtime/components/forms/TextArea.vue +26 -26
  61. package/dist/runtime/components/forms/TextInput.vue +28 -28
  62. package/dist/runtime/components/layouts/Accordion.vue +78 -78
  63. package/dist/runtime/components/media/ArchivePlayerAndContentContainer.vue +160 -160
  64. package/dist/runtime/components/media/ArchiveVideoPlayer.vue +186 -186
  65. package/dist/runtime/components/media/PlayerAndContentContainer.vue +178 -178
  66. package/dist/runtime/components/media/WebcastVideoPlayer.vue +140 -172
  67. package/dist/runtime/components/media/components/AgendaPanel.vue +43 -43
  68. package/dist/runtime/components/media/components/ArchiveMediaContainer.vue +91 -91
  69. package/dist/runtime/components/media/components/CeCreditNotification.vue +95 -95
  70. package/dist/runtime/components/media/components/ContentAccordion.vue +63 -63
  71. package/dist/runtime/components/media/components/ContentArea.vue +158 -158
  72. package/dist/runtime/components/media/components/ContentTabs.vue +231 -231
  73. package/dist/runtime/components/media/components/DocumentsPanel.vue +31 -31
  74. package/dist/runtime/components/media/components/JsonApi.vue +31 -31
  75. package/dist/runtime/components/media/components/MediaContainer.vue +63 -63
  76. package/dist/runtime/components/media/components/OverviewPanel.vue +52 -52
  77. package/dist/runtime/components/media/components/PresentersPanel.vue +52 -52
  78. package/dist/runtime/components/media/components/SessionReporting.vue +101 -95
  79. package/dist/runtime/components/media/components/SponsorsPanel.vue +71 -71
  80. package/dist/runtime/components/media/components/WindowContent.vue +92 -92
  81. package/dist/runtime/components/media/components/WindowSlide.vue +72 -72
  82. package/dist/runtime/components/presenters/PresenterListing.vue +164 -164
  83. package/dist/runtime/components/presenters/PresenterModal.vue +223 -223
  84. package/dist/runtime/components/profile/Profile.vue +149 -149
  85. package/dist/runtime/components/profile/components/Sidebar.vue +27 -27
  86. package/dist/runtime/components/profile/components/SidebarNavItem.vue +39 -39
  87. package/dist/runtime/components/profile/tabs/Favorites.vue +21 -21
  88. package/dist/runtime/components/profile/tabs/GeneralInformation.vue +122 -122
  89. package/dist/runtime/components/profile/tabs/ProfileImage.vue +75 -75
  90. package/dist/runtime/components/support/FAQAccordion.vue +140 -140
  91. package/dist/runtime/composables/useUcc.mjs +0 -14
  92. package/dist/runtime/store/auth.mjs +0 -3
  93. package/package.json +1 -1
  94. package/dist/runtime/components/media/components/SessionReporting.vue.d.ts +0 -35
@@ -1,21 +1,21 @@
1
- <script lang="ts" setup>
2
- import { toRefs } from "vue";
3
-
4
- type Props = {
5
- errors: Array<any>;
6
- };
7
-
8
- const props = defineProps<Props>();
9
-
10
- const { errors } = toRefs(props);
11
- </script>
12
-
13
- <template>
14
- <div class="text-white px-6 py-4 border-0 rounded relative mb-4 bg-red">
15
- <span class="inline-block align-middle">
16
- <ul>
17
- <li v-for="error in errors" :key="error[0]">{{ error[0] }}</li>
18
- </ul>
19
- </span>
20
- </div>
21
- </template>
1
+ <script lang="ts" setup>
2
+ import { toRefs } from "vue";
3
+
4
+ type Props = {
5
+ errors: Array<any>;
6
+ };
7
+
8
+ const props = defineProps<Props>();
9
+
10
+ const { errors } = toRefs(props);
11
+ </script>
12
+
13
+ <template>
14
+ <div class="text-white px-6 py-4 border-0 rounded relative mb-4 bg-red">
15
+ <span class="inline-block align-middle">
16
+ <ul>
17
+ <li v-for="error in errors" :key="error[0]">{{ error[0] }}</li>
18
+ </ul>
19
+ </span>
20
+ </div>
21
+ </template>
@@ -1,17 +1,17 @@
1
- <script lang="ts" setup>
2
- type Props = {
3
- errors: Array<string>;
4
- };
5
-
6
- const props = defineProps<Props>();
7
-
8
- const { errors } = toRefs(props);
9
- </script>
10
-
11
- <template>
12
- <div>
13
- <div v-if="errors" class="my-1 text-red-500">
14
- <div v-for="error in errors">{{ error }}</div>
15
- </div>
16
- </div>
17
- </template>
1
+ <script lang="ts" setup>
2
+ type Props = {
3
+ errors: Array<string>;
4
+ };
5
+
6
+ const props = defineProps<Props>();
7
+
8
+ const { errors } = toRefs(props);
9
+ </script>
10
+
11
+ <template>
12
+ <div>
13
+ <div v-if="errors" class="my-1 text-red-500">
14
+ <div v-for="error in errors">{{ error }}</div>
15
+ </div>
16
+ </div>
17
+ </template>
@@ -1,31 +1,31 @@
1
- <script setup lang="ts">
2
- interface Props {
3
- success?: boolean;
4
- }
5
-
6
- const props = withDefaults(defineProps<Props>(), {
7
- success: true,
8
- });
9
-
10
- const { success } = toRefs(props);
11
-
12
- const errorClass = computed(() => {
13
- return "message-base bg-red-100 border-red-400 text-red-600";
14
- });
15
-
16
- const successClass = computed(() => {
17
- return "message-base bg-green-100 border-green-400 text-green-600";
18
- });
19
- </script>
20
-
21
- <template>
22
- <div :class="success ? successClass : errorClass">
23
- <slot class="pb-0" />
24
- </div>
25
- </template>
26
-
1
+ <script setup lang="ts">
2
+ interface Props {
3
+ success?: boolean;
4
+ }
5
+
6
+ const props = withDefaults(defineProps<Props>(), {
7
+ success: true,
8
+ });
9
+
10
+ const { success } = toRefs(props);
11
+
12
+ const errorClass = computed(() => {
13
+ return "message-base bg-red-100 border-red-400 text-red-600";
14
+ });
15
+
16
+ const successClass = computed(() => {
17
+ return "message-base bg-green-100 border-green-400 text-green-600";
18
+ });
19
+ </script>
20
+
21
+ <template>
22
+ <div :class="success ? successClass : errorClass">
23
+ <slot class="pb-0" />
24
+ </div>
25
+ </template>
26
+
27
27
  <style scoped>
28
28
  .message-base {
29
29
  @apply border font-bold px-4 py-3 mb-4 rounded relative;
30
30
  }
31
- </style>
31
+ </style>
@@ -1,38 +1,38 @@
1
- <script lang="ts" setup>
2
- import CloseIcon from "../../assets/svg/close-icon.svg";
3
-
4
- type Props = {
5
- placeholder: string;
6
- };
7
-
8
- const props = withDefaults(defineProps<Props>(), {
9
- placeholder: "Search...",
10
- });
11
-
12
- const value = ref<string>("");
13
-
14
- const emit = defineEmits<{
15
- (e: "onChange", value: string): void;
16
- (e: "clear"): void;
17
- }>();
18
-
19
- const clear = () => {
20
- value.value = "";
21
- emit("clear");
22
- };
23
- </script>
24
-
25
- <template>
26
- <div class="flex flex-row items-center">
27
- <input
28
- v-model="value"
29
- type="text"
30
- class="flex-1 pl-2 pr-5 py-1"
31
- :placeholder="placeholder"
32
- @input="emit('onChange', value)"
33
- />
34
- <span class="flex-initial cursor-pointer px-4 py-2" @click="clear">
35
- <close-icon class="fill-current text-black" />
36
- </span>
37
- </div>
38
- </template>
1
+ <script lang="ts" setup>
2
+ import CloseIcon from "../../assets/svg/close-icon.svg";
3
+
4
+ type Props = {
5
+ placeholder: string;
6
+ };
7
+
8
+ const props = withDefaults(defineProps<Props>(), {
9
+ placeholder: "Search...",
10
+ });
11
+
12
+ const value = ref<string>("");
13
+
14
+ const emit = defineEmits<{
15
+ (e: "onChange", value: string): void;
16
+ (e: "clear"): void;
17
+ }>();
18
+
19
+ const clear = () => {
20
+ value.value = "";
21
+ emit("clear");
22
+ };
23
+ </script>
24
+
25
+ <template>
26
+ <div class="flex flex-row items-center">
27
+ <input
28
+ v-model="value"
29
+ type="text"
30
+ class="flex-1 pl-2 pr-5 py-1"
31
+ :placeholder="placeholder"
32
+ @input="emit('onChange', value)"
33
+ />
34
+ <span class="flex-initial cursor-pointer px-4 py-2" @click="clear">
35
+ <close-icon class="fill-current text-black" />
36
+ </span>
37
+ </div>
38
+ </template>
@@ -1,112 +1,112 @@
1
- <script lang="ts" setup>
2
- import { get } from "lodash-es";
3
-
4
- const form = ref({
5
- name: "",
6
- email: "",
7
- phone: "",
8
- message: "",
9
- });
10
- const submitted = ref<boolean>(false);
11
-
12
- // @todo add error handling to other form fields, or remove error fields from each field
13
- const errors = ref<[]>([]);
14
-
15
- const supportStore = useSupportStore();
16
-
17
- const handleForm = () => {
18
- errors.value = [];
19
- supportStore
20
- .submit(form.value)
21
- .then(() => {
22
- submitted.value = true;
23
- })
24
- .catch((error) => {
25
- console.log(error.response);
26
- errors.value = get(error.response._data, "errors", {});
27
- errors.value.response = [
28
- "Error: " + get(error.response._data, "message", ""),
29
- ];
30
- });
31
- };
32
-
33
- const acceptNumber = () => {
34
- const x = form.value.phone
35
- .replace(/\D/g, "")
36
- .match(/(\d{0,3})(\d{0,3})(\d{0,4})/);
37
- form.value.phone = !x[2]
38
- ? x[1]
39
- : "(" + x[1] + ") " + x[2] + (x[3] ? "-" + x[3] : "");
40
- };
41
- </script>
42
-
43
- <template>
44
- <section>
45
- <form v-if="!submitted" @submit.prevent="handleForm">
46
- <div class="font-bold mb-4">
47
- To contact support, please fill out the form below.
48
- </div>
49
-
50
- <div class="mb-3">
51
- <label class="block font-semibold text-grey-darkest mb-1">Name</label>
52
-
53
- <CommonTextInput
54
- v-model="form.name"
55
- placeholder="Name"
56
- :required="true"
57
- type="text"
58
- />
59
-
60
- <CommonErrorField :errors="errors['name']" />
61
- </div>
62
-
63
- <div class="mb-3">
64
- <label class="block font-semibold text-grey-darkest mb-1">Email</label>
65
-
66
- <CommonTextInput
67
- v-model="form.email"
68
- placeholder="you@company.com"
69
- :required="true"
70
- type="email"
71
- />
72
-
73
- <CommonErrorField :errors="errors['email']" />
74
- </div>
75
-
76
- <div class="mb-3">
77
- <label class="block font-semibold text-grey-darkest mb-1">Phone</label>
78
-
79
- <CommonTextInput
80
- v-model="form.phone"
81
- placeholder="Phone"
82
- :required="false"
83
- type="tel"
84
- @input="acceptNumber"
85
- />
86
- </div>
87
-
88
- <div class="mb-3">
89
- <label class="block font-semibold text-grey-darkest mb-1"
90
- >Message</label
91
- >
92
-
93
- <CommonTextArea v-model="form.message" />
94
-
95
- <CommonErrorField :errors="errors['message']" />
96
- </div>
97
-
98
- <button class="btn btn-secondary" type="submit">Submit</button>
99
- <div class="mb-3">
100
- <CommonErrorField :errors="errors['response']" />
101
- </div>
102
- </form>
103
-
104
- <!-- Submitted Message -->
105
- <div v-if="submitted" class="text-center my-12">
106
- <div class="text-2xl font-bold text-grey-darkest mb-2">Thank you.</div>
107
- <div class="text-lg font-semibold text-grey-darker">
108
- Your message has been received.
109
- </div>
110
- </div>
111
- </section>
112
- </template>
1
+ <script lang="ts" setup>
2
+ import { get } from "lodash-es";
3
+
4
+ const form = ref({
5
+ name: "",
6
+ email: "",
7
+ phone: "",
8
+ message: "",
9
+ });
10
+ const submitted = ref<boolean>(false);
11
+
12
+ // @todo add error handling to other form fields, or remove error fields from each field
13
+ const errors = ref<[]>([]);
14
+
15
+ const supportStore = useSupportStore();
16
+
17
+ const handleForm = () => {
18
+ errors.value = [];
19
+ supportStore
20
+ .submit(form.value)
21
+ .then(() => {
22
+ submitted.value = true;
23
+ })
24
+ .catch((error) => {
25
+ console.log(error.response);
26
+ errors.value = get(error.response._data, "errors", {});
27
+ errors.value.response = [
28
+ "Error: " + get(error.response._data, "message", ""),
29
+ ];
30
+ });
31
+ };
32
+
33
+ const acceptNumber = () => {
34
+ const x = form.value.phone
35
+ .replace(/\D/g, "")
36
+ .match(/(\d{0,3})(\d{0,3})(\d{0,4})/);
37
+ form.value.phone = !x[2]
38
+ ? x[1]
39
+ : "(" + x[1] + ") " + x[2] + (x[3] ? "-" + x[3] : "");
40
+ };
41
+ </script>
42
+
43
+ <template>
44
+ <section>
45
+ <form v-if="!submitted" @submit.prevent="handleForm">
46
+ <div class="font-bold mb-4">
47
+ To contact support, please fill out the form below.
48
+ </div>
49
+
50
+ <div class="mb-3">
51
+ <label class="block font-semibold text-grey-darkest mb-1">Name</label>
52
+
53
+ <CommonTextInput
54
+ v-model="form.name"
55
+ placeholder="Name"
56
+ :required="true"
57
+ type="text"
58
+ />
59
+
60
+ <CommonErrorField :errors="errors['name']" />
61
+ </div>
62
+
63
+ <div class="mb-3">
64
+ <label class="block font-semibold text-grey-darkest mb-1">Email</label>
65
+
66
+ <CommonTextInput
67
+ v-model="form.email"
68
+ placeholder="you@company.com"
69
+ :required="true"
70
+ type="email"
71
+ />
72
+
73
+ <CommonErrorField :errors="errors['email']" />
74
+ </div>
75
+
76
+ <div class="mb-3">
77
+ <label class="block font-semibold text-grey-darkest mb-1">Phone</label>
78
+
79
+ <CommonTextInput
80
+ v-model="form.phone"
81
+ placeholder="Phone"
82
+ :required="false"
83
+ type="tel"
84
+ @input="acceptNumber"
85
+ />
86
+ </div>
87
+
88
+ <div class="mb-3">
89
+ <label class="block font-semibold text-grey-darkest mb-1"
90
+ >Message</label
91
+ >
92
+
93
+ <CommonTextArea v-model="form.message" />
94
+
95
+ <CommonErrorField :errors="errors['message']" />
96
+ </div>
97
+
98
+ <button class="btn btn-secondary" type="submit">Submit</button>
99
+ <div class="mb-3">
100
+ <CommonErrorField :errors="errors['response']" />
101
+ </div>
102
+ </form>
103
+
104
+ <!-- Submitted Message -->
105
+ <div v-if="submitted" class="text-center my-12">
106
+ <div class="text-2xl font-bold text-grey-darkest mb-2">Thank you.</div>
107
+ <div class="text-lg font-semibold text-grey-darker">
108
+ Your message has been received.
109
+ </div>
110
+ </div>
111
+ </section>
112
+ </template>
@@ -1,44 +1,44 @@
1
- <script lang="ts" setup>
2
- import { ref } from "vue";
3
-
4
- interface Props {
5
- isEnabled: boolean;
6
- color?: string;
7
- }
8
-
9
- const props = withDefaults(defineProps<Props>(), {
10
- isEnabled: false,
11
- color: "#4D4D4D",
12
- });
13
-
14
- const value = ref<boolean>(props.isEnabled);
15
-
16
- const emit = defineEmits<{
17
- (event: "toggle", value: boolean): void;
18
- }>();
19
-
20
- const toggle = () => {
21
- value.value = !value.value;
22
- emit("toggle", value.value);
23
- };
24
- </script>
25
-
26
- <template id="switch-button">
27
- <div class="switch-button-control">
28
- <div
29
- class="switch-button"
30
- :class="{ enabled: value }"
31
- :style="{ '--color': color }"
32
- @click="toggle"
33
- >
34
- <div class="button" />
35
- </div>
36
- <div class="switch-button-label">
37
- <slot />
38
- </div>
39
- </div>
40
- </template>
41
-
1
+ <script lang="ts" setup>
2
+ import { ref } from "vue";
3
+
4
+ interface Props {
5
+ isEnabled: boolean;
6
+ color?: string;
7
+ }
8
+
9
+ const props = withDefaults(defineProps<Props>(), {
10
+ isEnabled: false,
11
+ color: "#4D4D4D",
12
+ });
13
+
14
+ const value = ref<boolean>(props.isEnabled);
15
+
16
+ const emit = defineEmits<{
17
+ (event: "toggle", value: boolean): void;
18
+ }>();
19
+
20
+ const toggle = () => {
21
+ value.value = !value.value;
22
+ emit("toggle", value.value);
23
+ };
24
+ </script>
25
+
26
+ <template id="switch-button">
27
+ <div class="switch-button-control">
28
+ <div
29
+ class="switch-button"
30
+ :class="{ enabled: value }"
31
+ :style="{ '--color': color }"
32
+ @click="toggle"
33
+ >
34
+ <div class="button" />
35
+ </div>
36
+ <div class="switch-button-label">
37
+ <slot />
38
+ </div>
39
+ </div>
40
+ </template>
41
+
42
42
  <style scoped>
43
43
  .switch-button-control {
44
44
  display: flex;
@@ -79,4 +79,4 @@ const toggle = () => {
79
79
  .switch-button-control .switch-button-label {
80
80
  margin-left: 10px;
81
81
  }
82
- </style>
82
+ </style>
@@ -1,26 +1,26 @@
1
- <script lang="ts" setup>
2
- type Props = {
3
- modelValue: string;
4
- };
5
-
6
- const emit = defineEmits<{
7
- (event: "update:modelValue", value: string): void;
8
- }>();
9
-
10
- const props = defineProps<Props>();
11
-
12
- const onInput = (e) => {
13
- emit("update:modelValue", e.target.value);
14
- };
15
- </script>
16
-
17
- <template>
18
- <span>
19
- <textarea
20
- :value="props.modelValue"
21
- class="form-input"
22
- rows="4"
23
- @change="onInput"
24
- ></textarea>
25
- </span>
26
- </template>
1
+ <script lang="ts" setup>
2
+ type Props = {
3
+ modelValue: string;
4
+ };
5
+
6
+ const emit = defineEmits<{
7
+ (event: "update:modelValue", value: string): void;
8
+ }>();
9
+
10
+ const props = defineProps<Props>();
11
+
12
+ const onInput = (e) => {
13
+ emit("update:modelValue", e.target.value);
14
+ };
15
+ </script>
16
+
17
+ <template>
18
+ <span>
19
+ <textarea
20
+ :value="props.modelValue"
21
+ class="form-input"
22
+ rows="4"
23
+ @change="onInput"
24
+ ></textarea>
25
+ </span>
26
+ </template>
@@ -1,28 +1,28 @@
1
- <script lang="ts" setup>
2
- type Props = {
3
- modelValue: string;
4
- placeholder: string;
5
- type: string;
6
- };
7
-
8
- const props = defineProps<Props>();
9
-
10
- const emit = defineEmits<{
11
- (event: "update:modelValue", value: string): void;
12
- }>();
13
-
14
- // methods
15
- const changeInput = (e) => {
16
- emit("update:modelValue", e.target.value);
17
- };
18
- </script>
19
-
20
- <template>
21
- <input
22
- class="form-input px-2 py-1"
23
- :type="type"
24
- :value="props.modelValue"
25
- :placeholder="placeholder"
26
- @change="changeInput"
27
- />
28
- </template>
1
+ <script lang="ts" setup>
2
+ type Props = {
3
+ modelValue: string;
4
+ placeholder: string;
5
+ type: string;
6
+ };
7
+
8
+ const props = defineProps<Props>();
9
+
10
+ const emit = defineEmits<{
11
+ (event: "update:modelValue", value: string): void;
12
+ }>();
13
+
14
+ // methods
15
+ const changeInput = (e) => {
16
+ emit("update:modelValue", e.target.value);
17
+ };
18
+ </script>
19
+
20
+ <template>
21
+ <input
22
+ class="form-input px-2 py-1"
23
+ :type="type"
24
+ :value="props.modelValue"
25
+ :placeholder="placeholder"
26
+ @change="changeInput"
27
+ />
28
+ </template>