@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
@@ -0,0 +1,88 @@
1
+ import { TextArea } from './TextArea';
2
+ const meta = {
3
+ title: 'Design System/Components/Form/TextArea',
4
+ component: TextArea,
5
+ parameters: {
6
+ layout: 'centered',
7
+ },
8
+ tags: ['autodocs'],
9
+ argTypes: {
10
+ label: {
11
+ control: 'text',
12
+ description: 'The label of the text input',
13
+ table: {
14
+ type: { summary: 'string' },
15
+ },
16
+ },
17
+ value: {
18
+ control: 'text',
19
+ description: 'The value of the text input',
20
+ table: {
21
+ type: { summary: 'string' },
22
+ },
23
+ },
24
+ placeholder: {
25
+ control: 'text',
26
+ description: 'The placeholder of the text input',
27
+ table: {
28
+ type: { summary: 'string' },
29
+ },
30
+ },
31
+ hintText: {
32
+ control: 'text',
33
+ description: 'The hint text of the text input',
34
+ table: {
35
+ type: { summary: 'string' },
36
+ },
37
+ },
38
+ errorText: {
39
+ control: 'text',
40
+ description: 'The error text of the text input',
41
+ table: {
42
+ type: { summary: 'string' },
43
+ },
44
+ },
45
+ disabled: {
46
+ control: 'boolean',
47
+ description: 'Whether the text input is disabled',
48
+ table: {
49
+ type: { summary: 'boolean' },
50
+ },
51
+ },
52
+ onChange: {
53
+ description: 'The onChange function of the text input',
54
+ table: {
55
+ type: { summary: 'function' },
56
+ },
57
+ },
58
+ maxLength: {
59
+ control: 'number',
60
+ description: 'The max length of the text input',
61
+ table: {
62
+ type: { summary: 'number' },
63
+ },
64
+ },
65
+ showMaxLengthIndicator: {
66
+ control: 'boolean',
67
+ description: 'Whether to show the max length indicator',
68
+ table: {
69
+ type: { summary: 'boolean' },
70
+ },
71
+ },
72
+ numberOfRows: {
73
+ control: 'number',
74
+ description: 'The number of rows of the text input',
75
+ table: {
76
+ type: { summary: 'number' },
77
+ },
78
+ },
79
+ },
80
+ };
81
+ export default meta;
82
+ export const Default = {
83
+ args: {
84
+ label: "Agent's name",
85
+ value: 'Anna',
86
+ onChange: () => { },
87
+ },
88
+ };
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { TextInputProps } from './types';
3
+ export declare const TextInput: React.FC<TextInputProps>;
@@ -0,0 +1,22 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import { Box } from '@mui/material';
4
+ import { Typography, TypographySize, TypographyWeight } from '../Typography';
5
+ export const TextInput = ({ label, value, onChange, placeholder, hintText, errorText, disabled, trailingText, }) => {
6
+ const [focused, setFocused] = useState(false);
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
8
+ ? 'none'
9
+ : '1px solid var(--colors-light-border-border-component)', overflow: 'hidden', borderRadius: 'var(--spacing-tokens-size-in-px-spacing-spacing-xs)', children: [_jsx(Box, { display: 'flex', flexDirection: 'row', padding: 'var(--spacing-tokens-size-in-px-spacing-spacing-lg)', width: '100%', borderRadius: 'var(--spacing-tokens-size-in-px-spacing-spacing-xs) 0 0 var(--spacing-tokens-size-in-px-spacing-spacing-xs)', border: `${errorText
10
+ ? '1px solid var(--colors-light-border-border-error)'
11
+ : focused
12
+ ? '1px solid var(--colors-light-border-border-component-active)'
13
+ : 'transparent'}`, children: _jsx("input", { type: "text", value: value, onChange: (e) => onChange(e.target.value), placeholder: placeholder, disabled: disabled, style: {
14
+ border: 'none',
15
+ outline: 'none',
16
+ width: '100%',
17
+ color: disabled
18
+ ? 'var(--colors-light-text-text-disabled)'
19
+ : 'var(--colors-light-text-text-title)',
20
+ backgroundColor: 'transparent',
21
+ }, onFocus: () => setFocused(true), onBlur: () => setFocused(false) }) }), trailingText && (_jsx(Box, { display: 'flex', alignItems: 'center', height: '100%', padding: 'var(--spacing-tokens-size-in-px-spacing-spacing-lg)', borderLeft: '1px solid var(--colors-light-border-border-component)', children: _jsx(Typography, { text: trailingText, size: TypographySize.TextS, weight: TypographyWeight.Regular, color: 'var(--colors-light-text-text-paragraph)' }) }))] }), errorText && (_jsx(Typography, { text: errorText, size: TypographySize.TextS, weight: TypographyWeight.Regular, color: 'var(--colors-light-text-text-error)' })), hintText && !errorText && (_jsx(Typography, { text: hintText, size: TypographySize.TextS, weight: TypographyWeight.Regular, color: 'var(--colors-light-text-text-subtle)' }))] }) }));
22
+ };
@@ -0,0 +1,85 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: import("react").FC<import("./types").TextInputProps>;
5
+ parameters: {
6
+ layout: string;
7
+ };
8
+ tags: string[];
9
+ argTypes: {
10
+ label: {
11
+ control: "text";
12
+ description: string;
13
+ table: {
14
+ type: {
15
+ summary: string;
16
+ };
17
+ };
18
+ };
19
+ value: {
20
+ control: "text";
21
+ description: string;
22
+ table: {
23
+ type: {
24
+ summary: string;
25
+ };
26
+ };
27
+ };
28
+ placeholder: {
29
+ control: "text";
30
+ description: string;
31
+ table: {
32
+ type: {
33
+ summary: string;
34
+ };
35
+ };
36
+ };
37
+ hintText: {
38
+ control: "text";
39
+ description: string;
40
+ table: {
41
+ type: {
42
+ summary: string;
43
+ };
44
+ };
45
+ };
46
+ errorText: {
47
+ control: "text";
48
+ description: string;
49
+ table: {
50
+ type: {
51
+ summary: string;
52
+ };
53
+ };
54
+ };
55
+ disabled: {
56
+ control: "boolean";
57
+ description: string;
58
+ table: {
59
+ type: {
60
+ summary: string;
61
+ };
62
+ };
63
+ };
64
+ trailingText: {
65
+ control: "text";
66
+ description: string;
67
+ table: {
68
+ type: {
69
+ summary: string;
70
+ };
71
+ };
72
+ };
73
+ onChange: {
74
+ description: string;
75
+ table: {
76
+ type: {
77
+ summary: string;
78
+ };
79
+ };
80
+ };
81
+ };
82
+ };
83
+ export default meta;
84
+ type Story = StoryObj<typeof meta>;
85
+ export declare const Default: Story;
@@ -0,0 +1,74 @@
1
+ import { TextInput } from './TextInput';
2
+ const meta = {
3
+ title: 'Design System/Components/Form/TextInput',
4
+ component: TextInput,
5
+ parameters: {
6
+ layout: 'centered',
7
+ },
8
+ tags: ['autodocs'],
9
+ argTypes: {
10
+ label: {
11
+ control: 'text',
12
+ description: 'The label of the text input',
13
+ table: {
14
+ type: { summary: 'string' },
15
+ },
16
+ },
17
+ value: {
18
+ control: 'text',
19
+ description: 'The value of the text input',
20
+ table: {
21
+ type: { summary: 'string' },
22
+ },
23
+ },
24
+ placeholder: {
25
+ control: 'text',
26
+ description: 'The placeholder of the text input',
27
+ table: {
28
+ type: { summary: 'string' },
29
+ },
30
+ },
31
+ hintText: {
32
+ control: 'text',
33
+ description: 'The hint text of the text input',
34
+ table: {
35
+ type: { summary: 'string' },
36
+ },
37
+ },
38
+ errorText: {
39
+ control: 'text',
40
+ description: 'The error text of the text input',
41
+ table: {
42
+ type: { summary: 'string' },
43
+ },
44
+ },
45
+ disabled: {
46
+ control: 'boolean',
47
+ description: 'Whether the text input is disabled',
48
+ table: {
49
+ type: { summary: 'boolean' },
50
+ },
51
+ },
52
+ trailingText: {
53
+ control: 'text',
54
+ description: 'The trailing text of the text input',
55
+ table: {
56
+ type: { summary: 'string' },
57
+ },
58
+ },
59
+ onChange: {
60
+ description: 'The onChange function of the text input',
61
+ table: {
62
+ type: { summary: 'function' },
63
+ },
64
+ },
65
+ },
66
+ };
67
+ export default meta;
68
+ export const Default = {
69
+ args: {
70
+ label: "Agent's name",
71
+ value: 'Anna',
72
+ onChange: () => { },
73
+ },
74
+ };
@@ -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';
@@ -0,0 +1 @@
1
+ export * from './Colors';
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import { HeaderProps } from './types/header';
2
+ import { HeaderProps } from './types';
3
3
  export declare const Header: React.FC<HeaderProps>;
