@beydesign/storybook 0.0.38 → 0.0.40

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.
Files changed (158) hide show
  1. package/dist/index.d.ts +9 -32
  2. package/dist/index.js +9 -45
  3. package/dist/stories/{AgentCard → Agent}/AgentCard.js +4 -11
  4. package/dist/stories/{AgentCard → Agent}/AgentCardSkeleton.js +1 -1
  5. package/dist/stories/Agent/index.d.ts +3 -0
  6. package/dist/stories/Agent/index.js +3 -0
  7. package/dist/stories/{AgentCard → Agent}/types.d.ts +1 -1
  8. package/dist/stories/Buttons/MainButton.d.ts +3 -0
  9. package/dist/stories/{Button.js → Buttons/MainButton.js} +3 -7
  10. package/dist/stories/{Button.stories.d.ts → Buttons/MainButton.stories.d.ts} +1 -1
  11. package/dist/stories/{Button.stories.js → Buttons/MainButton.stories.js} +3 -6
  12. package/dist/stories/Buttons/ToggleButtonGroup.d.ts +3 -0
  13. package/dist/stories/{ToggleButtonGroup.js → Buttons/ToggleButtonGroup.js} +3 -7
  14. package/dist/stories/{ToggleButtonGroup.stories.js → Buttons/ToggleButtonGroup.stories.js} +2 -2
  15. package/dist/stories/Buttons/index.d.ts +3 -0
  16. package/dist/stories/Buttons/index.js +3 -0
  17. package/dist/stories/{types/button.d.ts → Buttons/types.d.ts} +21 -3
  18. package/dist/stories/{types/button.js → Buttons/types.js} +9 -0
  19. package/dist/stories/{CreditsCard.d.ts → Credits/CreditsCard.d.ts} +1 -1
  20. package/dist/stories/{CreditsCard.js → Credits/CreditsCard.js} +3 -5
  21. package/dist/stories/{CreditsCard.stories.js → Credits/CreditsCard.stories.js} +2 -2
  22. package/dist/stories/Credits/index.d.ts +2 -0
  23. package/dist/stories/Credits/index.js +2 -0
  24. package/dist/stories/{Checkbox.d.ts → Form/Checkbox.d.ts} +1 -1
  25. package/dist/stories/{Checkbox.js → Form/Checkbox.js} +2 -3
  26. package/dist/stories/{Checkbox.stories.js → Form/Checkbox.stories.js} +2 -2
  27. package/dist/stories/{TextArea.d.ts → Form/TextArea.d.ts} +1 -1
  28. package/dist/stories/{TextArea.js → Form/TextArea.js} +1 -2
  29. package/dist/stories/{TextArea.stories.d.ts → Form/TextArea.stories.d.ts} +1 -1
  30. package/dist/stories/{TextArea.stories.js → Form/TextArea.stories.js} +1 -1
  31. package/dist/stories/{TextInput.d.ts → Form/TextInput.d.ts} +1 -1
  32. package/dist/stories/{TextInput.js → Form/TextInput.js} +1 -2
  33. package/dist/stories/{TextInput.stories.d.ts → Form/TextInput.stories.d.ts} +1 -1
  34. package/dist/stories/{TextInput.stories.js → Form/TextInput.stories.js} +1 -1
  35. package/dist/stories/Form/Toggle.d.ts +3 -0
  36. package/dist/stories/{Toggle.js → Form/Toggle.js} +2 -6
  37. package/dist/stories/{Toggle.stories.js → Form/Toggle.stories.js} +2 -2
  38. package/dist/stories/Form/index.d.ts +5 -0
  39. package/dist/stories/Form/index.js +5 -0
  40. package/dist/stories/Form/types.d.ts +94 -0
  41. package/dist/stories/{types/toggle.js → Form/types.js} +5 -0
  42. package/dist/stories/{Colors.js → Foundations/Colors.js} +1 -2
  43. package/dist/stories/Foundations/index.d.ts +1 -0
  44. package/dist/stories/Foundations/index.js +1 -0
  45. package/dist/stories/{Header.d.ts → Navigation/Header.d.ts} +1 -1
  46. package/dist/stories/{Header.js → Navigation/Header.js} +4 -6
  47. package/dist/stories/{Header.stories.js → Navigation/Header.stories.js} +2 -2
  48. package/dist/stories/{NavItem.d.ts → Navigation/NavItem.d.ts} +1 -1
  49. package/dist/stories/{NavItem.js → Navigation/NavItem.js} +4 -6
  50. package/dist/stories/{NavItem.stories.js → Navigation/NavItem.stories.js} +2 -2
  51. package/dist/stories/{Sidebar.d.ts → Navigation/Sidebar.d.ts} +1 -1
  52. package/dist/stories/{Sidebar.js → Navigation/Sidebar.js} +5 -11
  53. package/dist/stories/{Sidebar.stories.js → Navigation/Sidebar.stories.js} +2 -3
  54. package/dist/stories/Navigation/index.d.ts +4 -0
  55. package/dist/stories/Navigation/index.js +4 -0
  56. package/dist/stories/{types/sidebar.d.ts → Navigation/types.d.ts} +61 -1
  57. package/dist/stories/{types/nav-item.js → Navigation/types.js} +5 -0
  58. package/dist/stories/Typography/Typography.d.ts +3 -0
  59. package/dist/stories/{Typography.js → Typography/Typography.js} +2 -5
  60. package/dist/stories/{Typography.stories.js → Typography/Typography.stories.js} +2 -2
  61. package/dist/stories/Typography/index.d.ts +2 -0
  62. package/dist/stories/Typography/index.js +2 -0
  63. package/dist/stories/{types/typography.d.ts → Typography/types.d.ts} +0 -5
  64. package/dist/stories/UI/Avatar.d.ts +3 -0
  65. package/dist/stories/{Avatar.js → UI/Avatar.js} +4 -7
  66. package/dist/stories/{Avatar.stories.js → UI/Avatar.stories.js} +2 -2
  67. package/dist/stories/{Bagde.d.ts → UI/Badge.d.ts} +1 -1
  68. package/dist/stories/{Bagde.js → UI/Badge.js} +3 -4
  69. package/dist/stories/{Badge.stories.d.ts → UI/Badge.stories.d.ts} +1 -1
  70. package/dist/stories/{Badge.stories.js → UI/Badge.stories.js} +3 -3
  71. package/dist/stories/{HintBubble.d.ts → UI/HintBubble.d.ts} +1 -1
  72. package/dist/stories/{HintBubble.js → UI/HintBubble.js} +2 -3
  73. package/dist/stories/{HintBubble.stories.js → UI/HintBubble.stories.js} +2 -2
  74. package/dist/stories/{Logo.d.ts → UI/Logo.d.ts} +1 -1
  75. package/dist/stories/{Logo.js → UI/Logo.js} +1 -1
  76. package/dist/stories/UI/Logo.stories.d.ts +11 -0
  77. package/dist/stories/{Logo.stories.js → UI/Logo.stories.js} +2 -2
  78. package/dist/stories/UI/Menu.d.ts +3 -0
  79. package/dist/stories/{Menu.js → UI/Menu.js} +3 -11
  80. package/dist/stories/UI/Menu.stories.d.ts +6 -0
  81. package/dist/stories/{Menu.stories.js → UI/Menu.stories.js} +1 -1
  82. package/dist/stories/UI/ProgressIndicator.d.ts +3 -0
  83. package/dist/stories/{ProgressIndicator.js → UI/ProgressIndicator.js} +2 -6
  84. package/dist/stories/{ProgressIndicator.stories.js → UI/ProgressIndicator.stories.js} +2 -2
  85. package/dist/stories/UI/SkeletonLoader.d.ts +3 -0
  86. package/dist/stories/{SkeletonLoader.stories.js → UI/SkeletonLoader.stories.js} +1 -1
  87. package/dist/stories/UI/index.d.ts +8 -0
  88. package/dist/stories/UI/index.js +8 -0
  89. package/dist/stories/UI/types.d.ts +205 -0
  90. package/dist/stories/UI/types.js +71 -0
  91. package/dist/utils/common.d.ts +1 -0
  92. package/dist/utils/common.js +6 -0
  93. package/dist/utils/index.d.ts +2 -0
  94. package/dist/utils/index.js +2 -0
  95. package/package.json +1 -1
  96. package/dist/stories/AgentCard/index.d.ts +0 -3
  97. package/dist/stories/AgentCard/index.js +0 -2
  98. package/dist/stories/Avatar.d.ts +0 -4
  99. package/dist/stories/Button.d.ts +0 -4
  100. package/dist/stories/Logo.stories.d.ts +0 -39
  101. package/dist/stories/Menu.d.ts +0 -4
  102. package/dist/stories/Menu.stories.d.ts +0 -43
  103. package/dist/stories/ProgressIndicator.d.ts +0 -4
  104. package/dist/stories/SkeletonLoader.d.ts +0 -24
  105. package/dist/stories/Toggle.d.ts +0 -4
  106. package/dist/stories/ToggleButtonGroup.d.ts +0 -4
  107. package/dist/stories/Typography.d.ts +0 -4
  108. package/dist/stories/types/avatar.d.ts +0 -44
  109. package/dist/stories/types/avatar.js +0 -28
  110. package/dist/stories/types/badge.d.ts +0 -49
  111. package/dist/stories/types/badge.js +0 -25
  112. package/dist/stories/types/checkbox.d.ts +0 -26
  113. package/dist/stories/types/checkbox.js +0 -5
  114. package/dist/stories/types/header.d.ts +0 -25
  115. package/dist/stories/types/header.js +0 -1
  116. package/dist/stories/types/hint-bubble.d.ts +0 -24
  117. package/dist/stories/types/hint-bubble.js +0 -10
  118. package/dist/stories/types/logo.d.ts +0 -30
  119. package/dist/stories/types/logo.js +0 -6
  120. package/dist/stories/types/menu.d.ts +0 -30
  121. package/dist/stories/types/menu.js +0 -1
  122. package/dist/stories/types/nav-item.d.ts +0 -41
  123. package/dist/stories/types/progress-indicator.d.ts +0 -35
  124. package/dist/stories/types/progress-indicator.js +0 -8
  125. package/dist/stories/types/sidebar.js +0 -5
  126. package/dist/stories/types/text-area.d.ts +0 -30
  127. package/dist/stories/types/text-area.js +0 -1
  128. package/dist/stories/types/text-input.d.ts +0 -26
  129. package/dist/stories/types/text-input.js +0 -1
  130. package/dist/stories/types/toggle-button-group.d.ts +0 -28
  131. package/dist/stories/types/toggle-button-group.js +0 -9
  132. package/dist/stories/types/toggle.d.ts +0 -32
  133. /package/dist/stories/{AgentCard → Agent}/AgentCard.d.ts +0 -0
  134. /package/dist/stories/{AgentCard → Agent}/AgentCard.stories.d.ts +0 -0
  135. /package/dist/stories/{AgentCard → Agent}/AgentCard.stories.js +0 -0
  136. /package/dist/stories/{AgentCard → Agent}/AgentCardSkeleton.d.ts +0 -0
  137. /package/dist/stories/{AgentCard → Agent}/AgentCardSkeleton.stories.d.ts +0 -0
  138. /package/dist/stories/{AgentCard → Agent}/AgentCardSkeleton.stories.js +0 -0
  139. /package/dist/stories/{AgentCard → Agent}/types.js +0 -0
  140. /package/dist/stories/{ToggleButtonGroup.stories.d.ts → Buttons/ToggleButtonGroup.stories.d.ts} +0 -0
  141. /package/dist/stories/{CreditsCard.stories.d.ts → Credits/CreditsCard.stories.d.ts} +0 -0
  142. /package/dist/stories/{types/credits-card.d.ts → Credits/types.d.ts} +0 -0
  143. /package/dist/stories/{types/credits-card.js → Credits/types.js} +0 -0
  144. /package/dist/stories/{Checkbox.stories.d.ts → Form/Checkbox.stories.d.ts} +0 -0
  145. /package/dist/stories/{Toggle.stories.d.ts → Form/Toggle.stories.d.ts} +0 -0
  146. /package/dist/stories/{Colors.d.ts → Foundations/Colors.d.ts} +0 -0
  147. /package/dist/stories/{Colors.stories.d.ts → Foundations/Colors.stories.d.ts} +0 -0
  148. /package/dist/stories/{Colors.stories.js → Foundations/Colors.stories.js} +0 -0
  149. /package/dist/stories/{Header.stories.d.ts → Navigation/Header.stories.d.ts} +0 -0
  150. /package/dist/stories/{NavItem.stories.d.ts → Navigation/NavItem.stories.d.ts} +0 -0
  151. /package/dist/stories/{Sidebar.stories.d.ts → Navigation/Sidebar.stories.d.ts} +0 -0
  152. /package/dist/stories/{Typography.stories.d.ts → Typography/Typography.stories.d.ts} +0 -0
  153. /package/dist/stories/{types/typography.js → Typography/types.js} +0 -0
  154. /package/dist/stories/{Avatar.stories.d.ts → UI/Avatar.stories.d.ts} +0 -0
  155. /package/dist/stories/{HintBubble.stories.d.ts → UI/HintBubble.stories.d.ts} +0 -0
  156. /package/dist/stories/{ProgressIndicator.stories.d.ts → UI/ProgressIndicator.stories.d.ts} +0 -0
  157. /package/dist/stories/{SkeletonLoader.js → UI/SkeletonLoader.js} +0 -0
  158. /package/dist/stories/{SkeletonLoader.stories.d.ts → UI/SkeletonLoader.stories.d.ts} +0 -0
