PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 2.4.8
Booking for Appointments and Events Calendar – Amelia v2.4.8
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 / _components / advanced-select / AmAdvancedSelect.vue
ameliabooking / v3 / src / views / _components / advanced-select Last commit date
AmAdvancedSelect.vue 1 day ago
AmAdvancedSelect.vue
955 lines
1 <template>
2 <div ref="advSelectWrapperRef" class="am-adv-select__wrapper">
3 <el-cascader
4 ref="advSelect"
5 v-model="model"
6 class="am-adv-select"
7 :class="[
8 `am-adv-select--${size}`,
9 { 'am-adv-select--disabled': disabled },
10 { 'am-rtl': isRtl },
11 ]"
12 :options="props.options"
13 :props="props.propsData"
14 :placeholder="props.placeholder"
15 :disabled="props.disabled"
16 :clearable="props.clearable"
17 :show-all-levels="props.showAllLevels"
18 :collapse-tags="props.collapseTags"
19 :collapse-tags-tooltip="props.collapseTagsTooltip"
20 :separator="props.separator"
21 :filterable="props.filterable"
22 :filter-method="props.filterMethod"
23 :debounce="props.debounce"
24 :before-filter="props.beforeFilter"
25 :popper-class="popperClasses"
26 :teleported="props.teleported"
27 :tag-type="props.tagType"
28 :tag-effect="props.tagEffect"
29 :validate-event="props.validateEvent"
30 :max-collapse-tags="props.maxCollapseTags"
31 :persistent="props.persistent"
32 :fallback-placements="props.fallbackPlacements"
33 :placement="props.placement"
34 :style="cssVars"
35 :aria-label="props.ariaLabel"
36 @change="handleChange"
37 @expand-change="handleExpandChange"
38 @blur="(e) => emits('blur', e)"
39 @focus="(e) => emits('focus', e)"
40 @visible-change="handleVisibleChange"
41 @remove-tag="(val) => emits('remove-tag', val)"
42 >
43 <template v-if="props.prefixIcon" #prefix>
44 <component :is="props.prefixIcon" v-if="typeof props.prefixIcon === 'object'" />
45 <span v-if="typeof props.prefixIcon === 'string'" :class="`am-icon-${props.prefixIcon}`" />
46 </template>
47 <template #empty>
48 <span>
49 {{ emptyStateString }}
50 </span>
51 </template>
52 <template #default="{ node, data }">
53 <div v-if="!node.isLeaf" class="am-adv-select__item" :style="cssDropdownVars">
54 <span class="am-adv-select__item-label">
55 {{ data[props.propsData.label] }}
56 </span>
57 <span class="am-adv-select__item-quantity">
58 {{ `(${data[props.propsData.children].length})` }}
59 </span>
60 </div>
61 <div
62 v-if="node.isLeaf"
63 class="am-adv-select__item"
64 :class="{ 'am-adv-select__item-checked': node.checked }"
65 :style="cssDropdownVars"
66 >
67 <span class="am-adv-select__item-label">
68 {{ data[props.propsData.label] }}
69 </span>
70 <span
71 v-if="
72 data.price > 0 ||
73 (props.multiplePrices[data.id] && props.multiplePrices[data.id].visible)
74 "
75 class="am-adv-select__item-price"
76 >
77 <template v-if="props.multiplePrices[data.id] && props.multiplePrices[data.id].visible">
78 {{ props.multiplePricesLabel }}
79 {{ useFormattedPrice(props.multiplePrices[data.id].price) }}
80 </template>
81 <template v-else-if="data.price">
82 {{ ` ${useFormattedPrice(data.price)}` }}
83 </template>
84 <span v-if="taxVisibility(data.id)" class="am-adv-select__item-tax">
85 <template v-if="props.taxOptions.find((a) => a.id === data.id).excluded">
86 {{ props.taxLabel }}
87 </template>
88 <template v-else>
89 {{ props.taxLabelIncl }}
90 </template>
91 </span>
92 </span>
93 </div>
94 </template>
95 </el-cascader>
96
97 <teleport
98 v-if="teleportCategoryDisable && categoryName"
99 :to="`${popperId} .am-adv-select__popper-${uniqueClassSuffix} .el-cascader-panel .el-cascader-menu:nth-child(1)`"
100 :disabled="!teleportCategoryDisable && categoryName"
101 >
102 <span v-if="options.length" class="am-adv-select__popper-heading" :style="cssTeleport">
103 {{ categoryName }}
104 </span>
105 </teleport>
106
107 <teleport
108 v-if="teleportSubCategoryDisable && subCategoryName"
109 :to="`${popperId} .am-adv-select__popper-${uniqueClassSuffix} .el-cascader-panel .el-cascader-menu:nth-child(2)`"
110 :disabled="!teleportSubCategoryDisable && subCategoryName"
111 >
112 <span v-if="options.length" class="am-adv-select__popper-heading" :style="cssTeleport">
113 {{ subCategoryName }}
114 </span>
115 </teleport>
116 </div>
117 </template>
118
119 <script setup>
120 import { computed, inject, nextTick, ref, toRefs } from 'vue'
121 import { useColorTransparency } from '../../../assets/js/common/colorManipulation'
122 import { useFormattedPrice } from '../../../assets/js/common/formatting'
123 import { useElementSize } from '@vueuse/core'
124
125 /**
126 * Component Props
127 */
128 const props = defineProps({
129 id: {
130 type: String,
131 },
132 modelValue: {
133 type: [String, Array, Object, Number],
134 },
135 options: {
136 // * data of the options, the key of value and label can be customize by CascaderProps
137 type: Array,
138 default: () => [],
139 },
140 propsData: {
141 // * configuration options, see the following CascaderProps table.
142 type: Object,
143 },
144 size: {
145 // default / medium / small / mini / micro
146 type: String,
147 default: 'default',
148 validator(value) {
149 return ['default', 'medium', 'small', 'mini', 'micro'].includes(value)
150 },
151 },
152 placeholder: {
153 type: String,
154 default: '',
155 },
156 disabled: {
157 // * whether Cascader is disabled
158 type: Boolean,
159 default: false,
160 },
161 clearable: {
162 // * whether selected value can be cleared
163 type: Boolean,
164 default: true,
165 },
166 showAllLevels: {
167 // * whether to display all levels of the selected value in the input
168 type: Boolean,
169 default: true,
170 },
171 collapseTags: {
172 // * whether to collapse tags in multiple selection mode
173 type: Boolean,
174 default: true,
175 },
176 collapseTagsTooltip: {
177 // * whether show all selected tags when mouse hover text of collapse-tags. To use this, collapse-tags must be true
178 type: Boolean,
179 default: false,
180 },
181 separator: {
182 // * option label separator
183 type: String,
184 default: ' / ',
185 },
186 filterable: {
187 // * whether to filter options
188 type: Boolean,
189 default: true,
190 },
191 filterMethod: {
192 // * customize search logic, the first parameter is node, the second is keyword, and need return a boolean value indicating whether it hits.
193 type: Function,
194 default: (node, keyword) => {
195 let search = keyword.toLowerCase()
196 let label = node.text.toLowerCase()
197
198 return label.includes(search)
199 },
200 },
201 debounce: {
202 // * debounce delay when typing filter keyword, in milliseconds
203 type: Number,
204 default: 300,
205 },
206 beforeFilter: {
207 // * hook function before filtering with the value to be filtered as its parameter. If false is returned or a Promise is returned and then is rejected, filtering will be aborted
208 type: Function,
209 },
210 popperClass: {
211 // * custom class name for Cascader's dropdown
212 type: String,
213 default: '',
214 },
215 teleported: {
216 // * whether cascader popup is teleported
217 type: Boolean,
218 default: true,
219 },
220 tagType: {
221 // * tag type
222 type: String,
223 default: 'info',
224 validator(value) {
225 return ['info', 'success', 'warning', 'danger'].includes(value)
226 },
227 },
228 tagEffect: {
229 // * tag effect
230 type: String,
231 default: 'light',
232 validator(value) {
233 return ['dark', 'light', 'plain'].includes(value)
234 },
235 },
236 validateEvent: {
237 // * event name that triggers validation
238 type: Boolean,
239 default: true,
240 },
241 maxCollapseTags: {
242 // * The max tags number to be shown. To use this, collpase-tags must be true
243 type: Number,
244 default: 1,
245 },
246 persistent: {
247 // * when dropdown is inactive and persistent is false, dropdown will be destroyed
248 type: Boolean,
249 default: true,
250 },
251 fallbackPlacements: {
252 // * ist of possible positions for Tooltip popper.js
253 type: Array,
254 default: () => ['bottom-start', 'top-start', 'right', 'left'],
255 },
256 placement: {
257 // * placement of the dropdown, default is bottom-start
258 type: String,
259 default: 'bottom-start',
260 validator(value) {
261 return [
262 'top',
263 'top-start',
264 'top-end',
265 'bottom',
266 'bottom-start',
267 'bottom-end',
268 'left',
269 'left-start',
270 'left-end',
271 'right',
272 'right-start',
273 'right-end',
274 ].includes(value)
275 },
276 },
277 prefixIcon: {
278 type: [String, Object],
279 default: '',
280 },
281 currencySymbol: {
282 type: String,
283 default: '$',
284 },
285 categoryName: {
286 type: String,
287 default: '',
288 },
289 subCategoryName: {
290 type: String,
291 default: '',
292 },
293 emptyStateString: {
294 type: String,
295 default: 'No matching data',
296 },
297 taxOptions: {
298 type: [Object, Array],
299 default: () => {
300 return []
301 },
302 },
303 taxLabel: {
304 type: String,
305 default: '',
306 },
307 taxLabelIncl: {
308 type: String,
309 default: '',
310 },
311 taxVisible: {
312 type: Boolean,
313 default: true,
314 },
315 ariaLabel: {
316 type: String,
317 default: 'dropdown',
318 },
319 multiplePrices: {
320 type: Object,
321 default: () => {
322 return {}
323 },
324 },
325 multiplePricesLabel: {
326 type: String,
327 default: '',
328 },
329 })
330
331 /**
332 * Component Emits
333 * @type {EmitFn<(string)[]>}
334 */
335 const emits = defineEmits([
336 'change',
337 'expand-change',
338 'blur',
339 'focus',
340 'visible-change',
341 'remove-tag',
342 'update:modelValue',
343 ])
344
345 // * Component model
346 let { modelValue } = toRefs(props)
347 let model = computed({
348 get: () => modelValue.value,
349 set: (val) => {
350 emits('update:modelValue', val)
351 },
352 })
353
354 // * Tat Visibility
355 function taxVisibility(id) {
356 return props.taxVisible && !!props.taxOptions.filter((a) => a.id === id).length
357 }
358
359 // * Container Width
360 let cWidth = inject('containerWidth', 0)
361 let checkScreen = computed(() => cWidth.value < 560 || (cWidth.value > 560 && cWidth.value < 640))
362
363 // * Element Wrapper Size
364 const advSelectWrapperRef = ref(null)
365
366 const { width: wrapperWidth } = useElementSize(advSelectWrapperRef)
367
368 // * Component reference
369 const advSelect = ref(null)
370
371 // * Component text orientation
372 let isRtl = computed(() => {
373 if (document) {
374 return document.documentElement.dir === 'rtl'
375 }
376
377 return false
378 })
379
380 /**
381 * Dropdown (Popper) ID
382 */
383 const popperId = ref('')
384
385 /**
386 * Dropdown (Popper) identifier class
387 */
388 let uniqueClassSuffix = ref(Math.floor(Math.random() * 1000) + 1)
389
390 /**
391 * Dropdown (Popper) Classes
392 * @type {ComputedRef<string>}
393 */
394 let popperClasses = computed(() => {
395 return (
396 `am-adv-select__popper-${uniqueClassSuffix.value} am-adv-select__popper${props.popperClass ? ' ' + props.popperClass : ''}` +
397 (checkScreen.value ? ' am-adv-select__popper-mobile' : '')
398 )
399 })
400
401 /**
402 * Teleport Variables - category and subcategory name in drop down
403 */
404 let teleportSubCategoryDisable = ref(false)
405 let teleportCategoryDisable = ref(false)
406
407 // * Fonts
408 let amFonts = inject(
409 'amFonts',
410 ref({
411 fontFamily: 'Amelia Roboto, sans-serif',
412 fontUrl: '',
413 customFontFamily: '',
414 fontFormat: '',
415 customFontSelected: false,
416 }),
417 )
418
419 // * Colors
420 let amColors = inject(
421 'amColors',
422 ref({
423 colorPrimary: '#1246D6',
424 colorSuccess: '#019719',
425 colorError: '#B4190F',
426 colorWarning: '#CCA20C',
427 colorMainBgr: '#FFFFFF',
428 colorMainHeadingText: '#33434C',
429 colorMainText: '#1A2C37',
430 colorSbBgr: '#17295A',
431 colorSbText: '#FFFFFF',
432 colorInpBgr: '#FFFFFF',
433 colorInpBorder: '#D1D5D7',
434 colorInpText: '#1A2C37',
435 colorInpPlaceHolder: '#1A2C37',
436 colorDropBgr: '#FFFFFF',
437 colorDropBorder: '#D1D5D7',
438 colorDropText: '#0E1920',
439 colorBtnPrim: '#265CF2',
440 colorBtnPrimText: '#FFFFFF',
441 colorBtnSec: '#1A2C37',
442 colorBtnSecText: '#FFFFFF',
443 }),
444 )
445
446 // * Adv css vars
447 let cssVars = computed(() => {
448 return {
449 '--am-c-advs-bgr': amColors.value.colorInpBgr,
450 '--am-c-advs-border': amColors.value.colorInpBorder,
451 '--am-c-advs-text': amColors.value.colorInpText,
452 '--am-c-advs-placeholder': amColors.value.colorInpPlaceHolder,
453 '--am-c-advs-shadow': useColorTransparency(amColors.value.colorInpText, 0.05),
454 '--am-c-advs-text-op60': useColorTransparency(amColors.value.colorInpText, 0.6),
455 '--am-c-advs-text-op40': useColorTransparency(amColors.value.colorInpText, 0.4),
456 '--am-c-advs-text-op10': useColorTransparency(amColors.value.colorInpText, 0.03),
457 '--am-font-family': amFonts.value.fontFamily,
458 }
459 })
460
461 // * Adv dropdown css vars
462 let cssDropdownVars = computed(() => {
463 return {
464 '--am-c-advs-item-price': amColors.value.colorPrimary,
465 '--am-c-advs-item-price-op10': useColorTransparency(amColors.value.colorPrimary, 0.1),
466 '--am-c-advs-item-selected': amColors.value.colorPrimary,
467 '--am-c-advs-item-label-op40': useColorTransparency(amColors.value.colorDropText, 0.4),
468 '--am-font-family': amFonts.value.fontFamily,
469 }
470 })
471
472 /**
473 * Change Function
474 * @param val
475 */
476 function handleChange(val) {
477 emits('change', val)
478 emits('update:modelValue', val)
479 }
480
481 /**
482 * Dropdown expand detection and width of dropdown control
483 * @param val
484 */
485 function handleExpandChange(val) {
486 nextTick(() => {
487 if (val && val.length > 0) {
488 teleportSubCategoryDisable.value = true
489 }
490 })
491 emits('expand-change', val)
492 }
493
494 /**
495 * Dropdown visibility control
496 * @param e
497 */
498 function handleVisibleChange(e) {
499 nextTick(() => {
500 if (!e && !model.value) {
501 teleportSubCategoryDisable.value = false
502 }
503
504 teleportCategoryDisable.value = true
505 if (advSelect.value) {
506 advSelect.value.contentRef.style.setProperty(
507 '--am-c-advs-item-bgr',
508 amColors.value.colorDropBgr,
509 )
510 advSelect.value.contentRef.style.setProperty(
511 '--am-c-advs-item-border',
512 amColors.value.colorDropBorder,
513 )
514 advSelect.value.contentRef.style.setProperty(
515 '--am-c-advs-item-bgr-op10',
516 useColorTransparency(amColors.value.colorDropText, 0.1),
517 )
518 advSelect.value.contentRef.style.setProperty(
519 '--am-c-advs-item-label',
520 amColors.value.colorDropText,
521 )
522 advSelect.value.contentRef.style.setProperty(
523 '--am-c-advs-item-label-op65',
524 useColorTransparency(amColors.value.colorDropText, 0.65),
525 )
526 advSelect.value.contentRef.style.setProperty(
527 '--am-c-advs-item-border-op10',
528 useColorTransparency(amColors.value.colorDropText, 0.1),
529 )
530 advSelect.value.contentRef.style.setProperty('--am-font-family', amFonts.value.fontFamily)
531 advSelect.value.contentRef.style.setProperty('width', `${wrapperWidth.value}px`)
532 }
533 })
534 emits('visible-change', e)
535 }
536
537 let cssTeleport = computed(() => {
538 return {
539 '--am-h-advs-item-heading': checkScreen.value ? '32px' : '26px',
540 '--am-fs-advs-item-heading': checkScreen.value ? '16px' : '12px',
541 '--am-c-advs-item-heading-op65': useColorTransparency(amColors.value.colorDropText, 0.65),
542 '--am-c-advs-shadow': useColorTransparency(amColors.value.colorInpText, 0.05),
543 }
544 })
545 </script>
546
547 <style lang="scss">
548 @mixin am-adv-select-block {
549 // Adv Select
550 .am-adv-select {
551 // -c- color
552 // -rad- border radius
553 // -h- height
554 // -fs- font size
555 // -padd- padding
556 // -bgr background
557 // -advs- advanced select
558 --am-c-advs-bgr: var(--am-c-inp-bgr);
559 --am-c-advs-border: var(--am-c-inp-border);
560 --am-c-advs-text: var(--am-c-inp-text);
561 --am-c-advs-placeholder: var(--am-color-input-placeholder);
562 --am-rad-advs: var(--am-rad-inp);
563 --am-fs-advs: var(--am-fs-inp);
564 --am-h-advs: var(--am-h-inp);
565 --am-padd-advs: 0 12px;
566 width: 100%;
567
568 &__wrapper {
569 width: 100%;
570 }
571
572 // Size - default / medium / small / mini / micro
573 &--default {
574 --am-h-advs: 40px;
575 }
576 &--medium {
577 --am-h-advs: 36px;
578 }
579 &--small {
580 --am-h-advs: 32px;
581 }
582 &--mini {
583 --am-h-advs: 28px;
584 }
585 &--micro {
586 --am-h-advs: 24px;
587 }
588
589 // Disabled
590 &--disabled {
591 --am-c-advs-bgr: var(--am-c-advs-text-op10);
592 --am-c-advs-text: var(--am-c-advs-text-op60);
593 }
594
595 // Element visual presentation
596 .el-input {
597 border: none;
598 border-radius: 4px;
599 box-shadow: 0 2px 2px var(--am-c-advs-shadow);
600
601 &.is-focus {
602 // prevent hover color to be applied
603 .el-input__wrapper {
604 --am-c-advs-border: var(--am-c-primary);
605 }
606 }
607
608 &.el-input--prefix {
609 --am-padd-advs: 0 8px;
610 }
611
612 // Visual presentation of input
613 &__wrapper {
614 display: inline-flex;
615 align-items: center;
616 gap: 0 6px;
617 background-image: none;
618 background-color: var(--am-c-advs-bgr);
619 border: none;
620 border-radius: var(--am-rad-advs);
621 box-shadow: 0 0 0 1px var(--am-c-advs-border);
622 padding: var(--am-padd-advs);
623 height: var(--am-h-advs);
624 transition: 0.3s;
625
626 &:hover {
627 --am-c-advs-border: var(--am-c-advs-text-op40);
628 }
629
630 &:focus,
631 &:active &.is-focus {
632 --am-c-advs-border: var(--am-c-primary);
633 }
634 }
635
636 &__inner {
637 height: 24px;
638 font-size: var(--am-fs-advs);
639 font-weight: 400;
640 line-height: 1.6;
641 color: var(--am-c-advs-text);
642 background-color: transparent;
643 border: none;
644 border-radius: var(--am-rad-advs);
645 padding: 0;
646 width: 100%;
647
648 &::-webkit-input-placeholder {
649 /* Chrome/Opera/Safari */
650 color: var(--am-c-advs-placeholder);
651 }
652 &::-moz-placeholder {
653 /* Firefox 19+ */
654 color: var(--am-c-advs-placeholder);
655 }
656 &:-ms-input-placeholder {
657 /* IE 10+ */
658 color: var(--am-c-advs-placeholder);
659 }
660 &:-moz-placeholder {
661 /* Firefox 18- */
662 color: var(--am-c-advs-placeholder);
663 }
664
665 &:focus {
666 border: none;
667 box-shadow: none;
668 }
669 }
670
671 &__suffix {
672 .el-input__validateIcon {
673 border: none;
674 }
675
676 .el-icon {
677 font-family: 'amelia-icons';
678 font-size: 18px;
679 color: var(--am-c-advs-text);
680
681 &.icon-arrow-down {
682 &:before {
683 font-family: 'amelia-icons' !important;
684 font-size: 18px;
685 content: $am-icon-arrow-down;
686 }
687
688 svg {
689 display: none;
690 }
691 }
692
693 &.icon-circle-close {
694 &:before {
695 font-family: 'amelia-icons' !important;
696 font-size: 18px;
697 content: $am-icon-close;
698 }
699
700 svg {
701 display: none;
702 }
703 }
704 }
705 }
706
707 &__prefix {
708 [class^='am-icon']^='am-icon'] {
709 font-size: 24px;
710 line-height: 1;
711 color: var(--am-c-advs-text);
712 }
713 }
714 }
715
716 &.am-rtl {
717 .el-input {
718 &__suffix {
719 right: unset;
720 left: 12px;
721 }
722 }
723 }
724 }
725 }
726
727 // public
728 .amelia-v2-booking #amelia-container {
729 @include am-adv-select-block;
730 }
731
732 // admin
733 #amelia-app-backend-new {
734 @include am-adv-select-block;
735 }
736
737 // Adv Select Dropdown - Popper
738 .am-adv-select__popper {
739 --am-c-advs-item-bgr: var(--am-c-drop-bgr);
740 --am-c-advs-item-label: var(--am-c-main-text);
741 --am-c-advs-item-price: var(--am-c-primary);
742 --am-c-advs-item-selected: var(--am-c-primary);
743 --am-h-advs-item-heading: 26px;
744 --am-fs-advs-item-heading: 12px;
745
746 max-width: 454px;
747 width: 100%;
748 z-index: 9999999999 !important;
749
750 &.el-cascader__dropdown.el-popper[role='tooltip']='tooltip'] {
751 background-color: transparent;
752 border-color: var(--am-c-advs-item-border);
753 overflow: hidden;
754 }
755
756 * {
757 font-family: var(--am-font-family);
758 border-radius: unset;
759 box-sizing: border-box;
760 }
761
762 // Adv Select Dropdown Category Name
763 &-heading {
764 position: absolute;
765 top: 0;
766 left: 0;
767 display: flex;
768 align-items: center;
769 width: 100%;
770 height: var(--am-h-advs-item-heading);
771 font-size: var(--am-fs-advs-item-heading);
772 font-weight: 700;
773 font-style: normal;
774 line-height: 1.5;
775 color: var(--am-c-advs-item-heading-op65);
776 background-color: var(--am-c-advs-item-bgr);
777 padding-left: 8px;
778 }
779
780 .el-cascader {
781 // Panel - dropdown
782 &-panel {
783 display: flex;
784 background-color: var(--am-c-advs-item-bgr);
785 max-width: 454px;
786 width: 100%;
787 }
788
789 // Panel sides (columns) - Menu
790 &-menu {
791 width: 100%;
792 min-width: 170px;
793
794 // First column
795 &:nth-child(1) {
796 padding-top: 26px;
797 flex-shrink: 2;
798 border-color: var(--am-c-advs-item-border-op10);
799 }
800
801 // Second column
802 &:nth-child(2) {
803 padding-top: 26px;
804 flex-shrink: 1;
805
806 .am-adv-select__item-label {
807 width: 100%;
808 }
809 }
810
811 &:last-child {
812 .el-cascader-node {
813 padding: 0;
814 }
815 }
816
817 .el-scrollbar__bar.is-vertical {
818 display: block !important;
819 top: var(--am-h-advs-item-heading);
820 padding-top: 6px;
821
822 .el-scrollbar__thumb {
823 background: var(--am-c-advs-item-label);
824 opacity: 0.3;
825 }
826 }
827 }
828
829 &-node {
830 height: unset;
831 padding: 0;
832
833 &:not(.is-disabled):hover,
834 &:not(.is-disabled):focus {
835 background-color: var(--am-c-advs-item-bgr-op10);
836 }
837
838 &.in-active-path {
839 .am-adv-select__item-label {
840 color: var(--am-c-advs-item-selected);
841 }
842 }
843
844 &__label {
845 display: flex;
846 align-items: center;
847 justify-content: space-between;
848 padding: 4px 16px 4px 8px;
849 }
850
851 i {
852 display: none;
853 }
854 }
855
856 &__suggestion-list {
857 background-color: var(--am-c-advs-item-bgr);
858 color: var(--am-c-advs-item-label-op65);
859 }
860 }
861
862 .am-adv-select {
863 &__item {
864 width: 100%;
865 display: flex;
866 flex-wrap: wrap;
867 align-items: center;
868 justify-content: space-between;
869
870 &-checked {
871 .am-adv-select__item-label {
872 color: var(--am-c-advs-item-selected);
873 }
874 }
875
876 &-label {
877 display: block;
878 font-size: 14px;
879 font-weight: 400;
880 line-height: 1.43;
881 color: var(--am-c-advs-item-label);
882 white-space: nowrap;
883 overflow: hidden;
884 text-overflow: ellipsis;
885 }
886
887 &-quantity {
888 font-size: 14px;
889 font-weight: 400;
890 line-height: 1.714;
891 color: var(--am-c-advs-item-label-op40);
892 }
893
894 &-price {
895 font-size: 14px;
896 font-weight: 400;
897 line-height: 1.714;
898 color: var(--am-c-advs-item-price);
899 }
900
901 &-tax {
902 display: inline-flex;
903 font-size: 14px;
904 font-weight: 400;
905 line-height: 1;
906 color: var(--am-c-advs-item-price);
907 background-color: var(--am-c-advs-item-price-op10);
908 border-radius: 10px;
909 padding: 3px 8px;
910 }
911 }
912 }
913
914 .el-popper__arrow {
915 display: none;
916 }
917
918 // Mobile
919 &-mobile {
920 width: calc(100% - 20px);
921
922 .el-cascader {
923 // Panel - dropdown
924 &-panel {
925 height: min-content;
926 max-width: 100%;
927 width: 100%;
928 display: flex;
929 flex-direction: column;
930
931 .am-adv-select__popper-heading {
932 height: var(--am-h-advs-item-heading);
933 font-size: var(--am-fs-advs-item-heading);
934 box-shadow: 0 2px 2px var(--am-c-advs-shadow);
935 }
936 }
937
938 &-menu {
939 min-height: 160px;
940
941 &:first-child:not(:only-child) {
942 border-bottom: 1px solid var(--am-c-inp-border);
943 }
944
945 &__wrap {
946 height: min-content;
947 max-height: 160px;
948 overflow-y: scroll;
949 }
950 }
951 }
952 }
953 }
954 </style>
955