@dynamic-mockups/design-system 0.2.14 → 0.2.17

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 (213) hide show
  1. package/dist/design-system.css +1 -1
  2. package/dist/index.js +32 -29
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.mjs +8067 -7208
  5. package/dist/index.mjs.map +1 -1
  6. package/dist/src/components/atoms/index.d.ts +46 -25
  7. package/dist/src/components/atoms/layout/Container/Container.d.ts +24 -0
  8. package/dist/src/components/atoms/layout/Container/Container.stories.d.ts +31 -0
  9. package/dist/src/components/atoms/layout/Container/index.d.ts +2 -0
  10. package/dist/src/components/atoms/layout/Grid/Grid.d.ts +24 -0
  11. package/dist/src/components/atoms/layout/Grid/Grid.stories.d.ts +46 -0
  12. package/dist/src/components/atoms/layout/Grid/index.d.ts +2 -0
  13. package/dist/src/components/atoms/layout/Section/Section.d.ts +24 -0
  14. package/dist/src/components/atoms/layout/Section/Section.stories.d.ts +31 -0
  15. package/dist/src/components/atoms/layout/Section/index.d.ts +2 -0
  16. package/dist/src/components/atoms/typography/Blockquote/Blockquote.d.ts +24 -0
  17. package/dist/src/components/atoms/typography/Blockquote/Blockquote.stories.d.ts +15 -0
  18. package/dist/src/components/atoms/typography/Blockquote/index.d.ts +2 -0
  19. package/dist/src/components/atoms/typography/Code/Code.d.ts +24 -0
  20. package/dist/src/components/atoms/typography/Code/Code.stories.d.ts +16 -0
  21. package/dist/src/components/atoms/typography/Code/index.d.ts +2 -0
  22. package/dist/src/components/atoms/typography/Em/Em.d.ts +20 -0
  23. package/dist/src/components/atoms/typography/Em/Em.stories.d.ts +14 -0
  24. package/dist/src/components/atoms/typography/Em/index.d.ts +2 -0
  25. package/dist/src/components/atoms/typography/Kbd/Kbd.d.ts +24 -0
  26. package/dist/src/components/atoms/typography/Kbd/Kbd.stories.d.ts +16 -0
  27. package/dist/src/components/atoms/typography/Kbd/index.d.ts +2 -0
  28. package/dist/src/components/atoms/typography/Label/Label.d.ts +14 -0
  29. package/dist/src/components/atoms/{Label → typography/Label}/Label.stories.d.ts +0 -15
  30. package/dist/src/components/atoms/typography/Label/index.d.ts +2 -0
  31. package/dist/src/components/atoms/typography/Link/Link.d.ts +10 -0
  32. package/dist/src/components/atoms/typography/Link/Link.stories.d.ts +15 -0
  33. package/dist/src/components/atoms/typography/Link/index.d.ts +2 -0
  34. package/dist/src/components/atoms/typography/Quote/Quote.d.ts +20 -0
  35. package/dist/src/components/atoms/typography/Quote/Quote.stories.d.ts +14 -0
  36. package/dist/src/components/atoms/typography/Quote/index.d.ts +2 -0
  37. package/dist/src/components/atoms/typography/Strong/Strong.d.ts +20 -0
  38. package/dist/src/components/atoms/typography/Strong/Strong.stories.d.ts +15 -0
  39. package/dist/src/components/atoms/typography/Strong/index.d.ts +2 -0
  40. package/dist/src/components/atoms/ui-components/Accordion/Accordion.d.ts +23 -0
  41. package/dist/src/components/atoms/ui-components/Accordion/Accordion.stories.d.ts +19 -0
  42. package/dist/src/components/atoms/ui-components/Accordion/index.d.ts +2 -0
  43. package/dist/src/components/atoms/ui-components/Alert/Alert.d.ts +49 -0
  44. package/dist/src/components/atoms/ui-components/Alert/Alert.stories.d.ts +17 -0
  45. package/dist/src/components/atoms/ui-components/Alert/index.d.ts +2 -0
  46. package/dist/src/components/atoms/ui-components/AlertDialog/AlertDialog.d.ts +18 -0
  47. package/dist/src/components/atoms/ui-components/AlertDialog/AlertDialog.stories.d.ts +23 -0
  48. package/dist/src/components/atoms/ui-components/AlertDialog/index.d.ts +2 -0
  49. package/dist/src/components/atoms/ui-components/AspectRatio/AspectRatio.d.ts +10 -0
  50. package/dist/src/components/atoms/ui-components/AspectRatio/AspectRatio.stories.d.ts +14 -0
  51. package/dist/src/components/atoms/ui-components/AspectRatio/index.d.ts +2 -0
  52. package/dist/src/components/atoms/ui-components/Avatar/Avatar.d.ts +15 -0
  53. package/dist/src/components/atoms/{Avatar → ui-components/Avatar}/Avatar.stories.d.ts +8 -0
  54. package/dist/src/components/atoms/ui-components/Avatar/index.d.ts +2 -0
  55. package/dist/src/components/atoms/ui-components/Badge/Badge.d.ts +12 -0
  56. package/dist/src/components/atoms/{Select/Select.stories.d.ts → ui-components/Badge/Badge.stories.d.ts} +27 -43
  57. package/dist/src/components/atoms/ui-components/Badge/index.d.ts +2 -0
  58. package/dist/src/components/atoms/ui-components/Button/Button.d.ts +16 -0
  59. package/dist/src/components/atoms/{Switch/Switch.stories.d.ts → ui-components/Button/Button.stories.d.ts} +26 -43
  60. package/dist/src/components/atoms/ui-components/Button/index.d.ts +3 -0
  61. package/dist/src/components/atoms/ui-components/Callout/Callout.d.ts +14 -0
  62. package/dist/src/components/atoms/ui-components/Callout/Callout.stories.d.ts +17 -0
  63. package/dist/src/components/atoms/ui-components/Callout/index.d.ts +2 -0
  64. package/dist/src/components/atoms/ui-components/Card/Card.d.ts +12 -0
  65. package/dist/src/components/atoms/ui-components/Card/index.d.ts +2 -0
  66. package/dist/src/components/atoms/ui-components/Checkbox/Checkbox.d.ts +11 -0
  67. package/dist/src/components/atoms/{Popover/Popover.stories.d.ts → ui-components/Checkbox/Checkbox.stories.d.ts} +26 -43
  68. package/dist/src/components/atoms/ui-components/ContextMenu/ContextMenu.d.ts +17 -0
  69. package/dist/src/components/atoms/ui-components/ContextMenu/ContextMenu.stories.d.ts +21 -0
  70. package/dist/src/components/atoms/ui-components/ContextMenu/index.d.ts +2 -0
  71. package/dist/src/components/atoms/ui-components/DataList/DataList.d.ts +11 -0
  72. package/dist/src/components/atoms/ui-components/DataList/DataList.stories.d.ts +17 -0
  73. package/dist/src/components/atoms/ui-components/DataList/index.d.ts +2 -0
  74. package/dist/src/components/atoms/ui-components/Dialog/Dialog.d.ts +20 -0
  75. package/dist/src/components/atoms/ui-components/Dialog/Dialog.stories.d.ts +25 -0
  76. package/dist/src/components/atoms/ui-components/Dialog/index.d.ts +2 -0
  77. package/dist/src/components/atoms/ui-components/DropdownMenu/DropdownMenu.d.ts +21 -0
  78. package/dist/src/components/atoms/ui-components/DropdownMenu/DropdownMenu.stories.d.ts +26 -0
  79. package/dist/src/components/atoms/ui-components/DropdownMenu/index.d.ts +2 -0
  80. package/dist/src/components/atoms/ui-components/HoverCard/HoverCard.d.ts +14 -0
  81. package/dist/src/components/atoms/ui-components/HoverCard/HoverCard.stories.d.ts +19 -0
  82. package/dist/src/components/atoms/ui-components/HoverCard/index.d.ts +2 -0
  83. package/dist/src/components/atoms/ui-components/IconButton/IconButton.d.ts +7 -0
  84. package/dist/src/components/atoms/ui-components/IconButton/IconButton.stories.d.ts +15 -0
  85. package/dist/src/components/atoms/ui-components/IconButton/index.d.ts +2 -0
  86. package/dist/src/components/atoms/ui-components/Inset/Inset.d.ts +7 -0
  87. package/dist/src/components/atoms/ui-components/Inset/Inset.stories.d.ts +13 -0
  88. package/dist/src/components/atoms/ui-components/Inset/index.d.ts +2 -0
  89. package/dist/src/components/atoms/ui-components/Popover/Popover.d.ts +15 -0
  90. package/dist/src/components/atoms/ui-components/Popover/Popover.stories.d.ts +20 -0
  91. package/dist/src/components/atoms/ui-components/Popover/index.d.ts +2 -0
  92. package/dist/src/components/atoms/ui-components/Progress/Progress.d.ts +11 -0
  93. package/dist/src/components/atoms/ui-components/Progress/index.d.ts +2 -0
  94. package/dist/src/components/atoms/ui-components/ProgressBar/ProgressBar.d.ts +11 -0
  95. package/dist/src/components/atoms/ui-components/ProgressBar/ProgressBar.stories.d.ts +59 -0
  96. package/dist/src/components/atoms/ui-components/ProgressBar/index.d.ts +2 -0
  97. package/dist/src/components/atoms/ui-components/RadioGroup/RadioGroup.d.ts +13 -0
  98. package/dist/src/components/atoms/ui-components/RadioGroup/RadioGroup.stories.d.ts +49 -0
  99. package/dist/src/components/atoms/ui-components/RadioGroup/index.d.ts +2 -0
  100. package/dist/src/components/atoms/ui-components/ScrollArea/ScrollArea.d.ts +10 -0
  101. package/dist/src/components/atoms/ui-components/ScrollArea/index.d.ts +2 -0
  102. package/dist/src/components/atoms/ui-components/Select/Select.d.ts +19 -0
  103. package/dist/src/components/atoms/ui-components/Select/Select.stories.d.ts +23 -0
  104. package/dist/src/components/atoms/ui-components/Select/index.d.ts +2 -0
  105. package/dist/src/components/atoms/ui-components/Separator/Separator.d.ts +10 -0
  106. package/dist/src/components/atoms/ui-components/Separator/index.d.ts +2 -0
  107. package/dist/src/components/atoms/ui-components/Skeleton/Skeleton.d.ts +7 -0
  108. package/dist/src/components/atoms/ui-components/Skeleton/Skeleton.stories.d.ts +14 -0
  109. package/dist/src/components/atoms/ui-components/Skeleton/index.d.ts +2 -0
  110. package/dist/src/components/atoms/ui-components/Slider/Slider.d.ts +11 -0
  111. package/dist/src/components/atoms/{Slider → ui-components/Slider}/Slider.stories.d.ts +24 -58
  112. package/dist/src/components/atoms/ui-components/Slider/index.d.ts +2 -0
  113. package/dist/src/components/atoms/ui-components/Spinner/Spinner.d.ts +7 -0
  114. package/dist/src/components/atoms/ui-components/Spinner/Spinner.stories.d.ts +14 -0
  115. package/dist/src/components/atoms/ui-components/Spinner/index.d.ts +2 -0
  116. package/dist/src/components/atoms/ui-components/Stepper/Stepper.d.ts +49 -0
  117. package/dist/src/components/atoms/ui-components/Stepper/Stepper.stories.d.ts +64 -0
  118. package/dist/src/components/atoms/ui-components/Stepper/index.d.ts +2 -0
  119. package/dist/src/components/atoms/ui-components/Switch/Switch.d.ts +11 -0
  120. package/dist/src/components/atoms/ui-components/Switch/Switch.stories.d.ts +61 -0
  121. package/dist/src/components/atoms/ui-components/Table/Table.d.ts +14 -0
  122. package/dist/src/components/atoms/ui-components/Table/Table.stories.d.ts +20 -0
  123. package/dist/src/components/atoms/ui-components/Table/index.d.ts +2 -0
  124. package/dist/src/components/atoms/ui-components/Tabs/Tabs.d.ts +15 -0
  125. package/dist/src/components/atoms/ui-components/Tabs/Tabs.stories.d.ts +20 -0
  126. package/dist/src/components/atoms/ui-components/Tabs/index.d.ts +2 -0
  127. package/dist/src/components/atoms/ui-components/TextArea/TextArea.d.ts +12 -0
  128. package/dist/src/components/atoms/ui-components/TextArea/TextArea.stories.d.ts +68 -0
  129. package/dist/src/components/atoms/ui-components/TextField/TextField.d.ts +11 -0
  130. package/dist/src/components/atoms/ui-components/TextField/TextField.stories.d.ts +14 -0
  131. package/dist/src/components/atoms/ui-components/TextField/index.d.ts +2 -0
  132. package/dist/src/components/atoms/ui-components/Tooltip/Tooltip.d.ts +11 -0
  133. package/dist/src/components/atoms/ui-components/Tooltip/Tooltip.stories.d.ts +38 -0
  134. package/dist/src/components/templates/CancellationFlowTemplate/CancellationFlow.config.d.ts +2 -0
  135. package/dist/src/components/templates/CancellationFlowTemplate/CancellationFlow.types.d.ts +85 -0
  136. package/dist/src/components/templates/CancellationFlowTemplate/CancellationFlowManager.d.ts +30 -0
  137. package/dist/src/components/templates/CancellationFlowTemplate/CancellationFlowTemplate.d.ts +4 -0
  138. package/dist/src/components/templates/CancellationFlowTemplate/CancellationFlowTemplate.stories.d.ts +47 -0
  139. package/dist/src/components/templates/CancellationFlowTemplate/index.d.ts +4 -0
  140. package/dist/src/components/templates/index.d.ts +4 -0
  141. package/package.json +3 -2
  142. package/dist/src/components/atoms/Accordion/Accordion.d.ts +0 -52
  143. package/dist/src/components/atoms/Accordion/Accordion.stories.d.ts +0 -109
  144. package/dist/src/components/atoms/Accordion/index.d.ts +0 -2
  145. package/dist/src/components/atoms/AlertDialog/AlertDialog.d.ts +0 -66
  146. package/dist/src/components/atoms/AlertDialog/AlertDialog.stories.d.ts +0 -144
  147. package/dist/src/components/atoms/AlertDialog/index.d.ts +0 -2
  148. package/dist/src/components/atoms/Avatar/Avatar.d.ts +0 -54
  149. package/dist/src/components/atoms/Avatar/index.d.ts +0 -2
  150. package/dist/src/components/atoms/Badge/Badge.d.ts +0 -58
  151. package/dist/src/components/atoms/Badge/Badge.stories.d.ts +0 -706
  152. package/dist/src/components/atoms/Badge/index.d.ts +0 -2
  153. package/dist/src/components/atoms/Button/Button.d.ts +0 -63
  154. package/dist/src/components/atoms/Button/Button.stories.d.ts +0 -763
  155. package/dist/src/components/atoms/Button/index.d.ts +0 -2
  156. package/dist/src/components/atoms/Card/Card.d.ts +0 -44
  157. package/dist/src/components/atoms/Card/index.d.ts +0 -2
  158. package/dist/src/components/atoms/Checkbox/Checkbox.d.ts +0 -52
  159. package/dist/src/components/atoms/Checkbox/Checkbox.stories.d.ts +0 -168
  160. package/dist/src/components/atoms/Dialog/Dialog.d.ts +0 -53
  161. package/dist/src/components/atoms/Dialog/Dialog.stories.d.ts +0 -122
  162. package/dist/src/components/atoms/Dialog/index.d.ts +0 -2
  163. package/dist/src/components/atoms/DropdownMenu/DropdownMenu.d.ts +0 -61
  164. package/dist/src/components/atoms/DropdownMenu/DropdownMenu.stories.d.ts +0 -109
  165. package/dist/src/components/atoms/DropdownMenu/index.d.ts +0 -2
  166. package/dist/src/components/atoms/HoverCard/HoverCard.d.ts +0 -38
  167. package/dist/src/components/atoms/HoverCard/HoverCard.stories.d.ts +0 -86
  168. package/dist/src/components/atoms/HoverCard/index.d.ts +0 -2
  169. package/dist/src/components/atoms/Label/Label.d.ts +0 -19
  170. package/dist/src/components/atoms/Label/index.d.ts +0 -2
  171. package/dist/src/components/atoms/Popover/Popover.d.ts +0 -44
  172. package/dist/src/components/atoms/Popover/index.d.ts +0 -2
  173. package/dist/src/components/atoms/Progress/Progress.d.ts +0 -45
  174. package/dist/src/components/atoms/Progress/index.d.ts +0 -2
  175. package/dist/src/components/atoms/ProgressBar/ProgressBar.d.ts +0 -66
  176. package/dist/src/components/atoms/ProgressBar/ProgressBar.stories.d.ts +0 -439
  177. package/dist/src/components/atoms/ProgressBar/index.d.ts +0 -2
  178. package/dist/src/components/atoms/RadioGroup/RadioGroup.d.ts +0 -46
  179. package/dist/src/components/atoms/RadioGroup/RadioGroup.stories.d.ts +0 -104
  180. package/dist/src/components/atoms/RadioGroup/index.d.ts +0 -2
  181. package/dist/src/components/atoms/ScrollArea/ScrollArea.d.ts +0 -36
  182. package/dist/src/components/atoms/ScrollArea/index.d.ts +0 -2
  183. package/dist/src/components/atoms/Select/Select.d.ts +0 -55
  184. package/dist/src/components/atoms/Select/index.d.ts +0 -2
  185. package/dist/src/components/atoms/Separator/Separator.d.ts +0 -17
  186. package/dist/src/components/atoms/Separator/index.d.ts +0 -2
  187. package/dist/src/components/atoms/Slider/Slider.d.ts +0 -55
  188. package/dist/src/components/atoms/Slider/index.d.ts +0 -2
  189. package/dist/src/components/atoms/Stepper/Stepper.d.ts +0 -100
  190. package/dist/src/components/atoms/Stepper/Stepper.stories.d.ts +0 -496
  191. package/dist/src/components/atoms/Stepper/index.d.ts +0 -2
  192. package/dist/src/components/atoms/Switch/Switch.d.ts +0 -49
  193. package/dist/src/components/atoms/Tabs/Tabs.d.ts +0 -35
  194. package/dist/src/components/atoms/Tabs/Tabs.stories.d.ts +0 -83
  195. package/dist/src/components/atoms/Tabs/index.d.ts +0 -2
  196. package/dist/src/components/atoms/TextArea/TextArea.d.ts +0 -62
  197. package/dist/src/components/atoms/TextArea/TextArea.stories.d.ts +0 -178
  198. package/dist/src/components/atoms/Toast/Toast.d.ts +0 -59
  199. package/dist/src/components/atoms/Toast/Toast.stories.d.ts +0 -118
  200. package/dist/src/components/atoms/Toast/index.d.ts +0 -2
  201. package/dist/src/components/atoms/Toggle/Toggle.d.ts +0 -20
  202. package/dist/src/components/atoms/Toggle/Toggle.stories.d.ts +0 -118
  203. package/dist/src/components/atoms/Toggle/index.d.ts +0 -2
  204. package/dist/src/components/atoms/Tooltip/Tooltip.d.ts +0 -32
  205. package/dist/src/components/atoms/Tooltip/Tooltip.stories.d.ts +0 -87
  206. /package/dist/src/components/atoms/{Card → ui-components/Card}/Card.stories.d.ts +0 -0
  207. /package/dist/src/components/atoms/{Checkbox → ui-components/Checkbox}/index.d.ts +0 -0
  208. /package/dist/src/components/atoms/{Progress → ui-components/Progress}/Progress.stories.d.ts +0 -0
  209. /package/dist/src/components/atoms/{ScrollArea → ui-components/ScrollArea}/ScrollArea.stories.d.ts +0 -0
  210. /package/dist/src/components/atoms/{Separator → ui-components/Separator}/Separator.stories.d.ts +0 -0
  211. /package/dist/src/components/atoms/{Switch → ui-components/Switch}/index.d.ts +0 -0
  212. /package/dist/src/components/atoms/{TextArea → ui-components/TextArea}/index.d.ts +0 -0
  213. /package/dist/src/components/atoms/{Tooltip → ui-components/Tooltip}/index.d.ts +0 -0
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import type { StoryObj } from "@storybook/react-vite";
3
+ declare const meta: {
4
+ title: string;
5
+ component: React.ForwardRefExoticComponent<import("./TextField").TextFieldProps & React.RefAttributes<HTMLInputElement>>;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ tags: string[];
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
14
+ export declare const Sizes: Story;
@@ -0,0 +1,2 @@
1
+ export { TextField } from "./TextField";
2
+ export type { TextFieldProps } from "./TextField";
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { Tooltip as RadixTooltip } from "@radix-ui/themes";
3
+ import { type ColorToken } from "../../../../tokens";
4
+ import "./Tooltip.scss";
5
+ export type { ColorToken } from "../../../../tokens";
6
+ export interface TooltipProps extends Omit<React.ComponentPropsWithoutRef<typeof RadixTooltip>, "m" | "mx" | "my" | "mt" | "mr" | "mb" | "ml"> {
7
+ backgroundColorToken?: ColorToken;
8
+ textColorToken?: ColorToken;
9
+ className?: string;
10
+ }
11
+ export declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,38 @@
1
+ import React from "react";
2
+ import type { StoryObj } from "@storybook/react-vite";
3
+ declare const meta: {
4
+ title: string;
5
+ component: React.ForwardRefExoticComponent<import("./Tooltip").TooltipProps & React.RefAttributes<HTMLDivElement>>;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ tags: string[];
10
+ argTypes: {
11
+ content: {
12
+ control: "text";
13
+ description: string;
14
+ table: {
15
+ category: string;
16
+ };
17
+ };
18
+ backgroundColorToken: {
19
+ control: false;
20
+ description: string;
21
+ table: {
22
+ category: string;
23
+ };
24
+ };
25
+ textColorToken: {
26
+ control: false;
27
+ description: string;
28
+ table: {
29
+ category: string;
30
+ };
31
+ };
32
+ };
33
+ };
34
+ export default meta;
35
+ type Story = StoryObj<typeof meta>;
36
+ export declare const Default: Story;
37
+ export declare const OnIcon: Story;
38
+ export declare const WithCustomColors: Story;
@@ -0,0 +1,2 @@
1
+ import { CancellationFlowData } from "./CancellationFlow.types";
2
+ export declare const defaultCancellationFlowData: CancellationFlowData;
@@ -0,0 +1,85 @@
1
+ export type CancellationStep = "initial" | "reason-selection" | "too-expensive-offer" | "missing-mockups-offer" | "missing-features-request" | "seasonal-offer" | "technical-support" | "other-feedback" | "keep-account-success" | "confirm-cancellation";
2
+ export type CancellationReason = "too-expensive" | "missing-mockups" | "missing-features" | "seasonal-business" | "technical-issues" | "other";
3
+ export interface UserStats {
4
+ mockupsGenerated: number;
5
+ activeTemplates: number;
6
+ connectedStores: number;
7
+ }
8
+ export interface RecentCreation {
9
+ id: string;
10
+ imageUrl: string;
11
+ alt?: string;
12
+ }
13
+ export interface ReasonOption {
14
+ id: CancellationReason;
15
+ icon: string;
16
+ title: string;
17
+ description: string;
18
+ }
19
+ export interface DiscountOffer {
20
+ currentPrice: string;
21
+ discountedPrice: string;
22
+ discountPercentage: string;
23
+ duration: string;
24
+ }
25
+ export interface CreditsReward {
26
+ amount: number;
27
+ message?: string;
28
+ }
29
+ export interface TechnicalSupport {
30
+ availabilityStatus: string;
31
+ message: string;
32
+ responseTime: string;
33
+ }
34
+ export interface CancellationInfo {
35
+ accessUntilDate: string;
36
+ dataLossDate: string;
37
+ reactivationDate: string;
38
+ disclaimer: string;
39
+ }
40
+ export interface CancellationFlowData {
41
+ userStats: UserStats;
42
+ recentCreations: RecentCreation[];
43
+ reasonOptions: ReasonOption[];
44
+ discountOffer?: DiscountOffer;
45
+ creditsReward?: CreditsReward;
46
+ seasonalCreditsReward?: CreditsReward;
47
+ technicalSupport?: TechnicalSupport;
48
+ cancellationInfo?: CancellationInfo;
49
+ aiMockupGifUrl?: string;
50
+ roadmapUrl?: string;
51
+ }
52
+ export interface AcceptedOffer {
53
+ offerType: "discount" | "seasonal-discount";
54
+ reason: CancellationReason | null;
55
+ step: CancellationStep;
56
+ discountPercentage?: string;
57
+ discountedPrice?: string;
58
+ }
59
+ export interface CancellationFlowCallbacks {
60
+ onKeepAccount?: (step: CancellationStep, reason?: CancellationReason) => void;
61
+ onContinueToCancel?: (step: CancellationStep) => void;
62
+ onReasonSelected?: (reason: CancellationReason) => void;
63
+ onAcceptOffer?: (offer: AcceptedOffer) => void;
64
+ onDeclineOffer?: (offerType: string) => void;
65
+ onSubmitFeatureRequest?: (feature: string) => void;
66
+ onSubmitFeedback?: (feedback: string) => void;
67
+ onBookSupport?: () => void;
68
+ onConfirmCancellation?: (reason?: CancellationReason) => void;
69
+ onStepChange?: (newStep: CancellationStep, previousStep: CancellationStep) => void;
70
+ /** Fired when the user completes an action that closes the modal (accept offer, back to dashboard, etc.) */
71
+ onClose?: () => void;
72
+ /** Fired when the user dismisses the modal without completing (X button, backdrop click) */
73
+ onAbandon?: (step: CancellationStep, reason?: CancellationReason) => void;
74
+ onClaimCredits?: () => void;
75
+ onTryAI?: () => void;
76
+ onViewRoadmap?: () => void;
77
+ onBackToDashboard?: () => void;
78
+ }
79
+ export interface CancellationFlowTemplateProps {
80
+ open?: boolean;
81
+ data: CancellationFlowData;
82
+ callbacks: CancellationFlowCallbacks;
83
+ initialStep?: CancellationStep;
84
+ showClose?: boolean;
85
+ }
@@ -0,0 +1,30 @@
1
+ import React from "react";
2
+ import { CancellationStep, CancellationReason, CancellationFlowCallbacks, AcceptedOffer } from "./CancellationFlow.types";
3
+ interface UseCancellationFlowManagerProps {
4
+ initialStep?: CancellationStep;
5
+ callbacks: CancellationFlowCallbacks;
6
+ }
7
+ export declare const useCancellationFlowManager: ({ initialStep, callbacks, }: UseCancellationFlowManagerProps) => {
8
+ currentStep: CancellationStep;
9
+ selectedReason: CancellationReason | null;
10
+ featureRequest: string;
11
+ setFeatureRequest: React.Dispatch<React.SetStateAction<string>>;
12
+ otherFeedback: string;
13
+ setOtherFeedback: React.Dispatch<React.SetStateAction<string>>;
14
+ handleKeepAccount: () => void;
15
+ handleContinueToCancel: () => void;
16
+ handleReasonSelected: (reason: CancellationReason) => void;
17
+ handleReasonContinue: () => void;
18
+ handleAcceptOffer: (offer: AcceptedOffer) => void;
19
+ handleDeclineOffer: (offerType: string) => void;
20
+ handleSubmitFeatureRequest: () => void;
21
+ handleSubmitFeedback: () => void;
22
+ handleBookSupport: () => void;
23
+ handleConfirmCancellation: () => void;
24
+ handleBack: () => void;
25
+ handleClaimCredits: () => void;
26
+ handleTryAI: () => void;
27
+ handleViewRoadmap: () => void;
28
+ handleBackToDashboard: () => void;
29
+ };
30
+ export {};
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { CancellationFlowTemplateProps } from "./CancellationFlow.types";
3
+ import "./CancellationFlowTemplate.scss";
4
+ export declare const CancellationFlowTemplate: React.ForwardRefExoticComponent<CancellationFlowTemplateProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,47 @@
1
+ import type { StoryObj } from "@storybook/react";
2
+ import React from "react";
3
+ declare const meta: {
4
+ title: string;
5
+ component: React.ForwardRefExoticComponent<import("./CancellationFlow.types").CancellationFlowTemplateProps & React.RefAttributes<HTMLDivElement>>;
6
+ parameters: {
7
+ layout: string;
8
+ docs: {
9
+ description: {
10
+ component: string;
11
+ };
12
+ };
13
+ };
14
+ tags: string[];
15
+ argTypes: {
16
+ open: {
17
+ control: "boolean";
18
+ description: string;
19
+ defaultValue: boolean;
20
+ };
21
+ showClose: {
22
+ control: "boolean";
23
+ description: string;
24
+ defaultValue: boolean;
25
+ };
26
+ initialStep: {
27
+ control: "select";
28
+ options: string[];
29
+ description: string;
30
+ };
31
+ };
32
+ };
33
+ export default meta;
34
+ type Story = StoryObj<typeof meta>;
35
+ export declare const InitialScreen: Story;
36
+ export declare const ReasonSelection: Story;
37
+ export declare const TooExpensiveOffer: Story;
38
+ export declare const MissingMockupsOffer: Story;
39
+ export declare const MissingFeaturesRequest: Story;
40
+ export declare const SeasonalOffer: Story;
41
+ export declare const TechnicalSupport: Story;
42
+ export declare const OtherFeedback: Story;
43
+ export declare const KeepAccountSuccess: Story;
44
+ export declare const ConfirmCancellation: Story;
45
+ export declare const CustomData: Story;
46
+ export declare const WithoutCloseButton: Story;
47
+ export declare const InteractiveFlow: Story;
@@ -0,0 +1,4 @@
1
+ export { CancellationFlowTemplate } from "./CancellationFlowTemplate";
2
+ export type { CancellationStep, CancellationReason, AcceptedOffer, UserStats, RecentCreation, ReasonOption, DiscountOffer, CreditsReward, TechnicalSupport, CancellationInfo, CancellationFlowData, CancellationFlowCallbacks, CancellationFlowTemplateProps, } from "./CancellationFlow.types";
3
+ export { defaultCancellationFlowData } from "./CancellationFlow.config";
4
+ export { useCancellationFlowManager } from "./CancellationFlowManager";
@@ -8,3 +8,7 @@ export { OnboardingFlowManager } from "./OnboardingTemplate/OnboardingFlowManage
8
8
  export type { OnboardingFlowManagerProps } from "./OnboardingTemplate/OnboardingFlowManager";
9
9
  export type { OnboardingStepType, OnboardingStepBase, OnboardingRadioStep, OnboardingCheckboxStep, OnboardingButtonsPlusRadioStep, OnboardingKnowYourCustomerStep, OnboardingLauncherStep, OnboardingArtworkStep, OnboardingStep, OnboardingFlowConfig, OnboardingFlowData, OnboardingFlowCallbacks, } from "./OnboardingTemplate/OnboardingFlow.types";
10
10
  export { fullOnboardingFlowConfig } from "./OnboardingTemplate/OnboardingFlow.config";
11
+ export { CancellationFlowTemplate } from "./CancellationFlowTemplate/CancellationFlowTemplate";
12
+ export type { CancellationFlowTemplateProps, CancellationStep, CancellationReason, UserStats, RecentCreation, ReasonOption, DiscountOffer, CreditsReward, TechnicalSupport, CancellationInfo, CancellationFlowData, CancellationFlowCallbacks, } from "./CancellationFlowTemplate/CancellationFlow.types";
13
+ export { useCancellationFlowManager } from "./CancellationFlowTemplate/CancellationFlowManager";
14
+ export { defaultCancellationFlowData } from "./CancellationFlowTemplate/CancellationFlow.config";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-mockups/design-system",
3
- "version": "0.2.14",
3
+ "version": "0.2.17",
4
4
  "description": "A professional, scalable design system built with React 18, TypeScript, Radix UI, and Storybook",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -65,7 +65,8 @@
65
65
  },
