@beydesign/storybook 0.0.25 → 0.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25,7 +25,7 @@ const StyledSidebar = styled.div `
25
25
  overflow-x: hidden;
26
26
  overflow-y: scroll;
27
27
  position: relative;
28
- padding: 24px 0;
28
+ padding: 16px 0px 24px 0px;
29
29
  `;
30
30
  const SidebarContainer = styled.div `
31
31
  position: relative;
@@ -33,9 +33,11 @@ const SidebarContainer = styled.div `
33
33
  `;
34
34
  const LogoContainer = styled.div `
35
35
  display: flex;
36
+ align-items: center;
36
37
  justify-content: ${({ $size }) => $size === SidebarSize.Expanded ? 'flex-start' : 'center'};
37
38
  padding: ${({ $size }) => ($size === SidebarSize.Expanded ? '0 24px' : '0')};
38
39
  margin-bottom: 32px;
40
+ min-height: 38px;
39
41
  height: 38px;
40
42
  `;
41
43
  const ToggleButtonWrapper = styled.div `
@@ -64,7 +66,8 @@ const SectionTitle = styled.div `
64
66
  color: var(--colors-light-text-text-subtle);
65
67
  opacity: 0.5;
66
68
  padding: ${({ $size }) => $size === SidebarSize.Expanded ? '8px 12px' : '8px 0'};
67
- display: ${({ $size }) => $size === SidebarSize.Collapsed ? 'none' : 'block'};
69
+ display: ${({ $size }) => $size === SidebarSize.Collapsed ? 'flex' : 'block'};
70
+ justify-content: ${({ $size }) => $size === SidebarSize.Collapsed ? 'center' : 'flex-start'};
68
71
  `;
69
72
  const Separator = styled.div `
70
73
  height: 0.31px;
@@ -101,7 +104,9 @@ export const Sidebar = ({ size = SidebarSize.Expanded, className = '', navSectio
101
104
  }
102
105
  };
103
106
  const isCollapsed = sidebarSize === SidebarSize.Collapsed;
104
- return (_jsxs(SidebarContainer, { className: className, children: [_jsxs(StyledSidebar, { "$size": sidebarSize, children: [_jsx(LogoContainer, { "$size": sidebarSize, children: _jsx(Logo, { variant: isCollapsed ? LogoVariant.Icon : LogoVariant.Horizontal, color: logoProps.color, gradient: logoProps.gradient }) }), _jsx(NavItemsContainer, { children: navSections.map((section, sectionIndex) => (_jsxs(React.Fragment, { children: [_jsxs(NavSection, { children: [section.title && (_jsx(SectionTitle, { "$size": sidebarSize, children: _jsx(Typography, { text: section.title, size: TypographySize.TextS, weight: TypographyWeight.Regular, color: "var(--primitives-desktop-primary-gray-700)" }) })), section.items.map((item, itemIndex) => (_jsx(NavItemWrapper, { item: item, isCollapsed: isCollapsed }, `${item.text}-${itemIndex}`)))] }), sectionIndex < navSections.length - 1 &&
107
+ return (_jsxs(SidebarContainer, { className: className, children: [_jsxs(StyledSidebar, { "$size": sidebarSize, children: [_jsx(LogoContainer, { "$size": sidebarSize, children: _jsx(Logo, { variant: isCollapsed ? LogoVariant.Icon : LogoVariant.Horizontal, color: logoProps.color, gradient: logoProps.gradient }) }), _jsx(NavItemsContainer, { children: navSections.map((section, sectionIndex) => (_jsxs(React.Fragment, { children: [_jsxs(NavSection, { children: [section.title && (_jsx(SectionTitle, { "$size": sidebarSize, children: _jsx(Typography, { text: isCollapsed && section.title
108
+ ? section.title.split(' ').slice(-1)[0]
109
+ : section.title, size: TypographySize.TextS, weight: TypographyWeight.Regular, color: "var(--primitives-desktop-primary-gray-700)" }) })), section.items.map((item, itemIndex) => (_jsx(NavItemWrapper, { item: item, isCollapsed: isCollapsed }, `${item.text}-${itemIndex}`)))] }), sectionIndex < navSections.length - 1 &&
105
110
  section.showSeparator && _jsx(Separator, {})] }, `section-${sectionIndex}`))) }), _jsx(BottomContainer, { children: _jsxs(Box, { display: "flex", flexDirection: "column", gap: "16px", children: [credits && (_jsx(CreditsCard, { size: isCollapsed
106
111
  ? CreditsCardSize.Collapsed
107
112
  : CreditsCardSize.Expanded, maxCredits: credits.maxCredits, usedCredits: credits.usedCredits, creditInfoText: credits.creditInfoText, onUpgradeClick: credits.onUpgradeClick })), bottomNavItems.map((item, index) => (_jsx(NavItemWrapper, { item: item, isCollapsed: isCollapsed }, `bottom-${item.text}-${index}`)))] }) })] }), _jsx(ToggleButtonWrapper, { children: isCollapsed ? (_jsx(MainButton, { text: "Expand", size: ButtonSize.xxs, displayIconMode: ButtonDisplayMode.Only, displayIcon: "CaretRight", onClick: handleToggle, shape: ButtonShape.Circle, hierarchy: ButtonHierarchy.Tetriary, style: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@beydesign/storybook",
3
3
  "private": false,
4
- "version": "0.0.25",
4
+ "version": "0.0.27",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",