@appdirect/design-system 0.0.10 → 0.0.12

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 (179) hide show
  1. package/README.md +85 -5
  2. package/dist/Buttons/ActionIcon.js +14 -0
  3. package/dist/Buttons/Button.js +66 -0
  4. package/dist/Buttons/CloseButton.js +48 -0
  5. package/dist/Buttons/index.js +13 -0
  6. package/dist/Combobox/AutocompleteClearable.js +36 -0
  7. package/dist/Combobox/Combobox.js +28 -0
  8. package/dist/Combobox/Multiselect.js +31 -0
  9. package/dist/Combobox/SearchableSelect.js +43 -0
  10. package/dist/Combobox/Select.js +72 -0
  11. package/dist/Combobox/index.js +10 -0
  12. package/dist/ComplexComponents/DashboardWidget/DashboardWidget.js +96 -0
  13. package/dist/ComplexComponents/DashboardWidget/index.js +1 -0
  14. package/dist/ComplexComponents/DataTable/CustomBottomToolbar/index.js +82 -0
  15. package/dist/ComplexComponents/DataTable/CustomBottomToolbar/utils.js +23 -0
  16. package/dist/ComplexComponents/DataTable/CustomToolbarAlertBannerContent/index.js +23 -0
  17. package/dist/ComplexComponents/DataTable/CustomTopToolbar/DateRangeSelectorFilter/index.js +230 -0
  18. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterChip.js +30 -0
  19. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/DateRangeFilter.js +12 -0
  20. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/FilterRenderer.js +32 -0
  21. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/FilterSystem.js +90 -0
  22. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/MultiSelectFilter.js +43 -0
  23. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/SingleSelectFilter.js +30 -0
  24. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/index.js +39 -0
  25. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/types.js +9 -0
  26. package/dist/ComplexComponents/DataTable/CustomTopToolbar/ResultCount/index.js +31 -0
  27. package/dist/ComplexComponents/DataTable/CustomTopToolbar/SearchFilter.js +42 -0
  28. package/dist/ComplexComponents/DataTable/CustomTopToolbar/SelectFilter.js +21 -0
  29. package/dist/ComplexComponents/DataTable/CustomTopToolbar/index.js +410 -0
  30. package/dist/ComplexComponents/DataTable/DataTable.js +405 -0
  31. package/dist/ComplexComponents/DataTable/ErrorOverlay/index.js +9 -0
  32. package/dist/ComplexComponents/DataTable/SortableHeaderCell/index.js +27 -0
  33. package/dist/ComplexComponents/DataTable/index.js +1 -0
  34. package/dist/ComplexComponents/DataTable/translations/en.js +99 -0
  35. package/dist/ComplexComponents/DataTable/translations/index.js +17 -0
  36. package/dist/ComplexComponents/KeyInsight/KeyInsights.js +176 -0
  37. package/dist/ComplexComponents/KeyInsight/index.js +1 -0
  38. package/dist/ComplexComponents/NameValue/NameValue.js +94 -0
  39. package/dist/ComplexComponents/NameValue/NameValueItem.js +59 -0
  40. package/dist/ComplexComponents/NameValue/index.js +2 -0
  41. package/dist/ComplexComponents/PageContentHeader/PageContentHeader.js +92 -0
  42. package/dist/ComplexComponents/PageContentHeader/PageContentHeader.tsx +24 -34
  43. package/dist/ComplexComponents/PageContentHeader/index.js +1 -0
  44. package/dist/ComplexComponents/PageContentHeader/index.ts +0 -2
  45. package/dist/ComplexComponents/Placeholder/Placeholder.js +51 -0
  46. package/dist/ComplexComponents/Placeholder/index.js +1 -0
  47. package/dist/ComplexComponents/Slat/Slat.js +53 -0
  48. package/dist/ComplexComponents/Slat/index.js +1 -0
  49. package/dist/ComplexComponents/Utilities/CopyButton.js +45 -0
  50. package/dist/ComplexComponents/Utilities/index.js +1 -0
  51. package/dist/DataDisplay/Alert.js +77 -0
  52. package/dist/DataDisplay/Avatar.js +157 -0
  53. package/dist/DataDisplay/Badge.js +78 -0
  54. package/dist/DataDisplay/Card.js +100 -0
  55. package/dist/DataDisplay/Chip.js +36 -0
  56. package/dist/DataDisplay/Indicator.js +59 -0
  57. package/dist/DataDisplay/List.js +60 -0
  58. package/dist/DataDisplay/Pill.js +81 -0
  59. package/dist/DataDisplay/Progress.js +42 -0
  60. package/dist/DataDisplay/Table.js +38 -0
  61. package/dist/DataDisplay/ThemeIcon.js +31 -0
  62. package/dist/DataDisplay/index.js +18 -0
  63. package/dist/Inputs/Checkbox.js +62 -0
  64. package/dist/Inputs/ColorInput.js +48 -0
  65. package/dist/Inputs/DropZone.js +12 -0
  66. package/dist/Inputs/FileInput.js +77 -0
  67. package/dist/Inputs/NumberInput.js +49 -0
  68. package/dist/Inputs/Radio.js +55 -0
  69. package/dist/Inputs/RadioGroup.js +59 -0
  70. package/dist/Inputs/SegmentedControl.js +50 -0
  71. package/dist/Inputs/Slider.js +50 -0
  72. package/dist/Inputs/SliderWithLabel.js +32 -0
  73. package/dist/Inputs/Switch.js +47 -0
  74. package/dist/Inputs/TextArea.js +50 -0
  75. package/dist/Inputs/TextInput.js +87 -0
  76. package/dist/Inputs/index.js +27 -0
  77. package/dist/Layout/Box.js +39 -0
  78. package/dist/Layout/Center.js +11 -0
  79. package/dist/Layout/Container.js +11 -0
  80. package/dist/Layout/Flex.js +12 -0
  81. package/dist/Layout/Grid.js +13 -0
  82. package/dist/Layout/Group.js +14 -0
  83. package/dist/Layout/Inline.js +46 -0
  84. package/dist/Layout/SimpleGrid.js +14 -0
  85. package/dist/Layout/Stack.js +45 -0
  86. package/dist/Layout/index.js +10 -0
  87. package/dist/Misc/Divider.js +8 -0
  88. package/dist/Misc/Paper.js +24 -0
  89. package/dist/Misc/index.js +10 -0
  90. package/dist/Navigation/Breadcrumb.js +60 -0
  91. package/dist/Navigation/NavLink.js +28 -0
  92. package/dist/Navigation/Stepper.js +8 -0
  93. package/dist/Navigation/Tabs.js +22 -0
  94. package/dist/Navigation/index.js +9 -0
  95. package/dist/Overlays/Drawer.js +63 -0
  96. package/dist/Overlays/Menu.js +85 -0
  97. package/dist/Overlays/Modal.js +61 -0
  98. package/dist/Overlays/Popover.js +118 -0
  99. package/dist/Overlays/Tooltip.js +71 -0
  100. package/dist/Overlays/index.js +12 -0
  101. package/dist/Shell/AppShellLayout.js +13 -0
  102. package/dist/Shell/HeaderBar.js +8 -0
  103. package/dist/Shell/SidebarNav.js +9 -0
  104. package/dist/Shell/SidebarNavLink.js +17 -0
  105. package/dist/Shell/SingleColumnLayout.js +11 -0
  106. package/dist/Shell/TertiaryColumnLayout.js +12 -0
  107. package/dist/Shell/index.js +6 -0
  108. package/dist/Typography/Code.js +8 -0
  109. package/dist/Typography/Kbd.js +58 -0
  110. package/dist/Typography/Text.js +8 -0
  111. package/dist/Typography/Title.js +11 -0
  112. package/dist/Typography/index.js +12 -0
  113. package/dist/config.js +202 -0
  114. package/dist/contracts/PageContentHeader.json +10 -5
  115. package/dist/contracts/index.json +1 -1
  116. package/dist/hooks/useTableHandlers.js +136 -0
  117. package/dist/hooks/useTableRenderFunctions.js +164 -0
  118. package/dist/hooks/useTableState.js +70 -0
  119. package/dist/index.js +162 -0
  120. package/dist/index.ts +3 -4
  121. package/dist/stories/Buttons/ActionIcon.stories.tsx +159 -0
  122. package/dist/stories/Buttons/Button.stories.tsx +145 -0
  123. package/dist/stories/Buttons/CloseButton.stories.tsx +121 -0
  124. package/dist/stories/Combobox/AutocompleteClearable.stories.tsx +554 -0
  125. package/dist/stories/Combobox/Combobox.stories.tsx +106 -0
  126. package/dist/stories/Combobox/Multiselect.stories.tsx +664 -0
  127. package/dist/stories/Combobox/SearchableSelect.stories.tsx +640 -0
  128. package/dist/stories/Combobox/Select.stories.tsx +311 -0
  129. package/dist/stories/ComplexComponents/DashboardWidget/DashboardWidget.stories.tsx +822 -0
  130. package/dist/stories/ComplexComponents/DataTable/DataTable.stories.tsx +502 -0
  131. package/dist/stories/ComplexComponents/KeyInsight/KeyInsights.stories.tsx +386 -0
  132. package/dist/stories/ComplexComponents/NameValue/NameValue.stories.tsx +405 -0
  133. package/dist/stories/ComplexComponents/PageContentHeader/PageContentHeader.stories.tsx +527 -0
  134. package/dist/stories/ComplexComponents/Placeholder/Placeholder.stories.tsx +76 -0
  135. package/dist/stories/ComplexComponents/Slat/Slat.stories.tsx +79 -0
  136. package/dist/stories/ComplexComponents/Utilities/CopyButton.stories.tsx +479 -0
  137. package/dist/stories/DataDisplay/Alert.stories.tsx +296 -0
  138. package/dist/stories/DataDisplay/Avatar.stories.tsx +251 -0
  139. package/dist/stories/DataDisplay/Badge.stories.tsx +176 -0
  140. package/dist/stories/DataDisplay/Card.stories.tsx +406 -0
  141. package/dist/stories/DataDisplay/Chip.stories.tsx +495 -0
  142. package/dist/stories/DataDisplay/Indicator.stories.tsx +571 -0
  143. package/dist/stories/DataDisplay/List.stories.tsx +376 -0
  144. package/dist/stories/DataDisplay/Pill.stories.tsx +506 -0
  145. package/dist/stories/DataDisplay/Progress.stories.tsx +352 -0
  146. package/dist/stories/DataDisplay/Table.stories.tsx +346 -0
  147. package/dist/stories/DataDisplay/ThemeIcon.stories.tsx +125 -0
  148. package/dist/stories/Inputs/Checkbox.stories.tsx +263 -0
  149. package/dist/stories/Inputs/ColorInput.stories.tsx +434 -0
  150. package/dist/stories/Inputs/DropZone.stories.tsx +401 -0
  151. package/dist/stories/Inputs/FileInput.stories.tsx +383 -0
  152. package/dist/stories/Inputs/NumberInput.stories.tsx +342 -0
  153. package/dist/stories/Inputs/Radio.stories.tsx +437 -0
  154. package/dist/stories/Inputs/RadioGroup.stories.tsx +526 -0
  155. package/dist/stories/Inputs/SegmentedControl.stories.tsx +60 -0
  156. package/dist/stories/Inputs/Slider.stories.tsx +22 -0
  157. package/dist/stories/Inputs/SliderWithLabel.stories.tsx +37 -0
  158. package/dist/stories/Inputs/Switch.stories.tsx +361 -0
  159. package/dist/stories/Inputs/TextArea.stories.tsx +355 -0
  160. package/dist/stories/Inputs/TextInput.stories.tsx +266 -0
  161. package/dist/stories/Misc/Divider.stories.tsx +581 -0
  162. package/dist/stories/Misc/Paper.stories.tsx +557 -0
  163. package/dist/stories/Navigation/Breadcrumb.stories.tsx +489 -0
  164. package/dist/stories/Navigation/NavLink.stories.tsx +601 -0
  165. package/dist/stories/Navigation/Stepper.stories.tsx +413 -0
  166. package/dist/stories/Navigation/Tabs.stories.tsx +528 -0
  167. package/dist/stories/Overlays/Drawer.stories.tsx +802 -0
  168. package/dist/stories/Overlays/Menu.stories.tsx +941 -0
  169. package/dist/stories/Overlays/Modal.stories.tsx +249 -0
  170. package/dist/stories/Overlays/Popover.stories.tsx +780 -0
  171. package/dist/stories/Overlays/Tooltip.stories.tsx +52 -0
  172. package/dist/stories/Typography/Code.stories.tsx +368 -0
  173. package/dist/stories/Typography/Kbd.stories.tsx +514 -0
  174. package/dist/stories/Typography/Text.stories.tsx +117 -0
  175. package/dist/stories/Typography/Title.stories.tsx +112 -0
  176. package/dist/stories/index.json +1435 -0
  177. package/dist/types.js +127 -0
  178. package/package.json +12 -7
  179. package/dist/ComplexComponents/PageContentHeader/DescriptionBlock.tsx +0 -65
