diff --git a/src/components/Accordion/Accordion.tsx b/src/components/Accordion/Accordion.tsx index 929a8194..dec9089a 100644 --- a/src/components/Accordion/Accordion.tsx +++ b/src/components/Accordion/Accordion.tsx @@ -93,7 +93,7 @@ const Accordion: FC = ({ sx, }) => { return ( - + (!disabled ? onTitleClick() : null)} className={`accordionTitle ${disabled ? "disabled" : ""}`} diff --git a/src/components/Box/Box.tsx b/src/components/Box/Box.tsx index 57a3036b..c365e9c3 100644 --- a/src/components/Box/Box.tsx +++ b/src/components/Box/Box.tsx @@ -38,8 +38,7 @@ const BoxParent = styled.div>( border: `${get(theme, "box.border", lightV2.disabledGrey)} 1px solid`, borderRadius: customBorderRadius || 16, padding: customBorderPadding || 24, - boxShadow: get(theme, "box.shadow", "none"), - backgroundColor: get(theme, "box.backgroundColor", lightV2.white), + backgroundColor: theme.colors["Color/Neutral/colorWhite"], }; } diff --git a/src/components/BoxedIcon/BoxedIcon.tsx b/src/components/BoxedIcon/BoxedIcon.tsx index cf5338ab..c2d747f7 100644 --- a/src/components/BoxedIcon/BoxedIcon.tsx +++ b/src/components/BoxedIcon/BoxedIcon.tsx @@ -53,7 +53,11 @@ const IconContainer = styled.div(({ theme, sx }) => ({ })); const BoxedIcon: FC = ({ sx, children }) => { - return {children}; + return ( + + {children} + + ); }; export default BoxedIcon; diff --git a/src/components/GlobalStyles/GlobalStyles.tsx b/src/components/GlobalStyles/GlobalStyles.tsx index 0c403d4d..0be36ac3 100644 --- a/src/components/GlobalStyles/GlobalStyles.tsx +++ b/src/components/GlobalStyles/GlobalStyles.tsx @@ -282,6 +282,13 @@ const GlobalStyles = createGlobalStyle` font-weight: 600; line-height: 28px; } + .Heading3 { + font-family: Geist; + font-size: 30px; + font-style: normal; + font-weight: 600; + line-height: 38px; + } `; }} `; diff --git a/src/components/ScreenTitle/ScreenTitle.stories.tsx b/src/components/ScreenTitle/ScreenTitle.stories.tsx index c6c7418b..2fe12072 100644 --- a/src/components/ScreenTitle/ScreenTitle.stories.tsx +++ b/src/components/ScreenTitle/ScreenTitle.stories.tsx @@ -42,10 +42,10 @@ const Template: Story = (args: ScreenTitleProps) => ( export const Default = Template.bind({}); Default.args = { title: "Object Title", + superTitle: "Super Title", titleOptions: [ { title: "Created", value: "Wed, Feb 28 2024 · 23:56:02" }, { title: "Access", value: "PUBLIC" }, - { title: "Size", value: "1,2024 MiB - 2 Objects" }, ], actions: ( @@ -84,9 +84,10 @@ NoIcon.args = { export const CustomSubElement = Template.bind({}); CustomSubElement.args = { + icon: , + superTitle: "Super Title", title: "Object Title", titleOptions: [ - { title: "Created", value: "Wed, Feb 28 2024 · 23:56:02" }, { title: "Access", value: "PUBLIC" }, { title: "Size", value: "1,2024 MiB - 2 Objects" }, ], @@ -101,21 +102,6 @@ CustomSubElement.args = { ), - icon: , - subTitle: ( - - Online - - ), }; export const NoSubItems = Template.bind({}); diff --git a/src/components/ScreenTitle/ScreenTitle.tsx b/src/components/ScreenTitle/ScreenTitle.tsx index 600ede6e..ef6be935 100644 --- a/src/components/ScreenTitle/ScreenTitle.tsx +++ b/src/components/ScreenTitle/ScreenTitle.tsx @@ -43,8 +43,8 @@ const ScreenTitleContainer = styled.div( display: "flex", alignItems: !subTitle && !titleOptions ? "center" : ("flex-start" as const), + gap: 24, justifyContent: "space-between", - padding: 8, width: "100%", }, "& .headerBarIcon": { @@ -54,64 +54,40 @@ const ScreenTitleContainer = styled.div( height: 44, }, }, - "& .headerBarSubheader": { - color: get(theme, `screenTitle.subtitleColor`, lightV2.mutedText), - fontSize: 14, - }, "& .titleColumn": { - height: !subTitle && !titleOptions ? "60px" : ("auto" as const), + height: !subTitle && !titleOptions ? "56px" : ("auto" as const), justifyContent: "center", display: "flex", flexFlow: "column", alignItems: "flex-start", - gap: 4 as const, + gap: 0, "& .titleElement": { - fontSize: 24, - fontWeight: 600, - fontStyle: "normal" as const, - lineHeight: "28px", - color: get( - theme, - `screenTitle.titleColor`, - themeColors["Color/Neutral/Text/colorText"].lightMode, - ), + color: theme.colors["Color/Neutral/Text/colorTextHeading"], }, - "& .options": { - display: "flex", - gap: 28, - "& .title": { - fontSize: 12, - fontStyle: "normal", - fontWeight: 400, - lineHeight: "16px", - color: get( - theme, - `screenTitle.subtitleColor`, - themeColors["Color/Neutral/Text/colorTextTertiary"].lightMode, - ), - }, - "& .value": { - fontSize: 12, - fontStyle: "normal", - fontWeight: 600, - lineHeight: "16px", - color: get( - theme, - `screenTitle.subtitleColor`, - themeColors["Color/Neutral/Text/colorTextLabel"].lightMode, - ), - }, + "& .subTitle, .superTitle": { + color: theme.colors["Color/Neutral/Text/colorTextQuaternary"], }, }, "& .leftItems": { + flexGrow: 1, display: "flex", - alignItems: "flex-start" as const, + justifyContent: "space-between", gap: 16, + "& .titleColumn": { + flexGrow: "1", + }, + "& .options": { + display: "flex", + alignItems: "center", + color: theme.colors["Color/Neutral/Text/colorTextTertiary"], + gap: 24, + }, }, "& .rightItems": { display: "flex", alignItems: "center", - gap: 10, + gap: 8, + height: "100%", }, "& .optionElement": { display: "flex", @@ -146,6 +122,7 @@ const ScreenTitleContainer = styled.div( const ScreenTitle: FC> = ({ icon, + superTitle = "", subTitle = "", title, actions, @@ -157,29 +134,45 @@ const ScreenTitle: FC> = ({ - {icon ? {icon} : null} + {icon ? ( + ({ + "& .min-icon": { + color: theme.colors["Color/Brand/_minio/Raspberry"], + width: 24, + height: 24, + }, + })} + > + {icon} + + ) : null} - {title} - {subTitle && ( - {subTitle} + {superTitle && ( + {superTitle} )} - {titleOptions && ( - - {titleOptions?.map((optionItem, index) => ( - - {optionItem.title} - {optionItem.value} - - ))} - + {title} + {subTitle && ( + {subTitle} )} + {titleOptions && ( + + {titleOptions?.map((optionItem, index) => ( + + {optionItem.title} + {optionItem.value} + + ))} + + )} {actions && {actions}} diff --git a/src/components/ScreenTitle/ScreenTitle.types.ts b/src/components/ScreenTitle/ScreenTitle.types.ts index ed1d17b8..f84ae3ab 100644 --- a/src/components/ScreenTitle/ScreenTitle.types.ts +++ b/src/components/ScreenTitle/ScreenTitle.types.ts @@ -20,6 +20,7 @@ import { OverrideTheme } from "../../global/global.types"; export interface ScreenTitleProps { icon: React.ReactNode; + superTitle?: React.ReactNode; subTitle?: React.ReactNode; title: string; actions?: React.ReactNode; @@ -28,6 +29,7 @@ export interface ScreenTitleProps { } export interface ScreenTitleContainerProps { + superTitle?: React.ReactNode; subTitle?: React.ReactNode; titleOptions?: ScreenTitleOptions[]; sx?: OverrideTheme; @@ -36,5 +38,5 @@ export interface ScreenTitleContainerProps { export interface ScreenTitleOptions { title: string; - value: string; + value?: string; } diff --git a/src/components/Tabs/Tabs.tsx b/src/components/Tabs/Tabs.tsx index 42a2f4c5..3262715e 100644 --- a/src/components/Tabs/Tabs.tsx +++ b/src/components/Tabs/Tabs.tsx @@ -76,7 +76,7 @@ const TabsContainer = styled.div( "& .tabsPanels": { flexGrow: 1, width: "100%", - padding: 15, + padding: 24, border: horizontal ? "none" : `${get(