|
11 | 11 | @click="inputClick"
|
12 | 12 | @input="inputInput"
|
13 | 13 | class="block w-full pl-3 pr-10 py-2.5 border border-lightDropownButtonsBorder rounded-md leading-5 bg-lightDropdownButtonsBackground
|
14 |
| - placeholder-lightDropdownButtonsPlaceholderText text-lightDropdownButtonsText sm:text-sm transition duration-150 ease-in-out dark:bg-darkDropdownButtonsBackground dark:border-darkDropownButtonsBorder dark:placeholder-darkDropdownButtonsPlaceholderText |
15 |
| - dark:text-darkDropdownButtonsText focus:ring-lightPrimary focus:border-lightPrimary dark:focus:ring-darkPrimary dark:focus:border-darkPrimary" |
| 14 | + placeholder-lightDropdownButtonsPlaceholderText text-lightDropdownButtonsText sm:text-sm transition duration-150 ease-in-out dark:bg-darkDropdownButtonsBackground dark:border-darkDropdownButtonsBorder dark:placeholder-darkDropdownButtonsPlaceholderText |
| 15 | + dark:text-darkDropdownButtonsText focus:ring-lightPrimary focus:border-lightPrimary dark:focus:ring-darkPrimary dark:focus:border-darkPrimary" |
16 | 16 | autocomplete="off" data-custom="no-autofill"
|
17 | 17 | :placeholder="
|
18 | 18 | selectedItems.length && !multiple ? '' : (showDropdown ? $t('Search') : placeholder || $t('Select...'))
|
19 | 19 | "
|
20 | 20 | />
|
21 | 21 |
|
22 |
| - <div v-if="!multiple && selectedItems.length" class="absolute pointer-events-none inset-y-0 left-2 flex items-center pr-2 px-1"> |
| 22 | + <div v-if="!multiple && selectedItems.length" class="text-lightDropdownButtonsText dark:text-darkDropdownButtonsText absolute pointer-events-none inset-y-0 left-2 flex items-center pr-2 px-1"> |
23 | 23 | <slot
|
24 | 24 | name="selected-item"
|
25 | 25 | :option="selectedItems[0]"
|
26 | 26 | ></slot>
|
27 |
| - <span v-if="!$slots['selected-item']" class="text-lightPrimary dark:text-white font-medium "> |
| 27 | + <span v-if="!$slots['selected-item']" class="text-lightDropdownButtonsText dark:text-darkDropdownButtonsText font-medium "> |
28 | 28 | {{ selectedItems[0]?.label }}
|
29 | 29 | </span>
|
30 | 30 | </div>
|
31 | 31 |
|
32 | 32 | <div class="absolute inset-y-0 right-2 flex items-center pointer-events-none">
|
33 | 33 | <!-- triangle icon -->
|
34 |
| - <IconCaretDownSolid class="h-5 w-5 text-lightPrimary dark:text-gray-400 opacity-50 transition duration-150 ease-in" |
| 34 | + <IconCaretDownSolid class="h-5 w-5 text-lightPrimary dark:text-darkPrimary opacity-50 transition duration-150 ease-in" |
35 | 35 | :class="{ 'transform rotate-180': showDropdown }"
|
36 | 36 | />
|
37 | 37 | </div>
|
|
45 | 45 | v-for="item in filteredItems"
|
46 | 46 | :key="item.value"
|
47 | 47 | class="px-4 py-2 cursor-pointer hover:bg-lightDropdownOptionsHoverBackground dark:hover:bg-darkDropdownOptionsHoverBackground text-lightDropdownOptionsText dark:text-darkDropdownOptionsText"
|
48 |
| - :class="{ 'bg-lightPrimaryOpacity dark:bg-darkPrimaryOpacity': selectedItems.includes(item) }" |
| 48 | + :class="{ 'bg-lightDropdownPicked dark:bg-darkDropdownPicked': selectedItems.includes(item) }" |
49 | 49 | @click="toogleItem(item)"
|
50 | 50 | >
|
51 | 51 | <slot name="item" :option="item"></slot>
|
|
62 | 62 | </teleport>
|
63 | 63 |
|
64 | 64 | <div v-if="!teleportToBody && showDropdown" ref="dropdownEl" :style="dropdownStyle" :class="{'shadow-none': isTop}"
|
65 |
| - class="absolute z-10 mt-1 w-full bg-white shadow-lg dark:shadow-black dark:bg-gray-700 |
| 65 | + class="absolute z-10 mt-1 w-full bg-lightDropdownOptionsBackground shadow-lg text-lightDropdownButtonsText dark:shadow-black dark:bg-darkDropdownOptionsBackground |
66 | 66 | dark:border-gray-600 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm max-h-48"
|
67 |
| - @scroll="handleDropdownScroll"> |
| 67 | + @scroll="handleDropdownScroll"> |
68 | 68 | <div
|
69 | 69 | v-for="item in filteredItems"
|
70 | 70 | :key="item.value"
|
71 |
| - class="px-4 py-2 cursor-pointer hover:bg-lightDropdownOptionsHoverBackground dark:hover:bg-darkDropdownOptionsHoverBackground dark:text-darkDropdownOptionsText" |
72 |
| - :class="{ 'bg-lightPrimaryOpacity dark:bg-darkPrimaryOpacity': selectedItems.includes(item) }" |
| 71 | + class="px-4 py-2 cursor-pointer text-lightDropdownOptionsText hover:bg-lightDropdownOptionsHoverBackground dark:hover:bg-darkDropdownOptionsHoverBackground dark:text-darkDropdownOptionsText" |
| 72 | + :class="{ 'bg-lightDropdownPicked dark:bg-darkDropdownPicked': selectedItems.includes(item) }" |
73 | 73 | @click="toogleItem(item)"
|
74 | 74 | >
|
75 | 75 | <slot name="item" :option="item"></slot>
|
|
90 | 90 | <template v-for="item in selectedItems" :key="`afcl-select-${item.value}`">
|
91 | 91 | <slot name="selected-item" :item="item"></slot>
|
92 | 92 | <div v-if="!$slots['selected-item']"
|
93 |
| - class="bg-lightPrimaryOpacity text-lightPrimary text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-darkPrimaryOpacity dark:text-darkPrimary"> |
| 93 | + class="bg-lightDropdownMultipleSelectBackground text-lightDropdownMultipleSelectText text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-darkDropdownMultipleSelectBackground dark:text-darkDropdownMultipleSelectText"> |
94 | 94 | <span>{{ item.label }}</span>
|
95 | 95 | <button
|
96 | 96 | type="button"
|
97 | 97 | @click="toogleItem(item)"
|
98 |
| - class="z-index-100 flex-shrink-0 ml-1 h-4 w-4 -mr-1 rounded-full inline-flex items-center justify-center text-gray-400 hover:text-gray-500 focus:outline-none focus:text-gray-500 focus:bg-gray-100" |
| 98 | + class="z-index-100 flex-shrink-0 ml-1 h-4 w-4 -mr-1 rounded-full inline-flex items-center justify-center text-lightDropdownMultipleSelectIcon hover:text-lightDropdownMultipleSelectIconHover dark:text-darkDropdownMultipleSelectIcon dark:hover:text-darkDropdownMultipleSelectIconHover focus:outline-none focus:text-lightDropdownMultipleSelectIconFocus focus:bg-lightDropdownMultipleSelectIconFocusBackground dark:focus:text-darkDropdownMultipleSelectIconFocus dark:focus:bg-darkDropdownMultipleSelectIconFocusBackground" |
99 | 99 | >
|
100 | 100 | <span class="sr-only">{{ $t('Remove item') }}</span>
|
101 | 101 | <svg class="h-2 w-2" stroke="currentColor" fill="none" viewBox="0 0 8 8">
|
|
0 commit comments