@catalystsoftware/ui 1.0.4 → 1.0.5
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.
- package/data/tailwind.config.js +261 -3821
- package/dist/components/catalyst-ui/buttons/burger.tsx +207 -0
- package/dist/components/catalyst-ui/core/data-display/timeline.tsx +210 -0
- package/dist/components/catalyst-ui/core/feedback/alert.tsx +491 -0
- package/dist/components/catalyst-ui/core/feedback/spinner-1.tsx +65 -0
- package/dist/components/catalyst-ui/core/feedback/toast.tsx +1857 -0
- package/dist/components/catalyst-ui/core/navigation/menu.tsx +164 -0
- package/dist/components/catalyst-ui/forms/toggle-class.tsx +176 -0
- package/dist/components/catalyst-ui/hooks/use-copy-to-clipboard.tsx +419 -0
- package/dist/components/catalyst-ui/hooks/use-counter.tsx +13 -0
- package/dist/components/catalyst-ui/hooks/use-event-listener.tsx +23 -0
- package/dist/components/catalyst-ui/hooks/use-export-markdown.tsx +47 -0
- package/dist/components/catalyst-ui/hooks/use-focus.tsx +17 -0
- package/dist/components/catalyst-ui/hooks/use-interval.tsx +23 -0
- package/dist/components/catalyst-ui/hooks/use-is-client.tsx +16 -0
- package/dist/components/catalyst-ui/hooks/use-media-query.tsx +19 -0
- package/dist/components/catalyst-ui/hooks/use-mobile.tsx +19 -0
- package/dist/components/catalyst-ui/hooks/use-resize-observer.tsx +81 -0
- package/dist/components/catalyst-ui/hooks/use-timeout.tsx +21 -0
- package/dist/components/catalyst-ui/hooks/use-timer.tsx +209 -0
- package/dist/components/catalyst-ui/hooks/use-toggle.tsx +12 -0
- package/dist/components/catalyst-ui/media/image.tsx +13 -0
- package/dist/components/catalyst-ui/overlays/dual-sidebar.tsx +4142 -0
- package/dist/components/catalyst-ui/overlays/sidebar-original.tsx +726 -0
- package/dist/components/catalyst-ui/primitives/accordion.tsx +250 -0
- package/dist/components/catalyst-ui/primitives/alert-dialog.tsx +126 -0
- package/dist/components/catalyst-ui/primitives/aspect-ratio.tsx +9 -0
- package/dist/components/catalyst-ui/primitives/avatar.tsx +296 -0
- package/dist/components/catalyst-ui/primitives/badge.tsx +57 -0
- package/dist/components/catalyst-ui/primitives/breadcrumb.tsx +101 -0
- package/dist/components/catalyst-ui/primitives/button.tsx +265 -0
- package/dist/components/catalyst-ui/primitives/calendar-v4.tsx +208 -0
- package/dist/components/catalyst-ui/primitives/calendar.tsx +295 -0
- package/dist/components/catalyst-ui/primitives/card.tsx +618 -0
- package/dist/components/catalyst-ui/primitives/carousel.tsx +238 -0
- package/dist/components/catalyst-ui/primitives/chart.tsx +347 -0
- package/dist/components/catalyst-ui/primitives/checkbox.tsx +225 -0
- package/dist/components/catalyst-ui/primitives/collapsible.tsx +212 -0
- package/dist/components/catalyst-ui/primitives/command.tsx +393 -0
- package/dist/components/catalyst-ui/primitives/context-menu.tsx +236 -0
- package/dist/components/catalyst-ui/primitives/dialog.tsx +471 -0
- package/dist/components/catalyst-ui/primitives/drawer.tsx +761 -0
- package/dist/components/catalyst-ui/primitives/dropdown-menu.tsx +290 -0
- package/dist/components/catalyst-ui/primitives/empty.tsx +104 -0
- package/dist/components/catalyst-ui/primitives/field.tsx +244 -0
- package/dist/components/catalyst-ui/primitives/hover-card.tsx +124 -0
- package/dist/components/catalyst-ui/primitives/input-otp.tsx +76 -0
- package/dist/components/catalyst-ui/primitives/input.tsx +64 -0
- package/dist/components/catalyst-ui/primitives/item.tsx +196 -0
- package/dist/components/catalyst-ui/primitives/kbd.tsx +75 -0
- package/dist/components/catalyst-ui/primitives/label.tsx +24 -0
- package/dist/components/catalyst-ui/primitives/navigation-menu.tsx +150 -0
- package/dist/components/catalyst-ui/primitives/pagination.tsx +198 -0
- package/dist/components/catalyst-ui/primitives/popover.tsx +232 -0
- package/dist/components/catalyst-ui/primitives/progress.tsx +34 -0
- package/dist/components/catalyst-ui/primitives/radio-group.tsx +43 -0
- package/dist/components/catalyst-ui/primitives/resizable.tsx +56 -0
- package/dist/components/catalyst-ui/primitives/select.tsx +155 -0
- package/dist/components/catalyst-ui/primitives/separator.tsx +74 -0
- package/dist/components/catalyst-ui/primitives/sheet.tsx +126 -0
- package/dist/components/catalyst-ui/primitives/skeleton.tsx +15 -0
- package/dist/components/catalyst-ui/primitives/slider.tsx +27 -0
- package/dist/components/catalyst-ui/primitives/switch.tsx +187 -0
- package/dist/components/catalyst-ui/primitives/tabs.tsx +335 -0
- package/dist/components/catalyst-ui/primitives/textarea.tsx +24 -0
- package/dist/components/catalyst-ui/primitives/toggle-group.tsx +55 -0
- package/dist/components/catalyst-ui/primitives/toggle.tsx +42 -0
- package/dist/components/catalyst-ui/primitives/tooltip.tsx +116 -0
- package/dist/components/catalyst-ui/utils/basic-auth.tsx +40 -0
- package/dist/components/catalyst-ui/utils/context-storage.tsx +19 -0
- package/dist/components/catalyst-ui/utils/cors-middleware.tsx +71 -0
- package/dist/components/catalyst-ui/utils/deferred-content.tsx +595 -0
- package/dist/components/catalyst-ui/utils/honeypot-middleware.tsx +38 -0
- package/dist/components/catalyst-ui/utils/incId.tsx +75 -0
- package/dist/components/catalyst-ui/utils/jwk-auth.tsx +36 -0
- package/dist/components/catalyst-ui/utils/request-id.tsx +14 -0
- package/dist/components/catalyst-ui/utils/secure-headers.tsx +37 -0
- package/dist/components/catalyst-ui/utils/server-timing.tsx +23 -0
- package/dist/components/catalyst-ui/utils/utils.ts +43 -0
- package/dist/components/catalyst-ui/utils/with-cookie.tsx +43 -0
- package/dist/components/catalyst-ui/x/accordian-x.tsx +428 -0
- package/dist/components/catalyst-ui/x/alert-x.tsx +413 -0
- package/dist/components/catalyst-ui/x/animated-text-x.tsx +2242 -0
- package/dist/components/catalyst-ui/x/avatar-x.tsx +515 -0
- package/dist/components/catalyst-ui/x/badge-x.tsx +670 -0
- package/dist/components/catalyst-ui/x/button-X.tsx +2857 -0
- package/dist/components/catalyst-ui/x/button-group-x.tsx +847 -0
- package/dist/components/catalyst-ui/x/calendar-x.tsx +1910 -0
- package/dist/components/catalyst-ui/x/card-x.tsx +2597 -0
- package/dist/components/catalyst-ui/x/checkbox-x.tsx +656 -0
- package/dist/components/catalyst-ui/x/collapsible-x.tsx +1360 -0
- package/dist/components/catalyst-ui/x/combobox-x.tsx +911 -0
- package/dist/components/catalyst-ui/x/data-table-x.tsx +1753 -0
- package/dist/components/catalyst-ui/x/date-picker-x.tsx +648 -0
- package/dist/components/catalyst-ui/x/dialog-x.tsx +659 -0
- package/dist/components/catalyst-ui/x/dropdown-menu-x.tsx +612 -0
- package/dist/components/catalyst-ui/x/hover-card-x.tsx +375 -0
- package/dist/components/catalyst-ui/x/icon-x.tsx +840 -0
- package/dist/components/catalyst-ui/x/input-mask-x.tsx +981 -0
- package/dist/components/catalyst-ui/x/input-otp-x.tsx +659 -0
- package/dist/components/catalyst-ui/x/loader-x.tsx +1757 -0
- package/dist/components/catalyst-ui/x/pagination-x.tsx +622 -0
- package/dist/components/catalyst-ui/x/popover-x.tsx +744 -0
- package/dist/components/catalyst-ui/x/radio-group-x.tsx +499 -0
- package/dist/components/catalyst-ui/x/select-x.tsx +1127 -0
- package/dist/components/catalyst-ui/x/sheet-x.tsx +668 -0
- package/dist/components/catalyst-ui/x/switch-x.tsx +681 -0
- package/dist/components/catalyst-ui/x/table-x.tsx +574 -0
- package/dist/components/catalyst-ui/x/tabs-x.tsx +839 -0
- package/dist/components/catalyst-ui/x/textarea-x.tsx +1263 -0
- package/dist/components/catalyst-ui/x/tooltip-x.tsx +396 -0
- package/dist/components/catalyst-ui/x/tracker-x.tsx +560 -0
- package/dist/data/bg-data.tsx +901 -0
- package/dist/data/buttons-data.tsx +2327 -0
- package/dist/data/charts-data.tsx +102 -0
- package/dist/data/chat-data.tsx +83 -0
- package/dist/data/code-data.tsx +1040 -0
- package/dist/data/comboboxes-data.tsx +1843 -0
- package/dist/data/command-data.tsx +1381 -0
- package/dist/data/core-data.tsx +15953 -0
- package/dist/data/crm-data.tsx +47 -0
- package/dist/data/data.tsx +159 -0
- package/dist/data/date-and-time-data.tsx +554 -0
- package/dist/data/dependencies.tsx +7 -0
- package/dist/data/ecommerce-data.tsx +1387 -0
- package/dist/data/forms-data.tsx +7890 -0
- package/dist/data/hooks-data.tsx +5487 -0
- package/dist/data/index.ts +34 -0
- package/dist/data/inputs-data.tsx +557 -0
- package/dist/data/interactive-data.tsx +5394 -0
- package/dist/data/lofi-data.tsx +18295 -0
- package/dist/data/marketing-data.tsx +2546 -0
- package/dist/data/media-data.tsx +1510 -0
- package/dist/data/motion-data.tsx +5801 -0
- package/dist/data/overlay-data.tsx +4136 -0
- package/dist/data/pdf-data.tsx +124 -0
- package/dist/data/pos-data.tsx +213 -0
- package/dist/data/postcss.config.js +6 -0
- package/dist/data/primitive-data.tsx +5170 -0
- package/dist/data/prompt-data.tsx +1226 -0
- package/dist/data/requiredLibs.ts +4 -0
- package/dist/data/sandbox-data.tsx +1 -0
- package/dist/data/sidebars-data.tsx +5421 -0
- package/dist/data/stacks-data.tsx +32 -0
- package/dist/data/table-data.tsx +706 -0
- package/dist/data/tailwind.config.js +270 -0
- package/dist/data/tailwind.config.ngin.js +3830 -0
- package/dist/data/tailwind.css +431 -0
- package/dist/data/tools-data.tsx +6910 -0
- package/dist/data/typography-data.tsx +2050 -0
- package/dist/data/utils-data.tsx +6500 -0
- package/dist/data/x-data.tsx +1171 -0
- package/dist/data.tsx +159 -0
- package/package.json +1 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -362
|
@@ -0,0 +1,668 @@
|
|
|
1
|
+
/**const SheetDemo = () => {
|
|
2
|
+
return (
|
|
3
|
+
<Sheet>
|
|
4
|
+
<SheetTrigger asChild>
|
|
5
|
+
<Button variant='outline'>Default</Button>
|
|
6
|
+
</SheetTrigger>
|
|
7
|
+
<SheetContent>
|
|
8
|
+
<SheetHeader>
|
|
9
|
+
<SheetTitle>Edit profile</SheetTitle>
|
|
10
|
+
<SheetDescription>Make changes to your profile here. Click save when you're done.</SheetDescription>
|
|
11
|
+
</SheetHeader>
|
|
12
|
+
<div className='grid flex-1 auto-rows-min gap-6 px-4'>
|
|
13
|
+
<div className='grid gap-3'>
|
|
14
|
+
<Label htmlFor='sheet-demo-name'>Name</Label>
|
|
15
|
+
<Input id='sheet-demo-name' defaultValue='Pedro Duarte' />
|
|
16
|
+
</div>
|
|
17
|
+
<div className='grid gap-3'>
|
|
18
|
+
<Label htmlFor='sheet-demo-username'>Username</Label>
|
|
19
|
+
<Input id='sheet-demo-username' defaultValue='@peduarte' />
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
<SheetFooter>
|
|
23
|
+
<Button type='submit'>Save changes</Button>
|
|
24
|
+
<SheetClose asChild>
|
|
25
|
+
<Button variant='outline'>Close</Button>
|
|
26
|
+
</SheetClose>
|
|
27
|
+
</SheetFooter>
|
|
28
|
+
</SheetContent>
|
|
29
|
+
</Sheet>
|
|
30
|
+
)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const SheetSidesDemo = () => {
|
|
34
|
+
return (
|
|
35
|
+
<div className='flex flex-wrap gap-2'>
|
|
36
|
+
<Sheet>
|
|
37
|
+
<SheetTrigger asChild>
|
|
38
|
+
<Button variant='outline'>Top</Button>
|
|
39
|
+
</SheetTrigger>
|
|
40
|
+
<SheetContent side='top'>
|
|
41
|
+
<SheetHeader>
|
|
42
|
+
<SheetTitle>Edit profile</SheetTitle>
|
|
43
|
+
<SheetDescription>Make changes to your profile here. Click save when you're done.</SheetDescription>
|
|
44
|
+
</SheetHeader>
|
|
45
|
+
<div className='grid flex-1 auto-rows-min gap-6 px-4'>
|
|
46
|
+
<div className='grid gap-3'>
|
|
47
|
+
<Label htmlFor='sheet-demo-name'>Name</Label>
|
|
48
|
+
<Input id='sheet-demo-name' defaultValue='Pedro Duarte' />
|
|
49
|
+
</div>
|
|
50
|
+
<div className='grid gap-3'>
|
|
51
|
+
<Label htmlFor='sheet-demo-username'>Username</Label>
|
|
52
|
+
<Input id='sheet-demo-username' defaultValue='@peduarte' />
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
<SheetFooter>
|
|
56
|
+
<Button type='submit'>Save changes</Button>
|
|
57
|
+
<SheetClose asChild>
|
|
58
|
+
<Button variant='outline'>Close</Button>
|
|
59
|
+
</SheetClose>
|
|
60
|
+
</SheetFooter>
|
|
61
|
+
</SheetContent>
|
|
62
|
+
</Sheet>
|
|
63
|
+
<Sheet>
|
|
64
|
+
<SheetTrigger asChild>
|
|
65
|
+
<Button variant='outline'>Right</Button>
|
|
66
|
+
</SheetTrigger>
|
|
67
|
+
<SheetContent side='right'>
|
|
68
|
+
<SheetHeader>
|
|
69
|
+
<SheetTitle>Edit profile</SheetTitle>
|
|
70
|
+
<SheetDescription>Make changes to your profile here. Click save when you're done.</SheetDescription>
|
|
71
|
+
</SheetHeader>
|
|
72
|
+
<div className='grid flex-1 auto-rows-min gap-6 px-4'>
|
|
73
|
+
<div className='grid gap-3'>
|
|
74
|
+
<Label htmlFor='sheet-demo-name'>Name</Label>
|
|
75
|
+
<Input id='sheet-demo-name' defaultValue='Pedro Duarte' />
|
|
76
|
+
</div>
|
|
77
|
+
<div className='grid gap-3'>
|
|
78
|
+
<Label htmlFor='sheet-demo-username'>Username</Label>
|
|
79
|
+
<Input id='sheet-demo-username' defaultValue='@peduarte' />
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
<SheetFooter>
|
|
83
|
+
<Button type='submit'>Save changes</Button>
|
|
84
|
+
<SheetClose asChild>
|
|
85
|
+
<Button variant='outline'>Close</Button>
|
|
86
|
+
</SheetClose>
|
|
87
|
+
</SheetFooter>
|
|
88
|
+
</SheetContent>
|
|
89
|
+
</Sheet>
|
|
90
|
+
<Sheet>
|
|
91
|
+
<SheetTrigger asChild>
|
|
92
|
+
<Button variant='outline'>Bottom</Button>
|
|
93
|
+
</SheetTrigger>
|
|
94
|
+
<SheetContent side='bottom'>
|
|
95
|
+
<SheetHeader>
|
|
96
|
+
<SheetTitle>Edit profile</SheetTitle>
|
|
97
|
+
<SheetDescription>Make changes to your profile here. Click save when you're done.</SheetDescription>
|
|
98
|
+
</SheetHeader>
|
|
99
|
+
<div className='grid flex-1 auto-rows-min gap-6 px-4'>
|
|
100
|
+
<div className='grid gap-3'>
|
|
101
|
+
<Label htmlFor='sheet-demo-name'>Name</Label>
|
|
102
|
+
<Input id='sheet-demo-name' defaultValue='Pedro Duarte' />
|
|
103
|
+
</div>
|
|
104
|
+
<div className='grid gap-3'>
|
|
105
|
+
<Label htmlFor='sheet-demo-username'>Username</Label>
|
|
106
|
+
<Input id='sheet-demo-username' defaultValue='@peduarte' />
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
<SheetFooter>
|
|
110
|
+
<Button type='submit'>Save changes</Button>
|
|
111
|
+
<SheetClose asChild>
|
|
112
|
+
<Button variant='outline'>Close</Button>
|
|
113
|
+
</SheetClose>
|
|
114
|
+
</SheetFooter>
|
|
115
|
+
</SheetContent>
|
|
116
|
+
</Sheet>
|
|
117
|
+
<Sheet>
|
|
118
|
+
<SheetTrigger asChild>
|
|
119
|
+
<Button variant='outline'>Left</Button>
|
|
120
|
+
</SheetTrigger>
|
|
121
|
+
<SheetContent side='left'>
|
|
122
|
+
<SheetHeader>
|
|
123
|
+
<SheetTitle>Edit profile</SheetTitle>
|
|
124
|
+
<SheetDescription>Make changes to your profile here. Click save when you're done.</SheetDescription>
|
|
125
|
+
</SheetHeader>
|
|
126
|
+
<div className='grid flex-1 auto-rows-min gap-6 px-4'>
|
|
127
|
+
<div className='grid gap-3'>
|
|
128
|
+
<Label htmlFor='sheet-demo-name'>Name</Label>
|
|
129
|
+
<Input id='sheet-demo-name' defaultValue='Pedro Duarte' />
|
|
130
|
+
</div>
|
|
131
|
+
<div className='grid gap-3'>
|
|
132
|
+
<Label htmlFor='sheet-demo-username'>Username</Label>
|
|
133
|
+
<Input id='sheet-demo-username' defaultValue='@peduarte' />
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
<SheetFooter>
|
|
137
|
+
<Button type='submit'>Save changes</Button>
|
|
138
|
+
<SheetClose asChild>
|
|
139
|
+
<Button variant='outline'>Close</Button>
|
|
140
|
+
</SheetClose>
|
|
141
|
+
</SheetFooter>
|
|
142
|
+
</SheetContent>
|
|
143
|
+
</Sheet>
|
|
144
|
+
</div>
|
|
145
|
+
)
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
const SheetWithNoOverlayDemo = () => {
|
|
149
|
+
return (
|
|
150
|
+
<Sheet modal={false}>
|
|
151
|
+
<SheetTrigger asChild>
|
|
152
|
+
<Button variant='outline'>No Overlay</Button>
|
|
153
|
+
</SheetTrigger>
|
|
154
|
+
<SheetContent>
|
|
155
|
+
<SheetHeader>
|
|
156
|
+
<SheetTitle>Edit profile</SheetTitle>
|
|
157
|
+
<SheetDescription>Make changes to your profile here. Click save when you're done.</SheetDescription>
|
|
158
|
+
</SheetHeader>
|
|
159
|
+
<div className='grid flex-1 auto-rows-min gap-6 px-4'>
|
|
160
|
+
<div className='grid gap-3'>
|
|
161
|
+
<Label htmlFor='sheet-demo-name'>Name</Label>
|
|
162
|
+
<Input id='sheet-demo-name' defaultValue='Pedro Duarte' />
|
|
163
|
+
</div>
|
|
164
|
+
<div className='grid gap-3'>
|
|
165
|
+
<Label htmlFor='sheet-demo-username'>Username</Label>
|
|
166
|
+
<Input id='sheet-demo-username' defaultValue='@peduarte' />
|
|
167
|
+
</div>
|
|
168
|
+
</div>
|
|
169
|
+
<SheetFooter>
|
|
170
|
+
<Button type='submit'>Save changes</Button>
|
|
171
|
+
<SheetClose asChild>
|
|
172
|
+
<Button variant='outline'>Close</Button>
|
|
173
|
+
</SheetClose>
|
|
174
|
+
</SheetFooter>
|
|
175
|
+
</SheetContent>
|
|
176
|
+
</Sheet>
|
|
177
|
+
)
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
const SheetWithScrollableContentDemo = () => {
|
|
181
|
+
return (
|
|
182
|
+
<Sheet>
|
|
183
|
+
<SheetTrigger asChild>
|
|
184
|
+
<Button variant='outline'>Scrollable Content</Button>
|
|
185
|
+
</SheetTrigger>
|
|
186
|
+
<SheetContent>
|
|
187
|
+
<ScrollArea className='h-full'>
|
|
188
|
+
<SheetHeader>
|
|
189
|
+
<SheetTitle>Terms & Condition</SheetTitle>
|
|
190
|
+
<SheetDescription>Make sure read the terms and conditions before proceeding.</SheetDescription>
|
|
191
|
+
</SheetHeader>
|
|
192
|
+
<div className='space-y-1 p-4 pt-0 text-sm'>
|
|
193
|
+
<p className='mb-2 font-medium'>Last Updated: June 1, 2025</p>
|
|
194
|
+
|
|
195
|
+
<h3>1. Introduction</h3>
|
|
196
|
+
<p>
|
|
197
|
+
Welcome to our platform. These Terms and Conditions outline the rules and regulations for the use of our
|
|
198
|
+
services. By accessing or using our services, you agree to comply with these terms. If you do not agree
|
|
199
|
+
with any of these terms, please do not use our services.
|
|
200
|
+
</p>
|
|
201
|
+
|
|
202
|
+
<h3>2. Acceptance of Terms</h3>
|
|
203
|
+
<p>
|
|
204
|
+
By using our services, you confirm that you have read, understood, and accepted these terms. You also
|
|
205
|
+
agree to comply with any additional guidelines, policies, or rules that may apply to specific features of
|
|
206
|
+
our services.
|
|
207
|
+
</p>
|
|
208
|
+
|
|
209
|
+
<h3>3. Services Provided</h3>
|
|
210
|
+
<p>
|
|
211
|
+
We offer a range of digital services including but not limited to content creation, subscription services,
|
|
212
|
+
and access to various online tools. You acknowledge that the nature of our services may change over time,
|
|
213
|
+
and we reserve the right to modify, suspend, or discontinue services at any time.
|
|
214
|
+
</p>
|
|
215
|
+
|
|
216
|
+
<h3>4. User Obligations</h3>
|
|
217
|
+
<p>
|
|
218
|
+
As a user, you agree to provide accurate and complete information when required, and to update this
|
|
219
|
+
information if necessary. You are responsible for maintaining the confidentiality of your account details,
|
|
220
|
+
including username and password, and for all activities under your account.
|
|
221
|
+
</p>
|
|
222
|
+
|
|
223
|
+
<h3>5. Prohibited Activities</h3>
|
|
224
|
+
<p>You may not use our services for any unlawful activities, including but not limited to:</p>
|
|
225
|
+
<ul>
|
|
226
|
+
<li>Distributing malicious content or viruses</li>
|
|
227
|
+
<li>Engaging in illegal activities or fraud</li>
|
|
228
|
+
<li>Impersonating another user or entity</li>
|
|
229
|
+
<li>Harassing or bullying other users</li>
|
|
230
|
+
</ul>
|
|
231
|
+
|
|
232
|
+
<h3>6. Content Ownership</h3>
|
|
233
|
+
<p>
|
|
234
|
+
All content, including text, images, graphics, and software on our platform, is owned by us or our
|
|
235
|
+
licensors and is protected by copyright laws. You are granted a limited, non-exclusive license to access
|
|
236
|
+
and use this content for personal or business purposes.
|
|
237
|
+
</p>
|
|
238
|
+
|
|
239
|
+
<h3>7. Privacy and Data Protection</h3>
|
|
240
|
+
<p>
|
|
241
|
+
Your privacy is important to us. Please refer to our <a href='#'>Privacy Policy</a> to understand how we
|
|
242
|
+
collect, use, and protect your personal data.
|
|
243
|
+
</p>
|
|
244
|
+
|
|
245
|
+
<h3>8. Payment Terms</h3>
|
|
246
|
+
<p>
|
|
247
|
+
Some of our services are available for a fee. You agree to pay all applicable charges and fees associated
|
|
248
|
+
with your use of the services. We reserve the right to change the pricing of our services at any time.
|
|
249
|
+
</p>
|
|
250
|
+
|
|
251
|
+
<h3>9. Termination</h3>
|
|
252
|
+
<p>
|
|
253
|
+
We may suspend or terminate your account if you violate these Terms and Conditions or engage in any
|
|
254
|
+
behavior that we deem inappropriate. Upon termination, your access to our services will be revoked, and
|
|
255
|
+
any outstanding payments will be due immediately.
|
|
256
|
+
</p>
|
|
257
|
+
|
|
258
|
+
<h3>10. Disclaimers and Limitation of Liability</h3>
|
|
259
|
+
<p>
|
|
260
|
+
We provide our services "as is" and make no warranties regarding the accuracy, reliability, or
|
|
261
|
+
availability of the services. We are not responsible for any damages, losses, or expenses incurred by your
|
|
262
|
+
use of our services.
|
|
263
|
+
</p>
|
|
264
|
+
|
|
265
|
+
<h3>11. Governing Law</h3>
|
|
266
|
+
<p>
|
|
267
|
+
These Terms and Conditions shall be governed by and construed in accordance with the laws of the
|
|
268
|
+
jurisdiction in which our company is based. Any disputes arising from these terms shall be subject to the
|
|
269
|
+
exclusive jurisdiction of the courts of that jurisdiction.
|
|
270
|
+
</p>
|
|
271
|
+
|
|
272
|
+
<h3>12. Changes to Terms</h3>
|
|
273
|
+
<p>
|
|
274
|
+
We reserve the right to update or modify these Terms and Conditions at any time. Any changes will be
|
|
275
|
+
posted on this page, and the revised terms will take effect immediately upon posting. It is your
|
|
276
|
+
responsibility to review these terms periodically for any updates.
|
|
277
|
+
</p>
|
|
278
|
+
|
|
279
|
+
<h3>13. Contact Information</h3>
|
|
280
|
+
<p>If you have any questions or concerns about these Terms and Conditions, please contact us at:</p>
|
|
281
|
+
<p>Email: support@example.com</p>
|
|
282
|
+
<p>Phone: +1 (800) 123-4567</p>
|
|
283
|
+
</div>
|
|
284
|
+
<SheetFooter>
|
|
285
|
+
<SheetClose asChild>
|
|
286
|
+
<Button type='submit'>Accept</Button>
|
|
287
|
+
</SheetClose>
|
|
288
|
+
<SheetClose asChild>
|
|
289
|
+
<Button variant='outline'>Cancel</Button>
|
|
290
|
+
</SheetClose>
|
|
291
|
+
</SheetFooter>
|
|
292
|
+
</ScrollArea>
|
|
293
|
+
</SheetContent>
|
|
294
|
+
</Sheet>
|
|
295
|
+
)
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
const SheetWithFormDemo = () => {
|
|
299
|
+
const FormSchema = z.object({
|
|
300
|
+
firstName: z.string().min(1, 'First name is required').min(2, 'First name must be at least 2 characters'),
|
|
301
|
+
lastName: z.string().min(1, 'Last name is required').min(2, 'Last name must be at least 2 characters'),
|
|
302
|
+
email: z.string().min(1, 'Email is required').email({ message: 'Please enter a valid email address.' }),
|
|
303
|
+
mobileNumber: z
|
|
304
|
+
.number({ required_error: 'Mobile number is required', invalid_type_error: 'Please enter a valid number' })
|
|
305
|
+
.int('Mobile number must be a whole number')
|
|
306
|
+
.positive('Mobile number must be positive')
|
|
307
|
+
.refine(val => val.toString().length === 10, 'Mobile number must be exactly 10 digits'),
|
|
308
|
+
password: z.string().min(1, 'Password is required').min(8, 'Password must be at least 8 characters')
|
|
309
|
+
})
|
|
310
|
+
|
|
311
|
+
const form = useForm<z.infer<typeof FormSchema>>({
|
|
312
|
+
resolver: zodResolver(FormSchema),
|
|
313
|
+
defaultValues: {
|
|
314
|
+
firstName: '',
|
|
315
|
+
lastName: '',
|
|
316
|
+
email: '',
|
|
317
|
+
mobileNumber: undefined,
|
|
318
|
+
password: ''
|
|
319
|
+
}
|
|
320
|
+
})
|
|
321
|
+
|
|
322
|
+
const onSubmit = () => {
|
|
323
|
+
toast.custom(() => (
|
|
324
|
+
<Alert className='border-green-600 text-green-600 dark:border-green-400 dark:text-green-400'>
|
|
325
|
+
<CheckCheckIcon />
|
|
326
|
+
<AlertTitle>Account created successfully!</AlertTitle>
|
|
327
|
+
</Alert>
|
|
328
|
+
))
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
return (
|
|
332
|
+
<Sheet>
|
|
333
|
+
<SheetTrigger asChild>
|
|
334
|
+
<Button variant='outline'>Sign Up</Button>
|
|
335
|
+
</SheetTrigger>
|
|
336
|
+
<SheetContent>
|
|
337
|
+
<SheetHeader>
|
|
338
|
+
<SheetTitle className='text-center text-xl font-bold'>Sign Up</SheetTitle>
|
|
339
|
+
</SheetHeader>
|
|
340
|
+
<Form {...form}>
|
|
341
|
+
<form onSubmit={form.handleSubmit(onSubmit)} className='w-full'>
|
|
342
|
+
<div className='space-y-4 p-4 pt-0'>
|
|
343
|
+
<FormField
|
|
344
|
+
control={form.control}
|
|
345
|
+
name='firstName'
|
|
346
|
+
render={({ field }) => (
|
|
347
|
+
<FormItem>
|
|
348
|
+
<FormLabel>First Name</FormLabel>
|
|
349
|
+
<FormControl>
|
|
350
|
+
<Input placeholder='First name' {...field} />
|
|
351
|
+
</FormControl>
|
|
352
|
+
<FormMessage />
|
|
353
|
+
</FormItem>
|
|
354
|
+
)}
|
|
355
|
+
/>
|
|
356
|
+
<FormField
|
|
357
|
+
control={form.control}
|
|
358
|
+
name='lastName'
|
|
359
|
+
render={({ field }) => (
|
|
360
|
+
<FormItem>
|
|
361
|
+
<FormLabel>Last Name</FormLabel>
|
|
362
|
+
<FormControl>
|
|
363
|
+
<Input placeholder='Last name' {...field} />
|
|
364
|
+
</FormControl>
|
|
365
|
+
<FormMessage />
|
|
366
|
+
</FormItem>
|
|
367
|
+
)}
|
|
368
|
+
/>
|
|
369
|
+
<FormField
|
|
370
|
+
control={form.control}
|
|
371
|
+
name='email'
|
|
372
|
+
render={({ field }) => (
|
|
373
|
+
<FormItem>
|
|
374
|
+
<FormLabel>Email</FormLabel>
|
|
375
|
+
<FormControl>
|
|
376
|
+
<Input placeholder='Email address' {...field} />
|
|
377
|
+
</FormControl>
|
|
378
|
+
<FormMessage />
|
|
379
|
+
</FormItem>
|
|
380
|
+
)}
|
|
381
|
+
/>
|
|
382
|
+
<FormField
|
|
383
|
+
control={form.control}
|
|
384
|
+
name='mobileNumber'
|
|
385
|
+
render={({ field }) => (
|
|
386
|
+
<FormItem>
|
|
387
|
+
<FormLabel>Mobile Number</FormLabel>
|
|
388
|
+
<FormControl>
|
|
389
|
+
<Input
|
|
390
|
+
type='tel'
|
|
391
|
+
placeholder='8585858585'
|
|
392
|
+
value={field.value ? field.value.toString() : ''}
|
|
393
|
+
onChange={e => {
|
|
394
|
+
const value = e.target.value.replace(/[^\d]/g, '')
|
|
395
|
+
|
|
396
|
+
const limitedValue = value.slice(0, 10)
|
|
397
|
+
|
|
398
|
+
const numValue = limitedValue === '' ? undefined : parseInt(limitedValue, 10)
|
|
399
|
+
|
|
400
|
+
field.onChange(numValue)
|
|
401
|
+
}}
|
|
402
|
+
/>
|
|
403
|
+
</FormControl>
|
|
404
|
+
<FormMessage />
|
|
405
|
+
</FormItem>
|
|
406
|
+
)}
|
|
407
|
+
/>
|
|
408
|
+
<FormField
|
|
409
|
+
control={form.control}
|
|
410
|
+
name='password'
|
|
411
|
+
render={({ field }) => (
|
|
412
|
+
<FormItem>
|
|
413
|
+
<FormLabel>Password</FormLabel>
|
|
414
|
+
<FormControl>
|
|
415
|
+
<Input type='password' placeholder='Password' {...field} />
|
|
416
|
+
</FormControl>
|
|
417
|
+
<FormMessage />
|
|
418
|
+
</FormItem>
|
|
419
|
+
)}
|
|
420
|
+
/>
|
|
421
|
+
</div>
|
|
422
|
+
<SheetFooter>
|
|
423
|
+
<Button type='submit'>Create Account</Button>
|
|
424
|
+
|
|
425
|
+
<SheetClose asChild>
|
|
426
|
+
<Button variant='outline'>Close</Button>
|
|
427
|
+
</SheetClose>
|
|
428
|
+
</SheetFooter>
|
|
429
|
+
</form>
|
|
430
|
+
</Form>
|
|
431
|
+
</SheetContent>
|
|
432
|
+
</Sheet>
|
|
433
|
+
)
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
const NavigationMenu = ({ item, level }: { level: number; item: NavigationItem }) => {
|
|
437
|
+
if (item.type === 'page') {
|
|
438
|
+
return (
|
|
439
|
+
<div
|
|
440
|
+
className='focus-visible:ring-ring/50 flex items-center gap-2 rounded-md p-1 outline-none focus-visible:ring-[3px]'
|
|
441
|
+
style={{ paddingLeft: `${level === 0 ? 0.25 : 1.75}rem` }}
|
|
442
|
+
>
|
|
443
|
+
{level === 0 ? <item.icon className='size-4 shrink-0' /> : <CircleSmallIcon className='size-4 shrink-0' />}
|
|
444
|
+
<span className='text-sm'>{item.name}</span>
|
|
445
|
+
</div>
|
|
446
|
+
)
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
return (
|
|
450
|
+
<Collapsible className='flex flex-col gap-1.5' style={{ paddingLeft: `${level === 0 ? 0 : 1.5}rem` }}>
|
|
451
|
+
<CollapsibleTrigger className='focus-visible:ring-ring/50 flex items-center gap-2 rounded-md p-1 outline-none focus-visible:ring-[3px]'>
|
|
452
|
+
{level === 0 ? <item.icon className='size-4 shrink-0' /> : <CircleSmallIcon className='size-4 shrink-0' />}
|
|
453
|
+
<span className='flex-1 text-start text-sm'>{item.name}</span>
|
|
454
|
+
<ChevronRightIcon className='size-4 shrink-0 transition-transform [[data-state="open"]>&]:rotate-90' />
|
|
455
|
+
</CollapsibleTrigger>
|
|
456
|
+
<CollapsibleContent className='data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down flex flex-col gap-1.5 overflow-hidden transition-all duration-300'>
|
|
457
|
+
{item.children.map(item => (
|
|
458
|
+
<NavigationMenu key={item.name} item={item} level={level + 1} />
|
|
459
|
+
))}
|
|
460
|
+
</CollapsibleContent>
|
|
461
|
+
</Collapsible>
|
|
462
|
+
)
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
const SheetWithNavigationMenuDemo = () => {
|
|
466
|
+
return (
|
|
467
|
+
<Sheet>
|
|
468
|
+
<SheetTrigger asChild>
|
|
469
|
+
<Button variant='outline'>Navigation Menu</Button>
|
|
470
|
+
</SheetTrigger>
|
|
471
|
+
<SheetContent side='left' className='w-75'>
|
|
472
|
+
<SheetHeader>
|
|
473
|
+
<SheetTitle>Menu</SheetTitle>
|
|
474
|
+
</SheetHeader>
|
|
475
|
+
<div className='flex flex-col gap-2.5 p-4 pt-0'>
|
|
476
|
+
{navigationMenu.map(item => (
|
|
477
|
+
<NavigationMenu key={item.name} item={item} level={0} />
|
|
478
|
+
))}
|
|
479
|
+
</div>
|
|
480
|
+
</SheetContent>
|
|
481
|
+
</Sheet>
|
|
482
|
+
)
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
const DataTableDensityDemo = () => {
|
|
486
|
+
const [tableData, setTableData] = useState(data)
|
|
487
|
+
const [globalFilter, setGlobalFilter] = useState('')
|
|
488
|
+
const [sorting, setSorting] = useState<SortingState>([])
|
|
489
|
+
const [columnFilters, setColumnFilters] = useState<ColumnFiltersState>([])
|
|
490
|
+
const [columnVisibility, setColumnVisibility] = useState<VisibilityState>({})
|
|
491
|
+
const [rowSelection, setRowSelection] = useState({})
|
|
492
|
+
const [isSheetOpen, setIsSheetOpen] = useState(false)
|
|
493
|
+
|
|
494
|
+
// Form state for adding new user
|
|
495
|
+
const [newUser, setNewUser] = useState({
|
|
496
|
+
name: '',
|
|
497
|
+
email: '',
|
|
498
|
+
amount: '',
|
|
499
|
+
status: 'pending' as Payment['status']
|
|
500
|
+
})
|
|
501
|
+
|
|
502
|
+
// Function to handle form submission
|
|
503
|
+
const handleAddUser = () => {
|
|
504
|
+
if (!newUser.name || !newUser.email || !newUser.amount) {
|
|
505
|
+
return // Basic validation
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
const newPayment: Payment = {
|
|
509
|
+
id: String(tableData.length + 1),
|
|
510
|
+
name: newUser.name,
|
|
511
|
+
email: newUser.email,
|
|
512
|
+
amount: parseFloat(newUser.amount),
|
|
513
|
+
status: newUser.status
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
setTableData([...tableData, newPayment])
|
|
517
|
+
|
|
518
|
+
// Reset form
|
|
519
|
+
setNewUser({
|
|
520
|
+
name: '',
|
|
521
|
+
email: '',
|
|
522
|
+
amount: '',
|
|
523
|
+
status: 'pending'
|
|
524
|
+
})
|
|
525
|
+
|
|
526
|
+
setIsSheetOpen(false)
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
const table = useReactTable({
|
|
530
|
+
data: tableData,
|
|
531
|
+
columns,
|
|
532
|
+
onSortingChange: setSorting,
|
|
533
|
+
onColumnFiltersChange: setColumnFilters,
|
|
534
|
+
getCoreRowModel: getCoreRowModel(),
|
|
535
|
+
getPaginationRowModel: getPaginationRowModel(),
|
|
536
|
+
getSortedRowModel: getSortedRowModel(),
|
|
537
|
+
getFilteredRowModel: getFilteredRowModel(),
|
|
538
|
+
onColumnVisibilityChange: setColumnVisibility,
|
|
539
|
+
onRowSelectionChange: setRowSelection,
|
|
540
|
+
onGlobalFilterChange: setGlobalFilter,
|
|
541
|
+
globalFilterFn: 'includesString',
|
|
542
|
+
state: {
|
|
543
|
+
sorting,
|
|
544
|
+
columnFilters,
|
|
545
|
+
columnVisibility,
|
|
546
|
+
rowSelection,
|
|
547
|
+
globalFilter
|
|
548
|
+
}
|
|
549
|
+
})
|
|
550
|
+
|
|
551
|
+
return (
|
|
552
|
+
<div className='w-full'>
|
|
553
|
+
<div className='flex justify-between gap-2 py-4 max-sm:flex-col sm:items-center'>
|
|
554
|
+
<Input
|
|
555
|
+
placeholder='Search all columns...'
|
|
556
|
+
value={globalFilter ?? ''}
|
|
557
|
+
onChange={event => setGlobalFilter(String(event.target.value))}
|
|
558
|
+
className='max-w-2xs'
|
|
559
|
+
/>
|
|
560
|
+
<Sheet open={isSheetOpen} onOpenChange={setIsSheetOpen}>
|
|
561
|
+
<SheetTrigger asChild>
|
|
562
|
+
<Button variant='outline'>
|
|
563
|
+
<PlusIcon />
|
|
564
|
+
Add Users
|
|
565
|
+
</Button>
|
|
566
|
+
</SheetTrigger>
|
|
567
|
+
<SheetContent>
|
|
568
|
+
<SheetHeader>
|
|
569
|
+
<SheetTitle>Add New User</SheetTitle>
|
|
570
|
+
<SheetDescription>Add a new user to the table. Fill in all the required information.</SheetDescription>
|
|
571
|
+
</SheetHeader>
|
|
572
|
+
<div className='grid flex-1 auto-rows-min gap-6 px-4'>
|
|
573
|
+
<div className='grid gap-3'>
|
|
574
|
+
<Label htmlFor='user-name'>Name</Label>
|
|
575
|
+
<Input
|
|
576
|
+
id='user-name'
|
|
577
|
+
value={newUser.name}
|
|
578
|
+
onChange={e => setNewUser({ ...newUser, name: e.target.value })}
|
|
579
|
+
placeholder='Enter user name'
|
|
580
|
+
/>
|
|
581
|
+
</div>
|
|
582
|
+
<div className='grid gap-3'>
|
|
583
|
+
<Label htmlFor='user-email'>Email</Label>
|
|
584
|
+
<Input
|
|
585
|
+
id='user-email'
|
|
586
|
+
type='email'
|
|
587
|
+
value={newUser.email}
|
|
588
|
+
onChange={e => setNewUser({ ...newUser, email: e.target.value })}
|
|
589
|
+
placeholder='Enter email address'
|
|
590
|
+
/>
|
|
591
|
+
</div>
|
|
592
|
+
<div className='grid gap-3'>
|
|
593
|
+
<Label htmlFor='user-amount'>Amount</Label>
|
|
594
|
+
<Input
|
|
595
|
+
id='user-amount'
|
|
596
|
+
type='number'
|
|
597
|
+
value={newUser.amount}
|
|
598
|
+
onChange={e => setNewUser({ ...newUser, amount: e.target.value })}
|
|
599
|
+
placeholder='Enter amount'
|
|
600
|
+
/>
|
|
601
|
+
</div>
|
|
602
|
+
<div className='grid gap-3'>
|
|
603
|
+
<Label htmlFor='user-status'>Status</Label>
|
|
604
|
+
<Select
|
|
605
|
+
value={newUser.status}
|
|
606
|
+
onValueChange={(value: Payment['status']) => setNewUser({ ...newUser, status: value })}
|
|
607
|
+
>
|
|
608
|
+
<SelectTrigger className='w-full'>
|
|
609
|
+
<SelectValue placeholder='Select status' />
|
|
610
|
+
</SelectTrigger>
|
|
611
|
+
<SelectContent>
|
|
612
|
+
<SelectItem value='pending'>Pending</SelectItem>
|
|
613
|
+
<SelectItem value='processing'>Processing</SelectItem>
|
|
614
|
+
<SelectItem value='success'>Success</SelectItem>
|
|
615
|
+
<SelectItem value='failed'>Failed</SelectItem>
|
|
616
|
+
</SelectContent>
|
|
617
|
+
</Select>
|
|
618
|
+
</div>
|
|
619
|
+
</div>
|
|
620
|
+
<SheetFooter>
|
|
621
|
+
<Button type='button' onClick={handleAddUser}>
|
|
622
|
+
Add User
|
|
623
|
+
</Button>
|
|
624
|
+
<SheetClose asChild>
|
|
625
|
+
<Button variant='outline'>Cancel</Button>
|
|
626
|
+
</SheetClose>
|
|
627
|
+
</SheetFooter>
|
|
628
|
+
</SheetContent>
|
|
629
|
+
</Sheet>
|
|
630
|
+
</div>
|
|
631
|
+
<div className='rounded-md border'>
|
|
632
|
+
<Table>
|
|
633
|
+
<TableHeader>
|
|
634
|
+
{table.getHeaderGroups().map(headerGroup => (
|
|
635
|
+
<TableRow key={headerGroup.id}>
|
|
636
|
+
{headerGroup.headers.map(header => {
|
|
637
|
+
return (
|
|
638
|
+
<TableHead key={header.id}>
|
|
639
|
+
{header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext())}
|
|
640
|
+
</TableHead>
|
|
641
|
+
)
|
|
642
|
+
})}
|
|
643
|
+
</TableRow>
|
|
644
|
+
))}
|
|
645
|
+
</TableHeader>
|
|
646
|
+
<TableBody>
|
|
647
|
+
{table.getRowModel().rows?.length ? (
|
|
648
|
+
table.getRowModel().rows.map(row => (
|
|
649
|
+
<TableRow key={row.id} data-state={row.getIsSelected() && 'selected'}>
|
|
650
|
+
{row.getVisibleCells().map(cell => (
|
|
651
|
+
<TableCell key={cell.id}>{flexRender(cell.column.columnDef.cell, cell.getContext())}</TableCell>
|
|
652
|
+
))}
|
|
653
|
+
</TableRow>
|
|
654
|
+
))
|
|
655
|
+
) : (
|
|
656
|
+
<TableRow>
|
|
657
|
+
<TableCell colSpan={columns.length} className='h-24 text-center'>
|
|
658
|
+
No results.
|
|
659
|
+
</TableCell>
|
|
660
|
+
</TableRow>
|
|
661
|
+
)}
|
|
662
|
+
</TableBody>
|
|
663
|
+
</Table>
|
|
664
|
+
</div>
|
|
665
|
+
<p className='text-muted-foreground mt-4 text-center text-sm'>Add new user with sheet</p>
|
|
666
|
+
</div>
|
|
667
|
+
)
|
|
668
|
+
} */
|