@taiv/ui 1.12.0 → 1.14.0

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 (264) hide show
  1. package/dist/assets/assets.d.ts +5 -0
  2. package/dist/assets/assets.d.ts.map +1 -0
  3. package/dist/assets/assets.js +18 -0
  4. package/dist/assets/icons.d.ts +12 -0
  5. package/dist/assets/icons.d.ts.map +1 -0
  6. package/dist/assets/icons.js +62 -0
  7. package/dist/assets/svgs/GoogleIcon.d.ts +5 -0
  8. package/dist/assets/svgs/GoogleIcon.d.ts.map +1 -0
  9. package/dist/assets/svgs/GoogleIcon.js +2 -0
  10. package/dist/components/Data/Cards/ChartCard/ChartCard.d.ts.map +1 -1
  11. package/dist/components/Data/Cards/ChartCard/ChartCard.js +3 -2
  12. package/dist/components/Data/Cards/PieChartCard/PieChartCard.d.ts.map +1 -1
  13. package/dist/components/Data/Cards/PieChartCard/PieChartCard.js +2 -1
  14. package/dist/components/Data/Cards/StatsCard/StatsCard.d.ts.map +1 -1
  15. package/dist/components/Data/Cards/StatsCard/StatsCard.js +2 -1
  16. package/dist/components/Data/Chart/Chart.d.ts.map +1 -1
  17. package/dist/components/Data/Chart/Chart.js +5 -4
  18. package/dist/components/Data/Chart/Chart.stories.d.ts.map +1 -1
  19. package/dist/components/Data/Chart/Chart.stories.js +6 -5
  20. package/dist/components/Data/CheckboxTable/CheckboxTable.d.ts.map +1 -1
  21. package/dist/components/Data/CheckboxTable/CheckboxTable.js +15 -14
  22. package/dist/components/Data/PieChart/PieChart.d.ts.map +1 -1
  23. package/dist/components/Data/PieChart/PieChart.js +4 -3
  24. package/dist/components/Data/PieChart/PieChart.stories.d.ts.map +1 -1
  25. package/dist/components/Data/PieChart/PieChart.stories.js +4 -3
  26. package/dist/components/Data/Progress/Progress.stories.d.ts.map +1 -1
  27. package/dist/components/Data/Progress/Progress.stories.js +7 -6
  28. package/dist/components/Data/RemovableItemList/RemovableItemList.d.ts.map +1 -1
  29. package/dist/components/Data/RemovableItemList/RemovableItemList.js +4 -3
  30. package/dist/components/Info/Badge/Badge.stories.d.ts.map +1 -1
  31. package/dist/components/Info/Badge/Badge.stories.js +5 -4
  32. package/dist/components/Info/Badge/sizes.d.ts.map +1 -1
  33. package/dist/components/Info/Badge/sizes.js +7 -6
  34. package/dist/components/Info/Badge/variants.d.ts.map +1 -1
  35. package/dist/components/Info/Badge/variants.js +3 -2
  36. package/dist/components/Info/InfoCard/InfoCard.d.ts.map +1 -1
  37. package/dist/components/Info/InfoCard/InfoCard.js +2 -1
  38. package/dist/components/Info/Modals/FormModal/FormModal.d.ts.map +1 -1
  39. package/dist/components/Info/Modals/FormModal/FormModal.js +12 -11
  40. package/dist/components/Info/Modals/FormModal/FormModal.stories.js +11 -11
  41. package/dist/components/Info/Modals/Modal/Modal.d.ts.map +1 -1
  42. package/dist/components/Info/Modals/Modal/Modal.js +7 -6
  43. package/dist/components/Info/Modals/Modal/Modal.stories.d.ts +7 -0
  44. package/dist/components/Info/Modals/Modal/Modal.stories.d.ts.map +1 -0
  45. package/dist/components/Info/Modals/Modal/Modal.stories.js +61 -0
  46. package/dist/components/Info/Modals/Modals.stories.d.ts +16 -0
  47. package/dist/components/Info/Modals/Modals.stories.d.ts.map +1 -0
  48. package/dist/components/Info/Modals/Modals.stories.js +102 -0
  49. package/dist/components/Info/Notifications/NotificationProvider/NotificationProvider.d.ts.map +1 -1
  50. package/dist/components/Info/Notifications/NotificationProvider/NotificationProvider.js +7 -6
  51. package/dist/components/Info/Notifications/Notifications.stories.d.ts +10 -0
  52. package/dist/components/Info/Notifications/Notifications.stories.d.ts.map +1 -0
  53. package/dist/components/Info/Notifications/Notifications.stories.js +107 -0
  54. package/dist/components/Info/Tooltips/FormulaTooltip/FormulaTooltip.d.ts.map +1 -1
  55. package/dist/components/Info/Tooltips/FormulaTooltip/FormulaTooltip.js +2 -1
  56. package/dist/components/Info/Tooltips/InfoTooltip/InfoTooltip.d.ts +4 -4
  57. package/dist/components/Info/Tooltips/InfoTooltip/InfoTooltip.js +4 -4
  58. package/dist/components/Info/Tooltips/Tooltip/Tooltip.d.ts.map +1 -1
  59. package/dist/components/Info/Tooltips/Tooltip/Tooltip.js +2 -1
  60. package/dist/components/Inputs/Buttons/Button/Button.js +2 -2
  61. package/dist/components/Inputs/Buttons/Button/Button.stories.d.ts +1 -0
  62. package/dist/components/Inputs/Buttons/Button/Button.stories.d.ts.map +1 -1
  63. package/dist/components/Inputs/Buttons/Button/Button.stories.js +53 -46
  64. package/dist/components/Inputs/Buttons/Button/sizes.d.ts.map +1 -1
  65. package/dist/components/Inputs/Buttons/Button/sizes.js +4 -3
  66. package/dist/components/Inputs/Buttons/IconButton/IconButton.js +2 -2
  67. package/dist/components/Inputs/Buttons/IconButton/IconButton.stories.d.ts.map +1 -1
  68. package/dist/components/Inputs/Buttons/IconButton/IconButton.stories.js +7 -6
  69. package/dist/components/Inputs/Buttons/IconButton/sizes.d.ts.map +1 -1
  70. package/dist/components/Inputs/Buttons/IconButton/sizes.js +4 -3
  71. package/dist/components/Inputs/Buttons/SSOButton/SSOButton.d.ts +35 -0
  72. package/dist/components/Inputs/Buttons/SSOButton/SSOButton.d.ts.map +1 -0
  73. package/dist/components/Inputs/Buttons/SSOButton/SSOButton.js +37 -0
  74. package/dist/components/Inputs/Buttons/SSOButton/SSOButton.stories.d.ts +14 -0
  75. package/dist/components/Inputs/Buttons/SSOButton/SSOButton.stories.d.ts.map +1 -0
  76. package/dist/components/Inputs/Buttons/SSOButton/SSOButton.stories.js +121 -0
  77. package/dist/components/Inputs/Buttons/UnstyledButton/UnstyledButton.stories.d.ts.map +1 -1
  78. package/dist/components/Inputs/Buttons/UnstyledButton/UnstyledButton.stories.js +4 -3
  79. package/dist/components/Inputs/Buttons/shared/variants.d.ts +29 -29
  80. package/dist/components/Inputs/Buttons/shared/variants.d.ts.map +1 -1
  81. package/dist/components/Inputs/Buttons/shared/variants.js +6 -5
  82. package/dist/components/Inputs/Controls/Checkbox/Checkbox.stories.js +3 -3
  83. package/dist/components/Inputs/Controls/Radio/Radio.js +1 -1
  84. package/dist/components/Inputs/Controls/Radio/Radio.stories.js +3 -3
  85. package/dist/components/Inputs/Controls/RadioList/RadioList.d.ts.map +1 -1
  86. package/dist/components/Inputs/Controls/RadioList/RadioList.js +3 -2
  87. package/dist/components/Inputs/Controls/RadioList/RadioList.stories.d.ts.map +1 -1
  88. package/dist/components/Inputs/Controls/RadioList/RadioList.stories.js +3 -2
  89. package/dist/components/Inputs/Controls/SegmentedControl/SegmentedControl.stories.d.ts.map +1 -1
  90. package/dist/components/Inputs/Controls/SegmentedControl/SegmentedControl.stories.js +6 -5
  91. package/dist/components/Inputs/Controls/Toggle/Toggle.d.ts +4 -4
  92. package/dist/components/Inputs/Controls/Toggle/Toggle.js +5 -5
  93. package/dist/components/Inputs/Controls/Toggle/Toggle.stories.js +4 -4
  94. package/dist/components/Inputs/Dates/DatePicker/DatePicker.d.ts.map +1 -1
  95. package/dist/components/Inputs/Dates/DatePicker/DatePicker.js +5 -4
  96. package/dist/components/Inputs/Dates/DatePicker/DatePicker.stories.js +4 -4
  97. package/dist/components/Inputs/Dropdowns/CascadingSelect/CascadingSelect.d.ts.map +1 -1
  98. package/dist/components/Inputs/Dropdowns/CascadingSelect/CascadingSelect.js +6 -5
  99. package/dist/components/Inputs/Dropdowns/CascadingSelect/CascadingSelect.stories.js +5 -5
  100. package/dist/components/Inputs/Dropdowns/FontSelect/FontSelect.js +3 -3
  101. package/dist/components/Inputs/Dropdowns/FontSelect/FontSelect.stories.js +5 -5
  102. package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.d.ts.map +1 -1
  103. package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.js +7 -6
  104. package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.stories.js +5 -5
  105. package/dist/components/Inputs/Dropdowns/Select/Select.d.ts.map +1 -1
  106. package/dist/components/Inputs/Dropdowns/Select/Select.js +6 -5
  107. package/dist/components/Inputs/Dropdowns/Select/Select.stories.js +4 -4
  108. package/dist/components/Inputs/Dropdowns/shared/sizes.js +18 -18
  109. package/dist/components/Inputs/Sliders/Slider/Slider.d.ts.map +1 -1
  110. package/dist/components/Inputs/Sliders/Slider/Slider.js +15 -14
  111. package/dist/components/Inputs/Sliders/VolumeSlider/VolumeSlider.d.ts.map +1 -1
  112. package/dist/components/Inputs/Sliders/VolumeSlider/VolumeSlider.js +5 -4
  113. package/dist/components/Inputs/Sliders/shared/sizes.d.ts +9 -9
  114. package/dist/components/Inputs/Sliders/shared/sizes.js +9 -9
  115. package/dist/components/Inputs/TextInputs/AutoComplete/AutoComplete.d.ts.map +1 -1
  116. package/dist/components/Inputs/TextInputs/AutoComplete/AutoComplete.js +5 -4
  117. package/dist/components/Inputs/TextInputs/AutoComplete/AutoComplete.stories.js +5 -5
  118. package/dist/components/Inputs/TextInputs/NumberInput/NumberInput.js +10 -10
  119. package/dist/components/Inputs/TextInputs/NumberInput/NumberInput.stories.js +5 -5
  120. package/dist/components/Inputs/TextInputs/PasswordInput/PasswordInput.js +8 -8
  121. package/dist/components/Inputs/TextInputs/PasswordInput/PasswordInput.stories.js +5 -5
  122. package/dist/components/Inputs/TextInputs/SearchBar/SearchBar.d.ts.map +1 -1
  123. package/dist/components/Inputs/TextInputs/SearchBar/SearchBar.js +4 -3
  124. package/dist/components/Inputs/TextInputs/SearchBar/SearchBar.stories.js +5 -5
  125. package/dist/components/Inputs/TextInputs/TextArea/TextArea.d.ts.map +1 -1
  126. package/dist/components/Inputs/TextInputs/TextArea/TextArea.js +6 -5
  127. package/dist/components/Inputs/TextInputs/TextArea/TextArea.stories.js +5 -5
  128. package/dist/components/Inputs/TextInputs/TextInput/TextInput.js +5 -5
  129. package/dist/components/Inputs/TextInputs/TextInput/TextInput.stories.js +5 -5
  130. package/dist/components/Inputs/TextInputs/shared/sizes.d.ts +6 -6
  131. package/dist/components/Inputs/TextInputs/shared/sizes.js +3 -3
  132. package/dist/components/Layout/AutoGrid/AutoGrid.stories.d.ts +7 -0
  133. package/dist/components/Layout/AutoGrid/AutoGrid.stories.d.ts.map +1 -0
  134. package/dist/components/Layout/AutoGrid/AutoGrid.stories.js +78 -0
  135. package/dist/components/Layout/Box/Box.d.ts +1 -3
  136. package/dist/components/Layout/Box/Box.d.ts.map +1 -1
  137. package/dist/components/Layout/Box/Box.js +2 -2
  138. package/dist/components/Layout/Box/Box.stories.d.ts +1 -2
  139. package/dist/components/Layout/Box/Box.stories.d.ts.map +1 -1
  140. package/dist/components/Layout/Box/Box.stories.js +28 -98
  141. package/dist/components/Layout/Card/Card.d.ts +1 -1
  142. package/dist/components/Layout/Card/Card.d.ts.map +1 -1
  143. package/dist/components/Layout/Card/Card.js +2 -2
  144. package/dist/components/Layout/Card/Card.stories.d.ts +10 -0
  145. package/dist/components/Layout/Card/Card.stories.d.ts.map +1 -0
  146. package/dist/components/Layout/Card/Card.stories.js +92 -0
  147. package/dist/components/Layout/Center/Center.d.ts +2 -3
  148. package/dist/components/Layout/Center/Center.d.ts.map +1 -1
  149. package/dist/components/Layout/Center/Center.js +2 -2
  150. package/dist/components/Layout/Center/Center.stories.d.ts +8 -0
  151. package/dist/components/Layout/Center/Center.stories.d.ts.map +1 -0
  152. package/dist/components/Layout/Center/Center.stories.js +70 -0
  153. package/dist/components/Layout/Divider/Divider.stories.d.ts +7 -0
  154. package/dist/components/Layout/Divider/Divider.stories.d.ts.map +1 -0
  155. package/dist/components/Layout/Divider/Divider.stories.js +67 -0
  156. package/dist/components/Layout/Frame/Frame.js +1 -1
  157. package/dist/components/Layout/Frame/Frame.stories.d.ts +8 -0
  158. package/dist/components/Layout/Frame/Frame.stories.d.ts.map +1 -0
  159. package/dist/components/Layout/Frame/Frame.stories.js +78 -0
  160. package/dist/components/Layout/Grid/Grid.stories.d.ts +8 -0
  161. package/dist/components/Layout/Grid/Grid.stories.d.ts.map +1 -0
  162. package/dist/components/Layout/Grid/Grid.stories.js +72 -0
  163. package/dist/components/Layout/Group/Group.stories.d.ts +10 -0
  164. package/dist/components/Layout/Group/Group.stories.d.ts.map +1 -0
  165. package/dist/components/Layout/Group/Group.stories.js +114 -0
  166. package/dist/components/Layout/Loader/Loader.stories.d.ts +10 -0
  167. package/dist/components/Layout/Loader/Loader.stories.d.ts.map +1 -0
  168. package/dist/components/Layout/Loader/Loader.stories.js +68 -0
  169. package/dist/components/Layout/SectionCard/SectionCard.d.ts +3 -5
  170. package/dist/components/Layout/SectionCard/SectionCard.d.ts.map +1 -1
  171. package/dist/components/Layout/SectionCard/SectionCard.js +3 -8
  172. package/dist/components/Layout/SectionCard/SectionCard.stories.d.ts +9 -0
  173. package/dist/components/Layout/SectionCard/SectionCard.stories.d.ts.map +1 -0
  174. package/dist/components/Layout/SectionCard/SectionCard.stories.js +98 -0
  175. package/dist/components/Layout/Stack/Stack.stories.d.ts +1 -2
  176. package/dist/components/Layout/Stack/Stack.stories.d.ts.map +1 -1
  177. package/dist/components/Layout/Stack/Stack.stories.js +47 -66
  178. package/dist/components/Layout/Table/Table.stories.d.ts.map +1 -1
  179. package/dist/components/Layout/Table/Table.stories.js +4 -3
  180. package/dist/components/Layout/Tabs/Tabs.d.ts +2 -4
  181. package/dist/components/Layout/Tabs/Tabs.d.ts.map +1 -1
  182. package/dist/components/Layout/Tabs/Tabs.js +7 -6
  183. package/dist/components/Layout/Tabs/Tabs.stories.d.ts +9 -0
  184. package/dist/components/Layout/Tabs/Tabs.stories.d.ts.map +1 -0
  185. package/dist/components/Layout/Tabs/Tabs.stories.js +141 -0
  186. package/dist/components/Misc/IconBadge/IconBadge.js +1 -1
  187. package/dist/components/Misc/IconBadge/IconBadge.stories.d.ts +7 -0
  188. package/dist/components/Misc/IconBadge/IconBadge.stories.d.ts.map +1 -0
  189. package/dist/components/Misc/IconBadge/IconBadge.stories.js +48 -0
  190. package/dist/components/Misc/Stepper/Step.d.ts +16 -0
  191. package/dist/components/Misc/Stepper/Step.d.ts.map +1 -0
  192. package/dist/components/Misc/Stepper/Step.js +7 -0
  193. package/dist/components/Misc/Stepper/Step.stories.d.ts +477 -0
  194. package/dist/components/Misc/Stepper/Step.stories.d.ts.map +1 -0
  195. package/dist/components/Misc/Stepper/Step.stories.js +83 -0
  196. package/dist/components/Misc/Stepper/Stepper.d.ts +10 -0
  197. package/dist/components/Misc/Stepper/Stepper.d.ts.map +1 -0
  198. package/dist/components/Misc/Stepper/Stepper.js +72 -0
  199. package/dist/components/Misc/Stepper/Stepper.stories.d.ts +13 -0
  200. package/dist/components/Misc/Stepper/Stepper.stories.d.ts.map +1 -0
  201. package/dist/components/Misc/Stepper/Stepper.stories.js +126 -0
  202. package/dist/components/Misc/Stepper/variants.d.ts +54 -0
  203. package/dist/components/Misc/Stepper/variants.d.ts.map +1 -0
  204. package/dist/components/Misc/Stepper/variants.js +48 -0
  205. package/dist/components/Typography/CollapsibleText/CollapsibleText.d.ts.map +1 -1
  206. package/dist/components/Typography/CollapsibleText/CollapsibleText.js +2 -1
  207. package/dist/components/Typography/CollapsibleText/CollapsibleText.stories.d.ts.map +1 -1
  208. package/dist/components/Typography/CollapsibleText/CollapsibleText.stories.js +4 -3
  209. package/dist/components/Typography/CollapsibleTitle/CollapsibleTitle.d.ts.map +1 -1
  210. package/dist/components/Typography/CollapsibleTitle/CollapsibleTitle.js +2 -1
  211. package/dist/components/Typography/CollapsibleTitle/CollapsibleTitle.stories.d.ts.map +1 -1
  212. package/dist/components/Typography/CollapsibleTitle/CollapsibleTitle.stories.js +4 -3
  213. package/dist/components/Typography/Formula/Formula.d.ts.map +1 -1
  214. package/dist/components/Typography/Formula/Formula.js +5 -4
  215. package/dist/components/Typography/Formula/Formula.stories.d.ts +10 -0
  216. package/dist/components/Typography/Formula/Formula.stories.d.ts.map +1 -0
  217. package/dist/components/Typography/Formula/Formula.stories.js +85 -0
  218. package/dist/components/Typography/Fraction/Fraction.d.ts.map +1 -1
  219. package/dist/components/Typography/Fraction/Fraction.js +2 -1
  220. package/dist/components/Typography/Fraction/Fraction.stories.d.ts +9 -0
  221. package/dist/components/Typography/Fraction/Fraction.stories.d.ts.map +1 -0
  222. package/dist/components/Typography/Fraction/Fraction.stories.js +87 -0
  223. package/dist/components/Typography/Text/Text.d.ts.map +1 -1
  224. package/dist/components/Typography/Text/Text.js +6 -0
  225. package/dist/components/Typography/Text/Text.stories.d.ts +10 -0
  226. package/dist/components/Typography/Text/Text.stories.d.ts.map +1 -0
  227. package/dist/components/Typography/Text/Text.stories.js +101 -0
  228. package/dist/components/Typography/Title/Title.stories.d.ts +9 -0
  229. package/dist/components/Typography/Title/Title.stories.d.ts.map +1 -0
  230. package/dist/components/Typography/Title/Title.stories.js +98 -0
  231. package/dist/components/index.d.ts +3 -0
  232. package/dist/components/index.d.ts.map +1 -1
  233. package/dist/components/index.js +3 -0
  234. package/dist/constants/breakpoints.d.ts +1 -1
  235. package/dist/constants/breakpoints.js +1 -1
  236. package/dist/constants/colors.d.ts +1 -0
  237. package/dist/constants/colors.d.ts.map +1 -1
  238. package/dist/constants/colors.js +1 -0
  239. package/dist/constants/font.js +10 -10
  240. package/dist/constants/index.d.ts +1 -0
  241. package/dist/constants/index.d.ts.map +1 -1
  242. package/dist/constants/index.js +1 -0
  243. package/dist/constants/spacing.d.ts +12 -0
  244. package/dist/constants/spacing.d.ts.map +1 -0
  245. package/dist/constants/spacing.js +11 -0
  246. package/dist/docs/AIGeneratedBanner.d.ts +2 -0
  247. package/dist/docs/AIGeneratedBanner.d.ts.map +1 -0
  248. package/dist/docs/AIGeneratedBanner.js +5 -0
  249. package/dist/docs/design/Colors.stories.d.ts +7 -0
  250. package/dist/docs/design/Colors.stories.d.ts.map +1 -0
  251. package/dist/docs/design/Colors.stories.js +29 -0
  252. package/dist/docs/design/Spacing.stories.d.ts +6 -0
  253. package/dist/docs/design/Spacing.stories.d.ts.map +1 -0
  254. package/dist/docs/design/Spacing.stories.js +24 -0
  255. package/dist/docs/hooks/Copy.stories.d.ts +6 -0
  256. package/dist/docs/hooks/Copy.stories.d.ts.map +1 -0
  257. package/dist/docs/hooks/Copy.stories.js +61 -0
  258. package/dist/hooks/useConfirmationModal.d.ts.map +1 -1
  259. package/dist/hooks/useConfirmationModal.js +10 -9
  260. package/dist/hooks/useInfoModal.d.ts.map +1 -1
  261. package/dist/hooks/useInfoModal.js +10 -9
  262. package/dist/hooks/useMediaQuery.d.ts +2 -2
  263. package/dist/hooks/useMediaQuery.js +6 -6
  264. package/package.json +43 -32
