PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 2.4.6
Booking for Appointments and Events Calendar – Amelia v2.4.6
2.4.9 2.4.8 2.4.7 2.4.6 2.4.5 2.4.4 2.4.3 2.4.2 2.4.1 2.4 trunk 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.2 1.2.20 1.2.21 1.2.22 1.2.23 1.2.24 1.2.25 1.2.26 1.2.27 1.2.28 1.2.29 1.2.3 1.2.30 1.2.31 1.2.32 1.2.33 1.2.34 1.2.35 1.2.36 1.2.37 1.2.38 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.3
ameliabooking / v3 / src / views / public / EventForm / WpaEventsLandingForm / WpaEventsSelectionSidebar.vue
ameliabooking / v3 / src / views / public / EventForm / WpaEventsLandingForm Last commit date
WpaEventsBookButton.vue 1 month ago WpaEventsLandingForm.vue 1 month ago WpaEventsSelectionSidebar.vue 2 weeks ago
WpaEventsSelectionSidebar.vue
259 lines
1 <template>
2 <div
3 class="amelia-v2-booking wpa-events__tickets-am-shell wpa-events__tickets-root"
4 :style="eventCssVars"
5 >
6 <div class="wpa-events__tickets-head">
7 <h2 class="wpa-events__tickets-title">{{ title }}</h2>
8 <p v-if="subtitle" class="wpa-events__tickets-sub">{{ subtitle }}</p>
9 </div>
10
11 <div class="wpa-events__tickets-scroll">
12 <div class="wpa-events__tickets-list">
13 <details v-for="item in items" :key="item.id" class="wpa-events__ticket-card" open>
14 <summary
15 class="wpa-events__ticket-summary"
16 :class="{ 'wpa-events__ticket-summary--end': !item.name }"
17 >
18 <span v-if="item.name" class="wpa-events__ticket-cat">{{ item.name }}</span>
19 <span class="wpa-events__ticket-summary-right">
20 <span
21 :class="[
22 'wpa-events__ticket-left',
23 { 'wpa-events__muted': Number(item.left) === 0 },
24 ]"
25 >
26 <strong>{{ item.left }}</strong>
27 <span>{{ item.leftLabel }}</span>
28 </span>
29
30 <AmButton
31 v-if="item.name"
32 type="text"
33 category="secondary"
34 size="micro"
35 :icon-only="true"
36 icon="arrow-down"
37 :disabled="true"
38 custom-class="wpa-events__ticket-chevron-btn"
39 />
40 </span>
41 </summary>
42 <div class="wpa-events__ticket-body">
43 <div class="wpa-events__ticket-row">
44 <span v-if="item.priceFormatted" class="wpa-events__ticket-price">{{
45 item.priceFormatted
46 }}</span>
47 <div class="wpa-events__qty">
48 <AmInputNumber
49 :model-value="item.quantity"
50 :min="item.min"
51 :max="item.max"
52 :step="1"
53 :step-strictly="true"
54 size="small"
55 :disabled="item.disabled"
56 :aria-label="item.ariaLabel"
57 @update:model-value="(val) => emit('qty-update', item, val)"
58 />
59 </div>
60 </div>
61 </div>
62 </details>
63 </div>
64 </div>
65 </div>
66 </template>
67
68 <script setup>
69 import AmButton from '@/views/_components/button/AmButton.vue'
70 import AmInputNumber from '@/views/_components/input-number/AmInputNumber.vue'
71
72 defineProps({
73 eventCssVars: {
74 type: Object,
75 default: () => ({}),
76 },
77 title: {
78 type: String,
79 default: '',
80 },
81 subtitle: {
82 type: String,
83 default: '',
84 },
85 items: {
86 type: Array,
87 required: true,
88 },
89 })
90
91 const emit = defineEmits(['qty-update'])
92 </script>
93
94 <style lang="scss" scoped>
95 /* Amelia event form tokens (--am-*) come from parent :style (eventFormCssVars); root must not live under #amelia-container when teleported. */
96
97 .wpa-events__tickets-root {
98 display: flex;
99 flex-direction: column;
100 gap: 16px;
101 flex: 1 1 auto;
102 min-height: 0;
103 width: 100%;
104 font-family: var(--am-font-family);
105 color: var(--am-c-main-text);
106 }
107
108 .wpa-events__tickets-head {
109 width: 100%;
110 }
111
112 .wpa-events__tickets-title {
113 margin: 0 0 4px;
114 font-size: 18px;
115 line-height: 28px;
116 font-weight: 500;
117 color: var(--am-c-main-heading-text);
118 }
119
120 .wpa-events__tickets-sub {
121 margin: 0;
122 font-size: 13px;
123 line-height: 18px;
124 color: var(--am-c-inp-placeholder);
125 }
126
127 .wpa-events__tickets-scroll {
128 flex: 1 1 auto;
129 min-height: 200px;
130 overflow: hidden;
131 display: flex;
132 flex-direction: column;
133 }
134
135 .wpa-events__tickets-list {
136 flex: 1 1 auto;
137 overflow-y: auto;
138 padding-right: 4px;
139 display: flex;
140 flex-direction: column;
141 gap: 16px;
142 }
143
144 .wpa-events__ticket-card {
145 border: 1px solid var(--am-c-card-border);
146 border-radius: 12px;
147 background: var(--am-c-card-bgr);
148 overflow: hidden;
149 }
150
151 .wpa-events__ticket-summary {
152 list-style: none;
153 display: flex;
154 align-items: center;
155 justify-content: space-between;
156 gap: 12px;
157 padding: 12px 12px 8px;
158 cursor: pointer;
159 font-weight: 700;
160 font-size: 15px;
161 line-height: 24px;
162 color: var(--am-c-main-heading-text);
163
164 &--end {
165 justify-content: flex-end;
166 font-weight: 400;
167 }
168 }
169
170 .wpa-events__ticket-cat {
171 word-break: break-word;
172 }
173
174 .wpa-events__ticket-summary::-webkit-details-marker {
175 display: none;
176 }
177
178 .wpa-events__ticket-summary-right {
179 display: flex;
180 align-items: center;
181 gap: 16px;
182 flex-shrink: 0;
183 }
184
185 .wpa-events__ticket-left {
186 font-size: 15px;
187 line-height: 24px;
188 color: var(--am-c-main-text);
189 font-weight: 400;
190 display: flex;
191 gap: 4px;
192 flex-shrink: 0;
193
194 &.wpa-events__muted {
195 color: var(--am-c-inp-placeholder);
196 }
197
198 strong {
199 font-weight: 700;
200 }
201 }
202
203 .wpa-events__ticket-chevron-btn {
204 pointer-events: none;
205 --am-c-btn-first: var(--am-c-inp-placeholder);
206 --am-c-btn-first-op20: transparent;
207 --am-c-btn-first-op30: transparent;
208 --am-c-btn-second: var(--am-c-inp-placeholder);
209
210 :deep(.am-icon) {
211 display: inline-flex;
212 transform: rotate(0deg);
213 transition: transform 0.2s ease;
214 }
215 }
216
217 .wpa-events__ticket-card[open]] .wpa-events__ticket-chevron-btn :deep(.am-icon) {
218 transform: rotate(180deg);
219 }
220
221 .wpa-events__ticket-body {
222 border-top: 1px solid var(--am-c-card-border);
223 padding: 8px 12px 16px;
224 }
225
226 .wpa-events__ticket-row {
227 display: flex;
228 align-items: center;
229 gap: 8px;
230 justify-content: flex-end;
231 flex-wrap: wrap;
232 }
233
234 .wpa-events__ticket-price {
235 font-size: 14px;
236 line-height: 20px;
237 font-weight: 500;
238 text-align: right;
239 color: var(--am-c-primary);
240 }
241
242 .wpa-events__qty {
243 flex: 0 0 auto;
244 min-width: 112px;
245 max-width: 140px;
246
247 :deep(.am-input-number),
248 :deep(.el-input-number) {
249 width: 100%;
250 }
251 }
252
253 @media (max-width: 899px) {
254 .wpa-events__tickets-scroll {
255 max-height: none;
256 }
257 }
258 </style>
259