package/dist/index.d.ts CHANGED
@@ -1,32 +1,9 @@
1
- export { MainButton } from './stories/Button';
2
- export { Avatar } from './stories/Avatar';
3
- export { Typography } from './stories/Typography';
4
- export { Badge } from './stories/Bagde';
5
- export { Checkbox } from './stories/Checkbox';
6
- export { ToggleButtonGroup } from './stories/ToggleButtonGroup';
7
- export { ProgressIndicator } from './stories/ProgressIndicator';
8
- export { Logo } from './stories/Logo';
9
- export { Toggle } from './stories/Toggle';
10
- export { Header } from './stories/Header';
11
- export { NavItem } from './stories/NavItem';
12
- export { CreditsCard } from './stories/CreditsCard';
13
- export { Sidebar } from './stories/Sidebar';
14
- export { Menu } from './stories/Menu';
15
- export { SkeletonLoader } from './stories/SkeletonLoader';
16
- export { HintBubble } from './stories/HintBubble';
17
- export { ButtonSize, ButtonHierarchy, ButtonState, ButtonShape, ButtonDisplayMode, ButtonType, type MainButtonProps, } from './stories/types/button';
18
- export { BadgeColor, BadgeSize, type BadgeProps } from './stories/types/badge';
19
- export { AvatarStyle, AvatarSize, type AvatarProps, } from './stories/types/avatar';
20
- export { TypographySize, TypographyWeight, type TypographyProps, } from './stories/types/typography';
21
- export { CheckboxType, type CheckboxProps } from './stories/types/checkbox';
22
- export { ToggleButtonGroupSize, type ToggleButtonGroupProps, } from './stories/types/toggle-button-group';
23
- export { ProgressIndicatorMode, type ProgressIndicatorProps, } from './stories/types/progress-indicator';
24
- export { LogoVariant, type LogoProps } from './stories/types/logo';
25
- export { TogglePosition, type ToggleProps } from './stories/types/toggle';
26
- export { type HeaderProps } from './stories/types/header';
27
- export { NavItemState, NavItemSize, type NavItemProps, } from './stories/types/nav-item';
28
- export { CreditsCardSize, type CreditsCardProps, } from './stories/types/credits-card';
29
- export { SidebarSize, type SidebarProps, type NavItemConfig, type NavSection, } from './stories/types/sidebar';
30
- export { type MenuProps, type MenuItemProps } from './stories/types/menu';
31
- export { HintBubbleType, HintBubbleSize, type HintBubbleProps, } from './stories/types/hint-bubble';
32
- export { AgentCard, type AgentCardProps, type AgentState, AgentCardSkeleton, type AgentCardSkeletonProps, } from './stories/AgentCard';
1
+ export * from './stories/UI';
2
+ export * from './stories/Agent';
3
+ export * from './stories/Form';
4
+ export * from './stories/Buttons';
5
+ export * from './stories/Typography';
6
+ export * from './stories/Credits';
7
+ export * from './stories/Navigation';
8
+ export * from './stories/Typography';
9
+ export * from './stories/UI';
package/dist/index.js CHANGED
@@ -1,45 +1,9 @@
1
- // Components
2
- export { MainButton } from './stories/Button';
3
- export { Avatar } from './stories/Avatar';
4
- export { Typography } from './stories/Typography';
5
- export { Badge } from './stories/Bagde';
6
- export { Checkbox } from './stories/Checkbox';
7
- export { ToggleButtonGroup } from './stories/ToggleButtonGroup';
8
- export { ProgressIndicator } from './stories/ProgressIndicator';
9
- export { Logo } from './stories/Logo';
10
- export { Toggle } from './stories/Toggle';
11
- export { Header } from './stories/Header';
12
- export { NavItem } from './stories/NavItem';
13
- export { CreditsCard } from './stories/CreditsCard';
14
- export { Sidebar } from './stories/Sidebar';
15
- export { Menu } from './stories/Menu';
16
- export { SkeletonLoader } from './stories/SkeletonLoader';
17
- export { HintBubble } from './stories/HintBubble';
18
- // Button Types
19
- export { ButtonSize, ButtonHierarchy, ButtonState, ButtonShape, ButtonDisplayMode, ButtonType, } from './stories/types/button';
20
- // Badge Types
21
- export { BadgeColor, BadgeSize } from './stories/types/badge';
22
- // Avatar Types
23
- export { AvatarStyle, AvatarSize, } from './stories/types/avatar';
24
- // Typography Types
25
- export { TypographySize, TypographyWeight, } from './stories/types/typography';
26
- // Checkbox Types
27
- export { CheckboxType } from './stories/types/checkbox';
28
- // Toggle Button Group Types
29
- export { ToggleButtonGroupSize, } from './stories/types/toggle-button-group';
30
- // Progress Indicator Types
31
- export { ProgressIndicatorMode, } from './stories/types/progress-indicator';
32
- // Logo Types
33
- export { LogoVariant } from './stories/types/logo';
34
- // Toggle Types
35
- export { TogglePosition } from './stories/types/toggle';
36
- // NavItem Types
37
- export { NavItemState, NavItemSize, } from './stories/types/nav-item';
38
- // Card Types
39
- export { CreditsCardSize, } from './stories/types/credits-card';
40
- // Sidebar Types
41
- export { SidebarSize, } from './stories/types/sidebar';
42
- // Agent Card Types
43
- // Hint Bubble Types
44
- export { HintBubbleType, HintBubbleSize, } from './stories/types/hint-bubble';
45
- export { AgentCard, AgentCardSkeleton, } from './stories/AgentCard';
1
+ export * from './stories/UI';
2
+ export * from './stories/Agent';
3
+ export * from './stories/Form';
4
+ export * from './stories/Buttons';
5
+ export * from './stories/Typography';
6
+ export * from './stories/Credits';
7
+ export * from './stories/Navigation';
8
+ export * from './stories/Typography';
9
+ export * from './stories/UI';
@@ -2,18 +2,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React, { useState } from 'react';
3
3
  import { AgentState } from './types';
