@beydesign/storybook 0.0.37 → 0.0.39

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 (153) hide show
  1. package/dist/index.d.ts +10 -32
  2. package/dist/index.js +10 -43
  3. package/dist/stories/Agent/AgentCard.d.ts +3 -0
  4. package/dist/stories/{AgentCard.js → Agent/AgentCard.js} +6 -16
  5. package/dist/stories/{AgentCard.stories.js → Agent/AgentCard.stories.js} +2 -2
  6. package/dist/stories/Agent/AgentCardSkeleton.d.ts +2 -0
  7. package/dist/stories/{SkeletonLoader.js → Agent/AgentCardSkeleton.js} +1 -17
  8. package/dist/stories/{AgentCardSkeleton.stories.d.ts → Agent/AgentCardSkeleton.stories.d.ts} +1 -1
  9. package/dist/stories/{AgentCardSkeleton.stories.js → Agent/AgentCardSkeleton.stories.js} +2 -2
  10. package/dist/stories/Agent/index.d.ts +3 -0
  11. package/dist/stories/Agent/index.js +3 -0
  12. package/dist/stories/{types/agent-card.d.ts → Agent/types.d.ts} +22 -5
  13. package/dist/stories/Buttons/MainButton.d.ts +3 -0
  14. package/dist/stories/{Button.js → Buttons/MainButton.js} +3 -7
  15. package/dist/stories/{Button.stories.d.ts → Buttons/MainButton.stories.d.ts} +1 -1
  16. package/dist/stories/{Button.stories.js → Buttons/MainButton.stories.js} +3 -6
  17. package/dist/stories/Buttons/ToggleButtonGroup.d.ts +3 -0
  18. package/dist/stories/{ToggleButtonGroup.js → Buttons/ToggleButtonGroup.js} +3 -7
  19. package/dist/stories/{ToggleButtonGroup.stories.js → Buttons/ToggleButtonGroup.stories.js} +2 -2
  20. package/dist/stories/Buttons/index.d.ts +3 -0
  21. package/dist/stories/Buttons/index.js +3 -0
  22. package/dist/stories/{types/button.d.ts → Buttons/types.d.ts} +21 -3
  23. package/dist/stories/{types/button.js → Buttons/types.js} +9 -0
  24. package/dist/stories/{CreditsCard.d.ts → Credits/CreditsCard.d.ts} +1 -1
  25. package/dist/stories/{CreditsCard.js → Credits/CreditsCard.js} +3 -5
  26. package/dist/stories/{CreditsCard.stories.js → Credits/CreditsCard.stories.js} +2 -2
  27. package/dist/stories/Credits/index.d.ts +2 -0
  28. package/dist/stories/Credits/index.js +2 -0
  29. package/dist/stories/{Checkbox.d.ts → Form/Checkbox.d.ts} +1 -1
  30. package/dist/stories/{Checkbox.js → Form/Checkbox.js} +2 -3
  31. package/dist/stories/{Checkbox.stories.js → Form/Checkbox.stories.js} +2 -2
  32. package/dist/stories/Form/TextArea.d.ts +3 -0
  33. package/dist/stories/Form/TextArea.js +22 -0
  34. package/dist/stories/Form/TextArea.stories.d.ts +103 -0
  35. package/dist/stories/Form/TextArea.stories.js +88 -0
  36. package/dist/stories/Form/TextInput.d.ts +3 -0
  37. package/dist/stories/Form/TextInput.js +22 -0
  38. package/dist/stories/Form/TextInput.stories.d.ts +85 -0
  39. package/dist/stories/Form/TextInput.stories.js +74 -0
  40. package/dist/stories/Form/Toggle.d.ts +3 -0
  41. package/dist/stories/{Toggle.js → Form/Toggle.js} +2 -6
  42. package/dist/stories/{Toggle.stories.js → Form/Toggle.stories.js} +2 -2
  43. package/dist/stories/Form/index.d.ts +5 -0
  44. package/dist/stories/Form/index.js +5 -0
  45. package/dist/stories/Form/types.d.ts +94 -0
  46. package/dist/stories/{types/toggle.js → Form/types.js} +5 -0
  47. package/dist/stories/{Colors.js → Foundations/Colors.js} +1 -2
  48. package/dist/stories/Foundations/index.d.ts +1 -0
  49. package/dist/stories/Foundations/index.js +1 -0
  50. package/dist/stories/{Header.d.ts → Navigation/Header.d.ts} +1 -1
  51. package/dist/stories/{Header.js → Navigation/Header.js} +4 -6
  52. package/dist/stories/{Header.stories.js → Navigation/Header.stories.js} +2 -2
  53. package/dist/stories/{NavItem.d.ts → Navigation/NavItem.d.ts} +1 -1
  54. package/dist/stories/{NavItem.js → Navigation/NavItem.js} +4 -6
  55. package/dist/stories/{NavItem.stories.js → Navigation/NavItem.stories.js} +2 -2
  56. package/dist/stories/{Sidebar.d.ts → Navigation/Sidebar.d.ts} +1 -1
  57. package/dist/stories/{Sidebar.js → Navigation/Sidebar.js} +5 -11
  58. package/dist/stories/{Sidebar.stories.js → Navigation/Sidebar.stories.js} +2 -3
  59. package/dist/stories/Navigation/index.d.ts +4 -0
  60. package/dist/stories/Navigation/index.js +4 -0
  61. package/dist/stories/{types/sidebar.d.ts → Navigation/types.d.ts} +61 -1
  62. package/dist/stories/{types/nav-item.js → Navigation/types.js} +5 -0
  63. package/dist/stories/Typography/Typography.d.ts +3 -0
  64. package/dist/stories/{Typography.js → Typography/Typography.js} +2 -5
  65. package/dist/stories/{Typography.stories.js → Typography/Typography.stories.js} +2 -2
  66. package/dist/stories/Typography/index.d.ts +2 -0
  67. package/dist/stories/Typography/index.js +2 -0
  68. package/dist/stories/{types/typography.d.ts → Typography/types.d.ts} +0 -5
  69. package/dist/stories/UI/Avatar.d.ts +3 -0
  70. package/dist/stories/{Avatar.js → UI/Avatar.js} +4 -7
  71. package/dist/stories/{Avatar.stories.js → UI/Avatar.stories.js} +2 -2
  72. package/dist/stories/{Bagde.d.ts → UI/Badge.d.ts} +1 -1
  73. package/dist/stories/{Bagde.js → UI/Badge.js} +3 -4
  74. package/dist/stories/{Badge.stories.d.ts → UI/Badge.stories.d.ts} +1 -1
  75. package/dist/stories/{Badge.stories.js → UI/Badge.stories.js} +3 -3
  76. package/dist/stories/UI/HintBubble.d.ts +3 -0
  77. package/dist/stories/UI/HintBubble.js +28 -0
  78. package/dist/stories/UI/HintBubble.stories.d.ts +9 -0
  79. package/dist/stories/UI/HintBubble.stories.js +68 -0
  80. package/dist/stories/{Logo.d.ts → UI/Logo.d.ts} +1 -1
  81. package/dist/stories/{Logo.js → UI/Logo.js} +1 -1
  82. package/dist/stories/UI/Logo.stories.d.ts +11 -0
  83. package/dist/stories/{Logo.stories.js → UI/Logo.stories.js} +2 -2
  84. package/dist/stories/UI/Menu.d.ts +3 -0
  85. package/dist/stories/{Menu.js → UI/Menu.js} +3 -11
  86. package/dist/stories/UI/Menu.stories.d.ts +6 -0
  87. package/dist/stories/{Menu.stories.js → UI/Menu.stories.js} +1 -1
  88. package/dist/stories/UI/ProgressIndicator.d.ts +3 -0
  89. package/dist/stories/{ProgressIndicator.js → UI/ProgressIndicator.js} +2 -6
  90. package/dist/stories/{ProgressIndicator.stories.js → UI/ProgressIndicator.stories.js} +2 -2
  91. package/dist/stories/UI/SkeletonLoader.d.ts +3 -0
  92. package/dist/stories/UI/SkeletonLoader.js +19 -0
  93. package/dist/stories/UI/SkeletonLoader.stories.d.ts +8 -0
  94. package/dist/stories/UI/SkeletonLoader.stories.js +74 -0
  95. package/dist/stories/UI/index.d.ts +8 -0
  96. package/dist/stories/UI/index.js +8 -0
  97. package/dist/stories/UI/types.d.ts +205 -0
  98. package/dist/stories/UI/types.js +71 -0
  99. package/dist/utils/common.d.ts +1 -0
  100. package/dist/utils/common.js +6 -0
  101. package/dist/utils/index.d.ts +2 -0
  102. package/dist/utils/index.js +2 -0
  103. package/package.json +1 -1
  104. package/dist/stories/AgentCard.d.ts +0 -4
  105. package/dist/stories/Avatar.d.ts +0 -4
  106. package/dist/stories/Button.d.ts +0 -4
  107. package/dist/stories/Logo.stories.d.ts +0 -39
  108. package/dist/stories/Menu.d.ts +0 -4
  109. package/dist/stories/Menu.stories.d.ts +0 -43
  110. package/dist/stories/ProgressIndicator.d.ts +0 -4
  111. package/dist/stories/SkeletonLoader.d.ts +0 -47
  112. package/dist/stories/SkeletonLoader.stories.d.ts +0 -11
  113. package/dist/stories/SkeletonLoader.stories.js +0 -141
  114. package/dist/stories/Toggle.d.ts +0 -4
  115. package/dist/stories/ToggleButtonGroup.d.ts +0 -4
  116. package/dist/stories/Typography.d.ts +0 -4
  117. package/dist/stories/types/avatar.d.ts +0 -44
  118. package/dist/stories/types/avatar.js +0 -28
  119. package/dist/stories/types/badge.d.ts +0 -49
  120. package/dist/stories/types/badge.js +0 -25
  121. package/dist/stories/types/checkbox.d.ts +0 -26
  122. package/dist/stories/types/checkbox.js +0 -5
  123. package/dist/stories/types/header.d.ts +0 -25
  124. package/dist/stories/types/header.js +0 -1
  125. package/dist/stories/types/logo.d.ts +0 -30
  126. package/dist/stories/types/logo.js +0 -6
  127. package/dist/stories/types/menu.d.ts +0 -30
  128. package/dist/stories/types/menu.js +0 -1
  129. package/dist/stories/types/nav-item.d.ts +0 -41
  130. package/dist/stories/types/progress-indicator.d.ts +0 -35
  131. package/dist/stories/types/progress-indicator.js +0 -8
  132. package/dist/stories/types/sidebar.js +0 -5
  133. package/dist/stories/types/toggle-button-group.d.ts +0 -28
  134. package/dist/stories/types/toggle-button-group.js +0 -9
  135. package/dist/stories/types/toggle.d.ts +0 -32
  136. /package/dist/stories/{AgentCard.stories.d.ts → Agent/AgentCard.stories.d.ts} +0 -0
  137. /package/dist/stories/{types/agent-card.js → Agent/types.js} +0 -0
  138. /package/dist/stories/{ToggleButtonGroup.stories.d.ts → Buttons/ToggleButtonGroup.stories.d.ts} +0 -0
  139. /package/dist/stories/{CreditsCard.stories.d.ts → Credits/CreditsCard.stories.d.ts} +0 -0
  140. /package/dist/stories/{types/credits-card.d.ts → Credits/types.d.ts} +0 -0
  141. /package/dist/stories/{types/credits-card.js → Credits/types.js} +0 -0
  142. /package/dist/stories/{Checkbox.stories.d.ts → Form/Checkbox.stories.d.ts} +0 -0
  143. /package/dist/stories/{Toggle.stories.d.ts → Form/Toggle.stories.d.ts} +0 -0
  144. /package/dist/stories/{Colors.d.ts → Foundations/Colors.d.ts} +0 -0
  145. /package/dist/stories/{Colors.stories.d.ts → Foundations/Colors.stories.d.ts} +0 -0
  146. /package/dist/stories/{Colors.stories.js → Foundations/Colors.stories.js} +0 -0
  147. /package/dist/stories/{Header.stories.d.ts → Navigation/Header.stories.d.ts} +0 -0
  148. /package/dist/stories/{NavItem.stories.d.ts → Navigation/NavItem.stories.d.ts} +0 -0
  149. /package/dist/stories/{Sidebar.stories.d.ts → Navigation/Sidebar.stories.d.ts} +0 -0
  150. /package/dist/stories/{Typography.stories.d.ts → Typography/Typography.stories.d.ts} +0 -0
  151. /package/dist/stories/{types/typography.js → Typography/types.js} +0 -0
  152. /package/dist/stories/{Avatar.stories.d.ts → UI/Avatar.stories.d.ts} +0 -0
  153. /package/dist/stories/{ProgressIndicator.stories.d.ts → UI/ProgressIndicator.stories.d.ts} +0 -0
