aural-ui 2.0.4 → 2.0.7

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.
@@ -41,11 +41,12 @@ const meta: Meta<typeof DialogContent> = {
41
41
  component: `
42
42
  # Dialog Component
43
43
 
44
- A modal dialog component built on Radix UI primitives with customizable overlays, animations, and variant styling. Includes React 18 compatibility fixes for pointer-events issues.
44
+ A modal dialog component built on Radix UI primitives with customizable overlays, animations, variant styling, and configurable border sides. Includes React 18 compatibility fixes for pointer-events issues.
45
45
 
46
46
  ## Features
47
47
 
48
48
  - **Multiple Variants**: Neutral, positive, negative, warning, and info styles
49
+ - **Configurable Borders**: Support for all sides, specific sides, or no borders
49
50
  - **Custom Overlays**: Configurable opacity, glass effect, and noise texture
50
51
  - **Smooth Animations**: Zoom in/out animations with duration control
51
52
  - **Accessible**: Full keyboard navigation and screen reader support
@@ -55,78 +56,37 @@ A modal dialog component built on Radix UI primitives with customizable overlays
55
56
  - **Focus Management**: Automatic focus trapping and restoration
56
57
  - **React 18 Fix**: Includes \`useDialogCleanup\` hook for pointer-events issues
57
58
 
58
- ## Component Structure
59
+ ## Border Configuration
59
60
 
60
- - **Dialog**: Root component that manages dialog state
61
- - **DialogTrigger**: Button or element that opens the dialog
62
- - **DialogContent**: Main dialog container with overlay and content
63
- - **DialogHeader**: Header section for title and description
64
- - **DialogFooter**: Footer section for action buttons
65
- - **DialogTitle**: Accessible title element
66
- - **DialogDescription**: Optional description text
67
- - **DialogClose**: Close button component
68
- - **useDialogCleanup**: Hook to fix React 18 pointer-events issues
61
+ The \`borderConfig\` prop allows you to control which sides of the dialog have gradient borders:
62
+
63
+ - \`"none"\` - No borders
64
+ - \`"all"\` - All four sides
65
+ - \`"top"\` - Top border only (default)
66
+ - \`["top", "bottom"]\` - Top and bottom borders
67
+ - \`["left", "right"]\` - Left and right borders
68
+ - \`["top", "left", "right"]\` - Top, left, and right borders
69
69
 
70
70
  ## Usage Examples
71
71
 
72
- ### Basic Dialog
72
+ ### Basic Dialog with Border Configuration
73
73
  \`\`\`tsx
74
- import { Dialog, DialogContent, DialogTrigger, useDialogCleanup } from '@/components/dialog'
75
-
76
- function MyComponent() {
77
- const { handleDialogClose } = useDialogCleanup({ threshold: 100 })
78
-
79
- return (
80
- <Dialog>
81
- <DialogTrigger asChild>
82
- <Button>Open Dialog</Button>
83
- </DialogTrigger>
84
- <DialogContent onEscapeKeyDown={handleDialogClose}>
85
- <DialogHeader>
86
- <DialogTitle>Dialog Title</DialogTitle>
87
- <DialogDescription>Dialog description text.</DialogDescription>
88
- </DialogHeader>
89
- <div>Dialog content goes here.</div>
90
- <DialogFooter>
91
- <DialogClose asChild>
92
- <Button variant="outline" onClick={handleDialogClose}>Cancel</Button>
93
- </DialogClose>
94
- <Button>Confirm</Button>
95
- </DialogFooter>
96
- </DialogContent>
97
- </Dialog>
98
- )
99
- }
100
- \`\`\`
74
+ import { Dialog, DialogContent, DialogTrigger } from '@/components/dialog'
101
75
 
102
- ### Variant Styling
103
- \`\`\`tsx
104
- <DialogContent variant="negative">
105
- {/* Negative variant with red shadow */}
76
+ // All borders
77
+ <DialogContent borderConfig="all" variant="positive">
78
+ Content with borders on all sides
106
79
  </DialogContent>
107
- \`\`\`
108
80
 
109
- ### Custom Overlay
110
- \`\`\`tsx
111
- <DialogContent opacity="high" glass="high" noise="low">
112
- {/* High opacity overlay with glass effect and subtle noise */}
81
+ // Specific sides
82
+ <DialogContent borderConfig={["top", "bottom"]} variant="warning">
83
+ Content with top and bottom borders
113
84
  </DialogContent>
114
- \`\`\`
115
85
 
116
- ### React 18 Compatibility
117
- \`\`\`tsx
118
- function DialogWithCleanup() {
119
- const { handleDialogClose } = useDialogCleanup({ threshold: 150 })
120
-
121
- return (
122
- <DialogContent
123
- onInteractOutside={handleDialogClose}
124
- onPointerDownOutside={handleDialogClose}
125
- >
126
- {/* Dialog content */}
127
- </DialogContent>
128
- )
129
- }
86
+ // No borders
87
+ <DialogContent borderConfig="none" variant="neutral">
88
+ Content without any borders
89
+ </DialogContent>
130
90
  \`\`\`
131
91
  `,
132
92
  },