4
4
  import { Box } from '@mui/material';
5
- import { Typography } from '../Typography';
6
- import { TypographySize, TypographyWeight } from '../types/typography';
7
- import { Toggle } from '../Toggle';
8
- import { TogglePosition } from '../types/toggle';
9
- import { Badge } from '../Bagde';
10
- import { BadgeColor, BadgeSize } from '../types/badge';
11
- import { MainButton } from '../Button';
12
- import { ButtonHierarchy, ButtonSize } from '../types/button';
13
- import { Menu } from '../Menu';
5
+ import { Typography, TypographySize, TypographyWeight } from '../Typography';
6
+ import { Toggle, TogglePosition } from '../Form';
7
+ import { Badge, ProgressIndicator, ProgressIndicatorMode, BadgeColor, BadgeSize, Menu, } from '../UI';
8
+ import { MainButton, ButtonHierarchy, ButtonSize } from '../Buttons';
14
9
  import { ArrowsCounterClockwise } from '@phosphor-icons/react';
15
- import { ProgressIndicator } from '../ProgressIndicator';
16
- import { ProgressIndicatorMode } from '../types/progress-indicator';
17
10
  export const AgentCard = ({ title, description = '', date = '', showDate = false, badges = [], showBadges = false, showTimeBadge = false, showDescription = false, showMenu = false, menuItems = [], active = false, showActiveToggle = false, onActiveToggleChange, activeToggleDisabled = false, agentImage, time, onPreview, agentState, previewButtonText = 'Preview', }) => {
18
11
  const [hovered, setHovered] = useState(false);
19
12
  const [imageError, setImageError] = useState(false);
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box } from '@mui/material';
3
- import { SkeletonLoader } from '../SkeletonLoader';
3
+ import { SkeletonLoader } from '../UI';
4
4
  export const AgentCardSkeleton = ({ width = '300px', showDate = false, showBadges = false, showDescription = false, style, }) => {
5
5
  return (_jsxs(Box, { width: width, display: "flex", flexDirection: "column", borderRadius: "var(--spacing-tokens-size-in-px-spacing-md)", padding: "var(--spacing-tokens-size-in-px-spacing-spacing-xl)", gap: "var(--spacing-tokens-size-in-px-spacing-spacing-lg)", bgcolor: "var(--colors-light-background-bg-component)", boxShadow: `var(--global-shadows-shadow-xs-offset-x) var(--global-shadows-shadow-xs-offset-y) var(--global-shadows-shadow-xs-blur) var(--global-shadows-shadow-xs-spread) var(--global-shadows-shadow-xs-color)`, style: style, children: [_jsx(Box, { width: "100%", sx: { aspectRatio: 1 }, borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-sm)", overflow: "hidden", children: _jsx(SkeletonLoader, {}) }), _jsx(SkeletonLoader, { width: "70%", height: "24px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-xs)" }), showDate && (_jsx(SkeletonLoader, { width: "100%", height: "20px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-xs)" })), showBadges && (_jsxs(Box, { display: "flex", flexDirection: "row", gap: "var(--spacing-tokens-size-in-px-spacing-spacing-md)", children: [_jsx(SkeletonLoader, { width: "60px", height: "24px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-xs)" }), _jsx(SkeletonLoader, { width: "80px", height: "24px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-xs)" })] })), showDescription && (_jsxs(Box, { display: "flex", flexDirection: "column", gap: "var(--spacing-tokens-size-in-px-spacing-spacing-sm)", children: [_jsx(SkeletonLoader, { width: "100%", height: "16px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-xs)" }), _jsx(SkeletonLoader, { width: "80%", height: "16px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-xs)" })] }))] }));
