Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openstack-uicore-foundation",
"version": "5.0.68",
"version": "5.0.69-beta.1",
"description": "ui reactjs components for openstack marketing site",
"main": "lib/openstack-uicore-foundation.js",
"scripts": {
Expand Down
8 changes: 4 additions & 4 deletions src/components/inputs/upload-input-v3/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ const UploadInputV3 = ({
/>
) : (
<Box sx={{ color: 'primary.main', display: 'flex', alignItems: 'center' }}>
<UploadFileIcon fontSize="medium" />
<UploadFileIcon />
</Box>
)}
</Box>
Expand Down Expand Up @@ -479,7 +479,7 @@ const UploadInputV3 = ({
sx={fileRowSx}
>
<Box sx={{ color: 'error.main', display: 'flex', alignItems: 'center', mr: 2, minWidth: 32 }}>
<ErrorOutlineIcon fontSize="medium" />
<ErrorOutlineIcon />
</Box>

<Box sx={{ flex: 1, minWidth: 0 }}>
Expand All @@ -501,14 +501,14 @@ const UploadInputV3 = ({
title={T.translate("upload_input_v3.retry")}
sx={{ color: 'primary.main' }}
>
<ReplayIcon fontSize="small" />
<ReplayIcon />
</IconButton>
<IconButton
size="small"
onClick={() => handleDismissError(file)}
sx={{ color: 'error.main' }}
>
<CloseIcon fontSize="small" />
<CloseIcon />
</IconButton>
</Box>
))}
Expand Down
4 changes: 2 additions & 2 deletions src/components/mui/AuthButton/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ const AuthButton = ({
const anchorRef = useRef(null);
const [menuOpen, setMenuOpen] = useState(false);

const menuFontSize = theme?.custom?.menu?.fontSize || "1.4rem";
const menuLineHeight = theme?.custom?.menu?.lineHeight || "2rem";
const menuFontSize = theme?.custom?.menu?.fontSize || "0.875rem";
const menuLineHeight = theme?.custom?.menu?.lineHeight || "1.25rem";
const menuIconColor = theme?.custom?.menu?.icon || theme.palette.text.secondary;

const openMenu = () => {
Expand Down
4 changes: 2 additions & 2 deletions src/components/mui/BulkEditTable/components/Row.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const Row = (props) => {
sx={{ padding: 0 }}
aria-label={`Edit row ${row[idKey]}`}
>
<EditIcon fontSize="large" />
<EditIcon />
</IconButton>
)}
{onDelete && (
Expand All @@ -131,7 +131,7 @@ const Row = (props) => {
sx={{ padding: 0 }}
aria-label={`Delete row ${row[idKey]}`}
>
<DeleteIcon fontSize="large" />
<DeleteIcon />
</IconButton>
)}
</Box>
Expand Down
2 changes: 1 addition & 1 deletion src/components/mui/CustomDialog/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const CustomDialog = ({
color: theme.palette.grey[500]
})}
>
<CloseIcon fontSize="large" />
<CloseIcon />
</IconButton>
<Divider />
<DialogContent>{children}</DialogContent>
Expand Down
2 changes: 1 addition & 1 deletion src/components/mui/FormItemTable/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ const FormItemTable = ({
aria-label="Toggle row details"
onClick={() => toggleRow(row.form_item_id)}
>
<InfoOutlinedIcon color={getDetailsIconColor(row)} />
<InfoOutlinedIcon fontSize="small" color={getDetailsIconColor(row)} />
</IconButton>
) : (
<Typography variant="body2" noWrap sx={{ color: "error.main" }}>
Expand Down
4 changes: 2 additions & 2 deletions src/components/mui/GridFilter/components/Filter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const Filter = ({ id, value, criterias, onChange, onAdd, onDelete }) => {
onClick={() => onDelete(value)}
size="large"
>
<DeleteIcon fontSize="large" />
<DeleteIcon />
</IconButton>
) : (
<RoundButton
Expand All @@ -133,7 +133,7 @@ const Filter = ({ id, value, criterias, onChange, onAdd, onDelete }) => {
disabled={isAddDisabled}
sx={{ ml: "4px" }}
>
<AddIcon fontSize="large" />
<AddIcon />
</RoundButton>
)}
</Grid2>
Expand Down
4 changes: 2 additions & 2 deletions src/components/mui/GridFilter/components/FilterButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const FilterButton = ({ filterCount, onClick, onDelete, iconSx }) => {
if (filterCount > 0) {
return (
<Chip
icon={<FilterListIcon fontSize="large" />}
icon={<FilterListIcon />}
label={`${filterCount} ${T.translate("grid_filter.filters")}`}
onClick={onClick}
onDelete={onDelete}
Expand All @@ -46,7 +46,7 @@ const FilterButton = ({ filterCount, onClick, onDelete, iconSx }) => {
onClick={onClick}
sx={{ mr: 1, top: 0, position: "relative", padding: 0, ...iconSx }}
>
<FilterListIcon fontSize="large" />
<FilterListIcon />
</IconButton>
);
};
Expand Down
3 changes: 2 additions & 1 deletion src/components/mui/InfoNote/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import Box from "@mui/material/Box";
const InfoNote = ({ message, sx }) => (
<Box display="flex" alignItems="flex-start" gap={1} sx={sx}>
<InfoOutlinedIcon
sx={{ fontSize: 16, color: "text.secondary", mt: "2px" }}
fontSize="small"
sx={{ color: "text.secondary", mt: "2px" }}
/>
<Typography variant="body1" color="text.secondary" sx={{fontSize: "13px"}}>
{message}
Expand Down
14 changes: 14 additions & 0 deletions src/components/mui/MuiBaseCustomTheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";

export const MuiBaseCustomTheme = {
// must match the apps' html font-size so MUI's rem values render at their designed px
typography: {
htmlFontSize: 16
},
components: {
MuiOutlinedInput: {
styleOverrides: {
Expand Down Expand Up @@ -50,5 +54,15 @@ export const MuiBaseCustomTheme = {
tooltip: { fontSize: "1em", fontWeight: "400" }
}
},
// icon scale with medium at 22px, keeping MUI's small/large proportions (18 / 22 / 32px)
MuiSvgIcon: {
styleOverrides: {
root: ({ ownerState }) => ({
...(ownerState.fontSize === "small" && { fontSize: "1.125rem" }),
...(ownerState.fontSize === "medium" && { fontSize: "1.375rem" }),
...(ownerState.fontSize === "large" && { fontSize: "2rem" })
})
}
},
}
};
2 changes: 1 addition & 1 deletion src/components/mui/SponsorOrderGrid/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ const SponsorOrderGrid = ({
>
<Tooltip title={T.translate("sponsor_order_grid.change_quantity_tooltip")}>
<IconButton size="large" onClick={() => setChangeQuantityRow(row)}>
<RuleIcon fontSize="large" />
<RuleIcon />
</IconButton>
</Tooltip>
</TableCell>
Expand Down
3 changes: 1 addition & 2 deletions src/components/mui/formik-inputs/mui-formik-datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,13 @@ const MuiFormikDatepicker = ({
slotProps={{
day: {
sx: {
fontSize: "1.2rem",
fontWeight: 600
}
},
layout: {
sx: {
"& .MuiDayCalendar-weekDayLabel": {
fontSize: "1rem"
fontSize: "0.625rem"
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/mui/formik-inputs/mui-formik-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const MuiFormikSelect = ({
isClearable && field.value ? (
<InputAdornment position="end" sx={{ mr: 2 }}>
<IconButton size="small" onClick={handleClear}>
<ClearIcon fontSize="small" />
<ClearIcon />
</IconButton>
</InputAdornment>
) : null
Expand Down
2 changes: 1 addition & 1 deletion src/components/mui/formik-inputs/mui-formik-textfield.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const MuiFormikTextField = ({
{...props}
/>
{maxLength && (
<Typography sx={{ fontSize: "1.2rem", color: "#00000099", pl: 2 }}>
<Typography sx={{ fontSize: "0.75rem", color: "#00000099", pl: 2 }}>
{`${maxLength - currentLength} characters left`}
</Typography>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/mui/tables/components/row-actions-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const RowActionsMenu = ({ actions }) => {
onClick={(e) => setAnchorEl(e.currentTarget)}
data-testid="row-actions-menu-trigger"
>
<MoreVertIcon fontSize="large" />
<MoreVertIcon />
</IconButton>
<Menu
anchorEl={anchorEl}
Expand Down
4 changes: 2 additions & 2 deletions src/components/mui/tables/components/table-cell-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ const TableCellContent = ({ row, col }) => {
col.render(row)
) : isBoolean(row[col.columnKey]) ? (
row[col.columnKey] ? (
<CheckIcon fontSize="large" />
<CheckIcon />
) : (
<CloseIcon fontSize="large" />
<CloseIcon />
)
) : col.truncateText ? (
<TruncateText charLimit={col.truncateText}>
Expand Down
5 changes: 2 additions & 3 deletions src/components/mui/tables/editable-table/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ const EditableCell = ({ value, isEditing, onBlur, validation }) => {
<span style={{ flex: 1, fontWeight: "normal" }}>{value}</span>
{isHovering && (
<EditIcon
fontSize="small"
sx={{
opacity: 0.5,
position: "absolute",
Expand Down Expand Up @@ -320,9 +319,9 @@ const MuiTableEditable = ({
size="small"
onClick={() => onArchive(row)}
sx={{
fontSize: "1.3rem",
fontSize: "0.875rem",
fontWeight: "normal",
lineHeight: "2.2rem",
lineHeight: "1.375rem",
padding: "4px 5px",
color: "rgba(0,0,0,0.56)"
}}
Expand Down
8 changes: 4 additions & 4 deletions src/components/mui/tables/mui-table/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ const MuiTable = ({
data-testid="action-edit"
disabled={options.disableProp && row[options.disableProp]}
>
<EditIcon fontSize="large" />
<EditIcon />
</IconButton>
</span>
</Tooltip>
Expand Down Expand Up @@ -255,9 +255,9 @@ const MuiTable = ({
}
>
{row.is_archived ? (
<UnarchiveIcon fontSize="large" />
<UnarchiveIcon />
) : (
<ArchiveIcon fontSize="large" />
<ArchiveIcon />
)}
</IconButton>
</span>
Expand All @@ -284,7 +284,7 @@ const MuiTable = ({
sx={{ padding: 0 }}
disabled={options.disableProp && row[options.disableProp]}
>
<DeleteIcon fontSize="large" />
<DeleteIcon />
</IconButton>
</span>
</Tooltip>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ const MuiTableSortableV2 = ({
onClick={() => onEdit(row)}
sx={{ padding: 0 }}
>
<EditIcon fontSize="large" />
<EditIcon />
</IconButton>
</TableCell>
)}
Expand All @@ -234,7 +234,7 @@ const MuiTableSortableV2 = ({
onClick={() => handleDelete(row)}
sx={{ padding: 0 }}
>
<DeleteIcon fontSize="large" />
<DeleteIcon />
</IconButton>
</TableCell>
)}
Expand All @@ -246,7 +246,7 @@ const MuiTableSortableV2 = ({
className={styles.dottedBorderLeft}
>
<IconButton size="large" {...dragHandleProps}>
<UnfoldMoreIcon fontSize="large" />
<UnfoldMoreIcon />
</IconButton>
</TableCell>
)}
Expand Down
6 changes: 3 additions & 3 deletions src/components/mui/tables/sortable-table/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ const MuiTableSortable = ({
onClick={() => onEdit(row)}
sx={{ padding: 0 }}
>
<EditIcon fontSize="large" />
<EditIcon />
</IconButton>
</TableCell>
)}
Expand All @@ -204,7 +204,7 @@ const MuiTableSortable = ({
onClick={() => handleDelete(row)}
sx={{ padding: 0 }}
>
<DeleteIcon fontSize="large" />
<DeleteIcon />
</IconButton>
</TableCell>
)}
Expand All @@ -217,7 +217,7 @@ const MuiTableSortable = ({
{...provided.dragHandleProps}
>
<IconButton size="large">
<UnfoldMoreIcon fontSize="large" />
<UnfoldMoreIcon />
</IconButton>
</TableCell>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/mui/truncate-text.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const TruncateText = ({ children, charLimit }) => {
const tooltipTitle = isTruncated ? children : isOverflowing ? children : "";

return (
<Tooltip title={tooltipTitle} placement="top" componentsProps={{ tooltip: { sx: { fontSize: "1.2rem" } } }}>
<Tooltip title={tooltipTitle} placement="top" componentsProps={{ tooltip: { sx: { fontSize: "0.75rem" } } }}>
<span
ref={ref}
onMouseEnter={() => {
Expand Down
4 changes: 2 additions & 2 deletions src/components/table-sortable/SortableTableRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const SortableTableRow = ({ text, even, id, index, moveCard, dropItem, children,

const style = {
border: '1px dashed gray',
padding: '0.5rem 1rem',
marginBottom: '.5rem',
padding: '0.25rem 0.625rem',
marginBottom: '0.25rem',
backgroundColor: 'white',
cursor: 'move',
};
Expand Down
Loading