@@ -0,0 +1,557 @@
1
+ import type { Meta, StoryObj } from '@storybook/nextjs-vite';
2
+ import { Stack } from '@mantine/core';
3
+ import { Inline, Paper, Title, Text, Button, Badge, Divider } from '@appdirect/design-system';
4
+
5
+ const meta: Meta<typeof Paper> = {
6
+ title: 'Design System/Misc/Paper',
7
+ component: Paper,
8
+ parameters: {
9
+ layout: 'centered',
10
+ docs: {
11
+ description: {
12
+ component: 'Paper component for creating elevated surfaces with consistent styling and flexible variants.',
13
+ },
14
+ },
15
+ },
16
+ tags: ['autodocs', 'code-connected'],
17
+ argTypes: {
18
+ variant: {
19
+ control: 'select',
20
+ options: ['default', 'shadow', 'border', 'border-shadow'],
21
+ description: 'Paper variant - controls shadow and border',
22
+ },
23
+ p: {
24
+ control: 'select',
25
+ options: ['xs', 'sm', 'md', 'lg', 'xl'],
26
+ description: 'Paper padding',
27
+ },
28
+ radius: {
29
+ control: 'select',
30
+ options: ['xs', 'sm', 'md', 'lg', 'xl'],
31
+ description: 'Paper border radius',
32
+ },
33
+ },
34
+ };
35
+
36
+ export default meta;
37
+ type Story = StoryObj<typeof meta>;
38
+
39
+ export const Default: Story = {
40
+ args: {
41
+ children: (
42
+ <div>
43
+ <Title order={4} size="sm" fw={500} mb="xs">Default Paper</Title>
44
+ <Text size="sm">This is a basic paper component with default styling.</Text>
45
+ </div>
46
+ ),
47
+ },
48
+ };
49
+
50
+ export const Variants: Story = {
51
+ render: () => (
52
+ <Stack gap="lg" w={400}>
53
+ <div>
54
+ <Text size="sm" fw={500} mb="sm">Default (no shadow, no border):</Text>
55
+ <Paper variant="default">
56
+ <Title order={4} size="sm" fw={500} mb="xs">Default Paper</Title>
57
+ <Text size="sm">Basic paper with no shadow or border.</Text>
58
+ </Paper>
59
+ </div>
60
+
61
+ <div>
62
+ <Text size="sm" fw={500} mb="sm">Shadow:</Text>
63
+ <Paper variant="shadow">
64
+ <Title order={4} size="sm" fw={500} mb="xs">Shadow Paper</Title>
65
+ <Text size="sm">Paper with subtle shadow for elevation.</Text>
66
+ </Paper>
67
+ </div>
68
+
69
+ <div>
70
+ <Text size="sm" fw={500} mb="sm">Border:</Text>
71
+ <Paper variant="border">
72
+ <Title order={4} size="sm" fw={500} mb="xs">Border Paper</Title>
73
+ <Text size="sm">Paper with border for clear definition.</Text>
74
+ </Paper>
75
+ </div>
76
+
77
+ <div>
78
+ <Text size="sm" fw={500} mb="sm">Border + Shadow:</Text>
79
+ <Paper variant="border-shadow">
80
+ <Title order={4} size="sm" fw={500} mb="xs">Border + Shadow Paper</Title>
81
+ <Text size="sm">Paper with both border and shadow for maximum definition.</Text>
82
+ </Paper>
83
+ </div>
84
+ </Stack>
85
+ ),
86
+ parameters: {
87
+ docs: {
88
+ description: {
89
+ story: 'Different visual variants of the Paper component.',
90
+ },
91
+ },
92
+ },
93
+ };
94
+
95
+ export const WithPadding: Story = {
96
+ render: () => (
97
+ <Stack gap="lg" w={500}>
98
+ <div>
99
+ <Text size="sm" fw={500} mb="sm">Extra Small Padding (xs):</Text>
100
+ <Paper variant="border" p="xs">
101
+ <Text size="sm">Paper with extra small padding</Text>
102
+ </Paper>
103
+ </div>
104
+
105
+ <div>
106
+ <Text size="sm" fw={500} mb="sm">Small Padding (sm) - Default:</Text>
107
+ <Paper variant="border" p="sm">
108
+ <Text size="sm">Paper with small padding (default)</Text>
109
+ </Paper>
110
+ </div>
111
+
112
+ <div>
113
+ <Text size="sm" fw={500} mb="sm">Medium Padding (md):</Text>
114
+ <Paper variant="border" p="md">
115
+ <Text size="sm">Paper with medium padding</Text>
116
+ </Paper>
117
+ </div>
118
+
119
+ <div>
120
+ <Text size="sm" fw={500} mb="sm">Large Padding (lg):</Text>
121
+ <Paper variant="border" p="lg">
122
+ <Text size="sm">Paper with large padding</Text>
123
+ </Paper>
124
+ </div>
125
+
126
+ <div>
127
+ <Text size="sm" fw={500} mb="sm">Extra Large Padding (xl):</Text>
128
+ <Paper variant="border" p="xl">
129
+ <Text size="sm">Paper with extra large padding</Text>
130
+ </Paper>
131
+ </div>
132
+ </Stack>
133
+ ),
134
+ parameters: {
135
+ docs: {
136
+ description: {
137
+ story: 'Paper component with different padding sizes.',
138
+ },
139
+ },
140
+ },
141
+ };
142
+
143
+ export const WithRadius: Story = {
144
+ render: () => (
145
+ <Stack gap="lg" w={400}>
146
+ <div>
147
+ <Text size="sm" fw={500} mb="sm">Extra Small Radius (xs):</Text>
148
+ <Paper variant="border-shadow" radius="xs">
149
+ <Text size="sm">Paper with extra small border radius</Text>
150
+ </Paper>
151
+ </div>
152
+
153
+ <div>
154
+ <Text size="sm" fw={500} mb="sm">Small Radius (sm) - Default:</Text>
155
+ <Paper variant="border-shadow" radius="sm">
156
+ <Text size="sm">Paper with small border radius (default)</Text>
157
+ </Paper>
158
+ </div>
159
+
160
+ <div>
161
+ <Text size="sm" fw={500} mb="sm">Medium Radius (md):</Text>
162
+ <Paper variant="border-shadow" radius="md">
163
+ <Text size="sm">Paper with medium border radius</Text>
164
+ </Paper>
165
+ </div>
166
+
167
+ <div>
168
+ <Text size="sm" fw={500} mb="sm">Large Radius (lg):</Text>
169
+ <Paper variant="border-shadow" radius="lg">
170
+ <Text size="sm">Paper with large border radius</Text>
171
+ </Paper>
172
+ </div>
173
+
174
+ <div>
175
+ <Text size="sm" fw={500} mb="sm">Extra Large Radius (xl):</Text>
176
+ <Paper variant="border-shadow" radius="xl">
177
+ <Text size="sm">Paper with extra large border radius</Text>
178
+ </Paper>
179
+ </div>
180
+ </Stack>
181
+ ),
182
+ parameters: {
183
+ docs: {
184
+ description: {
185
+ story: 'Paper component with different border radius sizes.',
186
+ },
187
+ },
188
+ },
189
+ };
190
+
191
+ export const AsCards: Story = {
192
+ render: () => (
193
+ <Inline gap="lg" align="flex-start">
194
+ <Paper variant="shadow" style={{ width: 250 }}>
195
+ <Title order={4} size="sm" fw={500} mb="sm">Product Card</Title>
196
+ <div style={{
197
+ width: '100%',
198
+ height: 120,
199
+ backgroundColor: 'var(--mantine-color-gray-1)',
200
+ borderRadius: '4px',
201
+ marginBottom: '12px',
202
+ display: 'flex',
203
+ alignItems: 'center',
204
+ justifyContent: 'center'
205
+ }}>
206
+ <Text size="sm" c="dimmed">Product Image</Text>
207
+ </div>
208
+ <Text size="sm" mb="xs">Premium Wireless Headphones</Text>
209
+ <Text size="xs" c="dimmed" mb="sm">High-quality audio with noise cancellation</Text>
210
+ <Inline gap="xs" justify="space-between" align="center">
211
+ <Text size="lg" fw={600}>$199.99</Text>
212
+ <Button variant="primary" size="xs">Add to Cart</Button>
213
+ </Inline>
214
+ </Paper>
215
+
216
+ <Paper variant="border" style={{ width: 250 }}>
217
+ <Inline gap="xs" justify="space-between" align="flex-start" mb="sm">
218
+ <Title order={4} size="sm" fw={500}>User Profile</Title>
219
+ <Badge variant="filled" color="success">Online</Badge>
220
+ </Inline>
221
+ <Inline gap="sm" mb="sm">
222
+ <div style={{
223
+ width: 40,
224
+ height: 40,
225
+ borderRadius: '50%',
226
+ backgroundColor: 'var(--mantine-color-blue-6)',
227
+ display: 'flex',
228
+ alignItems: 'center',
229
+ justifyContent: 'center',
230
+ color: 'white',
231
+ fontSize: '14px',
232
+ fontWeight: 500
233
+ }}>
234
+ JD
235
+ </div>
236
+ <div>
237
+ <Text size="sm" fw={500}>John Doe</Text>
238
+ <Text size="xs" c="dimmed">Software Engineer</Text>
239
+ </div>
240
+ </Inline>
241
+ <Text size="xs" c="dimmed" mb="sm">
242
+ Passionate about creating great user experiences and building scalable applications.
243
+ </Text>
244
+ <Inline gap="xs">
245
+ <Button variant="outline" size="xs">View Profile</Button>
246
+ <Button variant="outline" size="xs">Message</Button>
247
+ </Inline>
248
+ </Paper>
249
+
250
+ <Paper variant="border-shadow" style={{ width: 250 }}>
251
+ <Inline gap="xs" justify="space-between" align="center" mb="sm">
252
+ <Title order={4} size="sm" fw={500}>Notification</Title>
253
+ <Text size="xs" c="dimmed">2 min ago</Text>
254
+ </Inline>
255
+ <Text size="sm" mb="sm">
256
+ Your order #12345 has been shipped and is on its way to your address.
257
+ </Text>
258
+ <Divider mb="sm" />
259
+ <Inline gap="xs" justify="flex-end">
260
+ <Button variant="outline" size="xs">Dismiss</Button>
261
+ <Button variant="primary" size="xs">Track Order</Button>
262
+ </Inline>
263
+ </Paper>
264
+ </Inline>
265
+ ),
266
+ parameters: {
267
+ docs: {
268
+ description: {
269
+ story: 'Paper components used as cards for different content types.',
270
+ },
271
+ },
272
+ },
273
+ };
274
+
275
+ export const NestedPapers: Story = {
276
+ render: () => (
277
+ <Paper variant="border-shadow" style={{ width: 500 }} p="lg">
278
+ <Title order={3} size="md" fw={500} mb="lg">Dashboard Overview</Title>
279
+
280
+ <Stack gap="md">
281
+ <Paper variant="shadow" p="md">
282
+ <Title order={4} size="sm" fw={500} mb="sm">Statistics</Title>
283
+ <Inline gap="lg">
284
+ <div>
285
+ <Text size="xl" fw={700} c="blue">1,234</Text>
286
+ <Text size="xs" c="dimmed">Total Users</Text>
287
+ </div>
288
+ <div>
289
+ <Text size="xl" fw={700} c="green">5,678</Text>
290
+ <Text size="xs" c="dimmed">Active Sessions</Text>
291
+ </div>
292
+ <div>
293
+ <Text size="xl" fw={700} c="orange">$12,345</Text>
294
+ <Text size="xs" c="dimmed">Revenue</Text>
295
+ </div>
296
+ </Inline>
297
+ </Paper>
298
+
299
+ <Inline gap="md" align="flex-start">
300
+ <Paper variant="border" p="md" style={{ flex: 1 }}>
301
+ <Title order={4} size="sm" fw={500} mb="sm">Recent Activity</Title>
302
+ <Stack gap="xs">
303
+ <Text size="sm">User John Doe logged in</Text>
304
+ <Text size="sm">New order #12345 received</Text>
305
+ <Text size="sm">Payment processed successfully</Text>
306
+ </Stack>
307
+ </Paper>
308
+
309
+ <Paper variant="border" p="md" style={{ flex: 1 }}>
310
+ <Title order={4} size="sm" fw={500} mb="sm">Quick Actions</Title>
311
+ <Stack gap="xs">
312
+ <Button variant="outline" size="sm" fullWidth>Create User</Button>
313
+ <Button variant="outline" size="sm" fullWidth>Generate Report</Button>
314
+ <Button variant="outline" size="sm" fullWidth>View Analytics</Button>
315
+ </Stack>
316
+ </Paper>
317
+ </Inline>
318
+ </Stack>
319
+ </Paper>
320
+ ),
321
+ parameters: {
322
+ docs: {
323
+ description: {
324
+ story: 'Nested Paper components for complex layouts and hierarchical content.',
325
+ },
326
+ },
327
+ },
328
+ };
329
+
330
+ export const ContentContainers: Story = {
331
+ render: () => (
332
+ <Stack gap="lg" w={600}>
333
+ <Paper variant="border" p="lg">
334
+ <Title order={3} size="md" fw={500} mb="md">Article Title</Title>
335
+ <Text size="sm" c="dimmed" mb="lg">Published on March 15, 2024 by John Doe</Text>
336
+
337
+ <Text mb="md">
338
+ This is the introduction paragraph of the article. It provides an overview of what the reader can expect to learn from this content.
339
+ </Text>
340
+
341
+ <Text mb="md">
342
+ The main body of the article continues here with detailed information, examples, and explanations that help the reader understand the topic better.
343
+ </Text>
344
+
345
+ <Paper variant="shadow" p="md" mb="md" style={{ backgroundColor: 'var(--mantine-color-blue-0)' }}>
346
+ <Text size="sm" fw={500} mb="xs">💡 Pro Tip</Text>
347
+ <Text size="sm">
348
+ This is a highlighted tip or important information that stands out from the main content.
349
+ </Text>
350
+ </Paper>
351
+
352
+ <Text mb="lg">
353
+ The article concludes with a summary of the key points and actionable takeaways for the reader.
354
+ </Text>
355
+
356
+ <Divider mb="md" />
357
+
358
+ <Inline gap="sm">
359
+ <Badge variant="outline">React</Badge>
360
+ <Badge variant="outline">TypeScript</Badge>
361
+ <Badge variant="outline">Design Systems</Badge>
362
+ </Inline>
363
+ </Paper>
364
+
365
+ <Paper variant="shadow" p="md">
366
+ <Inline gap="sm" justify="space-between" align="center" mb="sm">
367
+ <Title order={4} size="sm" fw={500}>Comments (3)</Title>
368
+ <Button variant="outline" size="xs">Add Comment</Button>
369
+ </Inline>
370
+
371
+ <Stack gap="sm">
372
+ <Paper variant="border" p="sm">
373
+ <Inline gap="xs" mb="xs">
374
+ <Text size="sm" fw={500}>Alice Johnson</Text>
375
+ <Text size="xs" c="dimmed">2 hours ago</Text>
376
+ </Inline>
377
+ <Text size="sm">Great article! This really helped me understand the concepts better.</Text>
378
+ </Paper>
379
+
380
+ <Paper variant="border" p="sm">
381
+ <Inline gap="xs" mb="xs">
382
+ <Text size="sm" fw={500}>Bob Smith</Text>
383
+ <Text size="xs" c="dimmed">1 day ago</Text>
384
+ </Inline>
385
+ <Text size="sm">Thanks for sharing this. Do you have any examples of implementation?</Text>
386
+ </Paper>
387
+
388
+ <Paper variant="border" p="sm">
389
+ <Inline gap="xs" mb="xs">
390
+ <Text size="sm" fw={500}>Carol Wilson</Text>
391
+ <Text size="xs" c="dimmed">2 days ago</Text>
392
+ </Inline>
393
+ <Text size="sm">Excellent explanation! Looking forward to more content like this.</Text>
394
+ </Paper>
395
+ </Stack>
396
+ </Paper>
397
+ </Stack>
398
+ ),
399
+ parameters: {
400
+ docs: {
401
+ description: {
402
+ story: 'Paper components used as content containers for articles, comments, and structured content.',
403
+ },
404
+ },
405
+ },
406
+ };
407
+
408
+ export const UseCases: Story = {
409
+ render: () => (
410
+ <Stack gap="xl" w={700}>
411
+ <Title order={3} size="md" fw={500} mb="xs">Common Use Cases</Title>
412
+
413
+ <div>
414
+ <Text size="sm" fw={500} mb="sm">1. Form Containers:</Text>
415
+ <Paper variant="border-shadow" p="lg" style={{ maxWidth: 400 }}>
416
+ <Title order={4} size="sm" fw={500} mb="md">Contact Form</Title>
417
+ <Stack gap="md">
418
+ <div>
419
+ <Text size="sm" fw={500} mb="xs">Name</Text>
420
+ <input
421
+ type="text"
422
+ placeholder="Enter your name..."
423
+ style={{
424
+ width: '100%',
425
+ padding: '8px 12px',
426
+ border: '1px solid var(--mantine-color-gray-3)',
427
+ borderRadius: '4px'
428
+ }}
429
+ />
430
+ </div>
431
+ <div>
432
+ <Text size="sm" fw={500} mb="xs">Email</Text>
433
+ <input
434
+ type="email"
435
+ placeholder="Enter your email..."
436
+ style={{
437
+ width: '100%',
438
+ padding: '8px 12px',
439
+ border: '1px solid var(--mantine-color-gray-3)',
440
+ borderRadius: '4px'
441
+ }}
442
+ />
443
+ </div>
444
+ <div>
445
+ <Text size="sm" fw={500} mb="xs">Message</Text>
446
+ <textarea
447
+ placeholder="Enter your message..."
448
+ rows={3}
449
+ style={{
450
+ width: '100%',
451
+ padding: '8px 12px',
452
+ border: '1px solid var(--mantine-color-gray-3)',
453
+ borderRadius: '4px',
454
+ resize: 'vertical'
455
+ }}
456
+ />
457
+ </div>
458
+ <Button variant="primary" fullWidth>Send Message</Button>
459
+ </Stack>
460
+ </Paper>
461
+ </div>
462
+
463
+ <div>
464
+ <Text size="sm" fw={500} mb="sm">2. Information Panels:</Text>
465
+ <Inline gap="md" align="flex-start">
466
+ <Paper variant="shadow" p="md" style={{ width: 200 }}>
467
+ <Title order={4} size="sm" fw={500} mb="sm">System Status</Title>
468
+ <Stack gap="xs">
469
+ <Inline gap="xs" justify="space-between">
470
+ <Text size="sm">API</Text>
471
+ <Badge variant="filled" color="green">Online</Badge>
472
+ </Inline>
473
+ <Inline gap="xs" justify="space-between">
474
+ <Text size="sm">Database</Text>
475
+ <Badge variant="filled" color="green">Online</Badge>
476
+ </Inline>
477
+ <Inline gap="xs" justify="space-between">
478
+ <Text size="sm">Cache</Text>
479
+ <Badge variant="filled" color="yellow">Warning</Badge>
480
+ </Inline>
481
+ </Stack>
482
+ </Paper>
483
+
484
+ <Paper variant="border" p="md" style={{ width: 200 }}>
485
+ <Title order={4} size="sm" fw={500} mb="sm">Quick Stats</Title>
486
+ <Stack gap="xs">
487
+ <div>
488
+ <Text size="lg" fw={600}>99.9%</Text>
489
+ <Text size="xs" c="dimmed">Uptime</Text>
490
+ </div>
491
+ <div>
492
+ <Text size="lg" fw={600}>1.2s</Text>
493
+ <Text size="xs" c="dimmed">Avg Response</Text>
494
+ </div>
495
+ <div>
496
+ <Text size="lg" fw={600}>15.3k</Text>
497
+ <Text size="xs" c="dimmed">Requests/hour</Text>
498
+ </div>
499
+ </Stack>
500
+ </Paper>
501
+ </Inline>
502
+ </div>
503
+
504
+ <div>
505
+ <Text size="sm" fw={500} mb="sm">3. Content Sections:</Text>
506
+ <Paper variant="border" p="lg" style={{ maxWidth: 500 }}>
507
+ <Title order={4} size="sm" fw={500} mb="md">Feature Highlights</Title>
508
+
509
+ <Stack gap="md">
510
+ <Paper variant="default" p="md" style={{ backgroundColor: 'var(--mantine-color-blue-0)' }}>
511
+ <Text size="sm" fw={500} mb="xs">🚀 Performance</Text>
512
+ <Text size="sm">Lightning-fast loading times and optimized performance.</Text>
513
+ </Paper>
514
+
515
+ <Paper variant="default" p="md" style={{ backgroundColor: 'var(--mantine-color-green-0)' }}>
516
+ <Text size="sm" fw={500} mb="xs">🔒 Security</Text>
517
+ <Text size="sm">Enterprise-grade security with end-to-end encryption.</Text>
518
+ </Paper>
519
+
520
+ <Paper variant="default" p="md" style={{ backgroundColor: 'var(--mantine-color-orange-0)' }}>
521
+ <Text size="sm" fw={500} mb="xs">📱 Responsive</Text>
522
+ <Text size="sm">Works perfectly on all devices and screen sizes.</Text>
523
+ </Paper>
524
+ </Stack>
525
+ </Paper>
526
+ </div>
527
+ </Stack>
528
+ ),
529
+ parameters: {
530
+ docs: {
531
+ description: {
532
+ story: 'Real-world examples of Paper usage in different application contexts.',
533
+ },
534
+ },
535
+ },
536
+ };
537
+
538
+ export const Interactive: Story = {
539
+ args: {
540
+ variant: 'border-shadow',
541
+ p: 'md',
542
+ radius: 'sm',
543
+ children: (
544
+ <div>
545
+ <Title order={4} size="sm" fw={500} mb="xs">Interactive Paper</Title>
546
+ <Text size="sm">Use the controls below to see different Paper configurations.</Text>
547
+ </div>
548
+ ),
549
+ },
550
+ parameters: {
551
+ docs: {
552
+ description: {
553
+ story: 'Use the controls below to interact with the Paper and see different combinations.',
554
+ },
555
+ },
556
+ },
557
+ };