@@ -0,0 +1,78 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Frame } from './Frame';
3
+ import { Text } from '../../Typography/Text/Text';
4
+ import { Stack } from '../Stack/Stack';
5
+ import { Button } from '../../Inputs/Buttons/Button/Button';
6
+ import { neutral } from '../../../constants/colors';
7
+ import { spacing } from '../../../constants/spacing';
8
+ import { Card } from '../Card/Card';
9
+ import { Title } from '../../Typography/Title/Title';
10
+ import { TextInput } from '../../Inputs/TextInputs/TextInput/TextInput';
11
+ import { Group } from '../Group/Group';
12
+ const meta = {
13
+ title: 'Components/Layout/Frame',
14
+ component: Frame,
15
+ parameters: {
16
+ layout: 'centered',
17
+ },
18
+ argTypes: {
19
+ title: {
20
+ control: { type: 'text' },
21
+ description: 'Section header title',
22
+ table: {
23
+ type: { summary: 'string' },
24
+ },
25
+ },
26
+ subtitle: {
27
+ control: { type: 'text' },
28
+ description: 'Optional subtitle below the title',
29
+ table: {
30
+ type: { summary: 'string' },
31
+ },
32
+ },
33
+ children: {
34
+ control: false,
35
+ description: 'Content displayed below the header',
36
+ table: {
37
+ type: { summary: 'ReactNode' },
38
+ },
39
+ },
40
+ width: {
41
+ control: { type: 'text' },
42
+ description: 'Width of the frame',
43
+ table: {
44
+ type: { summary: 'string | number' },
45
+ defaultValue: { summary: "'100%'" },
46
+ },
47
+ },
48
+ styles: {
49
+ control: { type: 'object' },
50
+ description: 'Custom styles override - use this sparingly',
51
+ table: {
52
+ type: { summary: 'Record<string, CSSObject>' },
53
+ },
54
+ },
55
+ },
56
+ };
57
+ export default meta;
58
+ export const Default = {
59
+ args: {
60
+ children: undefined,
61
+ title: 'Frame Title',
62
+ subtitle: 'Optional subtitle text',
63
+ width: '500px',
64
+ },
65
+ render: (args) => (_jsx(Frame, { ...args, children: _jsx("div", { style: {
66
+ backgroundColor: neutral[25],
67
+ border: `1px dashed ${neutral[50]}`,
68
+ borderRadius: '8px',
69
+ padding: '20px',
70
+ display: 'flex',
71
+ alignItems: 'center',
72
+ justifyContent: 'center',
73
+ minHeight: '150px',
74
+ }, children: _jsx(Text, { children: "Frame Content" }) }) })),
75
+ };
76
+ export const UseCases = {
77
+ render: () => (_jsxs(Stack, { gap: spacing.xxl, sx: { width: '500px' }, children: [_jsx(Frame, { title: "User Details", subtitle: "Enter your user details", children: _jsxs(Stack, { gap: spacing.lg, children: [_jsx(TextInput, { label: "Name", placeholder: "Enter your name", type: "text", fullWidth: true }), _jsx(TextInput, { label: "Email", placeholder: "Enter your email", type: "email", fullWidth: true }), _jsxs(Group, { children: [_jsx(Button, { variant: "primary", children: "Save" }), _jsx(Button, { variant: "secondary", children: "Cancel" })] })] }) }), _jsx(Frame, { title: "Your Items", subtitle: "View your recent items", children: _jsx(Stack, { gap: spacing.sm, children: [1, 2, 3].map((item) => (_jsxs(Card, { children: [_jsxs(Title, { variant: "cardHeader", children: ["Item ", item] }), _jsxs(Title, { variant: "cardSubheader", children: ["Description for item ", item] })] }, item))) }) }), _jsx(Frame, { title: "Stats This Week", children: _jsxs("div", { style: { display: 'flex', gap: '10px', alignItems: 'stretch' }, children: [_jsxs("div", { style: { textAlign: 'center', padding: '10px', backgroundColor: neutral[25], borderRadius: '8px', flex: 1 }, children: [_jsx(Text, { size: "xl", weight: "bold", children: "42" }), _jsx(Text, { size: "sm", color: neutral[100], children: "Ads Played" })] }), _jsxs("div", { style: { textAlign: 'center', padding: '10px', backgroundColor: neutral[25], borderRadius: '8px', flex: 1 }, children: [_jsx(Text, { size: "xl", weight: "bold", children: "1.2K" }), _jsx(Text, { size: "sm", color: neutral[100], children: "Impressions" })] }), _jsxs("div", { style: { textAlign: 'center', padding: '10px', backgroundColor: neutral[25], borderRadius: '8px', flex: 1 }, children: [_jsx(Text, { size: "xl", weight: "bold", children: "89%" }), _jsx(Text, { size: "sm", color: neutral[100], children: "Revenue Growth" })] })] }) })] })),
78
+ };
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { Grid } from './Grid';
3
+ declare const meta: Meta<typeof Grid>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const ColumnSpans: Story;
8
+ //# sourceMappingURL=Grid.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Grid.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Grid/Grid.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAQ9B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,IAAI,CA+C3B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AASnC,eAAO,MAAM,OAAO,EAAE,KA4BrB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAuBzB,CAAC"}
@@ -0,0 +1,72 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Grid } from './Grid';
3
+ import { Card } from '../Card/Card';
4
+ import { Title } from '../../Typography/Title/Title';
5
+ import { Stack } from '../Stack/Stack';
6
+ import { spacing } from '../../../constants/spacing';
7
+ const meta = {
8
+ title: 'Components/Layout/Grid',
9
+ component: Grid,
10
+ parameters: {
11
+ layout: 'centered',
12
+ },
13
+ argTypes: {
14
+ children: {
15
+ control: false,
16
+ description: 'Content for the Grid - each child node should also be within a <Grid.Col> element',
17
+ table: {
18
+ type: { summary: 'ReactNode' },
19
+ },
20
+ },
21
+ gutter: {
22
+ control: { type: 'select' },
23
+ options: ['xs', 'sm', 'md', 'lg', 'xl'],
24
+ description: 'Spacing between columns',
25
+ table: {
26
+ type: { summary: "'xs' | 'sm' | 'md' | 'lg' | 'xl' | number" },
27
+ defaultValue: { summary: "'md'" },
28
+ },
29
+ },
30
+ align: {
31
+ control: { type: 'select' },
32
+ options: ['flex-start', 'center', 'flex-end', 'stretch', 'baseline'],
33
+ description: 'Vertical alignment of grid items',
34
+ table: {
35
+ type: { summary: "'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline'" },
36
+ },
37
+ },
38
+ justify: {
39
+ control: { type: 'select' },
40
+ options: ['flex-start', 'center', 'flex-end', 'space-between', 'space-around', 'space-evenly'],
41
+ description: 'Horizontal alignment of grid items',
42
+ table: {
43
+ type: { summary: "'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly'" },
44
+ },
45
+ },
46
+ styles: {
47
+ control: { type: 'object' },
48
+ description: 'Custom styles to override with if necessary',
49
+ table: {
50
+ type: { summary: 'Record<string, CSSObject>' },
51
+ },
52
+ },
53
+ },
54
+ };
55
+ export default meta;
56
+ const SampleCard = ({ title, description }) => (_jsxs(Card, { animate: true, children: [_jsx(Title, { variant: "cardHeader", children: title }), _jsx(Title, { variant: "cardSubheader", children: description })] }));
57
+ export const Default = {
58
+ args: {
59
+ children: undefined,
60
+ gutter: undefined,
61
+ align: undefined,
62
+ justify: undefined,
63
+ styles: undefined,
64
+ },
65
+ decorators: [
66
+ (Story) => (_jsx("div", { style: { width: '700px' }, children: _jsx(Story, {}) })),
67
+ ],
68
+ render: (args) => (_jsxs(Grid, { ...args, children: [_jsx(Grid.Col, { span: 4, children: _jsx(SampleCard, { title: "Column 1", description: "span={4}" }) }), _jsx(Grid.Col, { span: 4, children: _jsx(SampleCard, { title: "Column 2", description: "span={4}" }) }), _jsx(Grid.Col, { span: 4, children: _jsx(SampleCard, { title: "Column 3", description: "span={4}" }) })] })),
69
+ };
70
+ export const ColumnSpans = {
71
+ render: () => (_jsxs(Stack, { spacing: spacing.md, sx: { width: '700px' }, children: [_jsxs(Grid, { gutter: "md", children: [_jsx(Grid.Col, { span: 6, children: _jsx(SampleCard, { title: "Column 1", description: "span={6}" }) }), _jsx(Grid.Col, { span: 6, children: _jsx(SampleCard, { title: "Column 2", description: "span={6}" }) })] }), _jsxs(Grid, { gutter: "md", children: [_jsx(Grid.Col, { span: 8, children: _jsx(SampleCard, { title: "Main Content", description: "span={8}" }) }), _jsx(Grid.Col, { span: 4, children: _jsx(SampleCard, { title: "Sidebar", description: "span={4}" }) })] }), _jsxs(Grid, { gutter: "md", children: [_jsx(Grid.Col, { span: 4, children: _jsx(SampleCard, { title: "Column 1", description: "span={4}" }) }), _jsx(Grid.Col, { span: 4, children: _jsx(SampleCard, { title: "Column 2", description: "span={4}" }) }), _jsx(Grid.Col, { span: 4, children: _jsx(SampleCard, { title: "Column 3", description: "span={4}" }) })] }), _jsxs(Grid, { gutter: "md", children: [_jsx(Grid.Col, { span: 3, children: _jsx(SampleCard, { title: "Left", description: "span={3}" }) }), _jsx(Grid.Col, { span: 6, children: _jsx(SampleCard, { title: "Center", description: "span={6}" }) }), _jsx(Grid.Col, { span: 3, children: _jsx(SampleCard, { title: "Right", description: "span={3}" }) })] })] })),
72
+ };
@@ -0,0 +1,10 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { Group } from './Group';
3
+ declare const meta: Meta<typeof Group>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const PositionAlign: Story;
8
+ export declare const WrapItems: Story;
9
+ export declare const GrowItems: Story;
10
+ //# sourceMappingURL=Group.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Group.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Group/Group.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAOhC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CA8E5B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAQnC,eAAO,MAAM,OAAO,EAAE,KA0BrB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAc3B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAuBvB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAUvB,CAAC"}
@@ -0,0 +1,114 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Group } from './Group';
3
+ import { Text } from '../../Typography/Text/Text';
4
+ import { Card } from '../Card/Card';
5
+ import { Stack } from '../Stack/Stack';
6
+ import { neutral } from '../../../constants/colors';
7
+ import { spacing } from '../../../constants/spacing';
8
+ const meta = {
9
+ title: 'Components/Layout/Group',
10
+ component: Group,
11
+ parameters: {
12
+ layout: 'centered',
13
+ },
14
+ argTypes: {
15
+ children: {
16
+ control: false,
17
+ description: 'Content to arrange horizontally',
18
+ table: {
19
+ type: { summary: 'ReactNode' },
20
+ },
21
+ },
22
+ position: {
23
+ control: { type: 'select' },
24
+ options: ['left', 'center', 'right', 'apart'],
25
+ description: 'Horizontal alignment of children',
26
+ table: {
27
+ type: { summary: "'left' | 'center' | 'right' | 'apart'" },
28
+ defaultValue: { summary: "'left'" },
29
+ },
30
+ },
31
+ align: {
32
+ control: { type: 'select' },
33
+ options: ['stretch', 'center', 'flex-start', 'flex-end'],
34
+ description: 'Vertical alignment of children',
35
+ table: {
36
+ type: { summary: "'stretch' | 'center' | 'flex-start' | 'flex-end'" },
37
+ defaultValue: { summary: "'stretch'" },
38
+ },
39
+ },
40
+ gap: {
41
+ control: { type: 'text' },
42
+ description: 'Spacing between items',
43
+ table: {
44
+ type: { summary: 'string' },
45
+ defaultValue: { summary: '16px' },
46
+ },
47
+ },
48
+ noWrap: {
49
+ control: { type: 'boolean' },
50
+ description: 'Prevent items from wrapping to new lines',
51
+ table: {
52
+ type: { summary: 'boolean' },
53
+ defaultValue: { summary: 'false' },
54
+ },
55
+ },
56
+ grow: {
57
+ control: { type: 'boolean' },
58
+ description: 'Whether children grow to fill available space',
59
+ table: {
60
+ type: { summary: 'boolean' },
61
+ defaultValue: { summary: 'false' },
62
+ },
63
+ },
64
+ width: {
65
+ control: { type: 'text' },
66
+ description: 'Custom width override',
67
+ table: {
68
+ type: { summary: 'string | number' },
69
+ },
70
+ },
71
+ h: {
72
+ control: { type: 'text' },
73
+ description: 'Custom height override - use this sparingly',
74
+ table: {
75
+ type: { summary: 'string | number' },
76
+ },
77
+ },
78
+ styles: {
79
+ control: { type: 'object' },
80
+ description: 'Custom styles override - use this sparingly',
81
+ table: {
82
+ type: { summary: 'Record<string, CSSObject>' },
83
+ },
84
+ },
85
+ },
86
+ };
87
+ export default meta;
88
+ const SampleCard = ({ label }) => (_jsx(Card, { styles: { root: { overflow: 'hidden' } }, children: _jsx(Text, { truncate: "end", weight: "bold", children: label }) }));
89
+ export const Default = {
90
+ args: {
91
+ children: undefined,
92
+ gap: undefined,
93
+ position: undefined,
94
+ align: undefined,
95
+ grow: false,
96
+ noWrap: false,
97
+ width: undefined,
98
+ h: undefined,
99
+ styles: undefined,
100
+ },
101
+ decorators: [
102
+ (Story) => (_jsx("div", { style: { width: '500px', backgroundColor: neutral[25], padding: '20px' }, children: _jsx(Story, {}) })),
103
+ ],
104
+ render: (args) => (_jsxs(Group, { ...args, children: [_jsx(SampleCard, { label: "Item 1" }), _jsx(SampleCard, { label: "Item 2" }), _jsx(SampleCard, { label: "Item 3" })] })),
105
+ };
106
+ export const PositionAlign = {
107
+ render: () => (_jsx(Stack, { spacing: spacing.md, sx: { width: '500px' }, children: ['left', 'center', 'right', 'apart'].map((pos) => (_jsxs("div", { children: [_jsx(Text, { variant: "label", mb: spacing.sm, children: _jsxs("code", { children: ["position=", '"' + pos + '"'] }) }), _jsxs(Group, { position: pos, spacing: spacing.sm, sx: { backgroundColor: neutral[25], padding: spacing.xs }, children: [_jsx(SampleCard, { label: "A" }), _jsx(SampleCard, { label: "B" })] })] }, pos))) })),
108
+ };
109
+ export const WrapItems = {
110
+ render: () => (_jsxs(Stack, { gap: "40px", children: [_jsxs("div", { children: [_jsxs(Text, { variant: "label", mb: spacing.sm, children: [_jsxs("code", { children: ["noWrap=", '{false}'] }), " (default, will continue to grow vertically)"] }), _jsxs(Group, { sx: { backgroundColor: neutral[25], padding: spacing.xs, width: '250px' }, children: [_jsx(SampleCard, { label: "First" }), _jsx(SampleCard, { label: "Second" }), _jsx(SampleCard, { label: "Third" }), _jsx(SampleCard, { label: "Fourth" })] })] }), _jsxs("div", { children: [_jsxs(Text, { variant: "label", mb: spacing.sm, children: [_jsxs("code", { children: ["noWrap=", '{true}'] }), ", combined with ", _jsx("code", { children: "overflow='hidden'" }), " on the card and ", _jsx("code", { children: "truncate='end'" }), " on the text"] }), _jsxs(Group, { noWrap: true, spacing: spacing.sm, sx: { backgroundColor: neutral[25], padding: spacing.xs, width: '250px' }, children: [_jsx(SampleCard, { label: "First" }), _jsx(SampleCard, { label: "Second" }), _jsx(SampleCard, { label: "Third" }), _jsx(SampleCard, { label: "Fourth" })] })] })] })),
111
+ };
112
+ export const GrowItems = {
113
+ render: () => (_jsxs("div", { children: [_jsx(Text, { variant: "label", mb: spacing.sm, children: _jsxs("code", { children: ["grow=", '{true}'] }) }), _jsxs(Group, { grow: true, spacing: spacing.sm, sx: { backgroundColor: neutral[25], padding: spacing.xs, width: '400px' }, children: [_jsx(SampleCard, { label: "A" }), _jsx(SampleCard, { label: "B" })] })] })),
114
+ };
@@ -0,0 +1,10 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { Loader } from './Loader';
3
+ declare const meta: Meta<typeof Loader>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const LoadingNotification: Story;
8
+ export declare const ButtonLoading: Story;
9
+ export declare const CenteredLoader: Story;
10
+ //# sourceMappingURL=Loader.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Loader.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Loader/Loader.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAUlC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAiB7B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAyBF,eAAO,MAAM,mBAAmB,EAAE,KAKjC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAK3B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAiB5B,CAAC"}
@@ -0,0 +1,68 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import { Loader } from './Loader';
4
+ import { Stack } from '../Stack/Stack';
5
+ import { Text } from '../../Typography/Text/Text';
6
+ import { Button } from '../../Inputs/Buttons/Button/Button';
7
+ import { Group } from '../Group/Group';
8
+ import { useNotifications } from '../../../hooks/useNotifications';
9
+ import { spacing } from '../../../constants/spacing';
10
+ const meta = {
11
+ title: 'Components/Misc/Loader',
12
+ component: Loader,
13
+ parameters: {
14
+ layout: 'centered',
15
+ },
16
+ argTypes: {
17
+ size: {
18
+ control: { type: 'select' },
19
+ options: ['xs', 'sm', 'md', 'lg', 'xl'],
20
+ description: 'Size of the loader',
21
+ table: {
22
+ type: { summary: "'xs' | 'sm' | 'md' | 'lg' | 'xl' | number" },
23
+ defaultValue: { summary: "'md'" },
24
+ },
25
+ },
26
+ },
27
+ };
28
+ export default meta;
29
+ export const Default = {
30
+ args: {
31
+ size: 'md',
32
+ },
33
+ };
34
+ const LoadingNotificationDemo = () => {
35
+ const { show, showLoading, hide } = useNotifications();
36
+ const [isLoading, setIsLoading] = useState(false);
37
+ const handleSuccess = () => {
38
+ setIsLoading(true);
39
+ const id = showLoading({ message: 'Saving your changes...' });
40
+ setTimeout(() => {
41
+ hide(id);
42
+ show({ variant: 'success', message: 'Your changes have been saved.' });
43
+ setIsLoading(false);
44
+ }, 3000);
45
+ };
46
+ return (_jsx(Group, { gap: spacing.xs, children: _jsx(Button, { onClick: handleSuccess, loading: isLoading, children: "Save" }) }));
47
+ };
48
+ export const LoadingNotification = {
49
+ render: () => _jsx(LoadingNotificationDemo, {}),
50
+ parameters: {
51
+ docs: { source: { code: false } },
52
+ },
53
+ };
54
+ export const ButtonLoading = {
55
+ render: () => _jsx(Button, { loading: true, children: "Save" }),
56
+ parameters: {
57
+ docs: { source: { code: false } },
58
+ },
59
+ };
60
+ export const CenteredLoader = {
61
+ decorators: [
62
+ (Story) => (_jsx("div", { style: { width: '300px', padding: spacing.xxl }, children: _jsx(Story, {}) })),
63
+ ],
64
+ render: () => (_jsxs(Stack, { align: "center", children: [_jsx(Loader, {}), _jsx(Text, { variant: "subtle", children: " Loading data..." })] })),
65
+ parameters: {
66
+ docs: { source: { code: false } },
67
+ },
68
+ };
@@ -1,11 +1,9 @@
1
1
  import React from 'react';
