|
182 | 182 | <div class="date-wrapper--button"> |
183 | 183 | <button v-if="th.isSort" @click="sortTh(i, $event)" |
184 | 184 | :class="{ 'th-button-active': [constants.DESC, constants.ASC].includes(sorts[i]) }" |
185 | | - :style="`background:${[constants.DESC, constants.ASC].includes(sorts[i]) ? '' : FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${[constants.DESC, constants.ASC].includes(sorts[i]) ? '' : FINAL_CONFIG.style.pagination.buttons.color}`"> |
| 185 | + :style="`background:${[constants.DESC, constants.ASC].includes(sorts[i]) ? '' : FINAL_CONFIG.style.th.buttons.filter.inactive.backgroundColor};color:${[constants.DESC, constants.ASC].includes(sorts[i]) ? '' : FINAL_CONFIG.style.th.buttons.filter.inactive.color}`"> |
186 | 186 | <span v-if="sorts[i] === constants.ASC" |
187 | 187 | v-html="[constants.DATE].includes(th.type) ? icons.sort09 : icons.sortAZ" /> |
188 | 188 | <span v-else-if="sorts[i] === constants.DESC" |
189 | 189 | v-html="[constants.DATE].includes(th.type) ? icons.sort90 : icons.sortZA" /> |
190 | 190 | <span v-else v-html="icons.arrowSort" /> |
191 | 191 | </button> |
192 | | - <button @click="resetDates(i); resetFilter(i, th, $event)" |
| 192 | + <button |
| 193 | + @click="resetDates(i); resetFilter(i, th, $event)" |
193 | 194 | :disabled="!filteredDatesIndexes[i] && isResetDisabled(i, th)" |
194 | | - class="th-reset"> |
| 195 | + class="th-reset" |
| 196 | + > |
195 | 197 | ✖ |
196 | 198 | </button> |
197 | 199 | </div> |
|
206 | 208 | <button v-if="!hasNaN[i] && th.isSort && th.type !== constants.DATE" |
207 | 209 | @click="sortTh(i, $event)" |
208 | 210 | :class="{ 'th-button-active': [constants.DESC, constants.ASC].includes(sorts[i]) }" |
209 | | - :style="`background:${[constants.DESC, constants.ASC].includes(sorts[i]) ? '' : FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${[constants.DESC, constants.ASC].includes(sorts[i]) ? '' : FINAL_CONFIG.style.pagination.buttons.color}`"> |
| 211 | + :style="`background:${[constants.DESC, constants.ASC].includes(sorts[i]) ? '' : FINAL_CONFIG.style.th.buttons.filter.inactive.backgroundColor};color:${[constants.DESC, constants.ASC].includes(sorts[i]) ? '' : FINAL_CONFIG.style.th.buttons.filter.inactive.color}`"> |
210 | 212 | <span v-if="sorts[i] === constants.ASC" |
211 | 213 | v-html="[constants.NUMERIC].includes(th.type) ? icons.sort09 : icons.sortZA" /> |
212 | 214 | <span v-else-if="sorts[i] === constants.DESC" |
|
218 | 220 | <button v-if="th.isMultiselect" @click="toggleMultiselect(i, th, $event)" |
219 | 221 | v-html="icons.filter" |
220 | 222 | :class="{ 'th-button-active': multiselects[i] && multiselects[i].length !== getDropdownOptions(i).length }" |
221 | | - :style="`background:${multiselects[i] && multiselects[i].length !== getDropdownOptions(i).length ? '' : FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${multiselects[i] && multiselects[i].length !== getDropdownOptions(i).length ? '' : FINAL_CONFIG.style.pagination.buttons.color}`" /> |
| 223 | + :style="`background:${multiselects[i] && multiselects[i].length !== getDropdownOptions(i).length ? '' : FINAL_CONFIG.style.th.buttons.filter.inactive.backgroundColor};color:${multiselects[i] && multiselects[i].length !== getDropdownOptions(i).length ? '' : FINAL_CONFIG.style.th.buttons.filter.inactive.color}`" /> |
222 | 224 |
|
223 | 225 | <!-- SHOW CHART --> |
224 | | - <button v-if="currentSelectionSpan.col === i && canChart" |
225 | | - @click="showChart = !showChart" v-html="icons.chart" |
| 226 | + <button |
| 227 | + v-if="currentSelectionSpan.col === i && canChart" |
| 228 | + @click="showChart = !showChart" |
| 229 | + v-html="icons.chart" |
226 | 230 | :class="{ 'th-button-active': showChart }" |
227 | | - :style="`background:${showChart ? '' : FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${showChart ? '' : FINAL_CONFIG.style.pagination.buttons.color}`" /> |
| 231 | + :style="`background:${showChart ? '' : FINAL_CONFIG.style.th.buttons.filter.inactive.backgroundColor};color:${showChart ? '' : FINAL_CONFIG.style.th.buttons.filter.inactive.color}`" /> |
228 | 232 |
|
229 | 233 | <div v-if="th.rangeFilter && rangeFilters[i] && !hasNaN[i]" class="th-range-filter"> |
230 | 234 | <label :for="`rangeMin${i}`"><span style="color:grey">ᒥ</span> min <span |
|
242 | 246 | </div> |
243 | 247 |
|
244 | 248 | <!-- RESET --> |
245 | | - <button v-if="canResetColumn(i, th)" @click="resetFilter(i, th, $event)" |
246 | | - :disabled="isResetDisabled(i, th)" class="th-reset"> |
| 249 | + <button |
| 250 | + v-if="canResetColumn(i, th)" |
| 251 | + @click="resetFilter(i, th, $event)" |
| 252 | + :disabled="isResetDisabled(i, th)" |
| 253 | + class="th-reset" |
| 254 | + > |
247 | 255 | ✖ |
248 | 256 | </button> |
249 | 257 |
|
|
300 | 308 | <tr v-for="(tr, i) in visibleRows" :key="`tbody_${i}`" :data-row="i % 2 === 0 ? 'odd' : 'even'" |
301 | 309 | :class="`tr_${uid}`" |
302 | 310 | :style="`${i % 2 === 0 ? `background:${FINAL_CONFIG.style.rows.odd.backgroundColor};color:${FINAL_CONFIG.style.rows.odd.color}` : `background:${FINAL_CONFIG.style.rows.even.backgroundColor};color:${FINAL_CONFIG.style.rows.even.color}`}`"> |
303 | | - <td class="vue-ui-table-td-iteration" :data-row="i % 2 === 0 ? 'odd' : 'even'">{{ |
304 | | - tr.absoluteIndex + 1 }}</td> |
305 | | - <td :data-row="i % 2 === 0 ? 'odd' : 'even'" v-for="(td, j) in tr.td" :key="`td_${i}_${j}`" |
306 | | - :style="isNumeric(td) || dataset.header[j].type === constants.DATE ? `text-align:right;font-variant-numeric: tabular-nums;` : ''" |
| 311 | + <td |
| 312 | + class="vue-ui-table-td-iteration" |
| 313 | + :data-row="i % 2 === 0 ? 'odd' : 'even'" |
| 314 | + :style="{ |
| 315 | + outline: FINAL_CONFIG.style.rows.outline |
| 316 | + }" |
| 317 | + > |
| 318 | + {{ tr.absoluteIndex + 1 }} |
| 319 | + </td> |
| 320 | + <td |
| 321 | + :data-row="i % 2 === 0 ? 'odd' : 'even'" |
| 322 | + v-for="(td, j) in tr.td" |
| 323 | + :key="`td_${i}_${j}`" |
| 324 | + :style="isNumeric(td) || dataset.header[j].type === constants.DATE ? `text-align:right;font-variant-numeric: tabular-nums;outline:${FINAL_CONFIG.style.rows.outline}` : `outline:${FINAL_CONFIG.style.rows.outline}`" |
307 | 325 | @click="selectTd({ |
308 | 326 | td, |
309 | 327 | rowIndex: i, |
@@ -606,6 +624,7 @@ import { |
606 | 624 | lightenHexColor, |
607 | 625 | palette, |
608 | 626 | treeShake, |
| 627 | + setOpacity, |
609 | 628 | } from "../lib"; |
610 | 629 | import { useConfig } from "../useConfig"; |
611 | 630 | import VueUiXy from "./vue-ui-xy.vue"; |
@@ -845,6 +864,36 @@ export default { |
845 | 864 | } |
846 | 865 | }, |
847 | 866 | computed: { |
| 867 | + colorCancelInactive() { |
| 868 | + return this.FINAL_CONFIG.style.th.buttons.cancel.inactive.backgroundColor; |
| 869 | + }, |
| 870 | + textColorCancelInactive() { |
| 871 | + return this.FINAL_CONFIG.style.th.buttons.cancel.inactive.color; |
| 872 | + }, |
| 873 | + colorCancelActive() { |
| 874 | + return this.FINAL_CONFIG.style.th.buttons.cancel.active.backgroundColor; |
| 875 | + }, |
| 876 | + colorCancelActiveLight() { |
| 877 | + return lightenHexColor(this.colorCancelActive, 0.33); |
| 878 | + }, |
| 879 | + colorCancelActiveOutline() { |
| 880 | + return setOpacity(this.colorCancelActive, 33); |
| 881 | + }, |
| 882 | + colorButtonSortActive() { |
| 883 | + return this.FINAL_CONFIG.style.th.buttons.filter.active.backgroundColor; |
| 884 | + }, |
| 885 | + colorButtonSortActiveLight() { |
| 886 | + return lightenHexColor(this.colorButtonSortActive, 0.33); |
| 887 | + }, |
| 888 | + colorButtonSortActiveOutline() { |
| 889 | + return setOpacity(this.colorButtonSortActive, 33); |
| 890 | + }, |
| 891 | + colorButtonSortInactive() { |
| 892 | + return this.FINAL_CONFIG.style.th.buttons.filter.inactive.backgroundColor; |
| 893 | + }, |
| 894 | + colorButtonSortActiveColorText() { |
| 895 | + return this.FINAL_CONFIG.style.th.buttons.filter.active.color; |
| 896 | + }, |
848 | 897 | dateHeaders() { |
849 | 898 | return [...this.tableHead].filter(th => th.type === this.constants.DATE); |
850 | 899 | }, |
@@ -1939,10 +1988,6 @@ export default { |
1939 | 1988 | padding: 3px 8px; |
1940 | 1989 | } |
1941 | 1990 |
|
1942 | | -.vue-ui-table-main tr td { |
1943 | | - outline: 1px solid white; |
1944 | | -} |
1945 | | -
|
1946 | 1991 | .vue-ui-table-main .th-numeric { |
1947 | 1992 | text-align: right; |
1948 | 1993 | font-variant-numeric: tabular-nums; |
@@ -2000,15 +2045,20 @@ export default { |
2000 | 2045 | outline: none; |
2001 | 2046 | } |
2002 | 2047 |
|
| 2048 | +button.th-reset:disabled { |
| 2049 | + background: v-bind(colorCancelInactive); |
| 2050 | + color: v-bind(textColorCancelInactive); |
| 2051 | +} |
| 2052 | +
|
2003 | 2053 | button.th-reset:not(:disabled) { |
2004 | | - background: radial-gradient(at top, #f19a71, #F17171); |
2005 | | - border: 1px solid #F17171; |
| 2054 | + background: radial-gradient(at top, v-bind(colorCancelActiveLight), v-bind(colorCancelActive)); |
| 2055 | + border: 1px solid v-bind(colorCancelActive); |
2006 | 2056 | color: white; |
2007 | 2057 | } |
2008 | 2058 |
|
2009 | 2059 | .vue-ui-table-main button.th-reset:not(:disabled):hover, |
2010 | 2060 | .vue-ui-table-main button.th-reset:not(:disabled):focus { |
2011 | | - outline: 3px solid #f171717e; |
| 2061 | + outline: 3px solid v-bind(colorCancelActiveOutline); |
2012 | 2062 | } |
2013 | 2063 |
|
2014 | 2064 | .vue-ui-table-main [data-is-open="false"] { |
@@ -2077,13 +2127,13 @@ button.th-reset:not(:disabled) { |
2077 | 2127 | } |
2078 | 2128 |
|
2079 | 2129 | .vue-ui-table-main .th-button-active { |
2080 | | - background: radial-gradient(at top, #62b5f0, #1f77b4); |
2081 | | - color: white; |
| 2130 | + background: radial-gradient(at top, v-bind(colorButtonSortActiveLight), v-bind(colorButtonSortActive)); |
| 2131 | + color: v-bind(colorButtonSortActiveColorText); |
2082 | 2132 | } |
2083 | 2133 |
|
2084 | 2134 | .vue-ui-table-main .th-button-active:hover, |
2085 | 2135 | .vue-ui-table-main .th-button-active:focus { |
2086 | | - outline: 3px solid #1f77b47a; |
| 2136 | + outline: 3px solid v-bind(colorButtonSortActiveOutline); |
2087 | 2137 | } |
2088 | 2138 |
|
2089 | 2139 | .vue-ui-table-main .th-date { |
@@ -2276,16 +2326,6 @@ button.th-reset:not(:disabled) { |
2276 | 2326 | width: 100%; |
2277 | 2327 | } |
2278 | 2328 |
|
2279 | | -.vue-ui-table-main th.col-selector--selected { |
2280 | | - background: radial-gradient(at top left, #62b5f0, #1f77b4); |
2281 | | - color: white; |
2282 | | -} |
2283 | | -
|
2284 | | -.vue-ui-table-main th.col-selector--selected div { |
2285 | | - background: transparent; |
2286 | | - color: white; |
2287 | | -} |
2288 | | -
|
2289 | 2329 | .vue-ui-table-main .vue-ui-table-chart-modal { |
2290 | 2330 | align-items: center; |
2291 | 2331 | border-radius: 8px; |
|
0 commit comments