(core) Mappings improvements

Summary:
- Adding new icon for calendar view (the old one by just bigger)
- When there are no columns to map the select box is grayed out
- Optional mappings can be cleared now

Test Plan: Added

Reviewers: JakubSerafin

Reviewed By: JakubSerafin

Subscribers: JakubSerafin

Differential Revision: https://phab.getgrist.com/D4066
This commit is contained in:
Jarosław Sadziński
2023-10-06 11:11:37 +02:00
parent 34f366585d
commit 572279916e
8 changed files with 265 additions and 47 deletions

View File

@@ -4,6 +4,7 @@ export type IconName = "ChartArea" |
"ChartKaplan" |
"ChartLine" |
"ChartPie" |
"TypeCalendar" |
"TypeCard" |
"TypeCardList" |
"TypeCell" |
@@ -152,6 +153,7 @@ export const IconList: IconName[] = ["ChartArea",
"ChartKaplan",
"ChartLine",
"ChartPie",
"TypeCalendar",
"TypeCard",
"TypeCardList",
"TypeCell",

View File

@@ -534,22 +534,25 @@ export const cssOptionRowIcon = styled(icon, `
}
`);
const cssOptionLabel = styled('div', `
export const cssOptionLabel = styled('div', `
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
--grist-option-label-color: ${theme.menuItemFg};
--grist-option-label-color-sel: ${theme.menuItemSelectedFg};
--grist-option-label-color-disabled: ${theme.menuItemDisabledFg};
.${weasel.cssMenuItem.className} & {
color: ${theme.menuItemFg};
color: var(--grist-option-label-color);
}
.${weasel.cssMenuItem.className}-sel & {
color: ${theme.menuItemSelectedFg};
color: var(--grist-option-label-color-sel);
background-color: ${theme.menuItemSelectedBg};
}
.${weasel.cssMenuItem.className}.disabled & {
color: ${theme.menuItemDisabledFg};
color: var(--grist-option-label-color-disabled);
}
`);