@catalystsoftware/ui 1.0.5 → 1.0.6

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 (155) hide show
  1. package/dist/data/data.tsx +29 -29
  2. package/dist/data/tailwind.config.js +3821 -261
  3. package/dist/data.tsx +29 -29
  4. package/package.json +4 -3
  5. package/components/catalyst-ui/buttons/burger.tsx +0 -207
  6. package/components/catalyst-ui/core/data-display/timeline.tsx +0 -210
  7. package/components/catalyst-ui/core/feedback/alert.tsx +0 -491
  8. package/components/catalyst-ui/core/feedback/spinner-1.tsx +0 -65
  9. package/components/catalyst-ui/core/feedback/toast.tsx +0 -1857
  10. package/components/catalyst-ui/core/navigation/menu.tsx +0 -164
  11. package/components/catalyst-ui/forms/toggle-class.tsx +0 -176
  12. package/components/catalyst-ui/hooks/use-copy-to-clipboard.tsx +0 -419
  13. package/components/catalyst-ui/hooks/use-counter.tsx +0 -13
  14. package/components/catalyst-ui/hooks/use-event-listener.tsx +0 -23
  15. package/components/catalyst-ui/hooks/use-export-markdown.tsx +0 -47
  16. package/components/catalyst-ui/hooks/use-focus.tsx +0 -17
  17. package/components/catalyst-ui/hooks/use-interval.tsx +0 -23
  18. package/components/catalyst-ui/hooks/use-is-client.tsx +0 -16
  19. package/components/catalyst-ui/hooks/use-media-query.tsx +0 -19
  20. package/components/catalyst-ui/hooks/use-mobile.tsx +0 -19
  21. package/components/catalyst-ui/hooks/use-resize-observer.tsx +0 -81
  22. package/components/catalyst-ui/hooks/use-timeout.tsx +0 -21
  23. package/components/catalyst-ui/hooks/use-timer.tsx +0 -209
  24. package/components/catalyst-ui/hooks/use-toggle.tsx +0 -12
  25. package/components/catalyst-ui/media/image.tsx +0 -13
  26. package/components/catalyst-ui/overlays/dual-sidebar.tsx +0 -4142
  27. package/components/catalyst-ui/overlays/sidebar-original.tsx +0 -726
  28. package/components/catalyst-ui/primitives/accordion.tsx +0 -250
  29. package/components/catalyst-ui/primitives/alert-dialog.tsx +0 -126
  30. package/components/catalyst-ui/primitives/aspect-ratio.tsx +0 -9
  31. package/components/catalyst-ui/primitives/avatar.tsx +0 -296
  32. package/components/catalyst-ui/primitives/badge.tsx +0 -57
  33. package/components/catalyst-ui/primitives/breadcrumb.tsx +0 -101
  34. package/components/catalyst-ui/primitives/button.tsx +0 -265
  35. package/components/catalyst-ui/primitives/calendar-v4.tsx +0 -208
  36. package/components/catalyst-ui/primitives/calendar.tsx +0 -295
  37. package/components/catalyst-ui/primitives/card.tsx +0 -618
  38. package/components/catalyst-ui/primitives/carousel.tsx +0 -238
  39. package/components/catalyst-ui/primitives/chart.tsx +0 -347
  40. package/components/catalyst-ui/primitives/checkbox.tsx +0 -225
  41. package/components/catalyst-ui/primitives/collapsible.tsx +0 -212
  42. package/components/catalyst-ui/primitives/command.tsx +0 -393
  43. package/components/catalyst-ui/primitives/context-menu.tsx +0 -236
  44. package/components/catalyst-ui/primitives/dialog.tsx +0 -471
  45. package/components/catalyst-ui/primitives/drawer.tsx +0 -761
  46. package/components/catalyst-ui/primitives/dropdown-menu.tsx +0 -290
  47. package/components/catalyst-ui/primitives/empty.tsx +0 -104
  48. package/components/catalyst-ui/primitives/field.tsx +0 -244
  49. package/components/catalyst-ui/primitives/hover-card.tsx +0 -124
  50. package/components/catalyst-ui/primitives/input-otp.tsx +0 -76
  51. package/components/catalyst-ui/primitives/input.tsx +0 -64
  52. package/components/catalyst-ui/primitives/item.tsx +0 -196
  53. package/components/catalyst-ui/primitives/kbd.tsx +0 -75
  54. package/components/catalyst-ui/primitives/label.tsx +0 -24
  55. package/components/catalyst-ui/primitives/navigation-menu.tsx +0 -150
  56. package/components/catalyst-ui/primitives/pagination.tsx +0 -198
  57. package/components/catalyst-ui/primitives/popover.tsx +0 -232
  58. package/components/catalyst-ui/primitives/progress.tsx +0 -34
  59. package/components/catalyst-ui/primitives/radio-group.tsx +0 -43
  60. package/components/catalyst-ui/primitives/resizable.tsx +0 -56
  61. package/components/catalyst-ui/primitives/select.tsx +0 -155
  62. package/components/catalyst-ui/primitives/separator.tsx +0 -74
  63. package/components/catalyst-ui/primitives/sheet.tsx +0 -126
  64. package/components/catalyst-ui/primitives/skeleton.tsx +0 -15
  65. package/components/catalyst-ui/primitives/slider.tsx +0 -27
  66. package/components/catalyst-ui/primitives/switch.tsx +0 -187
  67. package/components/catalyst-ui/primitives/tabs.tsx +0 -335
  68. package/components/catalyst-ui/primitives/textarea.tsx +0 -24
  69. package/components/catalyst-ui/primitives/toggle-group.tsx +0 -55
  70. package/components/catalyst-ui/primitives/toggle.tsx +0 -42
  71. package/components/catalyst-ui/primitives/tooltip.tsx +0 -116
  72. package/components/catalyst-ui/utils/basic-auth.tsx +0 -40
  73. package/components/catalyst-ui/utils/context-storage.tsx +0 -19
  74. package/components/catalyst-ui/utils/cors-middleware.tsx +0 -71
  75. package/components/catalyst-ui/utils/deferred-content.tsx +0 -595
  76. package/components/catalyst-ui/utils/honeypot-middleware.tsx +0 -38
  77. package/components/catalyst-ui/utils/incId.tsx +0 -75
  78. package/components/catalyst-ui/utils/jwk-auth.tsx +0 -36
  79. package/components/catalyst-ui/utils/request-id.tsx +0 -14
  80. package/components/catalyst-ui/utils/secure-headers.tsx +0 -37
  81. package/components/catalyst-ui/utils/server-timing.tsx +0 -23
  82. package/components/catalyst-ui/utils/utils.ts +0 -43
  83. package/components/catalyst-ui/utils/with-cookie.tsx +0 -43
  84. package/components/catalyst-ui/x/accordian-x.tsx +0 -428
  85. package/components/catalyst-ui/x/alert-x.tsx +0 -413
  86. package/components/catalyst-ui/x/animated-text-x.tsx +0 -2242
  87. package/components/catalyst-ui/x/avatar-x.tsx +0 -515
  88. package/components/catalyst-ui/x/badge-x.tsx +0 -670
  89. package/components/catalyst-ui/x/button-X.tsx +0 -2857
  90. package/components/catalyst-ui/x/button-group-x.tsx +0 -847
  91. package/components/catalyst-ui/x/calendar-x.tsx +0 -1910
  92. package/components/catalyst-ui/x/card-x.tsx +0 -2597
  93. package/components/catalyst-ui/x/checkbox-x.tsx +0 -656
  94. package/components/catalyst-ui/x/collapsible-x.tsx +0 -1360
  95. package/components/catalyst-ui/x/combobox-x.tsx +0 -911
  96. package/components/catalyst-ui/x/data-table-x.tsx +0 -1753
  97. package/components/catalyst-ui/x/date-picker-x.tsx +0 -648
  98. package/components/catalyst-ui/x/dialog-x.tsx +0 -659
  99. package/components/catalyst-ui/x/dropdown-menu-x.tsx +0 -612
  100. package/components/catalyst-ui/x/hover-card-x.tsx +0 -375
  101. package/components/catalyst-ui/x/icon-x.tsx +0 -840
  102. package/components/catalyst-ui/x/input-mask-x.tsx +0 -981
  103. package/components/catalyst-ui/x/input-otp-x.tsx +0 -659
  104. package/components/catalyst-ui/x/loader-x.tsx +0 -1757
  105. package/components/catalyst-ui/x/pagination-x.tsx +0 -622
  106. package/components/catalyst-ui/x/popover-x.tsx +0 -744
  107. package/components/catalyst-ui/x/radio-group-x.tsx +0 -499
  108. package/components/catalyst-ui/x/select-x.tsx +0 -1127
  109. package/components/catalyst-ui/x/sheet-x.tsx +0 -668
  110. package/components/catalyst-ui/x/switch-x.tsx +0 -681
  111. package/components/catalyst-ui/x/table-x.tsx +0 -574
  112. package/components/catalyst-ui/x/tabs-x.tsx +0 -839
  113. package/components/catalyst-ui/x/textarea-x.tsx +0 -1263
  114. package/components/catalyst-ui/x/tooltip-x.tsx +0 -396
  115. package/components/catalyst-ui/x/tracker-x.tsx +0 -560
  116. package/data/bg-data.tsx +0 -901
  117. package/data/buttons-data.tsx +0 -2327
  118. package/data/charts-data.tsx +0 -102
  119. package/data/chat-data.tsx +0 -83
  120. package/data/code-data.tsx +0 -1040
  121. package/data/comboboxes-data.tsx +0 -1843
  122. package/data/command-data.tsx +0 -1381
  123. package/data/core-data.tsx +0 -15953
  124. package/data/crm-data.tsx +0 -47
  125. package/data/data.tsx +0 -159
  126. package/data/date-and-time-data.tsx +0 -554
  127. package/data/dependencies.tsx +0 -7
  128. package/data/ecommerce-data.tsx +0 -1387
  129. package/data/forms-data.tsx +0 -7890
  130. package/data/hooks-data.tsx +0 -5487
  131. package/data/index.ts +0 -34
  132. package/data/inputs-data.tsx +0 -557
  133. package/data/interactive-data.tsx +0 -5394
  134. package/data/lofi-data.tsx +0 -18295
  135. package/data/marketing-data.tsx +0 -2546
  136. package/data/media-data.tsx +0 -1510
  137. package/data/motion-data.tsx +0 -5801
  138. package/data/overlay-data.tsx +0 -4136
  139. package/data/pdf-data.tsx +0 -124
  140. package/data/pos-data.tsx +0 -213
  141. package/data/postcss.config.js +0 -6
  142. package/data/primitive-data.tsx +0 -5170
  143. package/data/prompt-data.tsx +0 -1226
  144. package/data/requiredLibs.ts +0 -4
  145. package/data/sandbox-data.tsx +0 -1
  146. package/data/sidebars-data.tsx +0 -5421
  147. package/data/stacks-data.tsx +0 -32
  148. package/data/table-data.tsx +0 -706
  149. package/data/tailwind.config.js +0 -270
  150. package/data/tailwind.config.ngin.js +0 -3830
  151. package/data/tailwind.css +0 -431
  152. package/data/tools-data.tsx +0 -6910
  153. package/data/typography-data.tsx +0 -2050
  154. package/data/utils-data.tsx +0 -6500
  155. package/data/x-data.tsx +0 -1171
