@beydesign/storybook 0.0.1 → 0.0.2

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 (234) hide show
  1. package/README.md +60 -40
  2. package/dist/App.js +161 -5
  3. package/dist/assets/animations/loading-animation.json +1 -0
  4. package/dist/index.d.ts +12 -2
  5. package/dist/index.js +12 -4
  6. package/dist/stories/Agent/AgentCard.d.ts +3 -0
  7. package/dist/stories/Agent/AgentCard.js +102 -0
  8. package/dist/stories/Agent/AgentCard.stories.d.ts +13 -0
  9. package/dist/stories/Agent/AgentCard.stories.js +303 -0
  10. package/dist/stories/Agent/AgentCardSkeleton.d.ts +2 -0
  11. package/dist/stories/Agent/AgentCardSkeleton.js +6 -0
  12. package/dist/stories/Agent/AgentCardSkeleton.stories.d.ts +13 -0
  13. package/dist/stories/Agent/AgentCardSkeleton.stories.js +101 -0
  14. package/dist/stories/Agent/CreateNewCard.d.ts +7 -0
  15. package/dist/stories/Agent/CreateNewCard.js +25 -0
  16. package/dist/stories/Agent/CreateNewCard.stories.d.ts +7 -0
  17. package/dist/stories/Agent/CreateNewCard.stories.js +23 -0
  18. package/dist/stories/Agent/index.d.ts +4 -0
  19. package/dist/stories/Agent/index.js +4 -0
  20. package/dist/stories/Agent/types.d.ts +96 -0
  21. package/dist/stories/Agent/types.js +7 -0
  22. package/dist/stories/Buttons/MainButton.d.ts +3 -0
  23. package/dist/stories/Buttons/MainButton.js +302 -0
  24. package/dist/stories/Buttons/MainButton.stories.d.ts +28 -0
  25. package/dist/stories/Buttons/MainButton.stories.js +299 -0
  26. package/dist/stories/Buttons/ToggleButtonGroup.d.ts +3 -0
  27. package/dist/stories/Buttons/ToggleButtonGroup.js +34 -0
  28. package/dist/stories/Buttons/ToggleButtonGroup.stories.d.ts +9 -0
  29. package/dist/stories/Buttons/ToggleButtonGroup.stories.js +78 -0
  30. package/dist/stories/Buttons/index.d.ts +3 -0
  31. package/dist/stories/Buttons/index.js +3 -0
  32. package/dist/stories/{types/button.d.ts → Buttons/types.d.ts} +37 -14
  33. package/dist/stories/{types/button.js → Buttons/types.js} +12 -2
  34. package/dist/stories/Credits/CreditsCard.d.ts +3 -0
  35. package/dist/stories/Credits/CreditsCard.js +53 -0
  36. package/dist/stories/Credits/CreditsCard.stories.d.ts +7 -0
  37. package/dist/stories/Credits/CreditsCard.stories.js +34 -0
  38. package/dist/stories/Credits/CreditsCardSkeleton.d.ts +3 -0
  39. package/dist/stories/Credits/CreditsCardSkeleton.js +30 -0
  40. package/dist/stories/Credits/CreditsCardSkeleton.stories.d.ts +7 -0
  41. package/dist/stories/Credits/CreditsCardSkeleton.stories.js +40 -0
  42. package/dist/stories/Credits/index.d.ts +3 -0
  43. package/dist/stories/Credits/index.js +3 -0
  44. package/dist/stories/Credits/types.d.ts +57 -0
  45. package/dist/stories/Credits/types.js +11 -0
  46. package/dist/stories/EntityCard/EntityCard.d.ts +3 -0
  47. package/dist/stories/EntityCard/EntityCard.js +22 -0
  48. package/dist/stories/EntityCard/EntityCard.stories.d.ts +10 -0
  49. package/dist/stories/EntityCard/EntityCard.stories.js +187 -0
  50. package/dist/stories/EntityCard/EntityCardSkeleton.d.ts +3 -0
  51. package/dist/stories/EntityCard/EntityCardSkeleton.js +9 -0
  52. package/dist/stories/EntityCard/EntityCardSkeleton.stories.d.ts +10 -0
  53. package/dist/stories/EntityCard/EntityCardSkeleton.stories.js +73 -0
  54. package/dist/stories/EntityCard/index.d.ts +3 -0
  55. package/dist/stories/EntityCard/index.js +3 -0
  56. package/dist/stories/EntityCard/types.d.ts +54 -0
  57. package/dist/stories/EntityCard/types.js +1 -0
  58. package/dist/stories/Form/AutoComplete.d.ts +3 -0
  59. package/dist/stories/Form/AutoComplete.js +163 -0
  60. package/dist/stories/Form/AutoComplete.stories.d.ts +6 -0
  61. package/dist/stories/Form/AutoComplete.stories.js +88 -0
  62. package/dist/stories/Form/Checkbox.d.ts +3 -0
  63. package/dist/stories/Form/Checkbox.js +65 -0
  64. package/dist/stories/Form/Checkbox.stories.d.ts +13 -0
  65. package/dist/stories/Form/Checkbox.stories.js +121 -0
  66. package/dist/stories/Form/Dropdown.d.ts +3 -0
  67. package/dist/stories/Form/Dropdown.js +183 -0
  68. package/dist/stories/Form/Dropdown.stories.d.ts +6 -0
  69. package/dist/stories/Form/Dropdown.stories.js +122 -0
  70. package/dist/stories/Form/FileUpload/FileUpload.d.ts +3 -0
  71. package/dist/stories/Form/FileUpload/FileUpload.js +128 -0
  72. package/dist/stories/Form/FileUpload/FileUpload.stories.d.ts +7 -0
  73. package/dist/stories/Form/FileUpload/FileUpload.stories.js +51 -0
  74. package/dist/stories/Form/FileUpload/FileUploading.d.ts +3 -0
  75. package/dist/stories/Form/FileUpload/FileUploading.js +49 -0
  76. package/dist/stories/Form/FileUpload/FileUploading.stories.d.ts +10 -0
  77. package/dist/stories/Form/FileUpload/FileUploading.stories.js +108 -0
  78. package/dist/stories/Form/FileUpload/UploadedFile.d.ts +3 -0
  79. package/dist/stories/Form/FileUpload/UploadedFile.js +12 -0
  80. package/dist/stories/Form/FileUpload/UploadedFile.stories.d.ts +7 -0
  81. package/dist/stories/Form/FileUpload/UploadedFile.stories.js +73 -0
  82. package/dist/stories/Form/FileUpload/index.d.ts +3 -0
  83. package/dist/stories/Form/FileUpload/index.js +3 -0
  84. package/dist/stories/Form/TextArea.d.ts +3 -0
  85. package/dist/stories/Form/TextArea.js +23 -0
  86. package/dist/stories/Form/TextArea.stories.d.ts +161 -0
  87. package/dist/stories/Form/TextArea.stories.js +142 -0
  88. package/dist/stories/Form/TextInput.d.ts +3 -0
  89. package/dist/stories/Form/TextInput.js +57 -0
  90. package/dist/stories/Form/TextInput.stories.d.ts +155 -0
  91. package/dist/stories/Form/TextInput.stories.js +155 -0
  92. package/dist/stories/Form/Toggle.d.ts +3 -0
  93. package/dist/stories/Form/Toggle.js +57 -0
  94. package/dist/stories/Form/Toggle.stories.d.ts +6 -0
  95. package/dist/stories/Form/Toggle.stories.js +79 -0
  96. package/dist/stories/Form/index.d.ts +8 -0
  97. package/dist/stories/Form/index.js +8 -0
  98. package/dist/stories/Form/types.d.ts +274 -0
  99. package/dist/stories/Form/types.js +46 -0
  100. package/dist/stories/Foundations/Colors.d.ts +2 -0
  101. package/dist/stories/Foundations/Colors.js +266 -0
  102. package/dist/stories/Foundations/Colors.stories.d.ts +6 -0
  103. package/dist/stories/Foundations/Colors.stories.js +15 -0
  104. package/dist/stories/Foundations/index.d.ts +1 -0
  105. package/dist/stories/Foundations/index.js +1 -0
  106. package/dist/stories/Navigation/ComplexHeader.d.ts +3 -0
  107. package/dist/stories/Navigation/ComplexHeader.js +21 -0
  108. package/dist/stories/Navigation/ComplexHeader.stories.d.ts +6 -0
  109. package/dist/stories/Navigation/ComplexHeader.stories.js +82 -0
  110. package/dist/stories/Navigation/Header.d.ts +3 -0
  111. package/dist/stories/Navigation/Header.js +9 -0
  112. package/dist/stories/Navigation/Header.stories.d.ts +7 -0
  113. package/dist/stories/Navigation/Header.stories.js +87 -0
  114. package/dist/stories/Navigation/NavItem.d.ts +3 -0
  115. package/dist/stories/Navigation/NavItem.js +66 -0
  116. package/dist/stories/Navigation/NavItem.stories.d.ts +14 -0
  117. package/dist/stories/Navigation/NavItem.stories.js +100 -0
  118. package/dist/stories/Navigation/ProcessHeader.d.ts +3 -0
  119. package/dist/stories/Navigation/ProcessHeader.js +11 -0
  120. package/dist/stories/Navigation/ProcessHeader.stories.d.ts +6 -0
  121. package/dist/stories/Navigation/ProcessHeader.stories.js +76 -0
  122. package/dist/stories/Navigation/Sidebar.d.ts +3 -0
  123. package/dist/stories/Navigation/Sidebar.js +115 -0
  124. package/dist/stories/Navigation/Sidebar.stories.d.ts +11 -0
  125. package/dist/stories/Navigation/Sidebar.stories.js +174 -0
  126. package/dist/stories/Navigation/index.d.ts +6 -0
  127. package/dist/stories/Navigation/index.js +6 -0
  128. package/dist/stories/Navigation/types.d.ts +186 -0
  129. package/dist/stories/Navigation/types.js +21 -0
  130. package/dist/stories/PlanCard/PlanCard.d.ts +3 -0
  131. package/dist/stories/PlanCard/PlanCard.js +13 -0
  132. package/dist/stories/PlanCard/PlanCard.stories.d.ts +9 -0
  133. package/dist/stories/PlanCard/PlanCard.stories.js +125 -0
  134. package/dist/stories/PlanCard/PlanCardSkeleton.d.ts +3 -0
  135. package/dist/stories/PlanCard/PlanCardSkeleton.js +6 -0
  136. package/dist/stories/PlanCard/PlanCardSkeleton.stories.d.ts +7 -0
  137. package/dist/stories/PlanCard/PlanCardSkeleton.stories.js +40 -0
  138. package/dist/stories/PlanCard/index.d.ts +3 -0
  139. package/dist/stories/PlanCard/index.js +3 -0
  140. package/dist/stories/PlanCard/types.d.ts +61 -0
  141. package/dist/stories/PlanCard/types.js +1 -0
  142. package/dist/stories/StripeProduct/StripeProduct.d.ts +3 -0
  143. package/dist/stories/StripeProduct/StripeProduct.js +24 -0
  144. package/dist/stories/StripeProduct/StripeProduct.stories.d.ts +10 -0
  145. package/dist/stories/StripeProduct/StripeProduct.stories.js +110 -0
  146. package/dist/stories/StripeProduct/StripeProductCardSkeleton.d.ts +3 -0
  147. package/dist/stories/StripeProduct/StripeProductCardSkeleton.js +6 -0
  148. package/dist/stories/StripeProduct/StripeProductCardSkeleton.stories.d.ts +16 -0
  149. package/dist/stories/StripeProduct/StripeProductCardSkeleton.stories.js +137 -0
  150. package/dist/stories/StripeProduct/index.d.ts +3 -0
  151. package/dist/stories/StripeProduct/index.js +3 -0
  152. package/dist/stories/StripeProduct/types.d.ts +56 -0
  153. package/dist/stories/StripeProduct/types.js +1 -0
  154. package/dist/stories/Typography/Typography.d.ts +3 -0
  155. package/dist/stories/Typography/Typography.js +22 -0
  156. package/dist/stories/Typography/Typography.stories.d.ts +25 -0
  157. package/dist/stories/Typography/Typography.stories.js +225 -0
  158. package/dist/stories/Typography/index.d.ts +2 -0
  159. package/dist/stories/Typography/index.js +2 -0
  160. package/dist/stories/Typography/types.d.ts +46 -0
  161. package/dist/stories/Typography/types.js +27 -0
  162. package/dist/stories/UI/Avatar.d.ts +3 -0
  163. package/dist/stories/UI/Avatar.js +76 -0
  164. package/dist/stories/UI/Avatar.stories.d.ts +8 -0
  165. package/dist/stories/UI/Avatar.stories.js +76 -0
  166. package/dist/stories/UI/Badge.d.ts +3 -0
  167. package/dist/stories/UI/Badge.js +118 -0
  168. package/dist/stories/UI/Badge.stories.d.ts +11 -0
  169. package/dist/stories/UI/Badge.stories.js +107 -0
  170. package/dist/stories/UI/CheckIcon.d.ts +3 -0
  171. package/dist/stories/UI/CheckIcon.js +36 -0
  172. package/dist/stories/UI/CheckIcon.stories.d.ts +7 -0
  173. package/dist/stories/UI/CheckIcon.stories.js +48 -0
  174. package/dist/stories/UI/FeatureBanner.d.ts +3 -0
  175. package/dist/stories/UI/FeatureBanner.js +34 -0
  176. package/dist/stories/UI/FeatureBanner.stories.d.ts +9 -0
  177. package/dist/stories/UI/FeatureBanner.stories.js +131 -0
  178. package/dist/stories/UI/HintBubble.d.ts +3 -0
  179. package/dist/stories/UI/HintBubble.js +28 -0
  180. package/dist/stories/UI/HintBubble.stories.d.ts +9 -0
  181. package/dist/stories/UI/HintBubble.stories.js +68 -0
  182. package/dist/stories/UI/Logo.d.ts +3 -0
  183. package/dist/stories/UI/Logo.js +60 -0
  184. package/dist/stories/UI/Logo.stories.d.ts +11 -0
  185. package/dist/stories/UI/Logo.stories.js +65 -0
  186. package/dist/stories/UI/Menu.d.ts +3 -0
  187. package/dist/stories/UI/Menu.js +56 -0
  188. package/dist/stories/UI/Menu.stories.d.ts +7 -0
  189. package/dist/stories/UI/Menu.stories.js +80 -0
  190. package/dist/stories/UI/ProgressIndicator.d.ts +3 -0
  191. package/dist/stories/UI/ProgressIndicator.js +35 -0
  192. package/dist/stories/UI/ProgressIndicator.stories.d.ts +10 -0
  193. package/dist/stories/UI/ProgressIndicator.stories.js +98 -0
  194. package/dist/stories/UI/PromoBanner.d.ts +3 -0
  195. package/dist/stories/UI/PromoBanner.js +34 -0
  196. package/dist/stories/UI/PromoBanner.stories.d.ts +9 -0
  197. package/dist/stories/UI/PromoBanner.stories.js +159 -0
  198. package/dist/stories/UI/SkeletonLoader.d.ts +3 -0
  199. package/dist/stories/UI/SkeletonLoader.js +19 -0
  200. package/dist/stories/UI/SkeletonLoader.stories.d.ts +8 -0
  201. package/dist/stories/UI/SkeletonLoader.stories.js +74 -0
  202. package/dist/stories/UI/Stepper.d.ts +3 -0
  203. package/dist/stories/UI/Stepper.js +67 -0
  204. package/dist/stories/UI/Stepper.stories.d.ts +6 -0
  205. package/dist/stories/UI/Stepper.stories.js +65 -0
  206. package/dist/stories/UI/Topbar.d.ts +3 -0
  207. package/dist/stories/UI/Topbar.js +9 -0
  208. package/dist/stories/UI/Topbar.stories.d.ts +6 -0
  209. package/dist/stories/UI/Topbar.stories.js +71 -0
  210. package/dist/stories/UI/index.d.ts +13 -0
  211. package/dist/stories/UI/index.js +13 -0
  212. package/dist/stories/UI/types.d.ts +398 -0
  213. package/dist/stories/UI/types.js +110 -0
  214. package/dist/utils/common.d.ts +2 -0
  215. package/dist/utils/common.js +20 -0
  216. package/dist/utils/icon.d.ts +6 -0
  217. package/dist/utils/icon.js +6 -0
  218. package/dist/utils/index.d.ts +3 -0
  219. package/dist/utils/index.js +3 -0
  220. package/dist/utils/typography.d.ts +14 -0
  221. package/dist/utils/typography.js +46 -0
  222. package/package.json +48 -42
  223. package/dist/stories/Button.d.ts +0 -4
  224. package/dist/stories/Button.js +0 -258
  225. package/dist/stories/Colors.d.ts +0 -5
  226. package/dist/stories/Colors.js +0 -9
  227. package/dist/stories/Header.d.ts +0 -12
  228. package/dist/stories/Header.js +0 -4
  229. package/dist/stories/Header.stories.d.ts +0 -18
  230. package/dist/stories/Header.stories.js +0 -26
  231. package/dist/stories/Page.d.ts +0 -3
  232. package/dist/stories/Page.js +0 -8
  233. package/dist/stories/Page.stories.d.ts +0 -12
  234. package/dist/stories/Page.stories.js +0 -24
