PluginProbe
The Innovative Form Builder – IvyForms / 0.4
The Innovative Form Builder – IvyForms v0.4
1.5.1 1.5 1.4.1 1.4 trunk 0.1.2 0.2 0.2.1 0.3 0.3.1 0.4 0.5 0.6 0.6.1 0.6.1-backup 0.6.1.1 0.7 0.8 0.8.1 0.8.2 0.9 0.9.1 1.0 1.1 1.1.1 All 27 releases
ivyforms / frontend / src / views / _components / input / IvySelectOption.vue

IvySelectOption.vue in The Innovative Form Builder – IvyForms 0.4, at frontend/src/views/_components/input/IvySelectOption.vue

95 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <template>
2 <ElOption
3 :class="['ivyforms-select-option', { 'is-secondary': isSecondary }]"
4 :value="props.value"
5 :label="props.label"
6 :disabled="disabled"
7 >
8 <slot />
9 <IvyIcon
10 v-if="props.iconConfig?.name"
11 v-bind="{ ...props.iconConfig, name: props.iconConfig.name }"
12 />
13 </ElOption>
14 </template>
15
16 <script setup lang="ts">
17 import { inject } from 'vue'
18 import IvyIcon from '@/views/_components/icon/IvyIcon.vue'
19 import type { IconCategory } from '@/types/icons/icon-category'
20 import type { IconType } from '@/types/icons/icon-type'
21
22 const props = defineProps<{
23 value: string | number | boolean | object
24 label?: string | number
25 disabled?: boolean
26 iconConfig?: {
27 name: string
28 type?: IconType
29 category?: IconCategory
30 size?: 'l' | 'd' | 's' | 'xs'
31 class?: string
32 }
33 }>()
34
35 const isSecondary = inject('isSecondary', false)
36 </script>
37
38 <style lang="scss">
39 // Select Option
40 .ivyforms-select-option {
41 &.el-select-dropdown__item {
42 height: 48px;
43 color: var(--map-base-dusk-symbol-2);
44 cursor: pointer;
45 display: flex;
46 align-items: center;
47 justify-content: space-between;
48 margin: 0;
49 font-size: 14px;
50 font-style: normal;
51 font-weight: 400;
52 line-height: 20px;
53
54 h1,
55 h2,
56 h3,
57 h4,
58 h5,
59 h6,
60 p {
61 color: var(--map-base-dusk-symbol-2);
62 }
63
64 &.is-selected {
65 background: var(--map-base-brand-o10);
66 color: var(--map-base-dusk-symbol-2);
67 font-size: 14px;
68 font-style: normal;
69 font-weight: 400;
70
71 &.is-secondary {
72 background: var(--map-base-purple-o10);
73 &:after {
74 background-color: var(--map-base-purple-symbol-0) !important;
75 }
76 }
77
78 &:after {
79 background-color: var(--map-base-brand-symbol-2) !important;
80 }
81 }
82
83 &:hover,
84 &.is-hovering {
85 color: var(--map-base-dusk-symbol-2);
86 background: var(--map-hover);
87 }
88
89 .ivyforms-icon {
90 display: contents;
91 }
92 }
93 }
94 </style>
95