@@ -1,413 +0,0 @@
1
- import React, { useId } from 'react'
2
- import { cn } from "~/components/catalyst-ui"
3
- import { Alert, AlertTitle, AlertDescription, useAlertContext, alertVariants } from "~/components/catalyst-ui"
4
- import { Avatar, AvatarImage, AvatarFallback } from "~/components/catalyst-ui"
5
- import { Button } from "~/components/catalyst-ui"
6
- import { Progress,TsxSection, } from "~/components/catalyst-ui"
7
- import { X } from "lucide-react"
8
- import type { LucideIcon } from "lucide-react"
9
-
10
- /**
11
- * ★ ━━━━ ☆ ━━━━ AlertX ━━━━ ☆ ━━━━ ★
12
- * type AlertType = 'default' | 'withAvatar' | 'closable' | 'withLink' | 'attachedIcon' | 'focusedIcon' | 'fileUpload' | 'multipleAction' | 'task' | 'withAction'
13
- *
14
- * ★ ━━━━ ☆ ━━━━ USAGE ━━━━ ☆ ━━━━ ★
15
- * ★ ━━━━━━━━━ withAvatar ━━━━━━━━━ ★
16
- * ```jsx
17
- * <AlertX alert="withAvatar">
18
- * <AlertXTitle avatar='https://cdn.shadcnstudio.com/ss-assets/avatar/avatar-5.png' name='Hallie Richards'>
19
- * Sara has replied on the uploaded image.
20
- * </AlertXTitle>
21
- * <AlertXDescription>12 unread messages. Tap to see.</AlertXDescription>
22
- * </AlertX>
23
- * ```
24
- * ★ ━━━━━━━━━ closable ━━━━━━━━━ ★
25
- * ```jsx
26
- * {isClosableActive && (
27
- * <AlertX alert="closable">
28
- * <AlertXTitle onClose={() => setIsClosableActive(false)}>New message!</AlertXTitle>
29
- * <AlertXDescription>12 unread messages. Tap to see.</AlertXDescription>
30
- * </AlertX>
31
- * )}
32
- * ```
33
- * ★ ━━━━━━━━━ withAction ━━━━━━━━━ ★
34
- * ```jsx
35
- * <AlertX alert="withAction">
36
- * <AlertXTitle actionLabel="Open" onAction={() => console.log('opened')}>
37
- * New message!
38
- * </AlertXTitle>
39
- * </AlertX>
40
- * ```
41
- * ★ ━━━━━━━━━ attachedIcon ━━━━━━━━━ ★
42
- * ```jsx
43
- * <AlertX alert="attachedIcon" variant="destructive">
44
- * <AlertXTitle>This file contains virus!</AlertXTitle>
45
- * </AlertX>
46
- * ```
47
- * ★ ━━━━━━━━━ focusedIcon ━━━━━━━━━ ★
48
- * ```jsx
49
- * <AlertX alert="focusedIcon">
50
- * <AlertXTitle>This file contains virus!</AlertXTitle>
51
- * </AlertX>
52
- * ```
53
- * ★ ━━━━━━━━━ multipleAction ━━━━━━━━━ ★
54
- * ```jsx
55
- * {isMultipleActionActive && (
56
- * <AlertX alert="multipleAction" variant="primary">
57
- * <AlertXTitle onClose={() => setIsMultipleActionActive(false)}>
58
- * A new update is available
59
- * </AlertXTitle>
60
- * <AlertXDescription
61
- * skipLabel="Skip this update"
62
- * installLabel="Install now"
63
- * onSkip={() => console.log('skipped')}
64
- * onInstall={() => console.log('installed')}
65
- * >
66
- * Includes the at new dashboard View. Pages end exports will now load faster
67
- * </AlertXDescription>
68
- * </AlertX>
69
- * )}
70
- * ```
71
- *
72
- */
73
-
74
- type AlertType = 'default' | 'withAvatar' | 'closable' | 'withLink' | 'attachedIcon' | 'focusedIcon' | 'fileUpload' | 'multipleAction' | 'task' | 'withAction'
75
-
76
- const AlertXContext = React.createContext<AlertType>('default')
77
-
78
- interface AlertContextValue {
79
- variant?: string
80
- alert?: string
81
- }
82
-
83
- export function AlertX({ alert = 'default', variant, children, ...props }: any) {
84
- const contextValue: AlertContextValue = { variant, alert }
85
-
86
- switch (alert) {
87
- case 'attachedIcon':
88
- return (
89
- <AlertXContext.Provider value={contextValue}>
90
- <Alert className={cn(alertVariants({ variant }), 'flex items-stretch p-0', props.className)} {...props}>
91
- <div className='bg-destructive/10 text-destructive flex items-center rounded-l-lg border-r p-2'>
92
- <svg className="size-4" />
93
- </div>
94
- {children}
95
- </Alert>
96
- </AlertXContext.Provider>
97
- )
98
-
99
- case 'spotlight':
100
- return (
101
- <AlertXContext.Provider value={contextValue}>
102
- <Alert className={cn(alertVariants({ variant }), 'before:bg-primary/70 relative before:absolute before:size-full before:rounded-lg', props.className)} {...props}>
103
- {children}
104
- </Alert>
105
- </AlertXContext.Provider>
106
- )
107
-
108
- default:
109
- return (
110
- <AlertXContext.Provider value={contextValue}>
111
- <Alert className={cn(alertVariants({ variant }), props.className)} {...props}>
112
- {children}
113
- </Alert>
114
- </AlertXContext.Provider>
115
- )
116
- }
117
- }
118
-
119
- export function AlertXTitle({ children, ...props }: any) {
120
- const alertType = React.useContext(AlertXContext)
121
-
122
- switch (alertType) {
123
- case 'withAvatar':
124
- return (
125
- <div className={cn('col-start-2 flex items-center justify-between gap-3', props.className)}>
126
- <Avatar className='rounded-sm'>
127
- <AvatarImage src={props.avatar} alt={props.name} className='rounded-sm' />
128
- <AvatarFallback className='text-xs'>{props.name?.[0]}</AvatarFallback>
129
- </Avatar>
130
- <div className='flex-1'>
131
- <div className='min-h-4 font-medium tracking-tight'>{children}</div>
132
- </div>
133
- </div>
134
- )
135
-
136
- case 'closable':
137
- return (
138
- <div className={cn('flex items-start justify-between gap-3', props.className)}>
139
- <svg className="size-4 shrink-0 mt-0.5" />
140
- <div className='flex-1 min-h-4 font-medium tracking-tight'>{children}</div>
141
- <button className='shrink-0 cursor-pointer opacity-70 hover:opacity-100 transition-opacity' onClick={props.onClose}>
142
- <X className='size-5' />
143
- <span className='sr-only'>Close</span>
144
- </button>
145
- </div>
146
- )
147
-
148
- case 'withAction':
149
- return (
150
- <div className={cn('flex items-center justify-between gap-3 [&>svg]:translate-y-0', props.className)}>
151
- <svg className="size-4 shrink-0" />
152
- <div className='flex-1 font-medium tracking-tight'>{children}</div>
153
- <Button variant='outline' className='h-7 cursor-pointer rounded-md px-2' onClick={props.onAction}>
154
- {props.actionLabel || 'Open'}
155
- </Button>
156
- </div>
157
- )
158
-
159
- case 'attachedIcon':
160
- return (
161
- <div className={cn('p-3 min-h-4 font-medium tracking-tight', props.className)}>
162
- {children}
163
- </div>
164
- )
165
-
166
- case 'focusedIcon':
167
- return (
168
- <div className={cn('flex items-center gap-3', props.className)}>
169
- <Avatar className='rounded-md'>
170
- <AvatarFallback className='bg-destructive dark:bg-destructive/60 rounded-md text-white'>
171
- <svg className="size-4" />
172
- </AvatarFallback>
173
- </Avatar>
174
- <div className='min-h-4 font-medium tracking-tight'>{children}</div>
175
- </div>
176
- )
177
-
178
- case 'task':
179
- return (
180
- <div className={cn('flex gap-3', props.className)}>
181
- <Avatar className='rounded-sm'>
182
- <AvatarImage src={props.avatar} alt={props.name} className='rounded-sm' />
183
- <AvatarFallback className='text-xs'>{props.name?.[0]}</AvatarFallback>
184
- </Avatar>
185
- <div className='flex-1'>
186
- <div className='min-h-4 font-medium tracking-tight'>{children}</div>
187
- </div>
188
- </div>
189
- )
190
-
191
- case 'multipleAction':
192
- return (
193
- <div className={cn('flex justify-between gap-3', props.className)}>
194
- <svg className="size-4 shrink-0 mt-0.5" />
195
- <div className='flex-1 min-h-4 font-medium tracking-tight'>{children}</div>
196
- <button className='shrink-0 cursor-pointer' onClick={props.onClose}>
197
- <X className='size-5' />
198
- <span className='sr-only'>Close</span>
199
- </button>
200
- </div>
201
- )
202
-
203
- default:
204
- return (
205
- <AlertTitle className={cn(props.className)} {...props}>
206
- {children}
207
- </AlertTitle>
208
- )
209
- }
210
- }
211
-
212
- export function AlertXDescription({ children, ...props }: any) {
213
- const alertType = React.useContext(AlertXContext)
214
-
215
- switch (alertType) {
216
- case 'withAvatar':
217
- return (
218
- <div className={cn('text-muted-foreground text-sm [&_p]:leading-relaxed col-start-2', props.className)}>
219
- {children}
220
- </div>
221
- )
222
-
223
- case 'closable':
224
- return (
225
- <div className={cn('text-muted-foreground text-sm [&_p]:leading-relaxed ml-7', props.className)}>
226
- {children}
227
- </div>
228
- )
229
-
230
- case 'task':
231
- return (
232
- <div className={cn('flex flex-col gap-2', props.className)}>
233
- <div className='text-muted-foreground text-sm [&_p]:leading-relaxed'>{children}</div>
234
- <Progress
235
- value={props.progress || 0}
236
- className='bg-amber-600/20 *:bg-amber-600 dark:bg-amber-400/20 dark:*:bg-amber-400'
237
- aria-label='Task progress'
238
- />
239
- </div>
240
- )
241
-
242
- case 'multipleAction':
243
- return (
244
- <div className={cn('flex flex-col gap-4 ml-7', props.className)}>
245
- <div className='text-primary-foreground/80 text-sm [&_p]:leading-relaxed'>{children}</div>
246
- <div className='flex items-center gap-4'>
247
- <Button className='bg-secondary/10 focus-visible:bg-secondary/20 hover:bg-secondary/20 h-7 cursor-pointer rounded-md px-2' onClick={props.onSkip}>
248
- {props.skipLabel || 'Skip this update'}
249
- </Button>
250
- <Button variant='secondary' className='h-7 cursor-pointer rounded-md px-2' onClick={props.onInstall}>
251
- {props.installLabel || 'Install now'}
252
- </Button>
253
- </div>
254
- </div>
255
- )
256
-
257
- default:
258
- return (
259
- <AlertDescription className={cn(props.className)} {...props}>
260
- {children}
261
- </AlertDescription>
262
- )
263
- }
264
- }
265
-
266
- export function AlertXDemo() {
267
- const [isClosableActive, setIsClosableActive] = React.useState(true)
268
- const [isMultipleActionActive, setIsMultipleActionActive] = React.useState(true)
269
- const [progress, setProgress] = React.useState(0)
270
-
271
- React.useEffect(() => {
272
- const timer = setTimeout(() => setProgress(50), 100)
273
- return () => clearTimeout(timer)
274
- }, [])
275
-
276
- return (
277
- <div className="space-y-8 p-6 max-w-3xl mx-auto">
278
- <div>
279
- <h3 className="text-lg font-semibold mb-4">With Avatar</h3>
280
- <AlertX alert="withAvatar">
281
- <AlertXTitle avatar='https://cdn.shadcnstudio.com/ss-assets/avatar/avatar-5.png' name='Hallie Richards'>
282
- Sara has replied on the uploaded image.
283
- </AlertXTitle>
284
- <AlertXDescription>12 unread messages. Tap to see.</AlertXDescription>
285
- </AlertX>
286
- <TsxSection
287
- title="AlertX"
288
- code={`<AlertX alert="withAvatar">
289
- <AlertXTitle avatar='https://cdn.shadcnstudio.com/ss-assets/avatar/avatar-5.png' name='Hallie Richards'>
290
- Sara has replied on the uploaded image.
291
- </AlertXTitle>
292
- <AlertXDescription>12 unread messages. Tap to see.</AlertXDescription>
293
- </AlertX>`}
294
- />
295
- </div>
296
-
297
- <div>
298
- <h3 className="text-lg font-semibold mb-4">Closable</h3>
299
- {isClosableActive && (
300
- <AlertX alert="closable">
301
- <AlertXTitle onClose={() => setIsClosableActive(false)}>New message!</AlertXTitle>
302
- <AlertXDescription>12 unread messages. Tap to see.</AlertXDescription>
303
- </AlertX>
304
- )}
305
- <TsxSection
306
- title="AlertX"
307
- code={` {isClosableActive && (
308
- <AlertX alert="closable">
309
- <AlertXTitle onClose={() => setIsClosableActive(false)}>New message!</AlertXTitle>
310
- <AlertXDescription>12 unread messages. Tap to see.</AlertXDescription>
311
- </AlertX>
312
- )}`}
313
- />
314
- </div>
315
-
316
- <div>
317
- <h3 className="text-lg font-semibold mb-4">With Action</h3>
318
- <AlertX alert="withAction">
319
- <AlertXTitle actionLabel="Open" onAction={() => console.log('opened')}>
320
- New message!
321
- </AlertXTitle>
322
- </AlertX>
323
- <TsxSection
324
- title="AlertX"
325
- code={`<AlertX alert="withAction">
326
- <AlertXTitle actionLabel="Open" onAction={() => console.log('opened')}>
327
- New message!
328
- </AlertXTitle>
329
- </AlertX>`}
330
- />
331
- </div>
332
-
333
- <div>
334
- <h3 className="text-lg font-semibold mb-4">Attached Icon</h3>
335
- <AlertX alert="attachedIcon" variant="destructive">
336
- <AlertXTitle>This file contains virus!</AlertXTitle>
337
- </AlertX>
338
- <TsxSection
339
- title="AlertX"
340
- code={`<AlertX alert="attachedIcon" variant="destructive">
341
- <AlertXTitle>This file contains virus!</AlertXTitle>
342
- </AlertX>`}
343
- />
344
- </div>
345
-
346
- <div>
347
- <h3 className="text-lg font-semibold mb-4">Focused Icon</h3>
348
- <AlertX alert="focusedIcon">
349
- <AlertXTitle>This file contains virus!</AlertXTitle>
350
- </AlertX>
351
- <TsxSection
352
- title="AlertX"
353
- code={`<AlertX alert="focusedIcon">
354
- <AlertXTitle>This file contains virus!</AlertXTitle>
355
- </AlertX>`}
356
- />
357
- </div>
358
-
359
- <div>
360
- <h3 className="text-lg font-semibold mb-4">Task</h3>
361
- <AlertX alert="task">
362
- <AlertXTitle avatar='https://cdn.shadcnstudio.com/ss-assets/avatar/avatar-5.png' name='Rocky'>
363
- @Rocky
364
- </AlertXTitle>
365
- <AlertXDescription progress={progress}>
366
- this projects task is remaining, deadline is near.
367
- </AlertXDescription>
368
- </AlertX>
369
- <TsxSection
370
- title="AlertX"
371
- code={``}
372
- />
373
- </div>
374
-
375
- <div>
376
- <h3 className="text-lg font-semibold mb-4">Multiple Actions</h3>
377
- {isMultipleActionActive && (
378
- <AlertX alert="multipleAction" variant="primary">
379
- <AlertXTitle onClose={() => setIsMultipleActionActive(false)}>
380
- A new update is available
381
- </AlertXTitle>
382
- <AlertXDescription
383
- skipLabel="Skip this update"
384
- installLabel="Install now"
385
- onSkip={() => console.log('skipped')}
386
- onInstall={() => console.log('installed')}
387
- >
388
- Includes the at new dashboard View. Pages end exports will now load faster
389
- </AlertXDescription>
390
- </AlertX>
391
- )}
392
- <TsxSection
393
- title="AlertX"
394
- code={`{isMultipleActionActive && (
395
- <AlertX alert="multipleAction" variant="primary">
396
- <AlertXTitle onClose={() => setIsMultipleActionActive(false)}>
397
- A new update is available
398
- </AlertXTitle>
399
- <AlertXDescription
400
- skipLabel="Skip this update"
401
- installLabel="Install now"
402
- onSkip={() => console.log('skipped')}
403
- onInstall={() => console.log('installed')}
404
- >
405
- Includes the at new dashboard View. Pages end exports will now load faster
406
- </AlertXDescription>
407
- </AlertX>
408
- )}`}
409
- />
410
- </div>
411
- </div>
412
- )
413
- }