@@ -0,0 +1,187 @@
1
+ import { EntityCard } from './EntityCard';
2
+ import { BadgeColor } from '../UI';
3
+ const meta = {
4
+ title: 'Design System/Components/EntityCard/EntityCard',
5
+ component: EntityCard,
6
+ parameters: {
7
+ layout: 'centered',
8
+ design: {
9
+ type: 'figspec',
10
+ url: 'https://www.figma.com/design/mIhjz2yJjcpLlIqw6oUivt/Beyond-Presence?node-id=6916-20176',
11
+ },
12
+ },
13
+ tags: ['autodocs'],
14
+ argTypes: {
15
+ view: {
16
+ control: 'select',
17
+ options: ['avatar', 'agent'],
18
+ description: 'View variant — drives default width and image aspect ratio',
19
+ table: {
20
+ type: { summary: "'avatar' | 'agent'" },
21
+ defaultValue: { summary: 'avatar' },
22
+ },
23
+ },
24
+ name: {
25
+ control: 'text',
26
+ description: 'Display name shown over the image',
27
+ table: { type: { summary: 'string' } },
28
+ },
29
+ image: {
30
+ control: 'text',
31
+ description: 'Image url',
32
+ table: { type: { summary: 'string' } },
33
+ },
34
+ description: {
35
+ control: 'text',
36
+ description: 'Optional description shown below the image',
37
+ table: { type: { summary: 'string' } },
38
+ },
39
+ showDescription: {
40
+ control: 'boolean',
41
+ description: 'Whether to show the description',
42
+ table: { type: { summary: 'boolean' } },
43
+ },
44
+ showMenu: {
45
+ control: 'boolean',
46
+ description: 'Whether to show the menu on hover',
47
+ table: { type: { summary: 'boolean' } },
48
+ },
49
+ onPreview: {
50
+ description: 'Preview handler — renders the action button on hover',
51
+ table: { type: { summary: 'function' } },
52
+ },
53
+ previewButtonText: {
54
+ control: 'text',
55
+ description: 'Label for the action button; when set it renders text + icon, otherwise icon-only',
56
+ table: { type: { summary: 'string' } },
57
+ },
58
+ previewIcon: {
59
+ control: 'text',
60
+ description: 'Icon for the action button',
61
+ table: {
62
+ type: { summary: 'IconName' },
63
+ defaultValue: { summary: 'Play' },
64
+ },
65
+ },
66
+ showStatusBadge: {
67
+ control: 'boolean',
68
+ description: 'Whether to show the status badge (top-left)',
69
+ table: { type: { summary: 'boolean' } },
70
+ },
71
+ statusBadgeText: {
72
+ control: 'text',
73
+ description: 'Status badge text (e.g. "Active")',
74
+ table: { type: { summary: 'string' } },
75
+ },
76
+ statusBadgeColor: {
77
+ control: 'select',
78
+ options: Object.values(BadgeColor),
79
+ description: 'Status badge color',
80
+ table: {
81
+ type: { summary: 'BadgeColor' },
82
+ defaultValue: { summary: BadgeColor.Green },
83
+ },
84
+ },
85
+ menuItems: {
86
+ description: 'Menu items for the dropdown',
87
+ table: { type: { summary: 'array' } },
88
+ },
89
+ width: {
90
+ control: 'text',
91
+ description: 'Width of the card',
92
+ table: {
93
+ type: { summary: 'string | number' },
94
+ defaultValue: { summary: '208px' },
95
+ },
96
+ },
97
+ },
98
+ };
99
+ export default meta;
100
+ const avatarImage = 'https://images.unsplash.com/photo-1494790108377-be9c29b29330?fm=jpg&q=60&w=600&ixlib=rb-4.0.3';
101
+ export const Default = {
102
+ args: {
103
+ name: 'Nelly',
104
+ image: avatarImage,
105
+ onPreview: () => { },
106
+ showMenu: true,
107
+ menuItems: [
108
+ { label: 'Copy Avatar ID', icon: 'Copy', onClick: () => { } },
109
+ { label: 'Create Agent', icon: 'UserCirclePlus', onClick: () => { } },
110
+ { label: 'Delete', icon: 'Trash', onClick: () => { }, destructive: true },
111
+ ],
112
+ },
113
+ };
114
+ export const AgentView = {
115
+ args: {
116
+ view: 'agent',
117
+ name: 'Nelly Customer Support',
118
+ image: avatarImage,
119
+ onPreview: () => { },
120
+ previewButtonText: 'Join',
121
+ previewIcon: 'VideoCamera',
122
+ showStatusBadge: true,
123
+ statusBadgeText: 'Active',
124
+ showMenu: true,
125
+ menuItems: [
126
+ { label: 'Conversation Link', icon: 'ShareNetwork', onClick: () => { } },
127
+ { label: 'Copy Agent ID', icon: 'CopySimple', onClick: () => { } },
128
+ { label: 'Embed', icon: 'Code', onClick: () => { } },
129
+ { label: 'Agent Details', icon: 'IdentificationCard', onClick: () => { } },
130
+ { label: 'Duplicate', icon: 'Copy', onClick: () => { } },
131
+ { label: 'Delete', icon: 'Trash', onClick: () => { }, destructive: true },
132
+ ],
133
+ },
134
+ parameters: {
135
+ design: {
136
+ type: 'figspec',
137
+ url: 'https://www.figma.com/design/mIhjz2yJjcpLlIqw6oUivt/Beyond-Presence?node-id=6919-20599',
138
+ },
139
+ docs: {
140
+ description: {
141
+ story: 'The agent view — wider, square image, a persistent status badge, and a labelled "Join" action. Hover to reveal the action row.',
142
+ },
143
+ },
144
+ },
145
+ };
146
+ export const WithDescription = {
147
+ args: {
148
+ ...Default.args,
149
+ name: 'Nelly Customer Support',
150
+ showDescription: true,
151
+ description: 'Support description',
152
+ },
153
+ parameters: {
154
+ docs: {
155
+ description: {
156
+ story: 'Avatar card with an optional description below the image.',
157
+ },
158
+ },
159
+ },
160
+ };
161
+ export const NoActions = {
162
+ args: {
163
+ name: 'Nelly',
164
+ image: avatarImage,
165
+ },
166
+ parameters: {
167
+ docs: {
168
+ description: {
169
+ story: 'A read-only avatar card without preview or menu actions on hover.',
170
+ },
171
+ },
172
+ },
173
+ };
174
+ export const NoImage = {
175
+ args: {
176
+ ...Default.args,
177
+ name: 'No Image',
178
+ image: undefined,
179
+ },
180
+ parameters: {
181
+ docs: {
182
+ description: {
183
+ story: 'Fallback placeholder shown when no image is provided or it fails to load.',
184
+ },
185
+ },
186
+ },
187
+ };
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { EntityCardSkeletonProps } from './types';
3
+ export declare const EntityCardSkeleton: React.FC<EntityCardSkeletonProps>;
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box } from '@mui/material';
3
+ import { SkeletonLoader } from '../UI';
4
+ export const EntityCardSkeleton = ({ view = 'avatar', width, showDescription = false, style, }) => {
5
+ const isAgent = view === 'agent';
6
+ const cardWidth = width ?? (isAgent ? '280px' : '208px');
7
+ const imageAspectRatio = isAgent ? '1 / 1' : '203 / 264';
8
+ return (_jsxs(Box, { width: cardWidth, display: 'flex', flexDirection: 'column', gap: 'var(--spacing-tokens-size-in-px-spacing-spacing-md)', padding: 'var(--spacing-tokens-size-in-px-spacing-spacing-md)', borderRadius: 'var(--spacing-tokens-size-in-px-spacing-spacing-sm)', bgcolor: 'var(--color-background-bg-card-highlight)', border: '1px solid var(--color-border-border-subtle)', boxSizing: 'border-box', overflow: 'hidden', style: style, children: [_jsx(Box, { width: '100%', borderRadius: 'var(--spacing-tokens-size-in-px-spacing-spacing-sm)', overflow: 'hidden', sx: { aspectRatio: imageAspectRatio }, children: _jsx(SkeletonLoader, {}) }), showDescription && (_jsxs(Box, { display: 'flex', flexDirection: 'column', gap: 'var(--spacing-tokens-size-in-px-spacing-spacing-sm)', padding: '0 var(--spacing-tokens-size-in-px-spacing-spacing-lg)', width: '100%', boxSizing: 'border-box', children: [_jsx(SkeletonLoader, { width: '100%', height: 'var(--spacing-tokens-size-in-px-spacing-spacing-xl)', borderRadius: 'var(--spacing-tokens-size-in-px-spacing-spacing-xs)' }), _jsx(SkeletonLoader, { width: '70%', height: 'var(--spacing-tokens-size-in-px-spacing-spacing-xl)', borderRadius: 'var(--spacing-tokens-size-in-px-spacing-spacing-xs)' })] }))] }));
9
+ };
@@ -0,0 +1,10 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { EntityCardSkeleton } from './EntityCardSkeleton';
3
+ declare const meta: Meta<typeof EntityCardSkeleton>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof EntityCardSkeleton>;
6
+ export declare const Avatar: Story;
7
+ export declare const AvatarWithDescription: Story;
8
+ export declare const Agent: Story;
9
+ export declare const Grid: Story;
10
+ export declare const LoadingState: Story;
@@ -0,0 +1,73 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box } from '@mui/material';
3
+ import { EntityCardSkeleton } from './EntityCardSkeleton';
4
+ const meta = {
5
+ title: 'Design System/Components/EntityCard/EntityCardSkeleton',
6
+ component: EntityCardSkeleton,
7
+ parameters: {
8
+ layout: 'centered',
9
+ },
10
+ tags: ['autodocs'],
11
+ argTypes: {
12
+ view: {
13
+ control: 'select',
14
+ options: ['avatar', 'agent'],
15
+ description: 'View variant — drives default width and image aspect ratio',
16
+ table: {
17
+ type: { summary: "'avatar' | 'agent'" },
18
+ defaultValue: { summary: 'avatar' },
19
+ },
20
+ },
21
+ width: {
22
+ control: 'text',
23
+ description: 'Width of the card (overrides the view default)',
24
+ table: {
25
+ type: { summary: 'string | number' },
26
+ defaultValue: { summary: '208px (avatar) / 280px (agent)' },
27
+ },
28
+ },
29
+ showDescription: {
30
+ control: 'boolean',
31
+ description: 'Show the description placeholder',
32
+ table: {
33
+ type: { summary: 'boolean' },
34
+ defaultValue: { summary: 'false' },
35
+ },
36
+ },
37
+ style: {
38
+ control: 'object',
39
+ description: 'Custom style for the skeleton',
40
+ table: {
41
+ type: { summary: 'React.CSSProperties' },
42
+ defaultValue: { summary: 'undefined' },
43
+ },
44
+ },
45
+ },
46
+ };
47
+ export default meta;
48
+ export const Avatar = {
49
+ args: {
50
+ view: 'avatar',
51
+ },
52
+ };
53
+ export const AvatarWithDescription = {
54
+ args: {
55
+ view: 'avatar',
56
+ showDescription: true,
57
+ },
58
+ };
59
+ export const Agent = {
60
+ args: {
61
+ view: 'agent',
62
+ },
63
+ };
64
+ export const Grid = {
65
+ render: () => (_jsxs(Box, { display: "flex", flexWrap: "wrap", gap: 2, children: [_jsx(EntityCardSkeleton, { view: "avatar" }), _jsx(EntityCardSkeleton, { view: "avatar", showDescription: true }), _jsx(EntityCardSkeleton, { view: "agent" })] })),
66
+ };
67
+ export const LoadingState = {
68
+ render: () => (_jsxs(Box, { display: "flex", flexDirection: "column", gap: 3, children: [_jsxs(Box, { children: [_jsx("h3", { children: "Loading state example" }), _jsx("p", { children: "How a row of entity cards appears while data is loading." })] }), _jsx(Box, { display: "flex", flexWrap: "wrap", gap: 2, children: Array(5)
69
+ .fill(0)
70
+ .map((_, index) => (_jsx(EntityCardSkeleton, { view: "avatar" }, index))) }), _jsx(Box, { display: "flex", flexWrap: "wrap", gap: 2, children: Array(4)
71
+ .fill(0)
72
+ .map((_, index) => (_jsx(EntityCardSkeleton, { view: "agent" }, index))) })] })),
73
+ };
@@ -0,0 +1,3 @@
1
+ export * from './EntityCard';
2
+ export * from './EntityCardSkeleton';
3
+ export * from './types';
@@ -0,0 +1,3 @@
1
+ export * from './EntityCard';
2
+ export * from './EntityCardSkeleton';
3
+ export * from './types';
@@ -0,0 +1,54 @@
1
+ import { MenuItemProps, BadgeColor } from '../UI';
2
+ import { IconName } from '../../utils';
3
+ /**
4
+ * Entity card view variants.
5
+ * - `avatar`: portrait avatar tile (icon-only preview action)
6
+ * - `agent`: wider, square agent tile (labelled action + status badge)
7
+ */
8
+ export type EntityCardView = 'avatar' | 'agent';
9
+ /**
10
+ * Entity card component props
11
+ */
12
+ export interface EntityCardProps {
13
+ /** View variant — drives default width and image aspect ratio */
14
+ view?: EntityCardView;
15
+ /** Display name shown over the image */
16
+ name: string;
17
+ /** Image url */
18
+ image?: string;
19
+ /** Optional description shown below the image */
20
+ description?: string;
21
+ /** Whether to show the description */
22
+ showDescription?: boolean;
23
+ /** Preview handler — renders the action button on hover */
24
+ onPreview?: () => void;
25
+ /** Label for the action button; when set it renders text + icon, otherwise icon-only */
26
+ previewButtonText?: string;
27
+ /** Icon for the action button (defaults to `Play`) */
28
+ previewIcon?: IconName;
29
+ /** Whether to show the status badge (top-left) */
30
+ showStatusBadge?: boolean;
31
+ /** Status badge text (e.g. "Active") */
32
+ statusBadgeText?: string;
33
+ /** Status badge color (defaults to Green) */
34
+ statusBadgeColor?: BadgeColor;
35
+ /** Menu items for the dropdown — renders the menu button on hover */
36
+ menuItems?: MenuItemProps[];
37
+ /** Whether to show the menu */
38
+ showMenu?: boolean;
39
+ /** Width of the card (overrides the view default) */
40
+ width?: string | number;
41
+ }
42
+ /**
43
+ * Entity card skeleton props
44
+ */
45
+ export interface EntityCardSkeletonProps {
46
+ /** View variant — drives default width and image aspect ratio */
47
+ view?: EntityCardView;
48
+ /** Width of the card (overrides the view default) */
49
+ width?: string | number;
50
+ /** Show the description placeholder */
51
+ showDescription?: boolean;
52
+ /** Custom style for the skeleton */
53
+ style?: React.CSSProperties;
54
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { AutoCompleteProps } from './types';
3
+ export declare const AutoComplete: React.FC<AutoCompleteProps>;
@@ -0,0 +1,163 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React, { useEffect, useRef, useState } from 'react';
3
+ import { Box } from '@mui/material';
4
+ import { Typography, TypographySize, TypographyWeight } from '../Typography';
5
+ import { getIconComponent } from '../../utils';
6
+ import { getTypographySizeToken, getTypographyWeightToken, getTextStyles, } from '../../utils';
7
+ export const AutoComplete = ({ options, value, onChange, leadingIcon = 'MagnifyingGlass', placeholder = 'Search', disabled = false, onBlur, onFocus, }) => {
8
+ const [searchText, setSearchText] = useState('');
9
+ const [focused, setFocused] = useState(false);
10
+ const [highlightedIndex, setHighlightedIndex] = useState(-1);
11
+ const inputRef = useRef(null);
12
+ const optionsContainerRef = useRef(null);
13
+ useEffect(() => {
14
+ setSearchText(value || '');
15
+ }, [value]);
16
+ const handleInputChange = (e) => {
17
+ const newValue = e.target.value;
18
+ setSearchText(newValue);
19
+ setHighlightedIndex(-1);
20
+ if (value !== newValue) {
21
+ onChange(newValue);
22
+ }
23
+ };
24
+ const handleOptionSelect = (option) => {
25
+ if (option !== value) {
26
+ onChange(option);
27
+ }
28
+ setSearchText(option);
29
+ setFocused(false);
30
+ inputRef.current?.blur();
31
+ };
32
+ const handleKeyDown = (e) => {
33
+ if (!focused)
34
+ return;
35
+ const hasOptions = filteredOptions.length > 0;
36
+ switch (e.key) {
37
+ case 'ArrowDown':
38
+ e.preventDefault();
39
+ if (hasOptions) {
40
+ setHighlightedIndex((prev) => prev < filteredOptions.length - 1 ? prev + 1 : 0);
41
+ }
42
+ break;
43
+ case 'ArrowUp':
44
+ e.preventDefault();
45
+ if (hasOptions) {
46
+ setHighlightedIndex((prev) => prev > 0 ? prev - 1 : filteredOptions.length - 1);
47
+ }
48
+ break;
49
+ case 'Enter':
50
+ e.preventDefault();
51
+ if (hasOptions && highlightedIndex >= 0) {
52
+ handleOptionSelect(filteredOptions[highlightedIndex]);
53
+ }
54
+ break;
55
+ case 'Escape':
56
+ e.preventDefault();
57
+ setFocused(false);
58
+ inputRef.current?.blur();
59
+ break;
60
+ case 'Tab':
61
+ setFocused(false);
62
+ break;
63
+ default:
64
+ break;
65
+ }
66
+ };
67
+ useEffect(() => {
68
+ const handleClickOutside = (event) => {
69
+ if (optionsContainerRef.current &&
70
+ !optionsContainerRef.current.contains(event.target) &&
71
+ inputRef.current &&
72
+ !inputRef.current.contains(event.target)) {
73
+ setFocused(false);
74
+ }
75
+ };
76
+ if (focused) {
77
+ document.addEventListener('mousedown', handleClickOutside);
78
+ }
79
+ return () => {
80
+ document.removeEventListener('mousedown', handleClickOutside);
81
+ };
82
+ }, [focused]);
83
+ useEffect(() => {
84
+ if (highlightedIndex >= 0 && optionsContainerRef.current) {
85
+ const highlightedElement = optionsContainerRef.current.children[highlightedIndex];
86
+ if (highlightedElement) {
87
+ highlightedElement.scrollIntoView({ block: 'nearest' });
88
+ }
89
+ }
90
+ }, [highlightedIndex]);
91
+ const handleClear = (event) => {
92
+ event.stopPropagation();
93
+ if (!disabled) {
94
+ onChange('');
95
+ setSearchText('');
96
+ inputRef.current?.focus();
97
+ }
98
+ };
99
+ const handleFocus = () => {
100
+ if (!disabled) {
101
+ setFocused(true);
102
+ if (onFocus)
103
+ onFocus();
104
+ }
105
+ };
106
+ const handleBlur = () => {
107
+ setTimeout(() => {
108
+ setFocused(false);
109
+ if (onBlur)
110
+ onBlur();
111
+ if (searchText !== value) {
112
+ setSearchText(value || '');
113
+ }
114
+ }, 150);
115
+ };
116
+ const filteredOptions = React.useMemo(() => {
117
+ return options.filter((option) => option.toLowerCase().includes((searchText || '').toLowerCase()));
118
+ }, [options, searchText]);
119
+ const sizeToken = getTypographySizeToken(TypographySize.TextS);
120
+ const weightToken = getTypographyWeightToken(TypographyWeight.Regular);
121
+ const { fontSize, fontWeight, fontFamily, lineHeight, letterSpacing, paragraphIndent, paragraphSpacing, textDecoration, textTransform, } = getTextStyles(sizeToken, weightToken);
122
+ return (_jsxs(Box, { display: 'flex', flexDirection: 'column', position: 'relative', width: "100%", children: [_jsxs(Box, { display: 'flex', flexDirection: 'row', gap: 'var(--spacing-tokens-size-in-px-spacing-spacing-xs)', paddingX: 'var(--spacing-tokens-size-in-px-spacing-spacing-md)', paddingY: 'var(--spacing-tokens-size-in-px-spacing-spacing-sm)', alignItems: 'center', justifyContent: 'center', border: `1px solid ${focused ? 'var(--color-border-border-component-active)' : 'var(--color-border-border-component)'}`, borderRadius: '4px', bgcolor: disabled
123
+ ? 'var(--color-background-bg-component-disabled)'
124
+ : 'var(--color-background-bg-component)', children: [getIconComponent(leadingIcon, {
125
+ width: '24px',
126
+ height: '24px',
127
+ color: 'var(--color-foreground-fg-quaternary)',
128
+ 'aria-hidden': 'true',
129
+ }), _jsx("input", { ref: inputRef, type: "text", value: searchText, onChange: handleInputChange, onKeyDown: handleKeyDown, placeholder: placeholder, disabled: disabled, style: {
130
+ flexGrow: 1,
131
+ border: 'none',
132
+ outline: 'none',
133
+ fontSize: fontSize,
134
+ fontWeight: fontWeight,
135
+ fontFamily: fontFamily + ', sans-serif',
136
+ lineHeight: lineHeight + 'px',
137
+ letterSpacing: letterSpacing,
138
+ textIndent: paragraphIndent,
139
+ marginBottom: paragraphSpacing,
140
+ textTransform: textTransform,
141
+ textDecoration: textDecoration,
142
+ color: disabled
143
+ ? 'var(--color-text-text-disabled)'
144
+ : 'var(--color-text-text-title)',
145
+ backgroundColor: 'transparent',
146
+ }, onFocus: handleFocus, onBlur: handleBlur, "aria-autocomplete": "list", "aria-controls": focused ? 'autocomplete-options' : undefined, "aria-expanded": focused, role: "combobox" }), searchText &&
147
+ getIconComponent('X', {
148
+ width: '24px',
149
+ height: '24px',
150
+ color: 'var(--color-foreground-fg-quaternary)',
151
+ onClick: handleClear,
152
+ style: { cursor: disabled ? 'default' : 'pointer' },
153
+ 'aria-label': 'Clear input',
154
+ })] }), focused && (_jsx(Box, { id: "autocomplete-options", ref: optionsContainerRef, position: 'absolute', top: '100%', left: 0, zIndex: 1000, bgcolor: 'var(--color-background-bg-component)', borderRadius: '4px', width: '100%', maxHeight: '200px', overflow: 'auto', boxShadow: '0px 4px 8px rgba(0, 0, 0, 0.1)', mt: '4px', role: "listbox", children: filteredOptions.length === 0 ? (_jsx(Box, { display: 'flex', flexDirection: 'row', paddingX: 'var(--spacing-tokens-size-in-px-spacing-spacing-md)', paddingY: 'var(--spacing-tokens-size-in-px-spacing-spacing-sm)', children: _jsx(Typography, { size: TypographySize.TextS, weight: TypographyWeight.Regular, children: "No results found" }) })) : (filteredOptions.map((option, index) => (_jsx(Box, { display: 'flex', flexDirection: 'row', gap: 'var(--spacing-tokens-size-in-px-spacing-spacing-xs)', paddingX: 'var(--spacing-tokens-size-in-px-spacing-spacing-md)', paddingY: 'var(--spacing-tokens-size-in-px-spacing-spacing-sm)', onClick: () => handleOptionSelect(option), sx: {
155
+ cursor: 'pointer',
156
+ backgroundColor: highlightedIndex === index
157
+ ? 'var(--color-background-bg-page)'
158
+ : 'transparent',
159
+ '&:hover': {
160
+ backgroundColor: 'var(--color-background-bg-page)',
161
+ },
162
+ }, role: "option", "aria-selected": highlightedIndex === index, tabIndex: -1, children: _jsx(Typography, { size: TypographySize.TextS, weight: TypographyWeight.Regular, children: option }) }, option)))) }))] }));
163
+ };
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { AutoComplete } from './AutoComplete';
3
+ declare const meta: Meta<typeof AutoComplete>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof AutoComplete>;
6
+ export declare const Default: Story;
@@ -0,0 +1,88 @@
1
+ import { AutoComplete } from './AutoComplete';
2
+ const meta = {
3
+ title: 'Design System/Components/Form/AutoComplete',
4
+ component: AutoComplete,
5
+ parameters: {
6
+ layout: 'centered',
7
+ design: {
8
+ type: 'figspec',
9
+ url: 'https://www.figma.com/design/mIhjz2yJjcpLlIqw6oUivt/Beyond-Presence?node-id=4501-25356&t=XsmO3ZzXQ9rb1lu5-1',
10
+ },
11
+ },
12
+ tags: ['autodocs'],
13
+ argTypes: {
14
+ options: {
15
+ control: 'select',
16
+ description: 'The options to display in the autocomplete',
17
+ table: {
18
+ type: { summary: 'string[]' },
19
+ },
20
+ },
21
+ value: {
22
+ control: 'text',
23
+ description: 'The value of the selected option',
24
+ table: {
25
+ type: { summary: 'string' },
26
+ },
27
+ },
28
+ onChange: {
29
+ description: 'The onChange handler for the selected option',
30
+ table: {
31
+ type: { summary: 'function' },
32
+ },
33
+ },
34
+ disabled: {
35
+ control: 'boolean',
36
+ description: 'Whether the autocomplete is disabled',
37
+ table: {
38
+ type: { summary: 'boolean' },
39
+ },
40
+ },
41
+ leadingIcon: {
42
+ control: 'select',
43
+ description: 'The leading icon of the autocomplete',
44
+ options: ['MagnifyingGlass', 'User', 'Calendar', 'Bell'],
45
+ table: {
46
+ type: { summary: 'string' },
47
+ },
48
+ },
49
+ placeholder: {
50
+ control: 'text',
51
+ description: 'The placeholder of the autocomplete',
52
+ table: {
53
+ type: { summary: 'string' },
54
+ },
55
+ },
56
+ onBlur: {
57
+ description: 'The onBlur handler for the autocomplete',
58
+ table: {
59
+ type: { summary: 'function' },
60
+ },
61
+ },
62
+ onFocus: {
63
+ description: 'The onFocus handler for the autocomplete',
64
+ table: {
65
+ type: { summary: 'function' },
66
+ },
67
+ },
68
+ },
69
+ };
70
+ export default meta;
71
+ export const Default = {
72
+ args: {
73
+ options: [
74
+ 'Option 1',
75
+ 'Option 2',
76
+ 'Option 3',
77
+ 'Option 4',
78
+ 'Option 5',
79
+ 'Option 6',
80
+ 'Option 7',
81
+ 'Option 8',
82
+ 'Option 9',
83
+ 'Option 10',
84
+ ],
85
+ value: '',
86
+ onChange: () => { },
87
+ },
88
+ };
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { CheckboxProps } from './types';
3
+ export declare const Checkbox: React.FC<CheckboxProps>;