66
66
  "dependencies": {
67
67
  "@iconify-icon/react": "^3.0.3",
68
- "@radix-ui/colors": "^3.0.0"
68
+ "@radix-ui/colors": "^3.0.0",
69
+ "@radix-ui/react-icons": "^1.3.2"
69
70
  },
70
71
  "devDependencies": {
71
72
  "@chromatic-com/storybook": "^4.1.3",
@@ -1,52 +0,0 @@
1
- /**
2
- * Accordion Component
3
- * An accordion component that extends Radix UI Accordion
4
- */
5
- import React from "react";
6
- import type { AccordionSingleProps, AccordionMultipleProps } from "@radix-ui/react-accordion";
7
- import { type ColorToken } from "../../../tokens";
8
- import "./Accordion.scss";
9
- export type { ColorToken } from "../../../tokens";
10
- export type AccordionType = "single" | "multiple";
11
- export interface AccordionItemData {
12
- value: string;
13
- trigger: React.ReactNode;
14
- content: React.ReactNode;
15
- }
16
- export interface BaseAccordionProps {
17
- /**
18
- * Accordion type - single allows one item open, multiple allows many
19
- * @default 'single'
20
- */
21
- type?: AccordionType;
22
- /**
23
- * Array of accordion items
24
- */
25
- items: AccordionItemData[];
26
- /**
27
- * Default open value(s)
28
- */
29
- defaultValue?: string | string[];
30
- /**
31
- * Color token for trigger text
32
- */
33
- triggerColorToken?: ColorToken;
34
- /**
35
- * Color token for content text
36
- */
37
- contentColorToken?: ColorToken;
38
- /**
39
- * Color token for border
40
- */
41
- borderColorToken?: ColorToken;
42
- /**
43
- * Color token for background
44
- */
45
- backgroundColorToken?: ColorToken;
46
- /**
47
- * Custom className
48
- */
49
- className?: string;
50
- }
51
- export type AccordionProps = BaseAccordionProps & (Omit<AccordionSingleProps, "type" | "children"> | Omit<AccordionMultipleProps, "type" | "children">);
52
- export declare const Accordion: React.ForwardRefExoticComponent<AccordionProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,109 +0,0 @@
1
- import React from "react";
2
- import type { StoryObj } from "@storybook/react-vite";
3
- import type { ColorToken } from "./Accordion";
4
- declare const meta: {
5
- title: string;
6
- component: React.ForwardRefExoticComponent<import("./Accordion").AccordionProps & React.RefAttributes<HTMLDivElement>>;
7
- parameters: {
8
- layout: string;
9
- };
10
- tags: string[];
11
- argTypes: {
12
- type: {
13
- control: "select";
14
- options: string[];
15
- description: string;
16
- table: {
17
- category: string;
18
- };
19
- };
20
- items: {
21
- control: "object";
22
- description: string;
23
- table: {
24
- category: string;
25
- };
26
- };
27
- defaultValue: {
28
- control: "text";
29
- description: string;
30
- table: {
31
- category: string;
32
- };
33
- };
34
- triggerColorToken: {
35
- control: "select";
36
- options: ColorToken[];
37
- description: string;
38
- table: {
39
- category: string;
40
- };
41
- };
42
- contentColorToken: {
43
- control: "select";
44
- options: ColorToken[];
45
- description: string;
46
- table: {
47
- category: string;
48
- };
49
- };
50
- borderColorToken: {
51
- control: "select";
52
- options: ColorToken[];
53
- description: string;
54
- table: {
55
- category: string;
56
- };
57
- };
58
- backgroundColorToken: {
59
- control: "select";
60
- options: ColorToken[];
61
- description: string;
62
- table: {
63
- category: string;
64
- };
65
- };
66
- m: {
67
- table: {
68
- disable: boolean;
69
- };
70
- };
71
- mx: {
72
- table: {
73
- disable: boolean;
74
- };
75
- };
76
- my: {
77
- table: {
78
- disable: boolean;
79
- };
80
- };
81
- mt: {
82
- table: {
83
- disable: boolean;
84
- };
85
- };
86
- mr: {
87
- table: {
88
- disable: boolean;
89
- };
90
- };
91
- mb: {
92
- table: {
93
- disable: boolean;
94
- };
95
- };
96
- ml: {
97
- table: {
98
- disable: boolean;
99
- };
100
- };
101
- };
102
- };
103
- export default meta;
104
- type Story = StoryObj<typeof meta>;
105
- export declare const Single: Story;
106
- export declare const Multiple: Story;
107
- export declare const FAQ: Story;
108
- export declare const RichContent: Story;
109
- export declare const InteractiveColorPicker: Story;
@@ -1,2 +0,0 @@
1
- export { Accordion } from "./Accordion";
2
- export type { AccordionProps, AccordionType, AccordionItemData } from "./Accordion";
@@ -1,66 +0,0 @@
1
- /**
2
- * AlertDialog Component
3
- * An alert dialog component that extends Radix UI AlertDialog
4
- */
5
- import React from "react";
6
- import type { AlertDialogProps as RadixAlertDialogProps } from "@radix-ui/react-alert-dialog";
7
- import { type ColorToken } from "../../../tokens";
8
- import "./AlertDialog.scss";
9
- export type { ColorToken } from "../../../tokens";
10
- export interface AlertDialogProps extends Omit<RadixAlertDialogProps, "children"> {
11
- /**
12
- * Alert dialog trigger element
13
- */
14
- trigger?: React.ReactNode;
15
- /**
16
- * Alert dialog title
17
- */
18
- title: string;
19
- /**
20
- * Alert dialog description
21
- */
22
- description: string;
23
- /**
24
- * Cancel button text
25
- * @default 'Cancel'
26
- */
27
- cancelText?: string;
28
- /**
29
- * Action button text
30
- * @default 'Confirm'
31
- */
32
- actionText?: string;
33
- /**
34
- * Callback when action button is clicked
35
- */
36
- onAction?: () => void;
37
- /**
38
- * Callback when cancel button is clicked
39
- */
40
- onCancel?: () => void;
41
- /**
42
- * Color token for overlay background
43
- */
44
- overlayColorToken?: ColorToken;
45
- /**
46
- * Color token for dialog background
47
- */
48
- backgroundColorToken?: ColorToken;
49
- /**
50
- * Color token for title text
51
- */
52
- titleColorToken?: ColorToken;
53
- /**
54
- * Color token for description text
55
- */
56
- descriptionColorToken?: ColorToken;
57
- /**
58
- * Color token for action button background
59
- */
60
- actionColorToken?: ColorToken;
61
- /**
62
- * Custom className
63
- */
64
- className?: string;
65
- }
66
- export declare const AlertDialog: React.ForwardRefExoticComponent<AlertDialogProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,144 +0,0 @@
1
- import React from "react";
2
- import type { StoryObj } from "@storybook/react-vite";
3
- import type { ColorToken } from "./AlertDialog";
4
- declare const meta: {
5
- title: string;
6
- component: React.ForwardRefExoticComponent<import("./AlertDialog").AlertDialogProps & React.RefAttributes<HTMLDivElement>>;
7
- parameters: {
8
- layout: string;
9
- };
10
- tags: string[];
11
- argTypes: {
12
- trigger: {
13
- control: false;
14
- description: string;
15
- table: {
16
- category: string;
17
- };
18
- };
19
- title: {
20
- control: "text";
21
- description: string;
22
- table: {
23
- category: string;
24
- };
25
- };
26
- description: {
27
- control: "text";
28
- description: string;
29
- table: {
30
- category: string;
31
- };
32
- };
33
- cancelText: {
34
- control: "text";
35
- description: string;
36
- table: {
37
- category: string;
38
- };
39
- };
40
- actionText: {
41
- control: "text";
42
- description: string;
43
- table: {
44
- category: string;
45
- };
46
- };
47
- onAction: {
48
- control: false;
49
- description: string;
50
- table: {
51
- category: string;
52
- };
53
- };
54
- onCancel: {
55
- control: false;
56
- description: string;
57
- table: {
58
- category: string;
59
- };
60
- };
61
- overlayColorToken: {
62
- control: "select";
63
- options: ColorToken[];
64
- description: string;
65
- table: {
66
- category: string;
67
- };
68
- };
69
- backgroundColorToken: {
70
- control: "select";
71
- options: ColorToken[];
72
- description: string;
73
- table: {
74
- category: string;
75
- };
76
- };
77
- titleColorToken: {
78
- control: "select";
79
- options: ColorToken[];
80
- description: string;
81
- table: {
82
- category: string;
83
- };
84
- };
85
- descriptionColorToken: {
86
- control: "select";
87
- options: ColorToken[];
88
- description: string;
89
- table: {
90
- category: string;
91
- };
92
- };
93
- actionColorToken: {
94
- control: "select";
95
- options: ColorToken[];
96
- description: string;
97
- table: {
98
- category: string;
99
- };
100
- };
101
- m: {
102
- table: {
103
- disable: boolean;
104
- };
105
- };
106
- mx: {
107
- table: {
108
- disable: boolean;
109
- };
110
- };
111
- my: {
112
- table: {
113
- disable: boolean;
114
- };
115
- };
116
- mt: {
117
- table: {
118
- disable: boolean;
119
- };
120
- };
121
- mr: {
122
- table: {
123
- disable: boolean;
124
- };
125
- };
126
- mb: {
127
- table: {
128
- disable: boolean;
129
- };
130
- };
131
- ml: {
132
- table: {
133
- disable: boolean;
134
- };
135
- };
136
- };
137
- };
138
- export default meta;
139
- type Story = StoryObj<typeof meta>;
140
- export declare const Default: Story;
141
- export declare const CustomText: Story;
142
- export declare const WithCallback: Story;
143
- export declare const DangerAction: Story;
144
- export declare const InteractiveColorPicker: Story;
@@ -1,2 +0,0 @@
1
- export { AlertDialog } from "./AlertDialog";
2
- export type { AlertDialogProps } from "./AlertDialog";