From 7973499d83a487bb535281a82093be8e53552598 Mon Sep 17 00:00:00 2001 From: VINEETH ASOK KUMAR Date: Mon, 9 Oct 2023 11:37:15 +0200 Subject: [PATCH 1/4] Fix Button inside Btn issue and styling --- src/components/Collapsible/IconWrapper.tsx | 1 + .../SidebarCollapsibleItem/SidebarCollapsibleItem.tsx | 2 +- .../SidebarNavigationItem/SidebarNavigationItem.tsx | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/Collapsible/IconWrapper.tsx b/src/components/Collapsible/IconWrapper.tsx index f6041150..64d2f2a7 100644 --- a/src/components/Collapsible/IconWrapper.tsx +++ b/src/components/Collapsible/IconWrapper.tsx @@ -12,6 +12,7 @@ const LabelContainer = styled.span` width: stretch; flex: 1; gap: ${({ theme }) => theme.click.sidebar.navigation.item.default.space.gap}; + overflow: hidden; `; const EllipsisContainer = styled.span` diff --git a/src/components/SidebarCollapsibleItem/SidebarCollapsibleItem.tsx b/src/components/SidebarCollapsibleItem/SidebarCollapsibleItem.tsx index 4b556e97..d3c052dc 100644 --- a/src/components/SidebarCollapsibleItem/SidebarCollapsibleItem.tsx +++ b/src/components/SidebarCollapsibleItem/SidebarCollapsibleItem.tsx @@ -17,7 +17,7 @@ export interface SidebarCollapsibleItemProps extends HTMLAttributes( +const SidebarCollapsibleItem = forwardRef( ( { label, diff --git a/src/components/SidebarNavigationItem/SidebarNavigationItem.tsx b/src/components/SidebarNavigationItem/SidebarNavigationItem.tsx index 9be3c1d1..a6e50970 100644 --- a/src/components/SidebarNavigationItem/SidebarNavigationItem.tsx +++ b/src/components/SidebarNavigationItem/SidebarNavigationItem.tsx @@ -3,7 +3,7 @@ import styled from "styled-components"; import { HorizontalDirection, IconName } from "@/components"; import { IconWrapper } from "../Collapsible/IconWrapper"; -export interface SidebarNavigationItemProps extends HTMLAttributes { +export interface SidebarNavigationItemProps extends HTMLAttributes { label: ReactNode; selected?: boolean; level?: number; @@ -12,7 +12,7 @@ export interface SidebarNavigationItemProps extends HTMLAttributes( +const SidebarNavigationItem = forwardRef( ({ label, level = 0, icon, selected, iconDir, type = "main", ...props }, ref) => { return ( Date: Mon, 9 Oct 2023 14:12:56 +0200 Subject: [PATCH 2/4] Fix font type --- src/components/Typography/Text/Text.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Typography/Text/Text.tsx b/src/components/Typography/Text/Text.tsx index edca2a90..91bb63ef 100644 --- a/src/components/Typography/Text/Text.tsx +++ b/src/components/Typography/Text/Text.tsx @@ -2,7 +2,7 @@ import styled from "styled-components"; export type TextColor = "default" | "muted"; export type TextSize = "xs" | "sm" | "md" | "lg"; -export type TextWeight = "normal" | "medium" | "semibold" | "bold"; +export type TextWeight = "normal" | "medium" | "semibold" | "bold" | "mono"; export interface TextProps { color?: TextColor; From b0ec2348c5d8c638c4e86a47a5de304ccea60bd5 Mon Sep 17 00:00:00 2001 From: VINEETH ASOK KUMAR Date: Mon, 9 Oct 2023 18:19:44 +0200 Subject: [PATCH 3/4] Add xs token values to text --- src/styles/types.ts | 1 + src/styles/variables.json | 1 + 2 files changed, 2 insertions(+) diff --git a/src/styles/types.ts b/src/styles/types.ts index 041c2836..4a08d9d0 100644 --- a/src/styles/types.ts +++ b/src/styles/types.ts @@ -2373,6 +2373,7 @@ "lg": string }, "mono": { + "xs": string, "sm": string, "md": string, "lg": string diff --git a/src/styles/variables.json b/src/styles/variables.json index 58a5fefa..b831a440 100644 --- a/src/styles/variables.json +++ b/src/styles/variables.json @@ -2372,6 +2372,7 @@ "lg": "600 1rem/1.5 \"Inter\", '\"SF Pro Display\"', -apple-system, BlinkMacSystemFont, '\"Segoe UI\"', Roboto, Oxygen, Ubuntu, Cantarell, '\"Open Sans\"', '\"Helvetica Neue\"', sans-serif;" }, "mono": { + "xs": "500 0.625rem/1.6 \"Inconsolata\", '\"SFMono Regular\"', monospace", "sm": "500 0.75rem/1.6 \"Inconsolata\", '\"SFMono Regular\"', monospace", "md": "500 0.875rem/1.7 \"Inconsolata\", '\"SFMono Regular\"', monospace", "lg": "500 1rem/1.6 \"Inconsolata\", '\"SFMono Regular\"', monospace" From c590d137d23ff9576591381a992a9d86ed924d5f Mon Sep 17 00:00:00 2001 From: VINEETH ASOK KUMAR Date: Mon, 9 Oct 2023 18:19:57 +0200 Subject: [PATCH 4/4] Fix sidebar styling --- src/components/SidebarNavigationItem/SidebarNavigationItem.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/SidebarNavigationItem/SidebarNavigationItem.tsx b/src/components/SidebarNavigationItem/SidebarNavigationItem.tsx index a6e50970..a01e17cc 100644 --- a/src/components/SidebarNavigationItem/SidebarNavigationItem.tsx +++ b/src/components/SidebarNavigationItem/SidebarNavigationItem.tsx @@ -94,7 +94,7 @@ export const SidebarItemWrapper = styled.div<{ font: ${theme.click.sidebar.navigation[itemType].mobile.typography.hover}; } - &:active { + &:active, &[data-selected="true"] { font: ${theme.click.sidebar.navigation[itemType].mobile.typography.active}; } }