|
| 1 | +$select-border-radius: var(--border-radius); |
| 2 | +$select-color-border: var(--form-border); |
| 3 | +$select-color-dropdown-item-active-text: #fff; |
| 4 | +$select-color-dropdown-item-active: var(--choices-highlighted); |
| 5 | +$select-color-dropdown-item-create-text: var(--text); |
| 6 | +$select-color-dropdown: var(--choices-bg-color-dropdown, #fff); |
| 7 | +$select-color-input: var(--form-bg); |
| 8 | +$select-font-size: inherit; |
| 9 | +$select-line-height: 13px; |
| 10 | +$select-max-height-dropdown: 300px; |
| 11 | +$select-padding-dropdown-item-x: 6px; |
| 12 | +$select-padding-dropdown-item-y: 3px; |
| 13 | +$select-padding-x: 6px; |
| 14 | +$select-padding-y: 5px; |
| 15 | + |
| 16 | +@import "~tom-select/dist/scss/tom-select"; |
| 17 | + |
1 | 18 | .cfg-tags-widget { |
2 | | - padding-top: 5px; |
3 | | - position: relative; |
4 | | - z-index: 1; |
5 | | -} |
| 19 | + margin-top: 3px; |
| 20 | + margin-bottom: 3px; |
6 | 21 |
|
7 | | -.cfg-tags-widget:has(.selectize-input.input-active.dropdown-active) { |
8 | | - z-index: 2; |
9 | | -} |
| 22 | + &__all { |
| 23 | + display: flex; |
| 24 | + flex-wrap: wrap; |
| 25 | + gap: 3px; |
| 26 | + margin-bottom: 3px; |
| 27 | + } |
10 | 28 |
|
11 | | -.cfg-tags-widget-all { |
12 | | - padding: 5px 0 5px 0; |
13 | | -} |
| 29 | + &__tag { |
| 30 | + display: block; |
| 31 | + padding: 5px 10px 5px 25px; |
| 32 | + background: var(--form-button) url('./add.svg') no-repeat 6px center; |
| 33 | + border: 1px solid var(--form-border); |
| 34 | + border-radius: var(--border-radius); |
| 35 | + box-sizing: border-box; |
| 36 | + font-size: 13px; |
| 37 | + cursor: pointer; |
| 38 | + transition: background 0.2s ease; |
14 | 39 |
|
15 | | -.cfg-tags-widget-all span { |
16 | | - display: inline-block; |
17 | | - margin: 0 4px 5px 0; |
18 | | - padding: 5px 10px; |
19 | | - background: #eaeaea; |
20 | | - border-radius: 3px; |
21 | | - cursor: pointer; |
22 | | - white-space: nowrap; |
23 | | -} |
| 40 | + html[data-color-scheme=dark] & { |
| 41 | + background-image: url('./add--dark.svg'); |
| 42 | + } |
24 | 43 |
|
25 | | -.cfg-tags-widget-all span:hover { |
26 | | - background: #589b0e !important; |
27 | | - color: #fff; |
28 | | -} |
| 44 | + &:hover { |
| 45 | + color: inherit; |
| 46 | + background-color: var(--form-button-hover); |
| 47 | + } |
29 | 48 |
|
30 | | -.cfg-tags-widget .selectize-control.multi .selectize-input > div { |
31 | | - margin-right: 7px; |
32 | | - padding: 5px 10px; |
33 | | - background: #eaeaea; |
34 | | - border-radius: 3px; |
35 | | - line-height: 1; |
36 | | -} |
| 49 | + &:active { |
| 50 | + color: var(--form-button-active); |
| 51 | + } |
| 52 | + } |
37 | 53 |
|
38 | | -.cfg-tags-widget .selectize-control.multi .selectize-input > div:hover { |
39 | | - background: #c33 !important; |
40 | | - color: #fff; |
41 | | -} |
| 54 | + &__remove { |
| 55 | + position: relative; |
| 56 | + display: inline-block; |
| 57 | + width: var(--choices-button-dimension, 8px); |
| 58 | + margin: 0 calc(var(--choices-button-offset, 8px) * -.5) 0 var(--choices-button-offset, 8px); |
| 59 | + padding-bottom: 2px; |
| 60 | + padding-left: calc(var(--choices-button-offset, 8px) * 2); |
| 61 | + border: 0; |
| 62 | + border-left: 1px solid var(--choices-border); |
| 63 | + border-radius: var(--choices-button-border-radius, 0); |
| 64 | + background-color: transparent; |
| 65 | + background-image: var(--choices-icon-cross, url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==")); |
| 66 | + background-position: center; |
| 67 | + background-repeat: no-repeat; |
| 68 | + background-size: var(--choices-button-dimension, 8px); |
| 69 | + opacity: var(--choices-button-opacity, 0.75); |
| 70 | + cursor: pointer; |
| 71 | + line-height: var(--choices-button-line-height, 1); |
| 72 | + text-indent: -9999px; |
| 73 | + appearance: none; |
42 | 74 |
|
43 | | -/* Dark scheme */ |
44 | | -html[data-color-scheme="dark"] .cfg-tags-widget-all span, |
45 | | -html[data-color-scheme="dark"] .selectize-dropdown-header, |
46 | | -html[data-color-scheme="dark"] .selectize-control.single .selectize-input.input-active { |
47 | | - background: #292c32; |
48 | | -} |
| 75 | + html:not([data-color-scheme=dark]) & { |
| 76 | + background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMjIyIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==) |
| 77 | + } |
49 | 78 |
|
50 | | -html[data-color-scheme="dark"] .selectize-input, |
51 | | -html[data-color-scheme="dark"] .selectize-dropdown { |
52 | | - background: #151619; |
53 | | - border-color: #44464b; |
54 | | -} |
| 79 | + &:is(:hover, :focus) { |
| 80 | + --choices-button-opacity: var(--choices-button-opacity-hover, 1); |
| 81 | + } |
55 | 82 |
|
56 | | -html[data-color-scheme="dark"] .selectize-input.dropdown-active::before { |
57 | | - background-color: #44464b; |
58 | | -} |
| 83 | + &:focus { |
| 84 | + box-shadow: 0 0 0 2px var(--choices-highlight-color, #005F75) |
| 85 | + } |
| 86 | + } |
59 | 87 |
|
60 | | -html[data-color-scheme="dark"] .selectize-dropdown, |
61 | | -html[data-color-scheme="dark"] .selectize-input, |
62 | | -html[data-color-scheme="dark"] .selectize-input input { |
63 | | - color: var(--text); |
64 | | -} |
| 88 | + .ts-wrapper { |
| 89 | + &.dropdown-active .ts-control { |
| 90 | + border-radius: var(--choices-border-radius, 2.5px) var(--choices-border-radius, 2.5px) 0 0; |
| 91 | + } |
65 | 92 |
|
66 | | -html[data-color-scheme="dark"] .selectize-dropdown .active { |
67 | | - background: #1b1d21; |
68 | | - color: #fff; |
69 | | -} |
| 93 | + &.multi.has-items .ts-control { |
| 94 | + padding-left: 3px; |
70 | 95 |
|
71 | | -html[data-color-scheme="dark"] .cfg-tags-widget .selectize-control.multi .selectize-input > div { |
72 | | - background: #292c32; |
73 | | - color: var(--text); |
74 | | -} |
| 96 | + input { |
| 97 | + margin: -3px 4px 0 4px !important; |
| 98 | + } |
| 99 | + } |
| 100 | + |
| 101 | + .ts-control { |
| 102 | + > div { |
| 103 | + margin: 0 3px 3px 0; |
| 104 | + padding: 1px 5px 1px 6px; |
| 105 | + background-color: var(--choices-bg); |
| 106 | + border: 1px solid var(--choices-border); |
| 107 | + border-radius: 3px; |
| 108 | + color: var(--choices-item-color, #fff); |
| 109 | + cursor: auto; |
| 110 | + } |
| 111 | + |
| 112 | + input { |
| 113 | + color: var(--text); |
| 114 | + } |
| 115 | + } |
| 116 | + |
| 117 | + .create { |
| 118 | + padding-left: 25px !important; |
| 119 | + background-image: url('./add.svg'); |
| 120 | + background-repeat: no-repeat; |
| 121 | + background-position: 6px center; |
| 122 | + |
| 123 | + &.active, |
| 124 | + html[data-color-scheme=dark] & { |
| 125 | + background-image: url('./add--dark.svg'); |
| 126 | + } |
| 127 | + } |
| 128 | + } |
| 129 | + |
| 130 | + .ts-dropdown { |
| 131 | + margin-top: -1px; |
| 132 | + border: 1px solid var(--choices-keyline-color, #ddd); |
| 133 | + border-radius: 0 0 var(--choices-border-radius, 2.5px) var(--choices-border-radius, 2.5px); |
| 134 | + box-shadow: none; |
| 135 | + overflow: hidden; |
| 136 | + |
| 137 | + * { |
| 138 | + font-size: 13px; |
| 139 | + } |
| 140 | + |
| 141 | + .no-results { |
| 142 | + color: var(--text); |
| 143 | + } |
| 144 | + |
| 145 | + [data-selectable] { |
| 146 | + &.option { |
| 147 | + color: var(--text); |
| 148 | + } |
| 149 | + |
| 150 | + &.active { |
| 151 | + color: #fff; |
| 152 | + } |
75 | 153 |
|
76 | | -html[data-color-scheme="dark"] .selectize-control.plugin-drag_drop.multi > .selectize-input > div.ui-sortable-placeholder { |
77 | | - background: #292c32 !important; |
| 154 | + .highlight { |
| 155 | + background-color: var(--orange); |
| 156 | + color: #fff; |
| 157 | + } |
| 158 | + } |
| 159 | + } |
78 | 160 | } |
0 commit comments