@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,401 @@
1
+ import type { Meta, StoryObj } from '@storybook/nextjs-vite';
2
+ import { Stack } from '@mantine/core';
3
+ import { Inline, DropZone, Title, Text } from '@appdirect/design-system';
4
+ import { useState } from 'react';
5
+ import { IMAGE_MIME_TYPE, PDF_MIME_TYPE, MS_WORD_MIME_TYPE, MS_EXCEL_MIME_TYPE } from '@mantine/dropzone';
6
+
7
+ const meta: Meta<typeof DropZone> = {
8
+ title: 'Design System/Inputs/DropZone',
9
+ component: DropZone,
10
+ parameters: {
11
+ layout: 'centered',
12
+ docs: {
13
+ description: {
14
+ component: 'DropZone component for drag-and-drop file uploads with customizable file type restrictions and visual feedback.',
15
+ },
16
+ },
17
+ },
18
+ tags: ['autodocs', 'code-connected'],
19
+ argTypes: {
20
+ title: {
21
+ control: 'text',
22
+ description: 'Title text displayed in the dropzone',
23
+ },
24
+ description: {
25
+ control: 'text',
26
+ description: 'Description text displayed below the title',
27
+ },
28
+ maxSize: {
29
+ control: 'number',
30
+ description: 'Maximum file size in bytes',
31
+ },
32
+ accept: {
33
+ control: false,
34
+ description: 'Accepted file types',
35
+ },
36
+ disabled: {
37
+ control: 'boolean',
38
+ description: 'Disabled state',
39
+ },
40
+ multiple: {
41
+ control: 'boolean',
42
+ description: 'Allow multiple file selection',
43
+ },
44
+ },
45
+ };
46
+
47
+ export default meta;
48
+ type Story = StoryObj<typeof meta>;
49
+
50
+ export const Default: Story = {
51
+ args: {
52
+ title: 'Upload files',
53
+ description: 'Drag and drop files here or click to select',
54
+ },
55
+ };
56
+
57
+ export const FileTypes: Story = {
58
+ render: () => (
59
+ <Stack gap="lg" w={500}>
60
+ <div>
61
+ <Text size="sm" fw={500} mb="sm">Images Only</Text>
62
+ <DropZone
63
+ title="Upload Images"
64
+ description="Drag and drop image files here (PNG, JPEG, GIF, WebP)"
65
+ accept={IMAGE_MIME_TYPE}
66
+ maxSize={5 * 1024 ** 2}
67
+ />
68
+ </div>
69
+
70
+ <div>
71
+ <Text size="sm" fw={500} mb="sm">PDF Documents</Text>
72
+ <DropZone
73
+ title="Upload PDF Files"
74
+ description="Drag and drop PDF documents here"
75
+ accept={PDF_MIME_TYPE}
76
+ maxSize={10 * 1024 ** 2}
77
+ />
78
+ </div>
79
+
80
+ <div>
81
+ <Text size="sm" fw={500} mb="sm">Office Documents</Text>
82
+ <DropZone
83
+ title="Upload Documents"
84
+ description="Drag and drop Word or Excel files here"
85
+ accept={[...MS_WORD_MIME_TYPE, ...MS_EXCEL_MIME_TYPE]}
86
+ maxSize={20 * 1024 ** 2}
87
+ />
88
+ </div>
89
+
90
+ <div>
91
+ <Text size="sm" fw={500} mb="sm">Any File Type</Text>
92
+ <DropZone
93
+ title="Upload Any Files"
94
+ description="Drag and drop any type of file here"
95
+ accept={undefined}
96
+ maxSize={50 * 1024 ** 2}
97
+ />
98
+ </div>
99
+ </Stack>
100
+ ),
101
+ parameters: {
102
+ docs: {
103
+ description: {
104
+ story: 'DropZone with different file type restrictions and size limits.',
105
+ },
106
+ },
107
+ },
108
+ };
109
+
110
+ export const Sizes: Story = {
111
+ render: () => (
112
+ <Stack gap="lg" w={600}>
113
+ <div>
114
+ <Text size="sm" fw={500} mb="sm">Compact (80px height)</Text>
115
+ <DropZone
116
+ title="Compact Upload"
117
+ description="Small dropzone for quick uploads"
118
+ style={{ minHeight: 80 }}
119
+ />
120
+ </div>
121
+
122
+ <div>
123
+ <Text size="sm" fw={500} mb="sm">Standard (120px height)</Text>
124
+ <DropZone
125
+ title="Standard Upload"
126
+ description="Standard size dropzone for general use"
127
+ style={{ minHeight: 120 }}
128
+ />
129
+ </div>
130
+
131
+ <div>
132
+ <Text size="sm" fw={500} mb="sm">Large (200px height)</Text>
133
+ <DropZone
134
+ title="Large Upload Area"
135
+ description="Large dropzone for bulk file uploads or better visibility"
136
+ style={{ minHeight: 200 }}
137
+ />
138
+ </div>
139
+ </Stack>
140
+ ),
141
+ parameters: {
142
+ docs: {
143
+ description: {
144
+ story: 'DropZone with different sizes for various use cases.',
145
+ },
146
+ },
147
+ },
148
+ };
149
+
150
+ export const States: Story = {
151
+ render: () => (
152
+ <Stack gap="lg" w={500}>
153
+ <div>
154
+ <Text size="sm" fw={500} mb="sm">Default State</Text>
155
+ <DropZone
156
+ title="Default Upload"
157
+ description="Ready to accept files"
158
+ />
159
+ </div>
160
+
161
+ <div>
162
+ <Text size="sm" fw={500} mb="sm">Disabled State</Text>
163
+ <DropZone
164
+ title="Disabled Upload"
165
+ description="Upload is currently disabled"
166
+ disabled
167
+ />
168
+ </div>
169
+
170
+ <div>
171
+ <Text size="sm" fw={500} mb="sm">Multiple Files</Text>
172
+ <DropZone
173
+ title="Multiple File Upload"
174
+ description="You can upload multiple files at once"
175
+ multiple
176
+ />
177
+ </div>
178
+ </Stack>
179
+ ),
180
+ };
181
+
182
+ export const ControlledExample: Story = {
183
+ render: () => {
184
+ const [uploadedFiles, setUploadedFiles] = useState<File[]>([]);
185
+ const [rejectedFiles, setRejectedFiles] = useState<any[]>([]);
186
+
187
+ const handleDrop = (files: File[]) => {
188
+ setUploadedFiles(prev => [...prev, ...files]);
189
+ };
190
+
191
+ const handleReject = (files: any[]) => {
192
+ setRejectedFiles(prev => [...prev, ...files]);
193
+ };
194
+
195
+ const clearFiles = () => {
196
+ setUploadedFiles([]);
197
+ setRejectedFiles([]);
198
+ };
199
+
200
+ return (
201
+ <Stack gap="lg" w={500}>
202
+ <DropZone
203
+ title="Upload Images"
204
+ description="Drag and drop image files here (max 2MB each)"
205
+ accept={IMAGE_MIME_TYPE}
206
+ maxSize={2 * 1024 ** 2}
207
+ onDrop={handleDrop}
208
+ onReject={handleReject}
209
+ multiple
210
+ />
211
+
212
+ {uploadedFiles.length > 0 && (
213
+ <div style={{
214
+ padding: '12px',
215
+ backgroundColor: 'var(--mantine-color-green-0)',
216
+ borderRadius: '8px',
217
+ border: '1px solid var(--mantine-color-green-3)'
218
+ }}>
219
+ <Text size="sm" fw={500} mb="xs" c="green">Uploaded Files ({uploadedFiles.length}):</Text>
220
+ {uploadedFiles.map((file, index) => (
221
+ <Text key={index} size="sm">
222
+ • {file.name} ({(file.size / 1024).toFixed(1)} KB)
223
+ </Text>
224
+ ))}
225
+ </div>
226
+ )}
227
+
228
+ {rejectedFiles.length > 0 && (
229
+ <div style={{
230
+ padding: '12px',
231
+ backgroundColor: 'var(--mantine-color-red-0)',
232
+ borderRadius: '8px',
233
+ border: '1px solid var(--mantine-color-red-3)'
234
+ }}>
235
+ <Text size="sm" fw={500} mb="xs" c="red">Rejected Files ({rejectedFiles.length}):</Text>
236
+ {rejectedFiles.map((rejection, index) => (
237
+ <Text key={index} size="sm">
238
+ • {rejection.file.name} - {rejection.errors[0]?.message}
239
+ </Text>
240
+ ))}
241
+ </div>
242
+ )}
243
+
244
+ {(uploadedFiles.length > 0 || rejectedFiles.length > 0) && (
245
+ <button
246
+ onClick={clearFiles}
247
+ style={{
248
+ padding: '8px 16px',
249
+ border: '1px solid #ccc',
250
+ borderRadius: '4px',
251
+ background: 'white',
252
+ cursor: 'pointer'
253
+ }}
254
+ >
255
+ Clear All
256
+ </button>
257
+ )}
258
+ </Stack>
259
+ );
260
+ },
261
+ parameters: {
262
+ docs: {
263
+ description: {
264
+ story: 'Example of controlled DropZone with file handling and feedback.',
265
+ },
266
+ },
267
+ },
268
+ };
269
+
270
+ export const UseCases: Story = {
271
+ render: () => (
272
+ <Stack gap="lg" w={600}>
273
+ <Title order={3} size="md" fw={500} mb="xs">Common Use Cases</Title>
274
+
275
+ <Stack gap="md">
276
+ <div>
277
+ <Text size="sm" fw={500} mb="sm">Profile Picture Upload</Text>
278
+ <DropZone
279
+ title="Upload Profile Picture"
280
+ description="Drag and drop a profile image (JPEG, PNG, max 2MB)"
281
+ accept={['image/jpeg', 'image/png']}
282
+ maxSize={2 * 1024 ** 2}
283
+ multiple={false}
284
+ style={{ minHeight: 100 }}
285
+ />
286
+ </div>
287
+
288
+ <div>
289
+ <Text size="sm" fw={500} mb="sm">Document Upload</Text>
290
+ <DropZone
291
+ title="Upload Documents"
292
+ description="Drag and drop PDF, Word, or Excel files (max 10MB each)"
293
+ accept={[...PDF_MIME_TYPE, ...MS_WORD_MIME_TYPE, ...MS_EXCEL_MIME_TYPE]}
294
+ maxSize={10 * 1024 ** 2}
295
+ multiple
296
+ />
297
+ </div>
298
+
299
+ <div>
300
+ <Text size="sm" fw={500} mb="sm">Bulk Image Upload</Text>
301
+ <DropZone
302
+ title="Upload Multiple Images"
303
+ description="Drag and drop multiple images for gallery upload (max 5MB each)"
304
+ accept={IMAGE_MIME_TYPE}
305
+ maxSize={5 * 1024 ** 2}
306
+ multiple
307
+ style={{ minHeight: 150 }}
308
+ />
309
+ </div>
310
+
311
+ <div>
312
+ <Text size="sm" fw={500} mb="sm">Data Import</Text>
313
+ <DropZone
314
+ title="Import Data File"
315
+ description="Drag and drop CSV or Excel files for data import (max 25MB)"
316
+ accept={['text/csv', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']}
317
+ maxSize={25 * 1024 ** 2}
318
+ multiple={false}
319
+ />
320
+ </div>
321
+ </Stack>
322
+ </Stack>
323
+ ),
324
+ parameters: {
325
+ docs: {
326
+ description: {
327
+ story: 'Real-world examples of DropZone usage in different application contexts.',
328
+ },
329
+ },
330
+ },
331
+ };
332
+
333
+ export const CustomStyling: Story = {
334
+ render: () => (
335
+ <Stack gap="lg" w={500}>
336
+ <div>
337
+ <Text size="sm" fw={500} mb="sm">Custom Border Style</Text>
338
+ <DropZone
339
+ title="Stylized Upload"
340
+ description="Custom styled dropzone with dashed border"
341
+ style={{
342
+ border: '2px dashed var(--mantine-color-blue-4)',
343
+ borderRadius: '12px',
344
+ backgroundColor: 'var(--mantine-color-blue-0)'
345
+ }}
346
+ />
347
+ </div>
348
+
349
+ <div>
350
+ <Text size="sm" fw={500} mb="sm">Minimal Style</Text>
351
+ <DropZone
352
+ title="Minimal Upload"
353
+ description="Clean, minimal styling"
354
+ style={{
355
+ border: '1px solid var(--mantine-color-gray-3)',
356
+ borderRadius: '8px',
357
+ backgroundColor: 'var(--mantine-color-gray-0)'
358
+ }}
359
+ />
360
+ </div>
361
+
362
+ <div>
363
+ <Text size="sm" fw={500} mb="sm">Prominent Style</Text>
364
+ <DropZone
365
+ title="Important Upload"
366
+ description="Prominent styling for critical uploads"
367
+ style={{
368
+ border: '3px solid var(--mantine-color-orange-4)',
369
+ borderRadius: '16px',
370
+ backgroundColor: 'var(--mantine-color-orange-0)',
371
+ minHeight: 120
372
+ }}
373
+ />
374
+ </div>
375
+ </Stack>
376
+ ),
377
+ parameters: {
378
+ docs: {
379
+ description: {
380
+ story: 'Examples of DropZone with custom styling for different visual treatments.',
381
+ },
382
+ },
383
+ },
384
+ };
385
+
386
+ export const Interactive: Story = {
387
+ args: {
388
+ title: 'Interactive DropZone',
389
+ description: 'Drag and drop files here or click to select',
390
+ maxSize: 5 * 1024 ** 2,
391
+ multiple: true,
392
+ disabled: false,
393
+ },
394
+ parameters: {
395
+ docs: {
396
+ description: {
397
+ story: 'Use the controls below to interact with the DropZone and see different combinations.',
398
+ },
399
+ },
400
+ },
401
+ };