@@ -138,6 +98,22 @@ function DialogWithCleanup() {
138
98
  options: ["neutral", "positive", "negative", "warning", "info"],
139
99
  description: "Dialog variant for different use cases",
140
100
  },
101
+ borderConfig: {
102
+ control: { type: "select" },
103
+ options: [
104
+ "none",
105
+ "all",
106
+ "top",
107
+ "bottom",
108
+ "left",
109
+ "right",
110
+ ["top", "bottom"],
111
+ ["left", "right"],
112
+ ["top", "left", "right"],
113
+ ["bottom", "left", "right"],
114
+ ],
115
+ description: "Border configuration - which sides to show borders on",
116
+ },
141
117
  opacity: {
142
118
  control: { type: "select" },
143
119
  options: ["high", "medium", "low", "none"],
@@ -164,7 +140,211 @@ function DialogWithCleanup() {
164
140
  export default meta
165
141
  type Story = StoryObj<typeof Dialog>
166
142
 
167
- // 1. Dialog Cleanup Example - React 18 Compatibility
143
+ // 1. Border Configuration Examples
144
+ export const BorderConfigurations: Story = {
145
+ render: () => {
146
+ const BorderConfigDialog = ({
147
+ borderConfig,
148
+ variant,
149
+ title,
150
+ description,
151
+ }: any) => {
152
+ const { handleDialogClose } = useDialogCleanup({ threshold: 100 })
153
+
154
+ return (
155
+ <Dialog>
156
+ <DialogTrigger asChild>
157
+ <Button variant="outline" size="sm">
158
+ {title}
159
+ </Button>
160
+ </DialogTrigger>
161
+ <DialogContent
162
+ variant={variant}
163
+ borderConfig={borderConfig}
164
+ //@ts-expect-error onEscapeKeyDown available in Radix v2.0.0
165
+ onEscapeKeyDown={handleDialogClose}
166
+ onPointerDownOutside={handleDialogClose}
167
+ >
168
+ <DialogHeader>
169
+ <DialogTitle>{title}</DialogTitle>
170
+ <DialogDescription>{description}</DialogDescription>
171
+ </DialogHeader>
172
+ <div className="py-4">
173
+ <div className="rounded-lg border border-white/10 bg-white/5 p-3">
174
+ <div className="space-y-1 text-xs text-white/60">
175
+ <div>
176
+ Variant: <span className="text-white">{variant}</span>
177
+ </div>
178
+ <div>
179
+ Border Config:{" "}
180
+ <span className="text-white">
181
+ {Array.isArray(borderConfig)
182
+ ? `[${borderConfig.join(", ")}]`
183
+ : borderConfig}
184
+ </span>
185
+ </div>
186
+ </div>
187
+ </div>
188
+ </div>
189
+ <DialogFooter>
190
+ <DialogClose asChild>
191
+ <Button onClick={handleDialogClose}>Close</Button>
192
+ </DialogClose>
193
+ </DialogFooter>
194
+ </DialogContent>
195
+ </Dialog>
196
+ )
197
+ }
198
+
199
+ return (
200
+ <div className="space-y-8">
201
+ <div className="text-center">
202
+ <h3 className="mb-2 font-medium text-white">Border Configurations</h3>
203
+ <p className="text-sm text-white/60">
204
+ Explore different border configurations for dialog variants
205
+ </p>
206
+ </div>
207
+
208
+ <div className="space-y-6">
209
+ {/* All Borders */}
210
+ <div className="space-y-4">
211
+ <h4 className="text-sm font-medium text-white/80">All Borders</h4>
212
+ <div className="flex flex-wrap gap-2">
213
+ <BorderConfigDialog
214
+ borderConfig="all"
215
+ variant="neutral"
216
+ title="All - Neutral"
217
+ description="Dialog with borders on all four sides"
218
+ />
219
+ <BorderConfigDialog
220
+ borderConfig="all"
221
+ variant="positive"
222
+ title="All - Success"
223
+ description="Success dialog with complete border frame"
224
+ />
225
+ <BorderConfigDialog
226
+ borderConfig="all"
227
+ variant="negative"
228
+ title="All - Error"
229
+ description="Error dialog with full border emphasis"
230
+ />
231
+ </div>
232
+ </div>
233
+
234
+ {/* Single Sides */}
235
+ <div className="space-y-4">
236
+ <h4 className="text-sm font-medium text-white/80">
237
+ Single Side Borders
238
+ </h4>
239
+ <div className="flex flex-wrap gap-2">
240
+ <BorderConfigDialog
241
+ borderConfig="top"
242
+ variant="info"
243
+ title="Top Only"
244
+ description="Dialog with top border accent"
245
+ />
246
+ <BorderConfigDialog
247
+ borderConfig="bottom"
248
+ variant="warning"
249
+ title="Bottom Only"
250
+ description="Dialog with bottom border accent"
251
+ />
252
+ <BorderConfigDialog
253
+ borderConfig="left"
254
+ variant="positive"
255
+ title="Left Only"
256
+ description="Dialog with left border accent"
257
+ />
258
+ <BorderConfigDialog
259
+ borderConfig="right"
260
+ variant="negative"
261
+ title="Right Only"
262
+ description="Dialog with right border accent"
263
+ />
264
+ </div>
265
+ </div>
266
+
267
+ {/* Two Sides */}
268
+ <div className="space-y-4">
269
+ <h4 className="text-sm font-medium text-white/80">
270
+ Two Side Borders
271
+ </h4>
272
+ <div className="flex flex-wrap gap-2">
273
+ <BorderConfigDialog
274
+ borderConfig={["top", "bottom"]}
275
+ variant="neutral"
276
+ title="Top + Bottom"
277
+ description="Horizontal border emphasis"
278
+ />
279
+ <BorderConfigDialog
280
+ borderConfig={["left", "right"]}
281
+ variant="info"
282
+ title="Left + Right"
283
+ description="Vertical border emphasis"
284
+ />
285
+ <BorderConfigDialog
286
+ borderConfig={["top", "left"]}
287
+ variant="warning"
288
+ title="Top + Left"
289
+ description="Corner border accent"
290
+ />
291
+ <BorderConfigDialog
292
+ borderConfig={["bottom", "right"]}
293
+ variant="positive"
294
+ title="Bottom + Right"
295
+ description="Opposite corner accent"
296
+ />
297
+ </div>
298
+ </div>
299
+
300
+ {/* Three Sides */}
301
+ <div className="space-y-4">
302
+ <h4 className="text-sm font-medium text-white/80">
303
+ Three Side Borders
304
+ </h4>
305
+ <div className="flex flex-wrap gap-2">
306
+ <BorderConfigDialog
307
+ borderConfig={["top", "left", "right"]}
308
+ variant="negative"
309
+ title="Top + Left + Right"
310
+ description="Open bottom design"
311
+ />
312
+ <BorderConfigDialog
313
+ borderConfig={["bottom", "left", "right"]}
314
+ variant="warning"
315
+ title="Bottom + Left + Right"
316
+ description="Open top design"
317
+ />
318
+ </div>
319
+ </div>
320
+
321
+ {/* No Border */}
322
+ <div className="space-y-4">
323
+ <h4 className="text-sm font-medium text-white/80">No Borders</h4>
324
+ <div className="flex flex-wrap gap-2">
325
+ <BorderConfigDialog
326
+ borderConfig="none"
327
+ variant="neutral"
328
+ title="No Borders"
329
+ description="Clean minimal design without border accents"
330
+ />
331
+ </div>
332
+ </div>
333
+ </div>
334
+ </div>
335
+ )
336
+ },
337
+ parameters: {
338
+ docs: {
339
+ description: {
340
+ story:
341
+ "Comprehensive showcase of all border configuration options across different variants.",
342
+ },
343
+ },
344
+ },
345
+ }
346
+
347
+ // 2. Dialog Cleanup Example - React 18 Compatibility
168
348
  export const DialogCleanupExample: Story = {
169
349
  render: () => {
170
350
  const DialogWithCleanup = () => {
@@ -182,6 +362,8 @@ export const DialogCleanupExample: Story = {
182
362
  <Button>Open Dialog with Cleanup</Button>
183
363
  </DialogTrigger>
184
364
  <DialogContent
365
+ borderConfig="all"
366
+ variant="info"
185
367
  //@ts-expect-error onEscapeKeyDown available in Radix v2.0.0
186
368
  onEscapeKeyDown={handleClose}
187
369
  onPointerDownOutside={handleClose}
@@ -226,18 +408,6 @@ export const DialogCleanupExample: Story = {
226
408
  <div className="flex justify-center">
227
409
  <DialogWithCleanup />
228
410
  </div>
229
- <div className="text-center">
230
- <div className="inline-block max-w-lg rounded-lg border border-white/10 bg-white/5 p-4">
231
- <h4 className="mb-2 text-sm font-medium text-white">
232
- React 18 Compatibility
233
- </h4>
234
- <p className="text-xs leading-relaxed text-white/60">
235
- The useDialogCleanup hook prevents the pointer-events: none style
236
- from persisting on the body element after dialog close, which
237
- could make the page uninteractive in React 18.
238
- </p>
239
- </div>
240
- </div>
241
411
  </div>
242
412
  )
243
413
  },
@@ -251,11 +421,12 @@ export const DialogCleanupExample: Story = {
251
421
  },
252
422
  }
253
423
 
254
- // 2. Basic Dialog Variants with Cleanup
424
+ // 3. Basic Dialog Variants with Border Styles
255
425
  export const BasicVariants: Story = {
256
426
  render: () => {
257
427
  const DialogWithCleanupVariant = ({
258
428
  variant,
429
+ borderConfig,
259
430
  title,
260
431
  description,
261
432
  children,
@@ -269,6 +440,7 @@ export const BasicVariants: Story = {
269
440
  </DialogTrigger>
270
441
  <DialogContent
271
442
  variant={variant}
443
+ borderConfig={borderConfig}
272
444
  //@ts-expect-error onEscapeKeyDown available in Radix v2.0.0
273
445
  onEscapeKeyDown={handleDialogClose}
274
446
  onPointerDownOutside={handleDialogClose}
@@ -295,27 +467,29 @@ export const BasicVariants: Story = {
295
467
  <div className="space-y-8">
296
468
  <div className="text-center">
297
469
  <h3 className="mb-2 font-medium text-white">
298
- Dialog Variants with Cleanup
470
+ Dialog Variants with Border Styles
299
471
  </h3>
300
472
  <p className="text-sm text-white/60">
301
- Different dialog variants with React 18 compatibility fixes
473
+ Different dialog variants with customized border configurations
302
474
  </p>
303
475
  </div>
304
476
 
305
477
  <div className="flex flex-wrap justify-center gap-4">
306
478
  <DialogWithCleanupVariant
307
479
  variant="neutral"
480
+ borderConfig="top"
308
481
  title="Neutral Dialog"
309
- description="This is a neutral dialog with standard styling."
482
+ description="This is a neutral dialog with top border."
310
483
  >
311
484
  <p className="text-sm text-white/80">
312
- Neutral dialogs are perfect for general information, settings, or
313
- any content that doesn't require specific emotional context.
485
+ Neutral dialogs with minimal top border accent are perfect for
486
+ general information and settings.
314
487
  </p>
315
488
  </DialogWithCleanupVariant>
316
489
 
317
490
  <DialogWithCleanupVariant
318
491
  variant="positive"
492
+ borderConfig="all"
319
493
  title="Success Dialog"
320
494
  description="Operation completed successfully!"
321
495
  >
@@ -324,13 +498,14 @@ export const BasicVariants: Story = {
324
498
  <span className="font-medium text-green-400">Success!</span>
325
499
  </div>
326
500
  <p className="text-sm text-white/80">
327
- Your changes have been saved and are now live. Users will see the
328
- updates immediately.
501
+ Success dialogs with full border frame provide strong positive
502
+ feedback.
329
503
  </p>
330
504
  </DialogWithCleanupVariant>
331
505
 
332
506
  <DialogWithCleanupVariant
333
507
  variant="warning"
508
+ borderConfig={["top", "bottom"]}
334
509
  title="Warning Dialog"
335
510
  description="Please review the following before proceeding."
336
511
  >
@@ -340,14 +515,15 @@ export const BasicVariants: Story = {
340
515
  <span className="font-medium text-yellow-400">Warning</span>
341
516
  </div>
342
517
  <p className="text-sm text-yellow-200">
343
- This action will modify existing data. Make sure you have a
344
- backup before continuing.
518
+ Warning dialogs with horizontal borders create focused
519
+ attention.
345
520
  </p>
346
521
  </div>
347
522
  </DialogWithCleanupVariant>
348
523
 
349
524
  <DialogWithCleanupVariant
350
525
  variant="negative"
526
+ borderConfig={["left", "right"]}
351
527
  title="Error Dialog"
352
528
  description="An error occurred that requires your attention."
353
529
  >
@@ -357,14 +533,14 @@ export const BasicVariants: Story = {
357
533
  <span className="font-medium text-red-400">Error</span>
358
534
  </div>
359
535
  <p className="text-sm text-red-200">
360
- Failed to save changes. Please check your connection and try
361
- again.
536
+ Error dialogs with vertical borders provide urgent visual cues.
362
537
  </p>
363
538
  </div>
364
539
  </DialogWithCleanupVariant>
365
540
 
366
541
  <DialogWithCleanupVariant
367
542
  variant="info"
543
+ borderConfig="none"
368
544
  title="Information Dialog"
369
545
  description="Here's some important information for you."
370
546
  >
@@ -374,8 +550,8 @@ export const BasicVariants: Story = {
374
550
  <span className="font-medium text-blue-400">Information</span>
375
551
  </div>
376
552
  <p className="text-sm text-blue-200">
377
- The new features will be available starting next week. Check
378
- your email for detailed release notes.
553
+ Clean info dialogs without borders for minimal, focused content
554
+ presentation.
379
555
  </p>
380
556
  </div>
381
557
  </DialogWithCleanupVariant>
@@ -387,13 +563,13 @@ export const BasicVariants: Story = {
387
563
  docs: {
388
564
  description: {
389
565
  story:
390
- "Different dialog variants with useDialogCleanup hook for React 18 compatibility.",
566
+ "Different dialog variants showcasing various border configurations for enhanced visual hierarchy.",
391
567
  },
392
568
  },
393
569
  },
394
570
  }
395
571
 
396
- // 3. Nested Modal with Cleanup
572
+ // 4. Nested Modal with Cleanup
397
573
  export const NestedModalWithCleanup: Story = {
398
574
  render: () => {
399
575
  const NestedDialogComponent = () => {
@@ -428,6 +604,8 @@ export const NestedModalWithCleanup: Story = {
428
604
  </DialogTrigger>
429
605
  <DialogContent
430
606
  className="max-w-md"
607
+ borderConfig={["top", "left", "right"]}
608
+ variant="neutral"
431
609
  //@ts-expect-error onEscapeKeyDown available in Radix v2.0.0
432
610
  onEscapeKeyDown={handleEditClose}
433
611
  onPointerDownOutside={handleEditClose}
@@ -473,6 +651,7 @@ export const NestedModalWithCleanup: Story = {
473
651
  <Dialog open={isDeleteOpen} onOpenChange={setIsDeleteOpen}>
474
652
  <DialogContent
475
653
  variant="negative"
654
+ borderConfig="all"
476
655
  classes={{
477
656
  root: "max-w-sm",
478
657
  overlay: "z-60",
@@ -520,27 +699,15 @@ export const NestedModalWithCleanup: Story = {
520
699
  <div className="space-y-8">
521
700
  <div className="text-center">
522
701
  <h3 className="mb-2 font-medium text-white">
523
- Nested Modal with Cleanup
702
+ Nested Modal with Custom Borders
524
703
  </h3>
525
704
  <p className="text-sm text-white/60">
526
- Modal-on-modal with proper cleanup handling
705
+ Modal-on-modal with different border configurations
527
706
  </p>
528
707
  </div>
529
708
  <div className="flex justify-center">
530
709
  <NestedDialogComponent />
531
710
  </div>
532
- <div className="text-center">
533
- <div className="inline-block max-w-lg rounded-lg border border-white/10 bg-white/5 p-4">
534
- <h4 className="mb-2 text-sm font-medium text-white">
535
- Modal Stacking
536
- </h4>
537
- <p className="text-xs leading-relaxed text-white/60">
538
- This example demonstrates proper modal stacking where a delete
539
- confirmation dialog opens on top of an edit form dialog with
540
- proper cleanup handling for React 18.
541
- </p>
542
- </div>
543
- </div>
544
711
  </div>
545
712
  )
546
713
  },
@@ -548,13 +715,13 @@ export const NestedModalWithCleanup: Story = {
548
715
  docs: {
549
716
  description: {
550
717
  story:
551
- "Nested modal example with useDialogCleanup hook to handle multiple modal layers properly.",
718
+ "Nested modal example showcasing different border configurations for modal hierarchy.",
552
719
  },
553
720
  },
554
721
  },
555
722
  }
556
723
 
557
- // 4. Form Dialog with Cleanup
724
+ // 5. Form Dialog with Cleanup
558
725
  export const FormDialog: Story = {
559
726
  render: () => {
560
727
  const FormDialogComponent = () => {
@@ -587,6 +754,8 @@ export const FormDialog: Story = {
587
754
  </DialogTrigger>
588
755
  <DialogContent
589
756
  className="max-w-md"
757
+ borderConfig={["top", "bottom"]}
758
+ variant="info"
590
759
  //@ts-expect-error onEscapeKeyDown available in Radix v2.0.0
591
760
  onEscapeKeyDown={handleClose}
592
761
  onPointerDownOutside={handleClose}
@@ -688,7 +857,7 @@ export const FormDialog: Story = {
688
857
  <div className="text-center">
689
858
  <h3 className="mb-2 font-medium text-white">Form Dialog</h3>
690
859
  <p className="text-sm text-white/60">
691
- Dialog containing form elements with cleanup handling
860
+ Dialog containing form elements with horizontal border accent
692
861
  </p>
693
862
  </div>
694
863
  <div className="flex justify-center">
@@ -701,19 +870,20 @@ export const FormDialog: Story = {
701
870
  docs: {
702
871
  description: {
703
872
  story:
704
- "Form dialog with validation and cleanup handling for React 18 compatibility.",
873
+ "Form dialog with validation and horizontal border configuration for focused data entry.",
705
874
  },
706
875
  },
707
876
  },
708
877
  }
709
878
 
710
- // 5. Overlay Variations
879
+ // 6. Overlay Variations
711
880
  export const OverlayVariations: Story = {
712
881
  render: () => {
713
882
  const OverlayDialog = ({
714
883
  opacity,
715
884
  glass,
716
885
  noise,
886
+ borderConfig,
717
887
  title,
718
888
  description,
719
889
  }: any) => {
@@ -722,9 +892,17 @@ export const OverlayVariations: Story = {
722
892
  return (
723
893
  <Dialog>
724
894
  <DialogTrigger asChild>
725
- <Button variant="outline">{title}</Button>
895
+ <Button variant="outline" size="sm">
896
+ {title}
897
+ </Button>
726
898
  </DialogTrigger>
727
- <DialogContent opacity={opacity} glass={glass} noise={noise}>
899
+ <DialogContent
900
+ opacity={opacity}
901
+ glass={glass}
902
+ noise={noise}
903
+ borderConfig={borderConfig}
904
+ variant="neutral"
905
+ >
728
906
  <DialogHeader>
729
907
  <DialogTitle>{title}</DialogTitle>
730
908
  <DialogDescription>{description}</DialogDescription>
@@ -742,6 +920,14 @@ export const OverlayVariations: Story = {
742
920
  <div>
743
921
  Noise: <span className="text-white">{noise || "none"}</span>
744
922
  </div>
923
+ <div>
924
+ Border:{" "}
925
+ <span className="text-white">
926
+ {Array.isArray(borderConfig)
927
+ ? `[${borderConfig.join(", ")}]`
928
+ : borderConfig || "top"}
929
+ </span>
930
+ </div>
745
931
  </div>
746
932
  </div>
747
933
  <DialogFooter>
@@ -757,76 +943,63 @@ export const OverlayVariations: Story = {
757
943
  return (
758
944
  <div className="space-y-8">
759
945
  <div className="text-center">
760
- <h3 className="mb-2 font-medium text-white">Overlay Variations</h3>
946
+ <h3 className="mb-2 font-medium text-white">
947
+ Overlay Variations with Borders
948
+ </h3>
761
949
  <p className="text-sm text-white/60">
762
- Different overlay effects with cleanup handling
950
+ Different overlay effects combined with border configurations
763
951
  </p>
764
952
  </div>
765
953
 
766
954
  <div className="grid grid-cols-2 gap-4 md:grid-cols-3 lg:grid-cols-4">
767
955
  <OverlayDialog
768
956
  opacity="low"
957
+ borderConfig="top"
769
958
  title="Low Opacity"
770
959
  description="Subtle background dimming (40%)"
771
960
  />
772
961
  <OverlayDialog
773
962
  opacity="medium"
963
+ borderConfig={["top", "bottom"]}
774
964
  title="Medium Opacity"
775
965
  description="Balanced background dimming (60%)"
776
966
  />
777
967
  <OverlayDialog
778
968
  opacity="high"
969
+ borderConfig="all"
779
970
  title="High Opacity"
780
971
  description="Strong background dimming (80%)"
781
972
  />
782
973
  <OverlayDialog
783
974
  opacity="none"
975
+ borderConfig="none"
784
976
  title="Full Opacity"
785
977
  description="Complete background coverage (100%)"
786
978
  />
787
979
  <OverlayDialog
788
980
  glass="low"
981
+ borderConfig={["left", "right"]}
789
982
  title="Low Glass"
790
983
  description="Subtle backdrop blur effect"
791
984
  />
792
985
  <OverlayDialog
793
986
  glass="medium"
987
+ borderConfig="all"
794
988
  title="Medium Glass"
795
989
  description="Balanced backdrop blur effect"
796
990
  />
797
991
  <OverlayDialog
798
992
  glass="high"
993
+ borderConfig="top"
799
994
  title="High Glass"
800
995
  description="Strong backdrop blur effect"
801
996
  />
802
997
  <OverlayDialog
803
998
  noise="low"
999
+ borderConfig={["top", "left", "right"]}
804
1000
  title="Low Noise"
805
1001
  description="Subtle texture pattern"
806
1002
  />
807
- <OverlayDialog
808
- noise="medium"
809
- title="Medium Noise"
810
- description="Balanced texture pattern"
811
- />
812
- <OverlayDialog
813
- noise="high"
814
- title="High Noise"
815
- description="Strong texture pattern"
816
- />
817
- <OverlayDialog
818
- opacity="high"
819
- glass="high"
820
- title="High + Glass"
821
- description="Maximum focus with glass effect"
822
- />
823
- <OverlayDialog
824
- opacity="medium"
825
- glass="medium"
826
- noise="low"
827
- title="Balanced Mix"
828
- description="Balanced combination of effects"
829
- />
830
1003
  </div>
831
1004
  </div>
832
1005
  )
@@ -835,13 +1008,13 @@ export const OverlayVariations: Story = {
835
1008
  docs: {
836
1009
  description: {
837
1010
  story:
838
- "Showcase of different overlay configurations including opacity, glass, and noise effects.",
1011
+ "Showcase of different overlay configurations combined with various border styles.",
839
1012
  },
840
1013
  },
841
1014
  },
842
1015
  }
843
1016
 
844
- // 6. Accessibility Example
1017
+ // 7. Accessibility Example
845
1018
  export const AccessibilityExample: Story = {
846
1019
  render: () => {
847
1020
  const AccessibleDialog = () => {
@@ -853,6 +1026,8 @@ export const AccessibilityExample: Story = {
853
1026
  <Button>Accessible Dialog Demo</Button>
854
1027
  </DialogTrigger>
855
1028
  <DialogContent
1029
+ borderConfig="all"
1030
+ variant="info"
856
1031
  //@ts-expect-error onEscapeKeyDown available in Radix v2.0.0
857
1032
  onEscapeKeyDown={handleDialogClose}
858
1033
  onPointerDownOutside={handleDialogClose}
@@ -860,11 +1035,24 @@ export const AccessibilityExample: Story = {
860
1035
  <DialogHeader>
861
1036
  <DialogTitle>Accessibility Features</DialogTitle>
862
1037
  <DialogDescription>
863
- This dialog demonstrates proper accessibility implementation.
1038
+ This dialog demonstrates proper accessibility implementation
1039
+ with border configuration.
864
1040
  </DialogDescription>
865
1041
  </DialogHeader>
866
1042
 
867
1043
  <div className="space-y-4">
1044
+ <div className="rounded-lg border border-white/10 bg-white/5 p-4">
1045
+ <h4 className="mb-2 font-medium text-white">
1046
+ Border Configuration
1047
+ </h4>
1048
+ <ul className="space-y-1 text-sm text-white/80">
1049
+ <li>• Complete border frame for maximum visual emphasis</li>
1050
+ <li>• Customizable per dialog context and importance</li>
1051
+ <li>• Maintains accessibility contrast ratios</li>
1052
+ <li>• Works with all variant color schemes</li>
1053
+ </ul>
1054
+ </div>
1055
+
868
1056
  <div className="rounded-lg border border-white/10 bg-white/5 p-4">
869
1057
  <h4 className="mb-2 font-medium text-white">
870
1058
  Keyboard Navigation
@@ -889,18 +1077,6 @@ export const AccessibilityExample: Story = {
889
1077
  </ul>
890
1078
  </div>
891
1079
 
892
- <div className="rounded-lg border border-white/10 bg-white/5 p-4">
893
- <h4 className="mb-2 font-medium text-white">
894
- Screen Reader Support
895
- </h4>
896
- <ul className="space-y-1 text-sm text-white/80">
897
- <li>• Proper ARIA labels and roles</li>
898
- <li>• Focus management and trapping</li>
899
- <li>• Descriptive close button</li>
900
- <li>• Semantic heading structure</li>
901
- </ul>
902
- </div>
903
-
904
1080
  <div className="rounded-lg border border-white/10 bg-white/5 p-4">
905
1081
  <h4 className="mb-2 font-medium text-white">
906
1082
  React 18 Compatibility
@@ -931,24 +1107,12 @@ export const AccessibilityExample: Story = {
931
1107
  Accessibility Features
932
1108
  </h3>
933
1109
  <p className="text-sm text-white/60">
934
- Dialog with comprehensive accessibility and React 18 compatibility
1110
+ Dialog with comprehensive accessibility and border configuration
935
1111
  </p>
936
1112
  </div>
937
1113
  <div className="flex justify-center">
938
1114
  <AccessibleDialog />
939
1115
  </div>
940
- <div className="text-center">
941
- <div className="inline-block max-w-lg rounded-lg border border-white/10 bg-white/5 p-4">
942
- <h4 className="mb-2 text-sm font-medium text-white">
943
- Accessibility Best Practices
944
- </h4>
945
- <p className="text-xs leading-relaxed text-white/60">
946
- The Dialog component follows WCAG guidelines with proper focus
947
- management, keyboard navigation, screen reader support, semantic
948
- HTML structure, and React 18 compatibility fixes.
949
- </p>
950
- </div>
951
- </div>
952
1116
  </div>
953
1117
  )
954
1118
  },
@@ -956,7 +1120,7 @@ export const AccessibilityExample: Story = {
956
1120
  docs: {
957
1121
  description: {
958
1122
  story:
959
- "Comprehensive accessibility example with React 18 compatibility features.",
1123
+ "Comprehensive accessibility example with border configuration and React 18 compatibility features.",
960
1124
  },
961
1125
  },
962
1126
  },