@@ -1,11 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box } from '@mui/material';
3
- import { MainButton } from './Button';
4
- import { ButtonHierarchy, ButtonSize } from './types/button';
5
- import { Typography } from './Typography';
6
- import { TypographySize, TypographyWeight } from './types/typography';
7
- import { Avatar } from './Avatar';
8
- import { AvatarSize } from './types/avatar';
3
+ import { MainButton } from '../Buttons';
4
+ import { ButtonHierarchy, ButtonSize } from '../Buttons';
5
+ import { Typography, TypographySize, TypographyWeight } from '../Typography';
6
+ import { Avatar, AvatarSize } from '../UI';
9
7
  export const Header = ({ title = 'Beyond Presence', email, avatarProps, backButtonText = 'Back', onBackClick, onLogoutClick, className, }) => {
10
8
  return (_jsxs(Box, { className: className, display: 'flex', flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', borderBottom: '1px solid var(--primitives-desktop-primary-gray-200)', bgcolor: 'var(--colors-light-background-bg-white)', paddingX: 'var(--spacing-tokens-size-in-px-spacing-spacing-4xl)', height: 'var( --spacing-tokens-size-in-px-spacing-spacing-7xl)', children: [onBackClick ? (_jsx(MainButton, { text: backButtonText, hierarchy: ButtonHierarchy.Tetriary, showLeadingIcon: true, leadingIcon: 'ArrowLeft', onClick: onBackClick })) : (_jsx(Typography, { text: title, size: TypographySize.HeadingS, weight: TypographyWeight.SemiBold })), _jsxs(Box, { display: 'flex', flexDirection: 'row', alignItems: 'center', gap: '8px', children: [_jsxs(Box, { display: 'flex', flexDirection: 'column', alignItems: 'flex-end', justifyContent: 'space-between', children: [_jsx(Typography, { text: email, size: TypographySize.TextS, weight: TypographyWeight.SemiBold }), _jsx(MainButton, { text: 'Log Out', size: ButtonSize.sm, hierarchy: ButtonHierarchy.Tetriary, onClick: onLogoutClick, style: { paddingInline: '0px', paddingBlock: '0.1rem' } })] }), _jsx(Avatar, { ...avatarProps, size: AvatarSize.md })] })] }));
11
9
  };
@@ -1,8 +1,8 @@
1
1
  import { Header } from './Header';
2
- import { AvatarStyle } from './types/avatar';
2
+ import { AvatarStyle } from '../UI';
3
3
  import styles from './Header.module.css';
4
4
  const meta = {
5
- title: 'Design System/Components/Header',
5
+ title: 'Design System/Components/Navigation/Header',
6
6
  component: Header,
7
7
  parameters: {
8
8
  layout: 'centered',
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import { NavItemProps } from './types/nav-item';
2
+ import { NavItemProps } from './types';
3
3
  export declare const NavItem: React.FC<NavItemProps>;
@@ -1,12 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import styled from '@emotion/styled';
3
- import { NavItemState, NavItemSize } from './types/nav-item';
4
- import { Typography } from './Typography';
5
- import { TypographySize, TypographyWeight } from './types/typography';
6
- import { Badge } from './Bagde';
7
- import { BadgeColor, BadgeSize } from './types/badge';
3
+ import { NavItemState, NavItemSize } from './types';
4
+ import { Typography, TypographySize, TypographyWeight } from '../Typography';
5
+ import { Badge, BadgeColor, BadgeSize } from '../UI';
8
6
  import { Box } from '@mui/material';
9
- import { getIconComponent } from '../utils/icon';
7
+ import { getIconComponent } from '../../utils';
10
8
  const StyledNavItem = styled.div `
11
9
  display: flex;
12
10
  flex-direction: row;
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { NavItem } from './NavItem';
3
- import { NavItemState, NavItemSize } from './types/nav-item';
3
+ import { NavItemState, NavItemSize } from './types';
4
4
  const meta = {
5
- title: 'Design System/Components/NavItem',
5
+ title: 'Design System/Components/Navigation/NavItem',
6
6
  component: NavItem,
7
7
  parameters: {
8
8
  layout: 'centered',
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import { SidebarProps } from './types/sidebar';
2
+ import { SidebarProps } from './types';
3
3
  export declare const Sidebar: React.FC<SidebarProps>;
@@ -3,17 +3,11 @@ import React, { useState } from 'react';
3
3
  import styled from '@emotion/styled';
4
4
  import { Box } from '@mui/material';
5
5
  import { NavItem } from './NavItem';
6
- import { Logo } from './Logo';
7
- import { CreditsCard } from './CreditsCard';
8
- import { SidebarSize } from './types/sidebar';
9
- import { NavItemState, NavItemSize } from './types/nav-item';
10
- import { LogoVariant } from './types/logo';
11
- import { CreditsCardSize } from './types/credits-card';
12
- import { Typography } from './Typography';
13
- import { TypographySize, TypographyWeight } from './types/typography';
14
- import { MainButton } from './Button';
15
- import { ButtonDisplayMode, ButtonHierarchy, ButtonShape, } from './types/button';
16
- import { ButtonSize } from './types/button';
6
+ import { Logo, LogoVariant } from '../UI';
7
+ import { CreditsCard, CreditsCardSize } from '../Credits';
8
+ import { SidebarSize, NavItemSize, NavItemState, } from './types';
9
+ import { Typography, TypographySize, TypographyWeight } from '../Typography';
10
+ import { MainButton, ButtonDisplayMode, ButtonHierarchy, ButtonShape, ButtonSize, } from '../Buttons';
17
11
  const StyledSidebar = styled.div `
18
12
  display: flex;
19
13
  flex-direction: column;
@@ -1,10 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Sidebar } from './Sidebar';
3
- import { SidebarSize } from './types/sidebar';
4
- import { NavItemState } from './types/nav-item';
3
+ import { SidebarSize, NavItemState } from './types';
5
4
  import { Box, Stack, Typography } from '@mui/material';
6
5
  const meta = {
7
- title: 'Design System/Components/Sidebar',
6
+ title: 'Design System/Components/Navigation/Sidebar',
8
7
  component: Sidebar,
9
8
  parameters: {
10
9
  layout: 'fullscreen',
@@ -0,0 +1,4 @@
1
+ export * from './Header';
2
+ export * from './NavItem';
3
+ export * from './Sidebar';
4
+ export * from './types';
@@ -0,0 +1,4 @@
1
+ export * from './Header';
2
+ export * from './NavItem';
3
+ export * from './Sidebar';
4
+ export * from './types';
@@ -1,4 +1,64 @@
1
- import { IconName } from '../../utils/icon';
1
+ import { IconName } from '../../utils';
2
+ import { AvatarProps } from '../UI';
3
+ /**
4
+ * Header component props
5
+ */
6
+ export type HeaderProps = {
7
+ /** Title of the header */
8
+ title: string;
9
+ /** Email of the logged in user */
10
+ email: string;
11
+ /** Avatar props */
12
+ avatarProps: AvatarProps;
13
+ /** Text of the back button */
14
+ backButtonText?: string;
15
+ /** CSS class name for additional styling */
16
+ className?: string;
17
+ /** Callback function to handle back button click */
18
+ onBackClick?: () => void;
19
+ /** Callback function to handle logout button click */
20
+ onLogoutClick?: () => void;
21
+ };
22
+ export declare enum NavItemState {
23
+ Default = "default",
24
+ Active = "active",
25
+ Disabled = "disabled"
26
+ }
27
+ export declare enum NavItemSize {
28
+ Expanded = "expanded",
29
+ Collapsed = "collapsed"
30
+ }
31
+ export interface NavItemProps {
32
+ /**
33
+ * The text to display in the navigation item
34
+ */
35
+ text: string;
36
+ /**
37
+ * The icon to display before the text
38
+ * Uses Phosphor Icons
39
+ */
40
+ icon: IconName;
41
+ /**
42
+ * The current state of the navigation item
43
+ */
44
+ state?: NavItemState;
45
+ /**
46
+ * The size of the navigation item
47
+ */
48
+ size?: NavItemSize;
49
+ /**
50
+ * Whether to show a "Coming Soon" badge
51
+ */
52
+ showBadge?: boolean;
53
+ /**
54
+ * Optional click handler
55
+ */
56
+ onClick?: () => void;
57
+ /**
58
+ * Optional className for additional styling
59
+ */
60
+ className?: string;
61
+ }
2
62
  export declare enum SidebarSize {
3
63
  Expanded = "expanded",
4
64
  Collapsed = "collapsed"
@@ -9,3 +9,8 @@ export var NavItemSize;
9
9
  NavItemSize["Expanded"] = "expanded";
10
10
  NavItemSize["Collapsed"] = "collapsed";
11
11
  })(NavItemSize || (NavItemSize = {}));
12
+ export var SidebarSize;
13
+ (function (SidebarSize) {
14
+ SidebarSize["Expanded"] = "expanded";
15
+ SidebarSize["Collapsed"] = "collapsed";
16
+ })(SidebarSize || (SidebarSize = {}));
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { TypographyProps } from './types';
3
+ export declare const Typography: React.FC<TypographyProps>;