2
- import { CardProps as MantineCardProps } from '@mantine/core';
3
- import { colors } from '../../../constants/colors';
4
- export interface SectionCardProps extends Omit<MantineCardProps, 'children'> {
2
+ import { CardProps } from '../Card/Card';
3
+ export interface SectionCardProps extends Omit<CardProps, 'children'> {
5
4
  title: string;
6
5
  subtitle?: string;
7
6
  children: React.ReactNode;
8
- color?: keyof typeof colors;
9
7
  }
10
- export declare const SectionCard: ({ title, subtitle, children, color, ...props }: SectionCardProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const SectionCard: ({ title, subtitle, children, ...props }: SectionCardProps) => import("react/jsx-runtime").JSX.Element;
11
9
  //# sourceMappingURL=SectionCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SectionCard.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/SectionCard/SectionCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAuB,SAAS,IAAI,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACnF,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAInD,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,WAAW,GAAI,gDAA4D,gBAAgB,4CAsBvG,CAAC"}
1
+ {"version":3,"file":"SectionCard.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/SectionCard/SectionCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAQ,SAAS,EAAE,MAAM,cAAc,CAAC;AAK/C,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAE3B;AAED,eAAO,MAAM,WAAW,GAAI,yCAAyC,gBAAgB,4CAcpF,CAAC"}
@@ -1,13 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Card as MantineCard } from '@mantine/core';
2
+ import { Card } from '../Card/Card';
3
3
  import { Stack } from '../Stack/Stack';
4
4
  import { Title } from '../../Typography/Title/Title';
5
5
  import { Box } from '../Box/Box';
6
- export const SectionCard = ({ title, subtitle, children, color = 'primary', ...props }) => {
7
- return (_jsxs(MantineCard, { radius: "20px", shadow: "lg", withBorder: true, padding: 0, ...props, children: [_jsx(Box, { sx: {
8
- // background: `linear-gradient(to right, ${colors[color][300]}, ${colors[color][200]})`,
9
- backgroundColor: 'white',
10
- padding: '1.6rem 2rem 0 2rem',
11
- borderRadius: '20px 20px 0 0',
12
- }, children: _jsxs(Stack, { gap: "0.25rem", children: [_jsx(Title, { variant: "cardHeader", children: title }), subtitle && _jsx(Title, { variant: "cardSubheader", children: subtitle })] }) }), _jsx(Box, { sx: { padding: '2rem 3.2rem 3.2rem 3.2rem' }, children: children })] }));
6
+ export const SectionCard = ({ title, subtitle, children, ...props }) => {
7
+ return (_jsx(Card, { p: "24px", ...props, children: _jsxs(Stack, { gap: "20px", children: [_jsxs(Stack, { gap: "0", children: [_jsx(Title, { variant: "cardHeader", children: title }), subtitle && _jsx(Title, { variant: "cardSubheader", children: subtitle })] }), _jsx(Box, { children: children })] }) }));
13
8
  };
@@ -0,0 +1,9 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { SectionCard } from './SectionCard';
3
+ declare const meta: Meta<typeof SectionCard>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const Animation: Story;
8
+ export declare const WithAutoGrid: Story;
9
+ //# sourceMappingURL=SectionCard.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionCard.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/SectionCard/SectionCard.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAS5C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAsElC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAqBrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAQvB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAY1B,CAAC"}
@@ -0,0 +1,98 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { SectionCard } from './SectionCard';
3
+ import { AutoGrid } from '../AutoGrid/AutoGrid';
4
+ import { Text } from '../../Typography/Text/Text';
5
+ import { IconBadge } from '../../Misc/IconBadge/IconBadge';
6
+ import { IconEye } from '@tabler/icons-react';
7
+ import { Group } from '../Group/Group';
8
+ import { Title } from '../../Typography/Title/Title';
9
+ import { neutral } from '../../../constants/colors';
10
+ const meta = {
11
+ title: 'Components/Layout/SectionCard',
12
+ component: SectionCard,
13
+ parameters: {
14
+ layout: 'centered',
15
+ },
16
+ argTypes: {
17
+ title: {
18
+ control: { type: 'text' },
19
+ description: 'Main title displayed in the card header',
20
+ table: {
21
+ type: { summary: 'string' },
22
+ },
23
+ },
24
+ subtitle: {
25
+ control: { type: 'text' },
26
+ description: 'Optional subtitle displayed below the main title',
27
+ table: {
28
+ type: { summary: 'string' },
29
+ },
30
+ },
31
+ animate: {
32
+ control: { type: 'boolean' },
33
+ description: 'Enable a lifting hover animation',
34
+ table: {
35
+ type: { summary: 'boolean' },
36
+ defaultValue: { summary: 'false' },
37
+ },
38
+ },
39
+ children: {
40
+ control: false,
41
+ description: 'Content displayed in the card body',
42
+ table: {
43
+ type: { summary: 'ReactNode' },
44
+ },
45
+ },
46
+ radius: {
47
+ control: { type: 'text' },
48
+ description: 'Border radius of the card',
49
+ table: {
50
+ type: { summary: 'string | number' },
51
+ defaultValue: { summary: "'20px'" },
52
+ },
53
+ },
54
+ shadow: {
55
+ control: { type: 'select' },
56
+ options: ['xs', 'sm', 'md', 'lg', 'xl'],
57
+ description: 'Shadow depth of the card',
58
+ table: {
59
+ type: { summary: "'xs' | 'sm' | 'md' | 'lg' | 'xl'" },
60
+ defaultValue: { summary: "'lg'" },
61
+ },
62
+ },
63
+ p: {
64
+ control: { type: 'text' },
65
+ description: 'Padding of the card',
66
+ table: {
67
+ type: { summary: 'string | number' },
68
+ defaultValue: { summary: "'8px'" },
69
+ },
70
+ },
71
+ withBorder: {
72
+ control: { type: 'boolean' },
73
+ description: 'Whether to show card border',
74
+ table: {
75
+ type: { summary: 'boolean' },
76
+ defaultValue: { summary: 'true' },
77
+ },
78
+ },
79
+ },
80
+ };
81
+ export default meta;
82
+ export const Default = {
83
+ args: {
84
+ children: undefined,
85
+ title: 'Impressions This Week',
86
+ subtitle: 'Total impressions at all locations',
87
+ },
88
+ decorators: [
89
+ (Story) => (_jsx("div", { style: { width: '400px' }, children: _jsx(Story, {}) })),
90
+ ],
91
+ render: (args) => (_jsx(SectionCard, { ...args, children: _jsxs(Group, { gap: "10px", children: [_jsx(IconBadge, { icon: _jsx(IconEye, { size: 30 }), color: "salmon" }), _jsx(Title, { weight: "semibold", size: "2xl", color: neutral[200], children: "55,000" })] }) })),
92
+ };
93
+ export const Animation = {
94
+ render: () => (_jsx("div", { style: { width: '400px' }, children: _jsx(SectionCard, { title: "Example Card", subtitle: "With an example subtitle", animate: true, children: _jsx(Text, { variant: "subtle", children: "This card lifts on hover" }) }) })),
95
+ };
96
+ export const WithAutoGrid = {
97
+ render: () => (_jsx("div", { style: { width: '800px' }, children: _jsx(AutoGrid, { cols: 2, children: ['Example Card 1', 'Example Card 2', 'Example Card 3', 'Example Card 4'].map((label, i) => (_jsx(SectionCard, { title: label, subtitle: "With an example subtitle", animate: true, children: _jsx("div", {}) }, label))) }) })),
98
+ };
@@ -4,6 +4,5 @@ declare const meta: Meta<typeof Stack>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof meta>;
6
6
  export declare const Default: Story;
7
- export declare const JustifyAlignContent: Story;
8
- export declare const SpacingGap: Story;
7
+ export declare const PositionContent: Story;
9
8
  //# sourceMappingURL=Stack.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Stack.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Stack/Stack.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CAkD5B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAqBnC,eAAO,MAAM,OAAO,EAAE,KAarB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAmEjC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAwFxB,CAAC"}
1
+ {"version":3,"file":"Stack.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Stack/Stack.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAOhC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CA6D5B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAQnC,eAAO,MAAM,OAAO,EAAE,KAwBrB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAgB7B,CAAC"}