@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,612 +0,0 @@
1
- /**
2
-
3
-
4
-
5
-
6
-
7
-
8
- export function DropdownMenuX({ dropdownMenu = 'default', children, ...props }: any) {
9
- switch (dropdownMenu) {
10
- case 'Closable':
11
- break
12
- default:
13
- break;
14
- }
15
- }
16
-
17
- const DropdownMenuDemo = () => {
18
- return (
19
- <DropdownMenu>
20
- <DropdownMenuTrigger asChild>
21
- <Button variant='outline'>Basic</Button>
22
- </DropdownMenuTrigger>
23
- <DropdownMenuContent className='w-56'>
24
- <DropdownMenuLabel>My Account</DropdownMenuLabel>
25
- <DropdownMenuSeparator />
26
- <DropdownMenuGroup>
27
- <DropdownMenuItem>Profile</DropdownMenuItem>
28
- <DropdownMenuItem>Billing</DropdownMenuItem>
29
- </DropdownMenuGroup>
30
- <DropdownMenuSeparator />
31
- <DropdownMenuGroup>
32
- <DropdownMenuSub>
33
- <DropdownMenuSubTrigger>Invite users</DropdownMenuSubTrigger>
34
- <DropdownMenuPortal>
35
- <DropdownMenuSubContent>
36
- <DropdownMenuItem>Email</DropdownMenuItem>
37
- <DropdownMenuItem>Message</DropdownMenuItem>
38
- <DropdownMenuSeparator />
39
- <DropdownMenuItem>More...</DropdownMenuItem>
40
- </DropdownMenuSubContent>
41
- </DropdownMenuPortal>
42
- </DropdownMenuSub>
43
- <DropdownMenuItem>GitHub</DropdownMenuItem>
44
- <DropdownMenuItem>Support</DropdownMenuItem>
45
- <DropdownMenuItem disabled>API</DropdownMenuItem>
46
- </DropdownMenuGroup>
47
- </DropdownMenuContent>
48
- </DropdownMenu>
49
- )
50
- }
51
-
52
- const DropdownMenuUserSwitcherDemo = () => {
53
- const [selectUser, setSelectUser] = useState(users[0])
54
-
55
- return (
56
- <DropdownMenu>
57
- <DropdownMenuTrigger className='bg-secondary flex items-center gap-2 rounded-lg px-3 py-2.5'>
58
- <Avatar>
59
- <AvatarImage src={selectUser.src} alt={selectUser.name} />
60
- <AvatarFallback className='text-xs'>{selectUser.fallback}</AvatarFallback>
61
- </Avatar>
62
- <div className='flex flex-col gap-1 text-start leading-none'>
63
- <span className='max-w-[17ch] truncate text-sm leading-none font-semibold'>{selectUser.name}</span>
64
- <span className='text-muted-foreground max-w-[20ch] truncate text-xs'>{selectUser.mail}</span>
65
- </div>
66
- </DropdownMenuTrigger>
67
- <DropdownMenuContent align='start' className='w-66'>
68
- <DropdownMenuLabel>Task Assignment</DropdownMenuLabel>
69
- {users.map(user => (
70
- <DropdownMenuItem key={user.id} onClick={() => setSelectUser(user)}>
71
- <div className='flex items-center gap-2'>
72
- <Avatar>
73
- <AvatarImage src={user.src} alt={user.name} />
74
- <AvatarFallback className='text-xs'>{user.fallback}</AvatarFallback>
75
- </Avatar>
76
- <div className='flex flex-col gap-1 text-start leading-none'>
77
- <span className='max-w-[17ch] truncate text-sm leading-none font-semibold'>{user.name}</span>
78
- <span className='text-muted-foreground max-w-[20ch] truncate text-xs'>{user.mail}</span>
79
- </div>
80
- </div>
81
- {selectUser.id === user.id && <CheckIcon className='ml-auto' />}
82
- </DropdownMenuItem>
83
- ))}
84
- </DropdownMenuContent>
85
- </DropdownMenu>
86
- )
87
- }
88
-
89
- const DropdownMenuItemAvatarDemo = () => {
90
- return (
91
- <DropdownMenu>
92
- <DropdownMenuTrigger asChild>
93
- <Button variant='outline'>Menu item with avatar</Button>
94
- </DropdownMenuTrigger>
95
- <DropdownMenuContent className='w-91'>
96
- <DropdownMenuLabel>Chat List</DropdownMenuLabel>
97
- <DropdownMenuGroup>
98
- {listItems.map((item, index) => (
99
- <DropdownMenuItem key={index} className='justify-between'>
100
- <Avatar>
101
- <AvatarImage src={item.src} alt={item.name} />
102
- <AvatarFallback className='text-xs'>{item.fallback}</AvatarFallback>
103
- </Avatar>
104
- <div className='flex flex-1 flex-col'>
105
- <span className='text-popover-foreground'>{item.name}</span>
106
- <span className='text-muted-foreground text-xs'>{item.message}</span>
107
- </div>
108
- {item.newMessages ? (
109
- <div className='flex flex-col items-end gap-1'>
110
- <span className='text-muted-foreground text-xs'>{item.time}</span>
111
- <Badge className='h-5 min-w-5 bg-green-600 px-1 dark:bg-green-400'>{item.newMessages}</Badge>
112
- </div>
113
- ) : (
114
- <span className='text-muted-foreground text-xs'>{item.time}</span>
115
- )}
116
- </DropdownMenuItem>
117
- ))}
118
- </DropdownMenuGroup>
119
- </DropdownMenuContent>
120
- </DropdownMenu>
121
- )
122
- }
123
-
124
- const DropdownMenuItemActionDemo = () => {
125
- return (
126
- <DropdownMenu>
127
- <DropdownMenuTrigger asChild>
128
- <Button variant='outline'>Menu item with action</Button>
129
- </DropdownMenuTrigger>
130
- <DropdownMenuContent className='w-91'>
131
- <DropdownMenuLabel>Contact List</DropdownMenuLabel>
132
- <DropdownMenuGroup>
133
- {listItems.map((item, index) => (
134
- <DropdownMenuItem key={index} className='justify-between'>
135
- <Avatar>
136
- <AvatarImage src={item.src} alt={item.name} />
137
- <AvatarFallback className='text-xs'>{item.fallback}</AvatarFallback>
138
- </Avatar>
139
- <div className='flex flex-1 flex-col'>
140
- <span className='text-popover-foreground'>{item.name}</span>
141
- <span className='text-muted-foreground text-xs'>{item.mail}</span>
142
- </div>
143
- <Button variant='secondary' className='h-7 cursor-pointer rounded-md px-2'>
144
- Send
145
- </Button>
146
- </DropdownMenuItem>
147
- ))}
148
- <DropdownMenuItem>
149
- <Button className='grow'>Add Contact</Button>
150
- </DropdownMenuItem>
151
- </DropdownMenuGroup>
152
- </DropdownMenuContent>
153
- </DropdownMenu>
154
- )
155
- }
156
-
157
- const DropdownMeetingScheduleDemo = () => {
158
- const [firstMeeting, setFirstMeeting] = useState(false)
159
- const [secondMeeting, setSecondMeeting] = useState(true)
160
- const [thirdMeeting, setThirdMeeting] = useState(false)
161
- const [forthMeeting, setForthMeeting] = useState(true)
162
- const [fifthMeeting, setFifthMeeting] = useState(false)
163
-
164
- return (
165
- <DropdownMenu>
166
- <DropdownMenuTrigger asChild>
167
- <Button variant='outline'>Meetings Schedule</Button>
168
- </DropdownMenuTrigger>
169
- <DropdownMenuContent className='sm:w-124'>
170
- <DropdownMenuLabel>Today&apos;s meetings</DropdownMenuLabel>
171
- <DropdownMenuGroup>
172
- <DropdownMenuItem className='justify-between gap-3.5' onSelect={event => event.preventDefault()}>
173
- <span className='text-popover-foreground font-medium'>08:30</span>
174
- <div className='flex flex-1 flex-col'>
175
- <span className='text-popover-foreground'>Daily Project Review</span>
176
- <span className='text-muted-foreground text-xs'>Team organization</span>
177
- </div>
178
- <Avatar className='max-sm:hidden'>
179
- <AvatarImage src='https://cdn.shadcnstudio.com/ss-assets/avatar/avatar-11.png' alt='Hallie Richards' />
180
- <AvatarFallback className='text-xs'>Angel</AvatarFallback>
181
- </Avatar>
182
- <div className='flex items-center gap-2'>
183
- <span className='text-popover-foreground text-sm'>Privacy</span>
184
- <Switch id='airplane-mode' checked={firstMeeting} onCheckedChange={setFirstMeeting} />
185
- </div>
186
- </DropdownMenuItem>
187
- <DropdownMenuItem className='justify-between gap-3.5' onSelect={event => event.preventDefault()}>
188
- <span className='text-popover-foreground font-medium'>09:00</span>
189
- <div className='flex flex-1 flex-col'>
190
- <span className='text-popover-foreground'>Sprint Surge</span>
191
- <span className='text-muted-foreground text-xs'>Daily Boost for Agile Progress</span>
192
- </div>
193
- <div className='flex -space-x-3 max-sm:hidden'>
194
- {avatars.map((avatar, index) => (
195
- <Avatar key={index} className='ring-background ring-2'>
196
- <AvatarImage src={avatar.src} alt={avatar.name} />
197
- <AvatarFallback className='text-xs'>{avatar.fallback}</AvatarFallback>
198
- </Avatar>
199
- ))}
200
- </div>
201
- <div className='flex items-center gap-2'>
202
- <span className='text-popover-foreground text-sm'>Privacy</span>
203
- <Switch id='airplane-mode' checked={secondMeeting} onCheckedChange={setSecondMeeting} />
204
- </div>
205
- </DropdownMenuItem>
206
- <DropdownMenuItem className='justify-between gap-3.5' onSelect={event => event.preventDefault()}>
207
- <span className='text-popover-foreground font-medium'>11:45</span>
208
- <div className='flex flex-1 flex-col'>
209
- <span className='text-popover-foreground'>Project Status Update</span>
210
- <span className='text-muted-foreground text-xs'>Progress Overview Update</span>
211
- </div>
212
- <Avatar className='max-sm:hidden'>
213
- <AvatarImage src='https://cdn.shadcnstudio.com/ss-assets/avatar/avatar-12.png' alt='Hallie Richards' />
214
- <AvatarFallback className='text-xs'>Angel</AvatarFallback>
215
- </Avatar>
216
- <div className='flex items-center gap-2'>
217
- <span className='text-popover-foreground text-sm'>Privacy</span>
218
- <Switch id='airplane-mode' checked={thirdMeeting} onCheckedChange={setThirdMeeting} />
219
- </div>
220
- </DropdownMenuItem>
221
- <DropdownMenuItem className='justify-between gap-3.5' onSelect={event => event.preventDefault()}>
222
- <span className='text-popover-foreground font-medium'>06:30</span>
223
- <div className='flex flex-1 flex-col'>
224
- <span className='text-popover-foreground'>Team Performance</span>
225
- <span className='text-muted-foreground text-xs'>Team Metrics Evaluation</span>
226
- </div>
227
- <div className='flex -space-x-3 max-sm:hidden'>
228
- {avatars.map((avatar, index) => (
229
- <Avatar key={index} className='ring-background ring-2'>
230
- <AvatarImage src={avatar.src} alt={avatar.name} />
231
- <AvatarFallback className='text-xs'>{avatar.fallback}</AvatarFallback>
232
- </Avatar>
233
- ))}
234
- </div>
235
- <div className='flex items-center gap-2'>
236
- <span className='text-popover-foreground text-sm'>Privacy</span>
237
- <Switch id='airplane-mode' checked={forthMeeting} onCheckedChange={setForthMeeting} />
238
- </div>
239
- </DropdownMenuItem>
240
- <DropdownMenuItem className='justify-between gap-3.5' onSelect={event => event.preventDefault()}>
241
- <span className='text-popover-foreground font-medium'>10:50</span>
242
- <div className='flex flex-1 flex-col'>
243
- <span className='text-popover-foreground'>Stakeholder Feedback</span>
244
- <span className='text-muted-foreground text-xs'>Feedback from Stakeholders</span>
245
- </div>
246
- <Avatar className='max-sm:hidden'>
247
- <AvatarImage src='https://cdn.shadcnstudio.com/ss-assets/avatar/avatar-14.png' alt='Hallie Richards' />
248
- <AvatarFallback className='text-xs'>Angel</AvatarFallback>
249
- </Avatar>
250
- <div className='flex items-center gap-2'>
251
- <span className='text-popover-foreground text-sm'>Privacy</span>
252
- <Switch id='airplane-mode' checked={fifthMeeting} onCheckedChange={setFifthMeeting} />
253
- </div>
254
- </DropdownMenuItem>
255
- </DropdownMenuGroup>
256
- </DropdownMenuContent>
257
- </DropdownMenu>
258
- )
259
- }
260
-
261
- const DropdownMenuEditMenuDemo = () => {
262
- return (
263
- <DropdownMenu>
264
- <DropdownMenuTrigger asChild>
265
- <Button variant='ghost' size='icon' className='rounded-full'>
266
- <PencilIcon />
267
- <span className='sr-only'>Edit menu</span>
268
- </Button>
269
- </DropdownMenuTrigger>
270
- <DropdownMenuContent className='w-56'>
271
- <DropdownMenuLabel>Edit text</DropdownMenuLabel>
272
- <DropdownMenuGroup>
273
- {listItems.map((item, index) => (
274
- <DropdownMenuItem key={index}>
275
- <span className='flex items-center justify-center rounded-md border p-2'>
276
- <item.icon />
277
- </span>
278
- <div className='flex flex-col'>
279
- <span className='text-popover-foreground'>{item.property}</span>
280
- <span className='text-muted-foreground text-xs'>{item.description}</span>
281
- </div>
282
- </DropdownMenuItem>
283
- ))}
284
- </DropdownMenuGroup>
285
- </DropdownMenuContent>
286
- </DropdownMenu>
287
- )
288
- }
289
-
290
- const DropdownMenuUserMenuDemo = () => {
291
- return (
292
- <DropdownMenu>
293
- <DropdownMenuTrigger asChild>
294
- <Button variant='secondary' size='icon' className='overflow-hidden rounded-full'>
295
- <img src='https://cdn.shadcnstudio.com/ss-assets/avatar/avatar-5.png' alt='Hallie Richards' />
296
- </Button>
297
- </DropdownMenuTrigger>
298
- <DropdownMenuContent className='w-56'>
299
- <DropdownMenuLabel>My Account</DropdownMenuLabel>
300
- <DropdownMenuGroup>
301
- {listItems.map((item, index) => (
302
- <DropdownMenuItem key={index}>
303
- <item.icon />
304
- <span className='text-popover-foreground'>{item.property}</span>
305
- </DropdownMenuItem>
306
- ))}
307
- </DropdownMenuGroup>
308
- </DropdownMenuContent>
309
- </DropdownMenu>
310
- )
311
- }
312
-
313
- const DropdownMenuUserProfileDemo = () => {
314
- return (
315
- <DropdownMenu>
316
- <DropdownMenuTrigger asChild>
317
- <Button variant='outline'>User Profile</Button>
318
- </DropdownMenuTrigger>
319
- <DropdownMenuContent className='w-56'>
320
- <DropdownMenuLabel className='flex items-center gap-2'>
321
- <Avatar>
322
- <AvatarImage src='https://cdn.shadcnstudio.com/ss-assets/avatar/avatar-1.png' alt='Phillip George' />
323
- <AvatarFallback className='text-xs'>PG</AvatarFallback>
324
- </Avatar>
325
- <div className='flex flex-1 flex-col'>
326
- <span className='text-popover-foreground'>Phillip George</span>
327
- <span className='text-muted-foreground text-xs'>phillip@example.com</span>
328
- </div>
329
- </DropdownMenuLabel>
330
- <DropdownMenuSeparator />
331
- <DropdownMenuGroup>
332
- <DropdownMenuItem>Profile</DropdownMenuItem>
333
- <DropdownMenuItem>Billing</DropdownMenuItem>
334
- </DropdownMenuGroup>
335
- <DropdownMenuSeparator />
336
- <DropdownMenuGroup>
337
- <DropdownMenuSub>
338
- <DropdownMenuSubTrigger>Invite users</DropdownMenuSubTrigger>
339
- <DropdownMenuPortal>
340
- <DropdownMenuSubContent>
341
- <DropdownMenuItem>Email</DropdownMenuItem>
342
- <DropdownMenuItem>Message</DropdownMenuItem>
343
- <DropdownMenuSeparator />
344
- <DropdownMenuItem>More...</DropdownMenuItem>
345
- </DropdownMenuSubContent>
346
- </DropdownMenuPortal>
347
- </DropdownMenuSub>
348
- <DropdownMenuItem>GitHub</DropdownMenuItem>
349
- <DropdownMenuItem>Support</DropdownMenuItem>
350
- <DropdownMenuItem disabled>API</DropdownMenuItem>
351
- </DropdownMenuGroup>
352
- </DropdownMenuContent>
353
- </DropdownMenu>
354
- )
355
- }
356
-
357
- const DropdownMenuAlignStartDemo = () => {
358
- return (
359
- <DropdownMenu>
360
- <DropdownMenuTrigger asChild>
361
- <Button variant='outline'>Align Start</Button>
362
- </DropdownMenuTrigger>
363
- <DropdownMenuContent align='start' className='w-34'>
364
- <DropdownMenuGroup>
365
- <DropdownMenuItem>
366
- <PencilLineIcon />
367
- Edit
368
- </DropdownMenuItem>
369
- <DropdownMenuItem>
370
- <UploadIcon />
371
- Share
372
- </DropdownMenuItem>
373
- <DropdownMenuSeparator />
374
- <DropdownMenuItem variant='destructive'>
375
- <Trash2Icon />
376
- <span>Delete</span>
377
- </DropdownMenuItem>
378
- </DropdownMenuGroup>
379
- </DropdownMenuContent>
380
- </DropdownMenu>
381
- )
382
- }
383
-
384
- const DropdownMenuAlignEndDemo = () => {
385
- return (
386
- <DropdownMenu>
387
- <DropdownMenuTrigger asChild>
388
- <Button variant='outline'>Align End</Button>
389
- </DropdownMenuTrigger>
390
- <DropdownMenuContent align='end' className='w-66'>
391
- <DropdownMenuGroup>
392
- <DropdownMenuItem>
393
- New Tab<DropdownMenuShortcut>⌘ + T</DropdownMenuShortcut>
394
- </DropdownMenuItem>
395
- <DropdownMenuItem>
396
- New Window <DropdownMenuShortcut>⌘ + N</DropdownMenuShortcut>
397
- </DropdownMenuItem>
398
- <DropdownMenuSeparator />
399
- <DropdownMenuItem>
400
- New Incognito Window <DropdownMenuShortcut>⌘ + ⇧ + N</DropdownMenuShortcut>
401
- </DropdownMenuItem>
402
- <DropdownMenuItem>
403
- History <DropdownMenuShortcut>⌘ + Y</DropdownMenuShortcut>
404
- </DropdownMenuItem>
405
- <DropdownMenuItem>
406
- Downloads <DropdownMenuShortcut>⌥ + ⇧ + L</DropdownMenuShortcut>
407
- </DropdownMenuItem>
408
- </DropdownMenuGroup>
409
- </DropdownMenuContent>
410
- </DropdownMenu>
411
- )
412
- }
413
-
414
- const DropdownMenuBorderedMenuDemo = () => {
415
- return (
416
- <DropdownMenu>
417
- <DropdownMenuTrigger asChild>
418
- <Button variant='outline'>Bordered Menu</Button>
419
- </DropdownMenuTrigger>
420
- <DropdownMenuContent className='w-56 shadow-none'>
421
- <DropdownMenuLabel>Task priority</DropdownMenuLabel>
422
- <DropdownMenuGroup>
423
- {listItems.map((item, index) => (
424
- <DropdownMenuItem key={index}>
425
- <item.icon className={item.color} />
426
- {item.priority}
427
- </DropdownMenuItem>
428
- ))}
429
- </DropdownMenuGroup>
430
- </DropdownMenuContent>
431
- </DropdownMenu>
432
- )
433
- }
434
-
435
- const DropdownMenuItemIconDemo = () => {
436
- return (
437
- <DropdownMenu>
438
- <DropdownMenuTrigger asChild>
439
- <Button variant='outline'>Menu item with icon</Button>
440
- </DropdownMenuTrigger>
441
- <DropdownMenuContent className='w-56'>
442
- <DropdownMenuLabel>User Profile</DropdownMenuLabel>
443
- <DropdownMenuGroup>
444
- <DropdownMenuItem>
445
- <UserIcon />
446
- Profile
447
- </DropdownMenuItem>
448
- <DropdownMenuItem>
449
- <SettingsIcon />
450
- Settings
451
- </DropdownMenuItem>
452
- <DropdownMenuItem>
453
- <ReceiptIcon />
454
- Billing Plans
455
- </DropdownMenuItem>
456
- <DropdownMenuItem>
457
- <DollarSignIcon />
458
- Pricing
459
- </DropdownMenuItem>
460
- <DropdownMenuItem>
461
- <CircleHelpIcon />
462
- FAQ
463
- </DropdownMenuItem>
464
- </DropdownMenuGroup>
465
- </DropdownMenuContent>
466
- </DropdownMenu>
467
- )
468
- }
469
-
470
- const DropdownMenuCheckboxDemo = () => {
471
- const [showStatusBar, setShowStatusBar] = useState(true)
472
- const [showActivityBar, setShowActivityBar] = useState(false)
473
- const [showPanel, setShowPanel] = useState(false)
474
-
475
- return (
476
- <DropdownMenu>
477
- <DropdownMenuTrigger asChild>
478
- <Button variant='outline'>With checkbox</Button>
479
- </DropdownMenuTrigger>
480
- <DropdownMenuContent className='w-56'>
481
- <DropdownMenuLabel>Appearance</DropdownMenuLabel>
482
- <DropdownMenuSeparator />
483
- <DropdownMenuCheckboxItem checked={showStatusBar} onCheckedChange={setShowStatusBar}>
484
- Status Bar
485
- </DropdownMenuCheckboxItem>
486
- <DropdownMenuCheckboxItem checked={showActivityBar} onCheckedChange={setShowActivityBar} disabled>
487
- API
488
- </DropdownMenuCheckboxItem>
489
- <DropdownMenuCheckboxItem checked={showPanel} onCheckedChange={setShowPanel}>
490
- Invite users
491
- </DropdownMenuCheckboxItem>
492
- </DropdownMenuContent>
493
- </DropdownMenu>
494
- )
495
- }
496
-
497
- const DropdownMenuRadioGroupDemo = () => {
498
- const [position, setPosition] = useState('bottom')
499
-
500
- return (
501
- <DropdownMenu>
502
- <DropdownMenuTrigger asChild>
503
- <Button variant='outline'>With radio</Button>
504
- </DropdownMenuTrigger>
505
- <DropdownMenuContent className='w-56'>
506
- <DropdownMenuLabel>Panel Position</DropdownMenuLabel>
507
- <DropdownMenuSeparator />
508
- <DropdownMenuRadioGroup value={position} onValueChange={setPosition}>
509
- <DropdownMenuRadioItem value='top'>Top</DropdownMenuRadioItem>
510
- <DropdownMenuRadioItem value='bottom'>Bottom</DropdownMenuRadioItem>
511
- <DropdownMenuRadioItem value='right' disabled>
512
- Right
513
- </DropdownMenuRadioItem>
514
- </DropdownMenuRadioGroup>
515
- </DropdownMenuContent>
516
- </DropdownMenu>
517
- )
518
- }
519
-
520
- const DropdownSlideLeftAnimationDemo = () => {
521
- return (
522
- <DropdownMenu>
523
- <DropdownMenuTrigger asChild>
524
- <Button variant='outline'>Slide Left Animation</Button>
525
- </DropdownMenuTrigger>
526
- <DropdownMenuContent
527
- align='start'
528
- className='data-[state=closed]:slide-out-to-left-20 data-[state=open]:slide-in-from-left-20 data-[state=closed]:zoom-out-100 data-[state=open]:zoom-in-100 w-56 duration-400'
529
- >
530
- <DropdownMenuLabel>Settings</DropdownMenuLabel>
531
- <DropdownMenuGroup>
532
- <DropdownMenuItem>My Profile</DropdownMenuItem>
533
- <DropdownMenuItem>Settings</DropdownMenuItem>
534
- <DropdownMenuItem>Billing</DropdownMenuItem>
535
- <DropdownMenuItem>FAQs</DropdownMenuItem>
536
- </DropdownMenuGroup>
537
- <DropdownMenuSeparator />
538
- <DropdownMenuLabel>Contact</DropdownMenuLabel>
539
- <DropdownMenuGroup>
540
- <DropdownMenuItem>Call Support</DropdownMenuItem>
541
- <DropdownMenuItem>Chat with us</DropdownMenuItem>
542
- </DropdownMenuGroup>
543
- </DropdownMenuContent>
544
- </DropdownMenu>
545
- )
546
- }
547
-
548
- const DropdownMenuSlideUpAnimationDemo = () => {
549
- const [googleSwitch, setGoogleSwitch] = useState(false)
550
- const [twitterSwitch, setTwitterSwitch] = useState(false)
551
- const [linkedinSwitch, setLinkedinSwitch] = useState(false)
552
- const [dribbbleSwitch, setDribbbleSwitch] = useState(false)
553
- const [behanceSwitch, setBehanceSwitch] = useState(false)
554
-
555
- return (
556
- <DropdownMenu>
557
- <DropdownMenuTrigger asChild>
558
- <Button variant='outline'>Slide Up Animation</Button>
559
- </DropdownMenuTrigger>
560
- <DropdownMenuContent className='data-[state=closed]:slide-out-to-left-0 data-[state=open]:slide-in-from-left-0 data-[state=closed]:slide-out-to-bottom-20 data-[state=open]:slide-in-from-bottom-20 data-[state=closed]:zoom-out-100 w-56 duration-400'>
561
- <DropdownMenuLabel>Apps notification</DropdownMenuLabel>
562
- <DropdownMenuGroup>
563
- <DropdownMenuItem className='justify-between' onSelect={event => event.preventDefault()}>
564
- <img
565
- src='https://cdn.shadcnstudio.com/ss-assets/components/dropdown/google.png'
566
- alt='google'
567
- className='size-4'
568
- ></img>
569
- <span className='flex-1'>Google</span>
570
- <Switch id='airplane-mode' checked={googleSwitch} onCheckedChange={setGoogleSwitch} />
571
- </DropdownMenuItem>
572
- <DropdownMenuItem className='justify-between' onSelect={event => event.preventDefault()}>
573
- <img
574
- src='https://cdn.shadcnstudio.com/ss-assets/components/dropdown/twitter.png'
575
- alt='twitter'
576
- className='size-4'
577
- ></img>
578
- <span className='flex-1'>Twitter</span>
579
- <Switch id='airplane-mode' checked={twitterSwitch} onCheckedChange={setTwitterSwitch} />
580
- </DropdownMenuItem>
581
- <DropdownMenuItem className='justify-between' onSelect={event => event.preventDefault()}>
582
- <img
583
- src='https://cdn.shadcnstudio.com/ss-assets/components/dropdown/linkedin.png'
584
- alt='linkedin'
585
- className='size-4'
586
- ></img>
587
- <span className='flex-1'>Linkedin</span>
588
- <Switch id='airplane-mode' checked={linkedinSwitch} onCheckedChange={setLinkedinSwitch} />
589
- </DropdownMenuItem>
590
- <DropdownMenuItem className='justify-between' onSelect={event => event.preventDefault()}>
591
- <img
592
- src='https://cdn.shadcnstudio.com/ss-assets/components/dropdown/dribbble.png'
593
- alt='dribbble'
594
- className='size-4'
595
- ></img>
596
- <span className='flex-1'>Dribbble</span>
597
- <Switch id='airplane-mode' checked={dribbbleSwitch} onCheckedChange={setDribbbleSwitch} />
598
- </DropdownMenuItem>
599
- <DropdownMenuItem className='justify-between' onSelect={event => event.preventDefault()}>
600
- <img
601
- src='https://cdn.shadcnstudio.com/ss-assets/components/dropdown/behance.png'
602
- alt='behance'
603
- className='size-4'
604
- ></img>
605
- <span className='flex-1'>Behance</span>
606
- <Switch id='airplane-mode' checked={behanceSwitch} onCheckedChange={setBehanceSwitch} />
607
- </DropdownMenuItem>
608
- </DropdownMenuGroup>
609
- </DropdownMenuContent>
610
- </DropdownMenu>
611
- )
612
- } */