@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,61 @@
1
+ import React from 'react';
2
+ import { BadgeColor } from '../UI';
3
+ import { ButtonHierarchy } from '../Buttons';
4
+ /**
5
+ * Plan card component props — a compact, in-app subscription plan card.
6
+ */
7
+ export interface PlanCardProps {
8
+ /** Plan name (e.g. "Pro") */
9
+ title: string;
10
+ /** Short plan description */
11
+ description?: string;
12
+ /** Price text (e.g. "€210" or "Custom") */
13
+ price?: string;
14
+ /** Price suffix shown next to the price (e.g. "/month") */
15
+ priceSuffix?: string;
16
+ /** Badge text (e.g. "Most Popular", "Current Plan") */
17
+ badgeText?: string;
18
+ /** Badge color (defaults to Lemon) */
19
+ badgeColor?: BadgeColor;
20
+ /** Highlights the card with a brand background + border */
21
+ highlighted?: boolean;
22
+ /** Heading above the feature list */
23
+ featuresTitle?: string;
24
+ /** Feature list */
25
+ features?: string[];
26
+ /** Action button label (defaults to "Upgrade"); hidden when omitted */
27
+ buttonText?: string;
28
+ /** Action button click handler */
29
+ onButtonClick?: () => void;
30
+ /** Disable the action button (e.g. for the current plan) */
31
+ buttonDisabled?: boolean;
32
+ /** Action button hierarchy (defaults to Primary) */
33
+ buttonHierarchy?: ButtonHierarchy;
34
+ /** Show a loading spinner on the action button */
35
+ buttonLoading?: boolean;
36
+ /** Width of the card */
37
+ width?: string | number;
38
+ /** Custom style */
39
+ style?: React.CSSProperties;
40
+ /** Test id */
41
+ testId?: string;
42
+ }
43
+ /**
44
+ * Plan card skeleton props
45
+ */
46
+ export interface PlanCardSkeletonProps {
47
+ /** Whether to show the badge placeholder */
48
+ showBadge?: boolean;
49
+ /** Whether to show the button placeholder */
50
+ showButton?: boolean;
51
+ /** Whether to show the features placeholder */
52
+ showFeatures?: boolean;
53
+ /** Number of feature placeholders */
54
+ featuresCount?: number;
55
+ /** Width of the card */
56
+ width?: string | number;
57
+ /** Custom style */
58
+ style?: React.CSSProperties;
59
+ /** Test id */
60
+ testId?: string;
61
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { StripeProductProps } from './types';
2
+ import React from 'react';
3
+ export declare const StripeProduct: React.FC<StripeProductProps>;
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box } from '@mui/material';
3
+ import { Typography, TypographySize, TypographyWeight } from '../Typography';
4
+ import { ButtonHierarchy, ButtonSize, MainButton } from '../Buttons';
5
+ import { getIconComponent } from '../../utils';
6
+ import React from 'react';
7
+ import { Badge, BadgeColor, BadgeSize } from '../UI';
8
+ export const StripeProduct = ({ className, description, features, isMostPopular, isEnterprisePlan, style, title, duration, price, buttonProps, bubbleText, bubbleTooltip, bubbleTopOffset, testId, }) => {
9
+ return (_jsxs(Box, { display: 'flex', flexDirection: 'column', borderRadius: 'var(--spacing-tokens-size-in-px-spacing-spacing-lg)', paddingY: 'var(--spacing-tokens-size-in-px-spacing-spacing-2xl)', paddingX: 'var(--spacing-tokens-size-in-px-spacing-spacing-xl)', gap: 'var(--spacing-tokens-size-in-px-spacing-spacing-xl)', bgcolor: isMostPopular
10
+ ? 'var(--color-background-bg-card-highlight)'
11
+ : 'var(--color-background-bg-component)', border: isMostPopular ? '1.5px solid var(--color-border-border-brand)' : 'none', position: 'relative', boxShadow: '0px 0px 10px 0px rgba(0, 0, 0, 0.1)', style: style, className: className, "data-testid": testId, children: [bubbleText && (_jsx(Box, { position: 'absolute', top: bubbleTopOffset || '-4%', right: 0, left: 0, children: _jsx(Badge, { text: bubbleText, color: BadgeColor.Yellow, children: bubbleTooltip, size: BadgeSize.xs, fill: true }) })), _jsxs(Box, { display: 'flex', flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', children: [_jsx(Typography, { size: TypographySize.HeadingM, weight: TypographyWeight.Bold, color: 'var(--color-text-text-title)', children: title }), isMostPopular && (_jsx(Box, { display: 'flex', justifyContent: 'center', alignItems: 'center', paddingX: 'var(--spacing-tokens-size-in-px-spacing-spacing-md)', paddingY: 'var(--spacing-tokens-size-in-px-spacing-spacing-xs)', bgcolor: 'var(--color-background-bg-badge-accent-brand-violet)', borderRadius: 'var(--spacing-tokens-size-in-px-radius-radius-sm)', children: _jsx(Typography, { size: TypographySize.HeadingXS, weight: TypographyWeight.Regular, color: 'var(--color-text-text-accent)', children: "Most popular" }) }))] }), _jsx(Typography, { size: TypographySize.HeadingM, weight: TypographyWeight.Regular, color: 'var(--color-text-text-paragraph)', textStyle: { textAlign: 'left', minHeight: '100px' }, children: description }), _jsx(Box, { display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', alignItems: 'end', children: isEnterprisePlan ? (_jsx(Typography, { size: TypographySize.HeadingL, weight: TypographyWeight.Bold, color: 'var(--color-text-text-title)', children: "Custom" })) : (_jsxs(React.Fragment, { children: [_jsx(Typography, { size: TypographySize.HeadingL, weight: TypographyWeight.Bold, color: 'var(--color-text-text-title)', children: price }), _jsxs(Typography, { size: TypographySize.HeadingXS, weight: TypographyWeight.Regular, color: 'var(--color-text-text-paragraph)', children: ["/", duration] })] })) }), buttonProps && (_jsx(MainButton, { disabled: buttonProps?.disabled, loading: buttonProps?.loading, onClick: buttonProps?.onClick, text: buttonProps?.text, size: buttonProps?.size || ButtonSize.lg, hierarchy: buttonProps?.hierarchy || ButtonHierarchy.Primary, style: {
12
+ margin: 'var(--spacing-tokens-size-in-px-spacing-spacing-3xl) 0',
13
+ } })), features && features?.length > 0 && (_jsxs(Box, { display: 'flex', flexDirection: 'column', gap: 'var(--spacing-tokens-size-in-px-spacing-spacing-xl)', alignItems: 'flex-start', children: [_jsx(Typography, { size: TypographySize.TextM, weight: TypographyWeight.Medium, color: 'var(--color-text-text-title)', children: "This includes:" }), features.map((feature, index) => {
14
+ const isHeading = feature?.startsWith('-');
15
+ return (_jsxs(Box, { display: 'flex', flexDirection: 'row', justifyContent: 'space-between', alignItems: 'flex-start', gap: 'var(--spacing-tokens-size-in-px-spacing-spacing-md)', children: [!isHeading && (_jsx(Box, { width: '18px', height: '18px', bgcolor: 'var(--primitives-desktop-primary-brand-violet-100)', borderRadius: 'var(--spacing-tokens-size-in-px-radius-radius-full)', display: 'flex', justifyContent: 'center', alignItems: 'center', children: getIconComponent('Check', {
16
+ size: '12px',
17
+ color: 'var(--primitives-desktop-primary-brand-violet-500)',
18
+ }) })), _jsx(Typography, { size: TypographySize.TextS, weight: isHeading
19
+ ? TypographyWeight.Medium
20
+ : TypographyWeight.Regular, color: isHeading
21
+ ? 'var(--color-text-text-title)'
22
+ : 'var(--color-text-text-paragraph)', textStyle: { textAlign: 'left' }, children: isHeading ? feature?.slice(1)?.trim() : feature })] }, `${index}`));
23
+ })] }))] }));
24
+ };
@@ -0,0 +1,10 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { StripeProduct } from './StripeProduct';
3
+ declare const meta: Meta<typeof StripeProduct>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof StripeProduct>;
6
+ export declare const DefaultWithSubheadings: Story;
7
+ export declare const Default: Story;
8
+ export declare const MostPopular: Story;
9
+ export declare const EnterprisePlan: Story;
10
+ export declare const WithBubble: Story;
@@ -0,0 +1,110 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { StripeProduct } from './StripeProduct';
3
+ import { Tooltip } from '@mui/material';
4
+ import { Info } from '@phosphor-icons/react';
5
+ const meta = {
6
+ title: 'Design System/Components/StripeProduct/StripeProduct',
7
+ component: StripeProduct,
8
+ parameters: {
9
+ layout: 'centered',
10
+ design: {
11
+ type: 'figspec',
12
+ url: 'https://www.figma.com/design/LMfTHn8ncZVSVlEUGYSz4Q/Settings?node-id=3593-20344&m=dev',
13
+ },
14
+ },
15
+ tags: ['autodocs'],
16
+ argTypes: {},
17
+ };
18
+ export default meta;
19
+ export const DefaultWithSubheadings = {
20
+ args: {
21
+ title: 'Starter',
22
+ description: 'Tailored for personal projects and independent creators.',
23
+ price: '$100',
24
+ duration: 'month',
25
+ features: [
26
+ '-E2E Agent API',
27
+ 'Included Mins: 90',
28
+ 'Bundle $/min: $0.54',
29
+ 'Overage $/min: $0.33',
30
+ '-A2V Api',
31
+ 'Included mins: 180',
32
+ 'Bundle $/min: $0.27',
33
+ 'Overage $/min: $0.18',
34
+ ],
35
+ isMostPopular: false,
36
+ buttonProps: {
37
+ text: 'Select',
38
+ onClick: () => { },
39
+ },
40
+ },
41
+ };
42
+ export const Default = {
43
+ args: {
44
+ title: 'Starter',
45
+ description: 'Tailored for personal projects and independent creators.',
46
+ price: '$100',
47
+ duration: 'month',
48
+ features: [
49
+ '1 credit (1 min of Conversational Agent video)',
50
+ '5 stock Digital Twins',
51
+ ],
52
+ isMostPopular: false,
53
+ buttonProps: {
54
+ text: 'Select',
55
+ onClick: () => { },
56
+ },
57
+ },
58
+ };
59
+ export const MostPopular = {
60
+ args: {
61
+ title: 'Growth',
62
+ description: 'Designed for professionals looking to expand their reach.',
63
+ price: '$149',
64
+ duration: 'month',
65
+ features: [
66
+ '300 credits (300 min of Conversational Agent video)',
67
+ '5 stock Digital Twins',
68
+ '3 active Conversational Agents',
69
+ 'Priority support',
70
+ ],
71
+ isMostPopular: true,
72
+ buttonProps: {
73
+ text: 'Select',
74
+ onClick: () => { },
75
+ },
76
+ },
77
+ };
78
+ export const EnterprisePlan = {
79
+ args: {
80
+ title: 'Enterprise',
81
+ description: 'For businesses with high volume and custom needs.',
82
+ price: 'Custom',
83
+ duration: 'month',
84
+ features: [
85
+ '5000+ credits (5000+ min of Conversational Agent video)',
86
+ 'Integration support',
87
+ 'Full customization',
88
+ ],
89
+ isMostPopular: false,
90
+ isEnterprisePlan: true,
91
+ buttonProps: {
92
+ text: 'Contact us',
93
+ onClick: () => { },
94
+ },
95
+ },
96
+ };
97
+ export const WithBubble = {
98
+ args: {
99
+ title: 'Starter',
100
+ description: 'Tailored for personal projects and independent creators.',
101
+ price: '$100',
102
+ duration: 'month',
103
+ features: [
104
+ '1 credit (1 min of Conversational Agent video)',
105
+ '5 stock Digital Twins',
106
+ ],
107
+ bubbleText: "You're currently on the monthly plan",
108
+ bubbleTooltip: (_jsx(Tooltip, { title: "You're currently on the monthly plan", placement: "top", children: _jsx(Info, {}) })),
109
+ },
110
+ };
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { StripeProductCardSkeletonProps } from './types';
3
+ export declare const StripeProductCardSkeleton: React.FC<StripeProductCardSkeletonProps>;
@@ -0,0 +1,6 @@
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 StripeProductCardSkeleton = ({ width = 'auto', showMostPopular = false, showBubble = false, showButton = true, showFeatures = true, featuresCount = 5, style, testId, }) => {
5
+ return (_jsxs(Box, { width: width, display: "flex", flexDirection: "column", borderRadius: 'var(--spacing-tokens-size-in-px-spacing-spacing-lg)', paddingY: 'var(--spacing-tokens-size-in-px-spacing-spacing-2xl)', paddingX: 'var(--spacing-tokens-size-in-px-spacing-spacing-xl)', gap: 'var(--spacing-tokens-size-in-px-spacing-spacing-xl)', bgcolor: "var(--color-background-bg-component)", position: "relative", boxShadow: '0px 0px 10px 0px rgba(0, 0, 0, 0.1)', style: style, "data-testid": testId, children: [showBubble && (_jsx(Box, { position: "absolute", top: "-4%", left: "50%", sx: { transform: 'translateX(-50%)' }, width: "50%", children: _jsx(SkeletonLoader, { height: "24px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-xs)" }) })), _jsxs(Box, { display: "flex", flexDirection: "row", justifyContent: "space-between", alignItems: "center", children: [_jsx(SkeletonLoader, { width: "40%", height: "28px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-xs)" }), showMostPopular && (_jsx(SkeletonLoader, { width: "100px", height: "28px", borderRadius: "var(--spacing-tokens-size-in-px-radius-radius-sm)" }))] }), _jsxs(Box, { display: "flex", flexDirection: "column", gap: "var(--spacing-tokens-size-in-px-spacing-spacing-sm)", minHeight: "100px", children: [_jsx(SkeletonLoader, { width: "100%", height: "20px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-xs)" }), _jsx(SkeletonLoader, { width: "95%", height: "20px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-xs)" }), _jsx(SkeletonLoader, { width: "80%", height: "20px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-xs)" })] }), _jsxs(Box, { display: "flex", flexDirection: "row", alignItems: "end", gap: "4px", children: [_jsx(SkeletonLoader, { width: "80px", height: "36px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-xs)" }), _jsx(SkeletonLoader, { width: "60px", height: "20px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-xs)" })] }), showButton && (_jsx(Box, { margin: 'var(--spacing-tokens-size-in-px-spacing-spacing-3xl) 0', children: _jsx(SkeletonLoader, { width: "100%", height: "44px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-md)" }) })), showFeatures && (_jsxs(Box, { display: "flex", flexDirection: "column", gap: "var(--spacing-tokens-size-in-px-spacing-spacing-xl)", alignItems: "flex-start", children: [_jsx(SkeletonLoader, { width: "120px", height: "20px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-xs)" }), Array.from({ length: featuresCount }).map((_, index) => (_jsxs(Box, { display: "flex", flexDirection: "row", alignItems: "flex-start", gap: "var(--spacing-tokens-size-in-px-spacing-spacing-md)", width: "100%", children: [_jsx(SkeletonLoader, { width: "18px", height: "18px", borderRadius: "var(--spacing-tokens-size-in-px-radius-radius-full)" }), _jsx(SkeletonLoader, { width: index % 3 === 0 ? '85%' : index % 3 === 1 ? '75%' : '90%', height: "18px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-xs)" })] }, index)))] }))] }));
6
+ };
@@ -0,0 +1,16 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { StripeProductCardSkeleton } from './StripeProductCardSkeleton';
3
+ declare const meta: Meta<typeof StripeProductCardSkeleton>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof StripeProductCardSkeleton>;
6
+ export declare const Default: Story;
7
+ export declare const WithMostPopular: Story;
8
+ export declare const WithBubble: Story;
9
+ export declare const WithoutButton: Story;
10
+ export declare const WithoutFeatures: Story;
11
+ export declare const CustomFeaturesCount: Story;
12
+ export declare const Complete: Story;
13
+ export declare const CustomWidth: Story;
14
+ export declare const PricingGrid: Story;
15
+ export declare const LoadingState: Story;
16
+ export declare const MinimalVariant: Story;
@@ -0,0 +1,137 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box } from '@mui/material';
3
+ import { StripeProductCardSkeleton } from './StripeProductCardSkeleton';
4
+ const meta = {
5
+ title: 'Design System/Components/StripeProduct/StripeProductCardSkeleton',
6
+ component: StripeProductCardSkeleton,
7
+ parameters: {
8
+ layout: 'centered',
9
+ },
10
+ tags: ['autodocs'],
11
+ argTypes: {
12
+ width: {
13
+ control: 'text',
14
+ description: 'Width of the skeleton card',
15
+ table: {
16
+ type: { summary: 'string | number' },
17
+ defaultValue: { summary: 'auto' },
18
+ },
19
+ },
20
+ showMostPopular: {
21
+ control: 'boolean',
22
+ description: 'Show the most popular badge placeholder',
23
+ table: {
24
+ type: { summary: 'boolean' },
25
+ defaultValue: { summary: 'false' },
26
+ },
27
+ },
28
+ showBubble: {
29
+ control: 'boolean',
30
+ description: 'Show the bubble placeholder',
31
+ table: {
32
+ type: { summary: 'boolean' },
33
+ defaultValue: { summary: 'false' },
34
+ },
35
+ },
36
+ showButton: {
37
+ control: 'boolean',
38
+ description: 'Show the button placeholder',
39
+ table: {
40
+ type: { summary: 'boolean' },
41
+ defaultValue: { summary: 'true' },
42
+ },
43
+ },
44
+ showFeatures: {
45
+ control: 'boolean',
46
+ description: 'Show the features section placeholder',
47
+ table: {
48
+ type: { summary: 'boolean' },
49
+ defaultValue: { summary: 'true' },
50
+ },
51
+ },
52
+ featuresCount: {
53
+ control: 'number',
54
+ description: 'Number of feature items to show',
55
+ table: {
56
+ type: { summary: 'number' },
57
+ defaultValue: { summary: '5' },
58
+ },
59
+ },
60
+ style: {
61
+ control: 'object',
62
+ description: 'Custom style for the skeleton',
63
+ table: {
64
+ type: { summary: 'React.CSSProperties' },
65
+ defaultValue: { summary: 'undefined' },
66
+ },
67
+ },
68
+ },
69
+ };
70
+ export default meta;
71
+ export const Default = {
72
+ args: {
73
+ width: '360px',
74
+ },
75
+ };
76
+ export const WithMostPopular = {
77
+ args: {
78
+ width: '360px',
79
+ showMostPopular: true,
80
+ },
81
+ };
82
+ export const WithBubble = {
83
+ args: {
84
+ width: '360px',
85
+ showBubble: true,
86
+ },
87
+ };
88
+ export const WithoutButton = {
89
+ args: {
90
+ width: '360px',
91
+ showButton: false,
92
+ },
93
+ };
94
+ export const WithoutFeatures = {
95
+ args: {
96
+ width: '360px',
97
+ showFeatures: false,
98
+ },
99
+ };
100
+ export const CustomFeaturesCount = {
101
+ args: {
102
+ width: '360px',
103
+ featuresCount: 8,
104
+ },
105
+ };
106
+ export const Complete = {
107
+ args: {
108
+ width: '360px',
109
+ showMostPopular: true,
110
+ showBubble: true,
111
+ showButton: true,
112
+ showFeatures: true,
113
+ featuresCount: 6,
114
+ },
115
+ };
116
+ export const CustomWidth = {
117
+ args: {
118
+ width: '500px',
119
+ showMostPopular: true,
120
+ showBubble: true,
121
+ },
122
+ };
123
+ export const PricingGrid = {
124
+ render: () => (_jsxs(Box, { display: "flex", flexWrap: "wrap", gap: 3, children: [_jsx(StripeProductCardSkeleton, { width: "360px", showFeatures: true }), _jsx(StripeProductCardSkeleton, { width: "360px", showMostPopular: true, showBubble: true, featuresCount: 7 }), _jsx(StripeProductCardSkeleton, { width: "360px", showFeatures: true })] })),
125
+ };
126
+ export const LoadingState = {
127
+ render: () => (_jsxs(Box, { display: "flex", flexDirection: "column", gap: 4, children: [_jsxs(Box, { children: [_jsx("h3", { children: "Loading state example" }), _jsx("p", { children: "This demonstrates how the skeleton appears while loading pricing plans" })] }), _jsx(Box, { display: "flex", flexWrap: "wrap", gap: 3, justifyContent: "center", children: Array(3)
128
+ .fill(0)
129
+ .map((_, index) => (_jsx(StripeProductCardSkeleton, { width: "360px", showMostPopular: index === 1, showBubble: index === 1, featuresCount: index === 1 ? 7 : 5 }, index))) })] })),
130
+ };
131
+ export const MinimalVariant = {
132
+ args: {
133
+ width: '360px',
134
+ showButton: false,
135
+ showFeatures: false,
136
+ },
137
+ };
@@ -0,0 +1,3 @@
1
+ export * from './StripeProduct';
2
+ export * from './StripeProductCardSkeleton';
3
+ export * from './types';
@@ -0,0 +1,3 @@
1
+ export * from './StripeProduct';
2
+ export * from './StripeProductCardSkeleton';
3
+ export * from './types';
@@ -0,0 +1,56 @@
1
+ import { MainButtonProps } from '../Buttons';
2
+ import React from 'react';
3
+ /**
4
+ * Stripe product component props
5
+ */
6
+ export interface StripeProductProps {
7
+ /** Title of the product */
8
+ title: string;
9
+ /** Description of the product */
10
+ description: string;
11
+ /** Price of the product */
12
+ price: string;
13
+ /** Duration of the product */
14
+ duration: string;
15
+ /** Features of the product */
16
+ features?: string[];
17
+ /** Whether the product is the most popular */
18
+ isMostPopular?: boolean;
19
+ /** Whether the product is the enterprise plan */
20
+ isEnterprisePlan?: boolean;
21
+ /** Props for the button */
22
+ buttonProps?: MainButtonProps;
23
+ /** Text of the bubble */
24
+ bubbleText?: string;
25
+ /** Tooltip of the bubble */
26
+ bubbleTooltip?: JSX.Element;
27
+ /** Top offset of the bubble */
28
+ bubbleTopOffset?: React.CSSProperties['top'];
29
+ /** Style of the product */
30
+ style?: React.CSSProperties;
31
+ /** Class name of the product */
32
+ className?: string;
33
+ /** Test ID of the product */
34
+ testId?: string;
35
+ }
36
+ /**
37
+ * Stripe product card skeleton component props
38
+ */
39
+ export interface StripeProductCardSkeletonProps {
40
+ /** Width of the skeleton card */
41
+ width?: string | number;
42
+ /** Show the most popular badge placeholder */
43
+ showMostPopular?: boolean;
44
+ /** Show the bubble placeholder */
45
+ showBubble?: boolean;
46
+ /** Show the button placeholder */
47
+ showButton?: boolean;
48
+ /** Show the features section placeholder */
49
+ showFeatures?: boolean;
50
+ /** Number of feature items to show */
51
+ featuresCount?: number;
52
+ /** Custom style for the skeleton */
53
+ style?: React.CSSProperties;
54
+ /** Test ID of the skeleton card */
55
+ testId?: string;
56
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { TypographyProps } from './types';
3
+ export declare const Typography: React.FC<React.PropsWithChildren<TypographyProps>>;
@@ -0,0 +1,22 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { TypographySize, TypographyWeight } from './types';
3
+ import { getTextStyles, getTypographySizeToken, getTypographyWeightToken, } from '../../utils';
4
+ export const Typography = ({ text, color, size = TypographySize.HeadingL, weight = TypographyWeight.Bold, className, required = false, textStyle, children, title, }) => {
5
+ const sizeToken = getTypographySizeToken(size);
6
+ const weightToken = getTypographyWeightToken(weight);
7
+ const { fontSize, fontWeight, fontFamily, lineHeight, letterSpacing, paragraphIndent, paragraphSpacing, textDecoration, textTransform, } = getTextStyles(sizeToken, weightToken);
8
+ const requiredColor = 'var(--color-text-text-error)';
9
+ return (_jsxs("span", { className: className, style: {
10
+ fontSize: fontSize,
11
+ fontWeight: fontWeight,
12
+ fontFamily: fontFamily + ', sans-serif',
13
+ lineHeight: lineHeight + 'px',
14
+ letterSpacing: letterSpacing,
15
+ textIndent: paragraphIndent,
16
+ marginBottom: paragraphSpacing,
17
+ textTransform: textTransform,
18
+ textDecoration: textDecoration,
19
+ color: color || 'var(--global-text-text-title)',
20
+ ...textStyle,
21
+ }, title: title, children: [children || text, required && _jsx("span", { style: { color: requiredColor }, children: ' *' })] }));
22
+ };
@@ -0,0 +1,25 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { Typography } from './Typography';
3
+ declare const meta: Meta<typeof Typography>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Typography>;
6
+ export declare const HeadingXLBold: Story;
7
+ export declare const HeadingXLSemiBold: Story;
8
+ export declare const HeadingXLMedium: Story;
9
+ export declare const HeadingXLRegular: Story;
10
+ export declare const HeadingLBold: Story;
11
+ export declare const HeadingLSemiBold: Story;
12
+ export declare const HeadingLMedium: Story;
13
+ export declare const HeadingLRegular: Story;
14
+ export declare const HeadingMBold: Story;
15
+ export declare const Heading2XSRegular: Story;
16
+ export declare const TextLBold: Story;
17
+ export declare const TextLSemiBold: Story;
18
+ export declare const TextLMedium: Story;
19
+ export declare const TextLRegular: Story;
20
+ export declare const TextMBold: Story;
21
+ export declare const TextMSemiBold: Story;
22
+ export declare const TextMMedium: Story;
23
+ export declare const TextMRegular: Story;
24
+ export declare const TextSBold: Story;
25
+ export declare const TextSSemiBold: Story;