6
6
  };
@@ -0,0 +1,3 @@
1
+ export * from './AgentCard';
2
+ export * from './AgentCardSkeleton';
3
+ export * from './types';
@@ -0,0 +1,3 @@
1
+ export * from './AgentCard';
2
+ export * from './AgentCardSkeleton';
3
+ export * from './types';
@@ -1,4 +1,4 @@
1
- import { MenuItemProps } from '../types/menu';
1
+ import { MenuItemProps } from '../UI';
2
2
  export declare enum AgentState {
3
3
  pending = "pending",
4
4
  processing = "processing",
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { MainButtonProps } from './types';
3
+ export declare const MainButton: React.FC<MainButtonProps>;
@@ -1,10 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { CircularProgress } from '@mui/material';
3
3
  import styled from '@emotion/styled';
4
- import { ButtonSize, ButtonHierarchy, ButtonState, ButtonShape, ButtonDisplayMode, ButtonType, } from './types/button';
5
- import { Typography } from './Typography';
6
- import { TypographySize, TypographyWeight } from './types/typography';
7
- import { getIconComponent } from '../utils/icon';
4
+ import { ButtonSize, ButtonHierarchy, ButtonState, ButtonShape, ButtonDisplayMode, ButtonType, } from './types';
5
+ import { Typography, TypographySize, TypographyWeight } from '../Typography';
6
+ import { getIconComponent } from '../../utils';
8
7
  const StyledButton = styled.button `
9
8
  text-transform: none;
10
9
  padding: ${(props) => props.$displayIconMode === ButtonDisplayMode.Only
@@ -285,6 +284,3 @@ export const MainButton = ({ onClick, text, disabled = false, loading = false, t
285
284
  };
286
285
  return (_jsx(StyledButton, { onClick: onClick, type: type, disabled: state === ButtonState.Disabled || disabled, "$size": size, "$hierarchy": hierarchy, "$state": state, "$shape": shape, "$destructive": destructive, "$disabled": disabled, "$displayIconMode": displayIconMode, "$sizeStyles": sizeStyles, style: style, children: renderContent() }));
287
286
  };
288
- export const Components = () => {
289
- return (_jsxs("div", { style: { padding: '20px' }, children: [_jsx("h1", { children: "Buttons" }), _jsxs("div", { style: { display: 'flex', gap: '1rem', flexDirection: 'column' }, children: [_jsxs("div", { children: [_jsx("h2", { children: "Size: xl, Hierarchy: Primary" }), _jsx(MainButton, { text: "Primary Button", size: ButtonSize.xl, hierarchy: ButtonHierarchy.Primary, displayIcon: "Circle", state: ButtonState.Default, shape: ButtonShape.Square, destructive: false, showLeadingIcon: true, showTrailingIcon: true, leadingIcon: "Circle", trailingIcon: "Circle", onClick: () => console.log('clicked') })] }), _jsxs("div", { children: [_jsx("h2", { children: "White Variant with Icons" }), _jsx(MainButton, { text: "White Button", size: ButtonSize.xl, hierarchy: ButtonHierarchy.Primary, displayIcon: "Circle", state: ButtonState.Default, shape: ButtonShape.Square, showLeadingIcon: true, showTrailingIcon: true, leadingIcon: "Circle", trailingIcon: "Circle", onClick: () => console.log('clicked') })] }), _jsxs("div", { children: [_jsx("h2", { children: "Loading State" }), _jsx(MainButton, { text: "Loading Button", loading: true, size: ButtonSize.xl, hierarchy: ButtonHierarchy.Primary, displayIcon: "Circle", state: ButtonState.Default, shape: ButtonShape.Square, onClick: () => console.log('clicked') })] }), _jsxs("div", { children: [_jsx("h2", { children: "Disabled State" }), _jsx(MainButton, { text: "Disabled Button", disabled: true, size: ButtonSize.xl, hierarchy: ButtonHierarchy.Primary, displayIcon: "Circle", state: ButtonState.Default, shape: ButtonShape.Square, onClick: () => console.log('clicked') })] }), _jsxs("div", { children: [_jsx("h2", { children: "Destructive Button" }), _jsx(MainButton, { text: "Destructive Button", destructive: true, size: ButtonSize.xl, hierarchy: ButtonHierarchy.Primary, displayIcon: "Circle", state: ButtonState.Default, shape: ButtonShape.Square, onClick: () => console.log('clicked') })] }), _jsxs("div", { children: [_jsx("h2", { children: "Leading Icon Only" }), _jsx(MainButton, { text: "Leading Icon Button", size: ButtonSize.xl, hierarchy: ButtonHierarchy.Primary, displayIcon: "Circle", state: ButtonState.Default, shape: ButtonShape.Square, showLeadingIcon: true, showTrailingIcon: false, leadingIcon: "Circle", onClick: () => console.log('clicked') })] }), _jsxs("div", { children: [_jsx("h2", { children: "Trailing Icon Only" }), _jsx(MainButton, { text: "Trailing Icon Button", size: ButtonSize.xl, hierarchy: ButtonHierarchy.Primary, displayIcon: "Circle", state: ButtonState.Default, shape: ButtonShape.Square, showLeadingIcon: false, showTrailingIcon: true, trailingIcon: "Circle", onClick: () => console.log('clicked') })] })] })] }));
290
- };
@@ -1,5 +1,5 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
- import { MainButton } from './Button';
2
+ import { MainButton } from './MainButton';
3
3
  declare const meta: Meta<typeof MainButton>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof MainButton>;
@@ -1,10 +1,7 @@
1
- import { MainButton } from './Button';
2
- import { ButtonShape, ButtonState } from './types/button';
3
- import { ButtonDisplayMode } from './types/button';
4
- import { ButtonHierarchy } from './types/button';
5
- import { ButtonSize } from './types/button';
1
+ import { MainButton } from './MainButton';
2
+ import { ButtonHierarchy, ButtonSize, ButtonState, ButtonDisplayMode, ButtonShape, } from './types';
6
3
  const meta = {
7
- title: 'Design System/Components/Button',
4
+ title: 'Design System/Components/Buttons/MainButton',
8
5
  component: MainButton,
9
6
  parameters: {
10
7
  layout: 'centered',
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { ToggleButtonGroupProps } from './types';
3
+ export declare const ToggleButtonGroup: React.FC<ToggleButtonGroupProps>;
@@ -1,8 +1,7 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { ToggleButtonGroupSize, } from './types/toggle-button-group';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ToggleButtonGroupSize, ButtonHierarchy, ButtonSize, ButtonType, } from './types';
3
3
  import { Box } from '@mui/material';
4
- import { MainButton } from './Button';
5
- import { ButtonHierarchy, ButtonSize, ButtonType, } from './types/button';
4
+ import { MainButton } from './MainButton';
6
5
  export const ToggleButtonGroup = ({ onChange, options, selectedOption, disabled, size = ToggleButtonGroupSize.lg, }) => {
7
6
  const selectedOptionStyle = {
8
7
  backgroundColor: 'var(--colors-light-background-bg-card-highlight-hover)',
@@ -32,6 +31,3 @@ export const ToggleButtonGroup = ({ onChange, options, selectedOption, disabled,
32
31
  return (_jsx(MainButton, { text: option, onClick: () => onChange(option), size: getButtonSize(), hierarchy: ButtonHierarchy.Tetriary, type: ButtonType.Button, style: isSelected ? selectedOptionStyle : unselectedOptionStyle, disabled: disabled }, option));
33
32
  }) }));
34
33
  };
35
- export const Components = () => {
36
- return (_jsxs("div", { style: { padding: '20px' }, children: [_jsx("h1", { children: "Toggle Buttons" }), _jsx("div", { style: { display: 'flex', gap: '1rem', flexDirection: 'column' }, children: _jsx(ToggleButtonGroup, { options: ['Option 1', 'Option 2', 'Option 3'], selectedOption: "Option 1", onChange: () => { } }) })] }));
37
- };
@@ -1,7 +1,7 @@
1
1
  import { ToggleButtonGroup } from './ToggleButtonGroup';
2
- import { ToggleButtonGroupSize } from './types/toggle-button-group';
2
+ import { ToggleButtonGroupSize } from './types';
3
3
  const meta = {
4
- title: 'Design System/Components/ToggleButtonGroup',
4
+ title: 'Design System/Components/Buttons/ToggleButtonGroup',
5
5
  component: ToggleButtonGroup,
6
6
  parameters: {
7
7
  layout: 'centered',
@@ -0,0 +1,3 @@
1
+ export * from './MainButton';
2
+ export * from './ToggleButtonGroup';
3
+ export * from './types';
@@ -0,0 +1,3 @@
1
+ export * from './MainButton';
2
+ export * from './ToggleButtonGroup';
3
+ export * from './types';
@@ -1,5 +1,5 @@
1
1
  import type { CSSProperties } from 'react';
2
- import { IconName } from '../../utils/icon';
2
+ import { IconName } from '../../utils';
3
3
  /**
4
4
  * Button size variants
5
5
  */
@@ -100,7 +100,25 @@ export interface MainButtonProps {
100
100
  trailingIcon?: IconName;
101
101
  }
102
102
  /**
103
- * Props for the Components wrapper
103
+ * Toggle button size variants
104
104
  */
105
- export interface ComponentsProps {
105
+ export declare enum ToggleButtonGroupSize {
106
+ lg = "lg",
107
+ md = "md",
108
+ sm = "sm"
106
109
  }
110
+ /**
111
+ * Toggle button component props
112
+ */
113
+ export type ToggleButtonGroupProps = {
114
+ /** Size variant of the toggle button */
115
+ size?: ToggleButtonGroupSize;
116
+ /** Selected option of the toggle button */
117
+ selectedOption: string;
118
+ /** Options of the toggle button */
119
+ options: string[];
120
+ /** Whether the toggle button is disabled */
121
+ disabled?: boolean;
122
+ /** Callback function when the toggle button is selected */
123
+ onChange: (option: string) => void;
124
+ };
@@ -56,3 +56,12 @@ export var ButtonType;
56
56
  ButtonType["Submit"] = "submit";
57
57
  ButtonType["Reset"] = "reset";
58
58
  })(ButtonType || (ButtonType = {}));
59
+ /**
60
+ * Toggle button size variants
61
+ */
62
+ export var ToggleButtonGroupSize;
63
+ (function (ToggleButtonGroupSize) {
64
+ ToggleButtonGroupSize["lg"] = "lg";
65
+ ToggleButtonGroupSize["md"] = "md";
66
+ ToggleButtonGroupSize["sm"] = "sm";
67
+ })(ToggleButtonGroupSize || (ToggleButtonGroupSize = {}));
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import { CreditsCardProps } from './types/credits-card';
2
+ import { CreditsCardProps } from './types';
3
3
  export declare const CreditsCard: React.FC<CreditsCardProps>;
@@ -1,11 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import styled from '@emotion/styled';
3
- import { CreditsCardSize } from './types/credits-card';
4
- import { Typography } from './Typography';
5
- import { TypographySize, TypographyWeight } from './types/typography';
3
+ import { CreditsCardSize } from './types';
4
+ import { Typography, TypographySize, TypographyWeight } from '../Typography';
6
5
  import { Box } from '@mui/material';
7
- import { MainButton } from './Button';
8
- import { ButtonHierarchy, ButtonSize } from './types/button';
6
+ import { MainButton, ButtonHierarchy, ButtonSize } from '../Buttons';
9
7
  const StyledCard = styled.div `
10
8
  display: flex;
11
9
  flex-direction: column;
@@ -1,7 +1,7 @@
1
1
  import { CreditsCard } from './CreditsCard';
2
- import { CreditsCardSize } from './types/credits-card';
2
+ import { CreditsCardSize } from './types';
3
3
  const meta = {
4
- title: 'Design System/Components/CreditsCard',
4
+ title: 'Design System/Components/Credits/CreditsCard',
5
5
  component: CreditsCard,
6
6
  parameters: {
7
7
  layout: 'centered',
@@ -0,0 +1,2 @@
1
+ export * from './CreditsCard';
2
+ export * from './types';
@@ -0,0 +1,2 @@
1
+ export * from './CreditsCard';
2
+ export * from './types';
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import { CheckboxProps } from './types/checkbox';
2
+ import { CheckboxProps } from './types';
3
3
  export declare const Checkbox: React.FC<CheckboxProps>;
@@ -1,8 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box, Checkbox as MuiCheckbox } from '@mui/material';
3
- import { CheckboxType } from './types/checkbox';
4
- import { Typography } from './Typography';
5
- import { TypographySize, TypographyWeight } from './types/typography';
3
+ import { CheckboxType } from './types';
4
+ import { Typography, TypographySize, TypographyWeight } from '../Typography';
6
5
  export const Checkbox = ({ type = CheckboxType.Checkbox, label, checked, disabled, required, onChange, }) => {
7
6
  const props = {
8
7
  checked,
@@ -1,7 +1,7 @@
1
1
  import { Checkbox } from './Checkbox';
2
- import { CheckboxType } from './types/checkbox';
2
+ import { CheckboxType } from './types';
3
3
  const meta = {
4
- title: 'Design System/Components/Checkbox',
4
+ title: 'Design System/Components/Form/Checkbox',
5
5
  component: Checkbox,
6
6
  parameters: {
7
7
  layout: 'centered',
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import { TextAreaProps } from './types/text-area';
2
+ import { TextAreaProps } from './types';
3
3
  export declare const TextArea: React.FC<TextAreaProps>;
@@ -1,8 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from 'react';
3
3
  import { Box } from '@mui/material';
4
- import { Typography } from './Typography';
5
- import { TypographySize, TypographyWeight } from './types/typography';
4
+ import { Typography, TypographySize, TypographyWeight } from '../Typography';
6
5
  export const TextArea = ({ label, value, onChange, placeholder, hintText, errorText, disabled, maxLength = 256, showMaxLengthIndicator = false, numberOfRows = 5, }) => {
7
6
  const [focused, setFocused] = useState(false);
8
7
  return (_jsx(Box, { display: 'flex', flexDirection: 'column', gap: 'var(--spacing-tokens-size-in-px-spacing-spacing-sm)', children: _jsxs(Box, { display: 'flex', flexDirection: 'column', gap: 'var(--spacing-tokens-size-in-px-spacing-spacing-lg)', minWidth: '260px', children: [_jsx(Typography, { text: label, size: TypographySize.HeadingXS, weight: TypographyWeight.SemiBold }), _jsx(Box, { display: 'flex', flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', bgcolor: 'var(--colors-light-background-bg-component)', border: `1px solid ${errorText
@@ -1,7 +1,7 @@
1
1
  import type { StoryObj } from '@storybook/react';
2
2
  declare const meta: {
3
3
  title: string;
4
- component: import("react").FC<import("./types/text-area").TextAreaProps>;
4
+ component: import("react").FC<import("./types").TextAreaProps>;
5
5
  parameters: {
6
6
  layout: string;
7
7
  };
@@ -1,6 +1,6 @@
1
1
  import { TextArea } from './TextArea';
2
2
  const meta = {
3
- title: 'Design System/Components/TextArea',
3
+ title: 'Design System/Components/Form/TextArea',
4
4
  component: TextArea,
5
5
  parameters: {
6
6
  layout: 'centered',
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import { TextInputProps } from './types/text-input';
2
+ import { TextInputProps } from './types';
3
3
  export declare const TextInput: React.FC<TextInputProps>;
@@ -1,8 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from 'react';
3
3
  import { Box } from '@mui/material';
4
- import { Typography } from './Typography';
5
- import { TypographySize, TypographyWeight } from './types/typography';
4
+ import { Typography, TypographySize, TypographyWeight } from '../Typography';
6
5
  export const TextInput = ({ label, value, onChange, placeholder, hintText, errorText, disabled, trailingText, }) => {
7
6
  const [focused, setFocused] = useState(false);
8
7
  return (_jsx(Box, { display: 'flex', flexDirection: 'column', gap: 'var(--spacing-tokens-size-in-px-spacing-spacing-sm)', children: _jsxs(Box, { display: 'flex', flexDirection: 'column', gap: 'var(--spacing-tokens-size-in-px-spacing-spacing-lg)', minWidth: '260px', children: [_jsx(Typography, { text: label, size: TypographySize.HeadingXS, weight: TypographyWeight.SemiBold }), _jsxs(Box, { display: 'flex', flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', bgcolor: 'var(--colors-light-background-bg-component)', border: errorText
@@ -1,7 +1,7 @@
1
1
  import type { StoryObj } from '@storybook/react';
2
2
  declare const meta: {
3
3
  title: string;
4
- component: import("react").FC<import("./types/text-input").TextInputProps>;
4
+ component: import("react").FC<import("./types").TextInputProps>;
5
5
  parameters: {
6
6
  layout: string;
7
7
  };
@@ -1,6 +1,6 @@
1
1
  import { TextInput } from './TextInput';
2
2
  const meta = {
3
- title: 'Design System/Components/TextInput',
3
+ title: 'Design System/Components/Form/TextInput',
4
4
  component: TextInput,
5
5
  parameters: {
6
6
  layout: 'centered',
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { ToggleProps } from './types';
3
+ export declare const Toggle: React.FC<ToggleProps>;
@@ -1,8 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { TogglePosition } from './types/toggle';
2
+ import { TogglePosition } from './types';
3
3
  import { Box, styled, Switch } from '@mui/material';
4
- import { Typography } from './Typography';
5
- import { TypographySize, TypographyWeight } from './types/typography';
4
+ import { Typography, TypographySize, TypographyWeight } from '../Typography';
6
5
  const IOSSwitch = styled((props) => (_jsx(Switch, { focusVisibleClassName: ".Mui-focusVisible", disableRipple: true, ...props })))(({ theme }) => ({
7
6
  width: 36,
8
7
  height: 20,
@@ -57,6 +56,3 @@ const IOSSwitch = styled((props) => (_jsx(Switch, { focusVisibleClassName: ".Mui
57
56
  export const Toggle = ({ checked, onChange, text = 'Click me', title, disabled = false, togglePosition = TogglePosition.Left, style, }) => {
58
57
  return (_jsxs(Box, { display: "flex", alignItems: "flex-start", flexDirection: togglePosition === TogglePosition.Left ? 'row' : 'row-reverse', gap: 'var(--spacing-tokens-size-in-px-spacing-spacing-md)', sx: style, children: [_jsx(IOSSwitch, { checked: checked, onChange: (e) => onChange(e.target.checked), disabled: disabled }), text && (_jsxs(Box, { display: "flex", flexDirection: "column", children: [_jsx(Typography, { text: text, size: TypographySize.TextS, weight: TypographyWeight.Medium, color: 'var(--colors-light-text-text-title)' }), title && (_jsx(Typography, { text: title, size: TypographySize.TextS, weight: TypographyWeight.Medium, color: "#475467" }))] }))] }));
59
58
  };
60
- export const Components = () => {
61
- return (_jsxs("div", { style: { padding: '20px' }, children: [_jsx("h1", { children: "Toggle" }), _jsx("div", { style: { display: 'flex', gap: '1rem', flexDirection: 'column' } })] }));
62
- };
@@ -1,7 +1,7 @@
1
+ import { TogglePosition } from './types';
1
2
  import { Toggle } from './Toggle';
2
- import { TogglePosition } from './types/toggle';
3
3
  const meta = {
4
- title: 'Design System/Components/Toggle',
4
+ title: 'Design System/Components/Form/Toggle',
5
5
  component: Toggle,
6
6
  parameters: {
7
7
  layout: 'centered',
@@ -0,0 +1,5 @@
1
+ export * from './Checkbox';
2
+ export * from './Toggle';
3
+ export * from './TextArea';
4
+ export * from './TextInput';
5
+ export * from './types';
@@ -0,0 +1,5 @@
1
+ export * from './Checkbox';
2
+ export * from './Toggle';
3
+ export * from './TextArea';
4
+ export * from './TextInput';
5
+ export * from './types';
@@ -0,0 +1,94 @@
1
+ import { SxProps, Theme } from '@mui/material';
2
+ /**
3
+ * Text area component props
4
+ */
5
+ export type TextAreaProps = {
6
+ /** Text area label */
7
+ label: string;
8
+ /** Text area value */
9
+ value: string;
10
+ /** Text area onChange */
11
+ onChange: (value: string) => void;
12
+ /** Text input placeholder */
13
+ placeholder?: string;
14
+ /** Text input hint */
15
+ hintText?: string;
16
+ /** Text input error */
17
+ errorText?: string;
18
+ /** Text input disabled */
19
+ disabled?: boolean;
20
+ /** Text input max length */
21
+ maxLength?: number;
22
+ /** Text input show max length indicator */
23
+ showMaxLengthIndicator?: boolean;
24
+ /** Text input number of rows */
25
+ numberOfRows?: number;
26
+ };
27
+ /**
28
+ * Text input component props
29
+ */
30
+ export type TextInputProps = {
31
+ /** Text input label */
32
+ label: string;
33
+ /** Text input value */
34
+ value: string;
35
+ /** Text input onChange */
36
+ onChange: (value: string) => void;
37
+ /** Text input placeholder */
38
+ placeholder?: string;
39
+ /** Text input hint */
40
+ hintText?: string;
41
+ /** Text input error */
42
+ errorText?: string;
43
+ /** Text input disabled */
44
+ disabled?: boolean;
45
+ /** Text input trailing text */
46
+ trailingText?: string;
47
+ };
48
+ /**
49
+ * Toggle position variants
50
+ */
51
+ export declare enum TogglePosition {
52
+ Left = "Left",
53
+ Right = "Right"
54
+ }
55
+ /**
56
+ * Toggle component props
57
+ */
58
+ export type ToggleProps = {
59
+ /** Text of the toggle */
60
+ text?: string;
61
+ /** Title of the toggle */
62
+ title?: string;
63
+ /** Whether the toggle is checked */
64
+ checked: boolean;
65
+ /** Callback function when the toggle is checked */
66
+ onChange: (checked: boolean) => void;
67
+ /** Whether the toggle is disabled */
68
+ disabled?: boolean;
69
+ /** Position of the toggle */
70
+ togglePosition?: TogglePosition;
71
+ /** Style of the toggle */
72
+ style?: SxProps<Theme>;
73
+ };
74
+ export declare enum CheckboxType {
75
+ Radio = "Radio",
76
+ Checkbox = "Checkbox"
77
+ }
78
+ /**
79
+ * Checkbox component props
80
+ */
81
+ export type CheckboxProps = {
82
+ /** Type variant of the checkbox */
83
+ type?: CheckboxType;
84
+ /** Label of the checkbox */
85
+ label: string;
86
+ /** Whether the checkbox is checked */
87
+ checked?: boolean;
88
+ /** Whether the checkbox is disabled */
89
+ disabled?: boolean;
90
+ /** Whether the checkbox is read-only */
91
+ required?: boolean;
92
+ /** Event handler for the checkbox */
93
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
94
+ };
@@ -6,3 +6,8 @@ export var TogglePosition;
6
6
  TogglePosition["Left"] = "Left";
7
7
  TogglePosition["Right"] = "Right";
8
8
  })(TogglePosition || (TogglePosition = {}));
9
+ export var CheckboxType;
10
+ (function (CheckboxType) {
11
+ CheckboxType["Radio"] = "Radio";
12
+ CheckboxType["Checkbox"] = "Checkbox";
13
+ })(CheckboxType || (CheckboxType = {}));
@@ -2,8 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from 'react';
3
3
  import { Copy } from '@phosphor-icons/react';
4
4
  import styles from './Colors.module.css';
5
- import { Typography } from './Typography';
6
- import { TypographySize, TypographyWeight } from './types/typography';
5
+ import { Typography, TypographySize, TypographyWeight } from '../Typography';
7
6
  const ColorSwatch = ({ name, value }) => {
8
7
  const [copiedName, setCopiedName] = useState(false);
9
8
  const [copiedValue, setCopiedValue] = useState(false);
@@ -0,0 +1 @@
1
+ export * from './Colors';