@@ -1,5 +1,5 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { TypographySize, TypographyWeight, } from './types/typography';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { TypographySize, TypographyWeight } from './types';
3
3
  export const Typography = ({ text, color, size = TypographySize.HeadingL, weight = TypographyWeight.Bold, className, style, }) => {
4
4
  const getTypographySizeToken = () => {
5
5
  let sizeLc = size?.toLowerCase() || '';
@@ -50,6 +50,3 @@ export const Typography = ({ text, color, size = TypographySize.HeadingL, weight
50
50
  ...style,
51
51
  }, children: text }));
52
52
  };
53
- export const Components = () => {
54
- return (_jsxs("div", { style: { padding: '20px' }, children: [_jsx("h1", { children: "Typography" }), _jsx("div", { style: { display: 'flex', gap: '1rem', flexDirection: 'column' }, children: _jsxs("div", { children: [_jsx("h2", { children: "Size: Xl (HeadingXL)" }), _jsx(Typography, { text: "HeadingXL", size: TypographySize.HeadingXL, weight: TypographyWeight.Bold })] }) })] }));
55
- };
@@ -1,7 +1,7 @@
1
1
  import { Typography } from './Typography';
2
- import { TypographySize, TypographyWeight } from './types/typography';
2
+ import { TypographySize, TypographyWeight } from './types';
3
3
  const meta = {
4
- title: 'Design System/Foundations/Typography',
4
+ title: 'Design System/Foundations/Typography/Typography',
5
5
  component: Typography,
6
6
  parameters: {
7
7
  layout: 'centered',
@@ -0,0 +1,2 @@
1
+ export * from './Typography';
2
+ export * from './types';
@@ -0,0 +1,2 @@
1
+ export * from './Typography';
2
+ export * from './types';
@@ -40,8 +40,3 @@ export interface TypographyProps {
40
40
  /** Style object for additional styling */
41
41
  style?: React.CSSProperties;
42
42
  }
43
- /**
44
- * Props for the Components wrapper
45
- */
46
- export interface ComponentsProps {
47
- }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { AvatarProps } from './types';
3
+ export declare const Avatar: React.FC<AvatarProps>;
@@ -1,9 +1,9 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { AvatarImage, AvatarSize, AvatarStyle, getInitials, } from './types/avatar';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { AvatarImage, AvatarSize, AvatarStyle } from './types';
3
3
  import { Avatar as MuiAvatar, } from '@mui/material';
4
4
  import { User } from '@phosphor-icons/react';
5
- import { Typography } from './Typography';
6
- import { TypographySize, TypographyWeight } from './types/typography';
5
+ import { Typography, TypographySize, TypographyWeight } from '../Typography';
6
+ import { getInitials } from '../../utils';
7
7
  export const Avatar = ({ avatarStyle = AvatarStyle.Placeholder, border = false, image = AvatarImage, size = AvatarSize.xxl, style: customStyle, text = 'Scarlett Johansson', }) => {
8
8
  const getDimensions = (avatarSize) => {
9
9
  switch (avatarSize) {
@@ -74,6 +74,3 @@ export const Avatar = ({ avatarStyle = AvatarStyle.Placeholder, border = false,
74
74
  return (_jsx(MuiAvatar, { ...props, children: _jsx(User, { size: dimensions / 2, weight: "bold" }) }));
75
75
  }
76
76
  };
77
- export const Components = () => {
78
- return (_jsxs("div", { style: { padding: '20px' }, children: [_jsx("h1", { children: "Avatars" }), _jsxs("div", { style: { display: 'flex', gap: '1rem', flexDirection: 'column' }, children: [_jsxs("div", { children: [_jsx("h2", { children: "Size: sm, Avatar Style: Letters" }), _jsx(Avatar, { text: "Scarlett Johansson", size: AvatarSize.sm, avatarStyle: AvatarStyle.Letters })] }), _jsxs("div", { children: [_jsx("h2", { children: "Size: sm, Avatar Style: Picture" }), _jsx(Avatar, { image: AvatarImage, size: AvatarSize.sm, avatarStyle: AvatarStyle.Picture })] }), _jsxs("div", { children: [_jsx("h2", { children: "Size: sm, Avatar Style: Placeholder" }), _jsx(Avatar, { size: AvatarSize.sm, avatarStyle: AvatarStyle.Placeholder })] })] })] }));
79
- };
@@ -1,7 +1,7 @@
1
1
  import { Avatar } from './Avatar';
2
- import { AvatarImage, AvatarSize, AvatarStyle } from './types/avatar';
2
+ import { AvatarStyle, AvatarSize, AvatarImage } from './types';
3
3
  const meta = {
4
- title: 'Design System/Components/Avatar',
4
+ title: 'Design System/Components/UI/Avatar',
5
5
  component: Avatar,
6
6
  parameters: {
7
7
  layout: 'centered',
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import { BadgeProps } from './types/badge';
2
+ import { BadgeProps } from './types';
3
3
  export declare const Badge: React.FC<BadgeProps>;
@@ -1,9 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { BadgeColor, BadgeSize } from './types/badge';
2
+ import { BadgeColor, BadgeSize } from './types';
3
3
  import { Box } from '@mui/material';
4
- import { Typography } from './Typography';
5
- import { TypographySize, TypographyWeight } from './types/typography';
6
- import { getIconComponent } from '../utils/icon';
4
+ import { Typography, TypographySize, TypographyWeight } from '../Typography';
5
+ import { getIconComponent } from '../../utils';
7
6
  export const Badge = ({ color = BadgeColor.Default, size = BadgeSize.md, text, style: customStyle, icon = 'Cactus', showIcon = false, fill = true, }) => {
8
7
  const getBackgroundColor = (color) => {
9
8
  switch (color) {
@@ -1,5 +1,5 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
- import { Badge } from './Bagde';
2
+ import { Badge } from './Badge';
3
3
  declare const meta: Meta<typeof Badge>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof Badge>;
@@ -1,7 +1,7 @@
1
- import { Badge } from './Bagde';
2
- import { BadgeColor, BadgeSize } from './types/badge';
1
+ import { Badge } from './Badge';
2
+ import { BadgeColor, BadgeSize } from './types';
3
3
  const meta = {
4
- title: 'Design System/Components/Badge',
4
+ title: 'Design System/Components/UI/Badge',
5
5
  component: Badge,
6
6
  parameters: {
7
7
  layout: 'centered',
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { HintBubbleProps } from './types';
3
+ export declare const HintBubble: React.FC<HintBubbleProps>;
@@ -0,0 +1,28 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Box } from '@mui/material';
3
+ import { Typography, TypographySize, TypographyWeight } from '../Typography';
4
+ import { HintBubbleSize, HintBubbleType } from './types';
5
+ export const HintBubble = ({ text, size = HintBubbleSize.md, type = HintBubbleType.Info, }) => {
6
+ const getPadding = () => {
7
+ if (size === HintBubbleSize.sm) {
8
+ return 'var(--spacing-tokens-size-in-px-spacing-spacing-md) var(--spacing-tokens-size-in-px-spacing-spacing-lg)';
9
+ }
10
+ return 'var(--spacing-tokens-size-in-px-spacing-spacing-lg)';
11
+ };
12
+ const getTypographySize = () => {
13
+ if (size === HintBubbleSize.sm)
14
+ return TypographySize.TextXS;
15
+ return TypographySize.TextM;
16
+ };
17
+ const getTypographyWeight = () => {
18
+ if (size === HintBubbleSize.sm)
19
+ return TypographyWeight.Regular;
20
+ return TypographyWeight.Medium;
21
+ };
22
+ const getTypographyColor = () => {
23
+ if (type === HintBubbleType.Error)
24
+ return 'var(--colors-light-text-text-error)';
25
+ return 'var(--colors-light-text-text-title)';
26
+ };
27
+ return (_jsx(Box, { borderRadius: 'var(--spacing-tokens-size-in-px-spacing-spacing-md)', bgcolor: 'var(--colors-light-background-bg-card-highlight)', padding: getPadding(), gap: '10px', children: _jsx(Typography, { text: text, size: getTypographySize(), weight: getTypographyWeight(), color: getTypographyColor() }) }));
28
+ };
@@ -0,0 +1,9 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { HintBubble } from './HintBubble';
3
+ declare const meta: Meta<typeof HintBubble>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof HintBubble>;
6
+ export declare const Default: Story;
7
+ export declare const Small: Story;
8
+ export declare const Error: Story;
9
+ export declare const SmallError: Story;
@@ -0,0 +1,68 @@
1
+ import { HintBubble } from './HintBubble';
2
+ import { HintBubbleSize, HintBubbleType } from './types';
3
+ const meta = {
4
+ title: 'Design System/Components/UI/HintBubble',
5
+ component: HintBubble,
6
+ parameters: {
7
+ layout: 'centered',
8
+ design: {
9
+ type: 'figspec',
10
+ url: 'https://www.figma.com/design/mIhjz2yJjcpLlIqw6oUivt/Beyond-Presence?node-id=4717-3779&t=8I9WicYVdJD1jCB1-1',
11
+ },
12
+ },
13
+ tags: ['autodocs'],
14
+ argTypes: {
15
+ size: {
16
+ control: 'select',
17
+ options: Object.values(HintBubbleSize),
18
+ description: 'Size of the hint bubble',
19
+ table: {
20
+ type: { summary: 'string' },
21
+ },
22
+ },
23
+ type: {
24
+ control: 'select',
25
+ options: Object.values(HintBubbleType),
26
+ description: 'Type of the hint bubble',
27
+ table: {
28
+ type: { summary: 'string' },
29
+ },
30
+ },
31
+ text: {
32
+ control: 'text',
33
+ description: 'Text of the hint bubble',
34
+ table: {
35
+ type: { summary: 'string' },
36
+ },
37
+ },
38
+ },
39
+ };
40
+ export default meta;
41
+ export const Default = {
42
+ args: {
43
+ text: 'This is a hint bubble',
44
+ type: HintBubbleType.Info,
45
+ size: HintBubbleSize.md,
46
+ },
47
+ };
48
+ export const Small = {
49
+ args: {
50
+ text: 'This is a hint bubble',
51
+ type: HintBubbleType.Info,
52
+ size: HintBubbleSize.sm,
53
+ },
54
+ };
55
+ export const Error = {
56
+ args: {
57
+ text: 'This is an error hint bubble',
58
+ type: HintBubbleType.Error,
59
+ size: HintBubbleSize.md,
60
+ },
61
+ };
62
+ export const SmallError = {
63
+ args: {
64
+ text: 'This is an error hint bubble',
65
+ type: HintBubbleType.Error,
66
+ size: HintBubbleSize.sm,
67
+ },
68
+ };
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import { LogoProps } from './types/logo';
2
+ import { LogoProps } from './types';
3
3
  export declare const Logo: React.FC<LogoProps>;
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { LogoVariant } from './types/logo';
2
+ import { LogoVariant } from './types';
3
3
  export const Logo = ({ variant = LogoVariant.Horizontal, color = 'var(--colors-light-background-bg-brand)', gradient, className = '', svgUrl, }) => {
4
4
  const logoColor = gradient ? 'url(#gradient)' : color;
5
5
  if (svgUrl) {
@@ -0,0 +1,11 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { Logo } from './Logo';
3
+ declare const meta: Meta<typeof Logo>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Horizontal: Story;
7
+ export declare const Vertical: Story;
8
+ export declare const Icon: Story;
9
+ export declare const CustomColor: Story;
10
+ export declare const WithGradient: Story;
11
+ export declare const ExternalSvg: Story;
@@ -1,7 +1,7 @@
1
1
  import { Logo } from './Logo';
2
- import { LogoVariant } from './types/logo';
2
+ import { LogoVariant } from './types';
3
3
  const meta = {
4
- title: 'Design System/Foundations/Logo',
4
+ title: 'Design System/Foundations/UI/Logo',
5
5
  component: Logo,
6
6
  parameters: {
7
7
  layout: 'centered',
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { MenuProps } from './types';
3
+ export declare const Menu: React.FC<MenuProps>;
@@ -1,11 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { MenuItem as MuiMenuItem, Menu as MuiMenu, } from '@mui/material';
3
3
  import { Fragment, useState } from 'react';
4
- import { MainButton } from './Button';
5
- import { ButtonDisplayMode, ButtonHierarchy, ButtonType } from './types/button';
6
- import { Typography } from './Typography';
7
- import { TypographySize, TypographyWeight } from './types/typography';
8
- import { getIconComponent } from '../utils/icon';
4
+ import { MainButton, ButtonDisplayMode, ButtonHierarchy, ButtonType, } from '../Buttons';
5
+ import { Typography, TypographySize, TypographyWeight } from '../Typography';
6
+ import { getIconComponent } from '../../utils';
9
7
  export const Menu = ({ icon = 'DotsThree', items, style, }) => {
10
8
  const [anchorEl, setAnchorEl] = useState(null);
11
9
  const open = Boolean(anchorEl);
@@ -49,9 +47,3 @@ export const Menu = ({ icon = 'DotsThree', items, style, }) => {
49
47
  }
50
48
  }) })] }));
51
49
  };
52
- export const Components = () => {
53
- return (_jsxs("div", { style: { padding: '20px' }, children: [_jsx("h1", { children: "Menu" }), _jsx("div", { style: { display: 'flex', gap: '1rem', flexDirection: 'column' }, children: _jsx(Menu, { icon: "DotsThree", items: [
54
- { label: 'Edit', onClick: () => { }, icon: 'Pencil' },
55
- { label: 'Delete', onClick: () => { }, icon: 'Trash' },
56
- ] }) })] }));
57
- };
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { Menu } from './Menu';
3
+ declare const meta: Meta<typeof Menu>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
@@ -1,6 +1,6 @@
1
1
  import { Menu } from './Menu';
2
2
  const meta = {
3
- title: 'Design System/Components/Menu',
3
+ title: 'Design System/Components/UI/Menu',
4
4
  component: Menu,
5
5
  parameters: {
6
6
  layout: 'centered',
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { ProgressIndicatorProps } from './types';
3
+ export declare const ProgressIndicator: React.FC<ProgressIndicatorProps>;
@@ -1,8 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { ProgressIndicatorMode, } from './types/progress-indicator';
2
+ import { ProgressIndicatorMode } from './types';
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 ProgressIndicator = ({ mode = ProgressIndicatorMode.Value, currentValue = 40, maxValue = 100, fillColor = 'var(--colors-light-background-bg-brand)', backgroundColor = 'var(--colors-light-background-bg-white)', text = 'used', textColor = 'var(--colors-light-text-text-primary)', style, }) => {
7
6
  let errorText = '';
8
7
  const calculateFill = () => {
@@ -35,6 +34,3 @@ export const ProgressIndicator = ({ mode = ProgressIndicatorMode.Value, currentV
35
34
  }
36
35
  return (_jsxs(Box, { display: "flex", flexDirection: mode === ProgressIndicatorMode.Value ? 'column' : 'row', justifyContent: 'space-between', alignItems: mode === ProgressIndicatorMode.Value ? 'flex-end' : 'center', gap: 'var(--spacing-tokens-size-in-px-spacing-spacing-md)', sx: style, minWidth: 200, children: [mode === ProgressIndicatorMode.Value && (_jsx(Typography, { text: `${currentValue} / ${maxValue} ${text}`, size: TypographySize.TextXS, weight: TypographyWeight.Regular, color: textColor })), _jsx(Box, { display: "flex", flexGrow: 1, flexDirection: "row", alignItems: "center", borderRadius: '4px', sx: { backgroundColor, overflow: 'hidden' }, height: '4px', width: '100%', children: _jsx(Box, { height: '100%', borderRadius: '4px', sx: { backgroundColor: fillColor, width: `${calculateFill()}%` } }) }), mode === ProgressIndicatorMode.Percentage && (_jsx(Typography, { text: `${currentValue}%`, size: TypographySize.TextXS, weight: TypographyWeight.Regular, color: textColor }))] }));
37
36
  };
38
- export const Components = () => {
39
- return (_jsxs("div", { style: { padding: '20px' }, children: [_jsx("h1", { children: "Progress Indicator" }), _jsx("div", { style: { display: 'flex', gap: '1rem', flexDirection: 'column' } })] }));
40
- };
@@ -1,7 +1,7 @@
1
1
  import { ProgressIndicator } from './ProgressIndicator';
2
- import { ProgressIndicatorMode } from './types/progress-indicator';
2
+ import { ProgressIndicatorMode } from './types';
3
3
  const meta = {
4
- title: 'Design System/Components/ProgressIndicator',
4
+ title: 'Design System/Components/UI/ProgressIndicator',
5
5
  component: ProgressIndicator,
6
6
  parameters: {
7
7
  layout: 'centered',
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { SkeletonLoaderProps } from './types';
3
+ export declare const SkeletonLoader: React.FC<SkeletonLoaderProps>;
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Box } from '@mui/material';
3
+ export const SkeletonLoader = ({ width = '100%', height = '100%', borderRadius = 'var(--spacing-tokens-size-in-px-spacing-sm)', animationDuration = 1.5, style, }) => {
4
+ return (_jsx(Box, { width: width, height: height, borderRadius: borderRadius, sx: {
5
+ background: 'linear-gradient(90deg, var(--colors-light-background-bg-element) 25%, var(--colors-light-background-bg-component) 50%, var(--colors-light-background-bg-element) 75%)',
6
+ backgroundSize: '200% 100%',
7
+ animation: `shimmer ${animationDuration}s infinite linear`,
8
+ ...style,
9
+ }, children: _jsx("style", { children: `
10
+ @keyframes shimmer {
11
+ 0% {
12
+ background-position: 200% 0;
13
+ }
14
+ 100% {
15
+ background-position: -200% 0;
16
+ }
17
+ }
18
+ ` }) }));
19
+ };
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { SkeletonLoader } from './SkeletonLoader';
3
+ declare const meta: Meta<typeof SkeletonLoader>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof SkeletonLoader>;
6
+ export declare const Default: Story;
7
+ export declare const CustomAnimation: Story;
8
+ export declare const RoundedSkeleton: Story;
@@ -0,0 +1,74 @@
1
+ import { SkeletonLoader } from './SkeletonLoader';
2
+ const meta = {
3
+ title: 'Design System/Components/UI/SkeletonLoader',
4
+ component: SkeletonLoader,
5
+ parameters: {
6
+ layout: 'centered',
7
+ },
8
+ tags: ['autodocs'],
9
+ argTypes: {
10
+ width: {
11
+ control: 'text',
12
+ description: 'Width of the skeleton',
13
+ table: {
14
+ type: { summary: 'string | number' },
15
+ defaultValue: { summary: '100%' },
16
+ },
17
+ },
18
+ height: {
19
+ control: 'text',
20
+ description: 'Height of the skeleton',
21
+ table: {
22
+ type: { summary: 'string | number' },
23
+ defaultValue: { summary: '100%' },
24
+ },
25
+ },
26
+ borderRadius: {
27
+ control: 'text',
28
+ description: 'Border radius of the skeleton',
29
+ table: {
30
+ type: { summary: 'string' },
31
+ defaultValue: {
32
+ summary: 'var(--spacing-tokens-size-in-px-spacing-spacing-sm)',
33
+ },
34
+ },
35
+ },
36
+ animationDuration: {
37
+ control: 'number',
38
+ description: 'Animation duration in seconds',
39
+ table: {
40
+ type: { summary: 'number' },
41
+ defaultValue: { summary: '1.5' },
42
+ },
43
+ },
44
+ style: {
45
+ control: 'object',
46
+ description: 'Custom style for the skeleton',
47
+ table: {
48
+ type: { summary: 'React.CSSProperties' },
49
+ defaultValue: { summary: 'undefined' },
50
+ },
51
+ },
52
+ },
53
+ };
54
+ export default meta;
55
+ export const Default = {
56
+ args: {
57
+ width: 200,
58
+ height: 100,
59
+ },
60
+ };
61
+ export const CustomAnimation = {
62
+ args: {
63
+ width: 200,
64
+ height: 100,
65
+ animationDuration: 3,
66
+ },
67
+ };
68
+ export const RoundedSkeleton = {
69
+ args: {
70
+ width: 100,
71
+ height: 100,
72
+ borderRadius: '50%',
73
+ },
74
+ };
@@ -0,0 +1,8 @@
1
+ export * from './Badge';
2
+ export * from './Avatar';
3
+ export * from './HintBubble';
4
+ export * from './Logo';
5
+ export * from './Menu';
6
+ export * from './ProgressIndicator';
7
+ export * from './SkeletonLoader';
8
+ export * from './types';
@@ -0,0 +1,8 @@
1
+ export * from './Badge';
2
+ export * from './Avatar';
3
+ export * from './HintBubble';
4
+ export * from './Logo';
5
+ export * from './Menu';
6
+ export * from './ProgressIndicator';
7
+ export * from './SkeletonLoader';
8
+ export * from './types';