@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,2327 +0,0 @@
1
- export const buttonsData = [
2
- {
3
- name: "Button X",
4
- value: "buttonx",
5
- importPath: "~/components/catalyst-ui",
6
- multiImport: "ButtonX, buttonXVariants",
7
- path: "/components/catalyst-ui/buttons/buttonX.tsx",
8
- source: null,
9
- usagePath: "/components/catalyst-ui/buttons/buttonX.tsx",
10
- basicusage: `
11
- <ButtonX variant="default">
12
- Click Me
13
- </ButtonX>
14
-
15
- <ButtonX
16
- variant="default" // default | destructive | outline | secondary | ghost | link | elevated | filled | tonal | outlined | text | styled | reverted | dashed | gradient | soft | glass | success | warning | info | shine | pulse | violet | blue | green
17
- size="default" // default | sm | lg | icon
18
- align="middle" // left | middle | right
19
- effect="hoverUnderline" // expandIcon | ringHover | shine | shineHover | gooeyRight | gooeyLeft | underline | hoverUnderline | gradientSlideShow
20
- prefetch="intent" // none | intent | render | viewport
21
- nav="null" // null | navlink | anchor
22
- to="/"
23
- iconPlacement="left" // left | right
24
- icon={Icon}
25
- newTab={true}
26
- onClick={() => {}}
27
- className=""
28
- >
29
- Click Me
30
- </ButtonX>`,
31
- usage: `
32
- <ButtonX
33
- variant="default" // default | destructive | outline | secondary | ghost | link | elevated | filled | tonal | outlined | text | styled | reverted | dashed | gradient | soft | glass | success | warning | info | shine | pulse | violet | blue | green | Attract | Burger | Command | Copy
34
- size="default" // default | sm | lg | icon
35
- align="middle" // left | middle | right
36
- effect="hoverUnderline" // expandIcon | ringHover | shine | shineHover | gooeyRight | gooeyLeft | underline | hoverUnderline | gradientSlideShow
37
- prefetch="intent" // none | intent | render | viewport
38
- nav="null" // null | navlink | anchor
39
- to="/"
40
- iconPlacement="left" // left | right
41
- icon={Icon}
42
- newTab={true}
43
- asChild={false}
44
- type="button" // button | submit | reset
45
- onClick={() => {}}
46
- className=""
47
- particleCount={12} // for Attract variant
48
- attractRadius={50} // for Attract variant
49
- attractVariant="default" // default | violet | blue | green - for Attract variant
50
- activeText="Attracting" // for Attract variant
51
- inactiveText="Hover me" // for Attract variant
52
- content="text to copy" // for Copy variant
53
- delay={3000} // for Copy variant
54
- onCopy={(content) => {}} // for Copy variant
55
- isCopied={false} // for Copy variant
56
- onCopyChange={(isCopied) => {}} // for Copy variant
57
- >
58
- Click Me
59
- </ButtonX>`,
60
- premium: true,
61
- category: "Buttons",
62
- tags: ["ui", "components", "button", "interactive", "navigation", "advanced", "animated"],
63
- features: ["Responsive", "TypeScript", "Accessible", "Multiple Variants", "Navigation Support", "Loading States", "Advanced Effects", "Animated Variants", "Attract Button", "Command Button", "Copy Button"],
64
- dependencies: ["react", "class-variance-authority", "@radix-ui/react-slot", "@remix-run/react", "lucide-react", "motion/react", "~/components/catalyst-ui/utils"],
65
- props: {
66
- "ButtonX": [
67
- { name: "className", type: "string", default: "null" },
68
- { name: "variant", type: "default | destructive | outline | secondary | ghost | link | elevated | filled | tonal | outlined | text | styled | reverted | dashed | gradient | soft | glass | success | warning | info | shine | pulse | violet | blue | green | Attract | Burger | Command | Copy", default: "default" },
69
- { name: "effect", type: "expandIcon | ringHover | shine | shineHover | gooeyRight | gooeyLeft | underline | hoverUnderline | gradientSlideShow", default: "null" },
70
- { name: "size", type: "default | sm | lg | icon", default: "default" },
71
- { name: "align", type: "left | middle | right", default: "middle" },
72
- { name: "to", type: "string", default: "/" },
73
- { name: "prefetch", type: "none | intent | render | viewport", default: "intent" },
74
- { name: "nav", type: "null | navlink | anchor", default: "null" },
75
- { name: "newTab", type: "boolean", default: "true" },
76
- { name: "asChild", type: "boolean", default: "false" },
77
- { name: "icon", type: "icon function", default: "null" },
78
- { name: "iconPlacement", type: "left | right", default: "left" },
79
- { name: "onClick", type: "react function", default: "null" },
80
- { name: "type", type: "button | submit | reset", default: "button for navlink and anchor, submit for effect, defaults to submit" },
81
- { name: "particleCount", type: "number", default: "12" },
82
- { name: "attractRadius", type: "number", default: "50" },
83
- { name: "attractVariant", type: "default | violet | blue | green", default: "default" },
84
- { name: "activeText", type: "string", default: "Attracting" },
85
- { name: "inactiveText", type: "string", default: "Hover me" },
86
- { name: "content", type: "string", default: "null" },
87
- { name: "delay", type: "number", default: "3000" },
88
- { name: "onCopy", type: "function", default: "null" },
89
- { name: "isCopied", type: "boolean", default: "false" },
90
- { name: "onCopyChange", type: "function", default: "null" },
91
- ],
92
- "AttractButton": [
93
- { name: "particleCount", type: "number", default: "12" },
94
- { name: "attractRadius", type: "number", default: "50" },
95
- { name: "attractVariant", type: "default | violet | blue | green", default: "default" },
96
- { name: "icon", type: "React.ReactNode", default: "null" },
97
- { name: "activeText", type: "string", default: "Attracting" },
98
- { name: "inactiveText", type: "string", default: "Hover me" },
99
- { name: "className", type: "string", default: "null" },
100
- ],
101
- "CommandButton": [
102
- { name: "variant", type: "default | primary | secondary", default: "default" },
103
- { name: "size", type: "sm | default | lg", default: "default" },
104
- { name: "className", type: "string", default: "null" },
105
- { name: "children", type: "React.ReactNode", default: "null" },
106
- ],
107
- "CopyButton": [
108
- { name: "content", type: "string", default: "null" },
109
- { name: "className", type: "string", default: "null" },
110
- { name: "size", type: "default | sm | lg | icon", default: "default" },
111
- { name: "variant", type: "default | destructive | outline | secondary | ghost | link", default: "default" },
112
- { name: "delay", type: "number", default: "3000" },
113
- { name: "onClick", type: "function", default: "null" },
114
- { name: "onCopy", type: "function", default: "null" },
115
- { name: "isCopied", type: "boolean", default: "false" },
116
- { name: "onCopyChange", type: "function", default: "null" },
117
- ],
118
- "FloatButton": [
119
- { name: "icon", type: "React.ReactNode", default: "null" },
120
- { name: "description", type: "string", default: "null" },
121
- { name: "tooltip", type: "string", default: "null" },
122
- { name: "type", type: "default | primary", default: "default" },
123
- { name: "shape", type: "circle | square", default: "circle" },
124
- { name: "size", type: "small | default | large", default: "default" },
125
- { name: "className", type: "string", default: "null" },
126
- { name: "onClick", type: "function", default: "null" },
127
- { name: "children", type: "React.ReactNode", default: "null" },
128
- ],
129
- "FlipButton": [
130
- { name: "frontText", type: "string", default: "null" },
131
- { name: "backText", type: "string", default: "null" },
132
- { name: "transition", type: "Transition", default: "{ type: 'spring', stiffness: 280, damping: 20 }" },
133
- { name: "className", type: "string", default: "null" },
134
- { name: "frontClassName", type: "string", default: "null" },
135
- { name: "backClassName", type: "string", default: "null" },
136
- { name: "from", type: "top | bottom | left | right", default: "top" },
137
- ],
138
- "HoldButton": [
139
- { name: "holdDuration", type: "number", default: "3000" },
140
- { name: "onComplete", type: "function", default: "null" },
141
- { name: "icon", type: "React.ReactNode", default: "null" },
142
- { name: "holdText", type: "string", default: "Hold me" },
143
- { name: "releaseText", type: "string", default: "Release" },
144
- { name: "holdVariant", type: "red | green | blue | orange | grey", default: "red" },
145
- { name: "className", type: "string", default: "null" },
146
- { name: "disabled", type: "boolean", default: "false" },
147
- ],
148
- "LiquidButton": [
149
- { name: "className", type: "string", default: "null" },
150
- { name: "variant", type: "default | destructive | outline | secondary | ghost | link", default: "default" },
151
- { name: "size", type: "default | sm | lg | icon", default: "default" },
152
- ],
153
- "ParticleButton": [
154
- { name: "children", type: "React.ReactNode", default: "null" },
155
- { name: "onClick", type: "function", default: "null" },
156
- { name: "onSuccess", type: "function", default: "null" },
157
- { name: "successDuration", type: "number", default: "1000" },
158
- { name: "particleCount", type: "number | low | high", default: "6" },
159
- { name: "showIcon", type: "boolean", default: "true" },
160
- { name: "icon", type: "React.ReactNode", default: "null" },
161
- { name: "variant", type: "default | destructive | outline | secondary | ghost | link", default: "default" },
162
- { name: "size", type: "default | sm | lg | icon", default: "default" },
163
- { name: "align", type: "left | middle | right", default: "middle" },
164
- { name: "className", type: "string", default: "null" },
165
- { name: "disabled", type: "boolean", default: "false" },
166
- ],
167
- "RippleButton": [
168
- { name: "children", type: "React.ReactNode", default: "null" },
169
- { name: "onClick", type: "function", default: "null" },
170
- { name: "className", type: "string", default: "null" },
171
- { name: "rippleClassName", type: "string", default: "null" },
172
- { name: "variant", type: "default | destructive | outline | secondary | ghost", default: "default" },
173
- { name: "size", type: "default | sm | lg | icon", default: "default" },
174
- { name: "scale", type: "number", default: "10" },
175
- { name: "transition", type: "Transition", default: "{ duration: 0.6, ease: 'easeOut' }" },
176
- ],
177
- "SocialButton": [
178
- { name: "shareButtons", type: "ShareButton[]", default: "[{ icon: Twitter, label: 'Share on Twitter' }, ...]" },
179
- { name: "label", type: "string", default: "Hover me" },
180
- { name: "icon", type: "React.ReactNode", default: "null" },
181
- { name: "variant", type: "light | dark | outline", default: "light" },
182
- { name: "className", type: "string", default: "null" },
183
- ],
184
- "SplitButton": [
185
- { name: "label", type: "string", default: "null" },
186
- { name: "icon", type: "React.ReactNode", default: "null" },
187
- { name: "items", type: "SplitButtonItem[]", default: "[]" },
188
- { name: "onClick", type: "function", default: "null" },
189
- { name: "className", type: "string", default: "null" },
190
- { name: "containerClassName", type: "string", default: "null" },
191
- { name: "variant", type: "default | destructive | outline | secondary | ghost", default: "default" },
192
- { name: "align", type: "left | middle | right", default: "default" },
193
- { name: "size", type: "default | sm | lg | icon", default: "sm" },
194
- { name: "children", type: "React.ReactNode", default: "null" },
195
- ],
196
- "SwitchButton": [
197
- { name: "checked", type: "boolean", default: "false" },
198
- { name: "onCheckedChange", type: "function", default: "null" },
199
- { name: "className", type: "string", default: "null" },
200
- { name: "variant", type: "default | primary | secondary | destructive", default: "default" },
201
- { name: "size", type: "sm | md | lg", default: "md" },
202
- { name: "disabled", type: "boolean", default: "false" },
203
- { name: "labels", type: "{ checked: string; unchecked: string }", default: "null" },
204
- ],
205
- "ToggleButton": [
206
- { name: "checked", type: "boolean", default: "false" },
207
- { name: "onChange", type: "function", default: "null" },
208
- { name: "disabled", type: "boolean", default: "false" },
209
- { name: "className", type: "string", default: "null" },
210
- { name: "variant", type: "default | outline | ghost", default: "default" },
211
- { name: "size", type: "sm | md | lg | icon", default: "md" },
212
- { name: "children", type: "React.ReactNode", default: "null" },
213
- ],
214
- "SlideButton": [
215
- { name: "className", type: "string", default: "null" },
216
- { name: "variant", type: "default | ghost", default: "default" },
217
- { name: "size", type: "sm | default | lg", default: "default" },
218
- { name: "text", type: "string", default: "Browse Components" },
219
- { name: "hoverText", type: "string", default: "null" },
220
- { name: "to", type: "string", default: "/" },
221
- { name: "prefetch", type: "none | intent | render | viewport", default: "intent" },
222
- ],
223
- "TextRevealButton": [
224
- { name: "text", type: "string", default: "shadcn.io" },
225
- { name: "revealColor", type: "string", default: "#37FF8B" },
226
- { name: "strokeColor", type: "string", default: "rgba(100, 100, 100, 0.7)" },
227
- { name: "className", type: "string", default: "null" },
228
- { name: "style", type: "React.CSSProperties", default: "null" },
229
- ],
230
- "ShimmerButton": [
231
- { name: "shimmerColor", type: "string", default: "#ffffff" },
232
- { name: "shimmerSize", type: "string", default: "0.05em" },
233
- { name: "shimmerDuration", type: "string", default: "3s" },
234
- { name: "borderRadius", type: "string", default: "100px" },
235
- { name: "background", type: "string", default: "rgba(0, 0, 0, 1)" },
236
- { name: "className", type: "string", default: "null" },
237
- { name: "children", type: "React.ReactNode", default: "null" },
238
- ],
239
- "Rating": [
240
- { name: "value", type: "number", default: "null" },
241
- { name: "onValueChange", type: "function", default: "null" },
242
- { name: "defaultValue", type: "number", default: "0" },
243
- { name: "onChange", type: "function", default: "null" },
244
- { name: "readOnly", type: "boolean", default: "false" },
245
- { name: "className", type: "string", default: "null" },
246
- { name: "children", type: "React.ReactNode", default: "null" },
247
- ],
248
- "RatingButton": [
249
- { name: "index", type: "number", default: "null" },
250
- { name: "size", type: "number", default: "20" },
251
- { name: "className", type: "string", default: "null" },
252
- { name: "icon", type: "React.ReactNode", default: "<StarIcon />" },
253
- ],
254
- "InputButtonProvider": [
255
- { name: "className", type: "string", default: "null" },
256
- { name: "transition", type: "Transition", default: "{ type: 'spring', stiffness: 300, damping: 20 }" },
257
- { name: "showInput", type: "boolean", default: "null" },
258
- { name: "setShowInput", type: "function", default: "null" },
259
- { name: "id", type: "string", default: "null" },
260
- { name: "children", type: "React.ReactNode", default: "null" },
261
- ],
262
- "InputButton": [
263
- { name: "className", type: "string", default: "null" },
264
- ],
265
- "InputButtonAction": [
266
- { name: "className", type: "string", default: "null" },
267
- ],
268
- "InputButtonSubmit": [
269
- { name: "className", type: "string", default: "null" },
270
- { name: "children", type: "React.ReactNode", default: "null" },
271
- { name: "icon", type: "React.ElementType", default: "ArrowRight" },
272
- ],
273
- "InputButtonInput": [
274
- { name: "className", type: "string", default: "null" },
275
- ],
276
- },
277
- desc: "An advanced button component collection with 20+ specialized button variants including Attract, Command, Copy, Float, Flip, Hold, Liquid, Particle, Ripple, Social, Split, Switch, Toggle, Slide, TextReveal, Shimmer, Rating, and InputButton variants. Features animations, particle effects, hover states, and complex interactions.",
278
- status: "Listed",
279
- lastUpdated: "2024-11-30T00:00:00Z"
280
- },
281
- {
282
- name: "Bg Animate Button",
283
- value: "bg-animate-button",
284
- importPath: "~/components/catalyst-ui",
285
- multiImport: "BgAnimateButton",
286
- path: "/components/catalyst-ui/expandables/bg-animate-button.tsx",
287
- source: null,
288
- usagePath: "/components/catalyst-ui/expandables/bg-animate-button.tsx",
289
- basicusage: `
290
- <BgAnimateButton>
291
- Button
292
- </BgAnimateButton>
293
-
294
- <BgAnimateButton
295
- variant="primary"
296
- size="default"
297
- showBackground={false}
298
- rounded="full"
299
- shadow="soft"
300
- gradient="forest"
301
- animation="spin"
302
- className=""
303
- asChild={false}
304
- >
305
- Button
306
- </BgAnimateButton>`,
307
- usage: `
308
- <BgAnimateButton
309
- variant="primary"
310
- size="default"
311
- showBackground={false}
312
- rounded="full"
313
- shadow="soft"
314
- gradient="forest"
315
- animation="spin"
316
- className=""
317
- asChild={false}
318
- >
319
- Button
320
- </BgAnimateButton>`,
321
- premium: true,
322
- category: "Expandables",
323
- tags: ["ui", "components", "button", "animated", "gradient", "interactive"],
324
- features: ["Responsive", "TypeScript", "Accessible", "Animations", "Gradients", "Customizable"],
325
- dependencies: ["react", "@radix-ui/react-slot", "class-variance-authority"],
326
- props: {
327
- "BgAnimateButton": [
328
- { name: "variant", type: "primary | success | secondary | destructive | ghost", default: "'primary'" },
329
- { name: "size", type: "sm | default | lg", default: "'default'" },
330
- { name: "showBackground", type: "boolean", default: "false" },
331
- { name: "rounded", type: "full | xl | 2xl | 3xl | sm | xs | base", default: "'full'" },
332
- { name: "shadow", type: "flat | soft | base | deep | deeper", default: "'soft'" },
333
- { name: "gradient", type: "sunrise | ocean | candy | default | forest | sunset | nebula", default: "null" },
334
- { name: "animation", type: "spin | pulse | spin-slow | spin-fast", default: "null" },
335
- { name: "className", type: "string", default: "null" },
336
- { name: "asChild", type: "boolean", default: "false" },
337
- ],
338
- },
339
- desc: null,
340
- status: "Listed",
341
- lastUpdated: "2024-12-29T15:30:00Z"
342
- },
343
- {
344
- name: "Rating Button 1",
345
- value: "rating-button-1",
346
- importPath: "~/components/catalyst-ui/buttons/rating-button-1",
347
- multiImport: "Rating1, RatingButton1",
348
- basicusage: `
349
- <Rating1 defaultValue={3}>
350
- {Array.from({ length: 5 }).map((_, index) => (
351
- <RatingButton1 key={index} />
352
- ))}
353
- </Rating1>
354
-
355
- <Rating1
356
- defaultValue={0}
357
- value={3}
358
- onChange={(event, value) => console.log(value)}
359
- onValueChange={(value) => console.log(value)}
360
- readOnly={false}
361
- className=""
362
- >
363
- {Array.from({ length: 5 }).map((_, index) => (
364
- <RatingButton1
365
- key={index}
366
- index={index}
367
- size={20}
368
- icon={<StarIcon />}
369
- className=""
370
- />
371
- ))}
372
- </Rating1>`,
373
- path: "/components/catalyst-ui/buttons/rating-button-1.tsx",
374
- source: null,
375
- usagePath: "/components/catalyst-ui/buttons/rating-button-1.tsx",
376
- usage: null,
377
- premium: true,
378
- category: "Buttons",
379
- tags: ["buttons", "rating", "stars", "interactive", "input", "feedback"],
380
- features: ["Responsive", "TypeScript", "Accessible", "Keyboard Navigation", "Custom Icons", "Read-only Mode", "Hover Effects"],
381
- dependencies: ["lucide-react", "react", "@radix-ui/react-use-controllable-state"],
382
- props: {
383
- "Rating1": [
384
- { name: "defaultValue", type: "number", default: "0" },
385
- { name: "value", type: "number", default: "null" },
386
- { name: "onChange", type: "(event, value: number) => void", default: "null" },
387
- { name: "onValueChange", type: "(value: number) => void", default: "null" },
388
- { name: "readOnly", type: "boolean", default: "false" },
389
- { name: "className", type: "string", default: "null" },
390
- { name: "children", type: "ReactNode", default: "null" },
391
- ],
392
- "RatingButton1": [
393
- { name: "index", type: "number", default: "null" },
394
- { name: "size", type: "number", default: "20" },
395
- { name: "icon", type: "ReactElement<LucideProps>", default: "<StarIcon />" },
396
- { name: "className", type: "string", default: "null" },
397
- ],
398
- },
399
- desc: null,
400
- status: null,
401
- lastUpdated: null
402
- },
403
- {
404
- // @dev app/components/catalyst-ui/buttons/theme-toggle-button.tsx:6
405
- name: "Theme Toggle Button",
406
- value: "theme-toggle-button",
407
- importPath: "~/components/catalyst-ui/buttons/theme-toggle-button",
408
- multiImport: "ThemeToggleButton, useThemeTransition",
409
- basicusage: `
410
- <ThemeToggleButton theme="light" onClick={() => {}} />
411
-
412
- <ThemeToggleButton
413
- theme="light"
414
- showLabel={false}
415
- variant="circle"
416
- start="center"
417
- url=""
418
- className=""
419
- onClick={() => {}}
420
- />`,
421
- path: "/components/catalyst-ui/buttons/theme-toggle-button.tsx",
422
- source: null,
423
- usagePath: "/components/catalyst-ui/buttons/theme-toggle-button.tsx",
424
- usage: null,
425
- premium: true,
426
- category: "Buttons",
427
- tags: ["buttons", "theme", "toggle", "dark mode", "animated", "transition"],
428
- features: ["Responsive", "TypeScript", "Accessible", "Animated", "View Transitions API", "Multiple Variants", "Custom Positions"],
429
- dependencies: ["lucide-react", "react"],
430
- props: {
431
- "ThemeToggleButton": [
432
- { name: "theme", type: "light | dark", default: "light" },
433
- { name: "showLabel", type: "boolean", default: "false" },
434
- { name: "variant", type: "circle | circle-blur | gif | polygon", default: "circle" },
435
- { name: "start", type: "center | top-left | top-right | bottom-left | bottom-right", default: "center" },
436
- { name: "url", type: "string", default: "null" },
437
- { name: "className", type: "string", default: "null" },
438
- { name: "onClick", type: "() => void", default: "null" },
439
- ],
440
- },
441
- desc: null,
442
- status: null,
443
- lastUpdated: null
444
- },
445
- {
446
- // @dev app/components/catalyst-ui/buttons/theme-switcher.tsx:6
447
- name: "Theme Switcher",
448
- value: "theme-switcher",
449
- importPath: "~/components/catalyst-ui/buttons/theme-switcher",
450
- multiImport: null,
451
- basicusage: `
452
- <ThemeSwitcher />
453
-
454
- <ThemeSwitcher
455
- value="system"
456
- onChange={(theme) => console.log(theme)}
457
- defaultValue="system"
458
- className=""
459
- />`,
460
- path: "/components/catalyst-ui/buttons/theme-switcher.tsx",
461
- source: null,
462
- usagePath: "/components/catalyst-ui/buttons/theme-switcher.tsx",
463
- usage: null,
464
- premium: true,
465
- category: "Buttons",
466
- tags: ["buttons", "theme", "switcher", "dark mode", "light mode", "toggle"],
467
- features: ["Responsive", "TypeScript", "Accessible", "Animated", "Theme Control", "System Theme Support"],
468
- dependencies: ["motion/react", "lucide-react", "react", "@radix-ui/react-use-controllable-state"],
469
- props: {
470
- "ThemeSwitcher": [
471
- { name: "value", type: "light | dark | system", default: "null" },
472
- { name: "onChange", type: "(theme: light | dark | system) => void", default: "null" },
473
- { name: "defaultValue", type: "light | dark | system", default: "system" },
474
- { name: "className", type: "string", default: "null" },
475
- ],
476
- },
477
- desc: null,
478
- status: null,
479
- lastUpdated: null
480
- },
481
- {
482
- // @dev app/components/catalyst-ui/buttons/text-reveal-button.tsx:6
483
- name: "Text Reveal Button",
484
- value: "text-reveal-button",
485
- importPath: "~/components/catalyst-ui/buttons/text-reveal-button",
486
- multiImport: null,
487
- basicusage: `
488
- <TextRevealButton text="HOVER ME" />
489
-
490
- <TextRevealButton
491
- text="shadcn.io"
492
- revealColor="#37FF8B"
493
- strokeColor="rgba(100, 100, 100, 0.7)"
494
- className=""
495
- style={{}}
496
- />`,
497
- path: "/components/catalyst-ui/buttons/text-reveal-button.tsx",
498
- source: null,
499
- usagePath: "/components/catalyst-ui/buttons/text-reveal-button.tsx",
500
- usage: null,
501
- premium: true,
502
- category: "Buttons",
503
- tags: ["buttons", "animated", "text", "reveal", "hover", "effect"],
504
- features: ["Responsive", "TypeScript", "Accessible", "Animated", "Text Reveal Effect", "Customizable Colors"],
505
- dependencies: ["react"],
506
- props: {
507
- "TextRevealButton": [
508
- { name: "text", type: "string", default: "shadcn.io" },
509
- { name: "revealColor", type: "string", default: "#37FF8B" },
510
- { name: "strokeColor", type: "string", default: "rgba(100, 100, 100, 0.7)" },
511
- { name: "className", type: "string", default: "null" },
512
- { name: "style", type: "React.CSSProperties", default: "null" },
513
- ],
514
- },
515
- desc: null,
516
- status: null,
517
- lastUpdated: null
518
- },
519
- {
520
- // @dev app/components/catalyst-ui/buttons/ripple-button.tsx:6
521
- name: "Ripple Button",
522
- value: "ripple-button",
523
- importPath: "~/components/catalyst-ui/buttons/ripple-button",
524
- multiImport: null,
525
- basicusage: `
526
- <RippleButton>
527
- Click me
528
- </RippleButton>
529
-
530
- <RippleButton
531
- variant="default"
532
- size="default"
533
- scale={10}
534
- transition={{ duration: 0.6, ease: 'easeOut' }}
535
- rippleClassName=""
536
- className=""
537
- onClick={(e) => console.log('clicked')}
538
- >
539
- Click me
540
- </RippleButton>`,
541
- path: "/components/catalyst-ui/buttons/ripple-button.tsx",
542
- source: null,
543
- usagePath: "/components/catalyst-ui/buttons/ripple-button.tsx",
544
- usage: null,
545
- premium: true,
546
- category: "Buttons",
547
- tags: ["buttons", "animated", "ripple", "effect", "interactive"],
548
- features: ["Responsive", "TypeScript", "Accessible", "Animated", "Ripple Effect", "Customizable"],
549
- dependencies: ["motion/react", "react", "class-variance-authority"],
550
- props: {
551
- "RippleButton": [
552
- { name: "variant", type: "default | destructive | outline | secondary | ghost", default: "default" },
553
- { name: "size", type: "default | sm | lg | icon", default: "default" },
554
- { name: "scale", type: "number", default: "10" },
555
- { name: "transition", type: "Transition", default: "{ duration: 0.6, ease: 'easeOut' }" },
556
- { name: "rippleClassName", type: "string", default: "null" },
557
- { name: "className", type: "string", default: "null" },
558
- { name: "onClick", type: "(event: React.MouseEvent<HTMLButtonElement>) => void", default: "null" },
559
- { name: "children", type: "ReactNode", default: "null" },
560
- ],
561
- },
562
- desc: null,
563
- status: null,
564
- lastUpdated: null
565
- },
566
- {
567
- // @dev app/components/catalyst-ui/buttons/rating-button.tsx:6
568
- name: "Rating",
569
- value: "rating",
570
- importPath: "~/components/catalyst-ui/buttons/rating-button",
571
- multiImport: "Rate, RatingButton",
572
- basicusage: `
573
- <Rate defaultValue={3}>
574
- {Array.from({ length: 5 }).map((_, index) => (
575
- <RatingButton key={index} />
576
- ))}
577
- </Rate>
578
-
579
- <Rate
580
- defaultValue={0}
581
- value={3}
582
- onChange={(event, value) => console.log(value)}
583
- onValueChange={(value) => console.log(value)}
584
- readOnly={false}
585
- className=""
586
- >
587
- {Array.from({ length: 5 }).map((_, index) => (
588
- <RatingButton
589
- key={index}
590
- index={index}
591
- size={20}
592
- icon={<StarIcon />}
593
- className=""
594
- />
595
- ))}
596
- </Rate>`,
597
- path: "/components/catalyst-ui/buttons/rating-button.tsx",
598
- source: null,
599
- usagePath: "/components/catalyst-ui/buttons/rating-button.tsx",
600
- usage: null,
601
- premium: true,
602
- category: "Buttons",
603
- tags: ["buttons", "rating", "stars", "interactive", "input"],
604
- features: ["Responsive", "TypeScript", "Accessible", "Keyboard Navigation", "Custom Icons", "Read-only Mode"],
605
- dependencies: ["lucide-react", "react", "@radix-ui/react-use-controllable-state"],
606
- props: {
607
- "Rate": [
608
- { name: "defaultValue", type: "number", default: "0" },
609
- { name: "value", type: "number", default: "null" },
610
- { name: "onChange", type: "(event, value: number) => void", default: "null" },
611
- { name: "onValueChange", type: "(value: number) => void", default: "null" },
612
- { name: "readOnly", type: "boolean", default: "false" },
613
- { name: "className", type: "string", default: "null" },
614
- { name: "children", type: "ReactNode", default: "null" },
615
- ],
616
- "RatingButton": [
617
- { name: "index", type: "number", default: "null" },
618
- { name: "size", type: "number", default: "20" },
619
- { name: "icon", type: "ReactElement<LucideProps>", default: "<StarIcon />" },
620
- { name: "className", type: "string", default: "null" },
621
- ],
622
- },
623
- desc: null,
624
- status: null,
625
- lastUpdated: null
626
- },
627
- {
628
- // @dev app/components/catalyst-ui/buttons/liquid-button.tsx:6
629
- name: "Liquid Button",
630
- value: "liquid-button",
631
- importPath: "~/components/catalyst-ui/buttons/liquid-button",
632
- multiImport: null,
633
- basicusage: `
634
- <LiquidButton>
635
- Click me
636
- </LiquidButton>
637
-
638
- <LiquidButton
639
- variant="default"
640
- size="default"
641
- className=""
642
- >
643
- Click me
644
- </LiquidButton>`,
645
- path: "/components/catalyst-ui/buttons/liquid-button.tsx",
646
- source: null,
647
- usagePath: "/components/catalyst-ui/buttons/liquid-button.tsx",
648
- usage: null,
649
- premium: true,
650
- category: "Buttons",
651
- tags: ["buttons", "animated", "hover", "liquid", "fill"],
652
- features: ["Responsive", "TypeScript", "Accessible", "Animated", "Liquid Fill Effect", "Customizable"],
653
- dependencies: ["motion/react", "react", "class-variance-authority"],
654
- props: {
655
- "LiquidButton": [
656
- { name: "variant", type: "default | outline | secondary", default: "default" },
657
- { name: "size", type: "default | sm | lg | icon", default: "default" },
658
- { name: "className", type: "string", default: "null" },
659
- ],
660
- },
661
- desc: null,
662
- status: null,
663
- lastUpdated: null
664
- },
665
- {
666
- // @dev app/components/catalyst-ui/buttons/input-button.tsx:6
667
- name: "Input Button",
668
- value: "input-button",
669
- importPath: "~/components/catalyst-ui/buttons/input-button",
670
- multiImport: "InputButton, InputButtonProvider, InputButtonAction, InputButtonSubmit, InputButtonInput",
671
- basicusage: `
672
- <InputButtonProvider>
673
- <InputButton>
674
- <InputButtonAction>Click me</InputButtonAction>
675
- <InputButtonInput placeholder="Enter text" />
676
- <InputButtonSubmit>Submit</InputButtonSubmit>
677
- </InputButton>
678
- </InputButtonProvider>
679
-
680
- <InputButtonProvider
681
- showInput={false}
682
- setShowInput={() => {}}
683
- transition={{ type: 'spring', stiffness: 300, damping: 20 }}
684
- id=""
685
- className=""
686
- >
687
- <InputButton className="">
688
- <InputButtonAction className="">Click me</InputButtonAction>
689
- <InputButtonInput
690
- type="text"
691
- placeholder="Enter text"
692
- className=""
693
- />
694
- <InputButtonSubmit
695
- icon={ArrowRight}
696
- className=""
697
- >
698
- Submit
699
- </InputButtonSubmit>
700
- </InputButton>
701
- </InputButtonProvider>`,
702
- path: "/components/catalyst-ui/buttons/input-button.tsx",
703
- source: null,
704
- usagePath: "/components/catalyst-ui/buttons/input-button.tsx",
705
- usage: null,
706
- premium: true,
707
- category: "Buttons",
708
- tags: ["buttons", "input", "animated", "expandable", "form"],
709
- features: ["Responsive", "TypeScript", "Accessible", "Animated", "Expandable", "Customizable"],
710
- dependencies: ["motion/react", "lucide-react", "react"],
711
- props: {
712
- "InputButtonProvider": [
713
- { name: "showInput", type: "boolean", default: "null" },
714
- { name: "setShowInput", type: "React.Dispatch<React.SetStateAction<boolean>>", default: "null" },
715
- { name: "transition", type: "Transition", default: "{ type: 'spring', stiffness: 300, damping: 20 }" },
716
- { name: "id", type: "string", default: "null" },
717
- { name: "className", type: "string", default: "null" },
718
- ],
719
- "InputButton": [
720
- { name: "className", type: "string", default: "null" },
721
- ],
722
- "InputButtonAction": [
723
- { name: "className", type: "string", default: "null" },
724
- ],
725
- "InputButtonSubmit": [
726
- { name: "icon", type: "React.ElementType", default: "ArrowRight" },
727
- { name: "className", type: "string", default: "null" },
728
- { name: "children", type: "ReactNode", default: "null" },
729
- ],
730
- "InputButtonInput": [
731
- { name: "type", type: "string", default: "text" },
732
- { name: "placeholder", type: "string", default: "null" },
733
- { name: "className", type: "string", default: "null" },
734
- ],
735
- },
736
- desc: null,
737
- status: null,
738
- lastUpdated: null
739
- },
740
- {
741
- // @dev app/components/catalyst-ui/buttons/copy-button.tsx:6
742
- name: "Copy Button",
743
- value: "copy-button",
744
- importPath: "~/components/catalyst-ui/buttons/copy-button",
745
- multiImport: null,
746
- basicusage: `
747
- <CopyButton content="Text to copy" />
748
-
749
- <CopyButton
750
- content="Text to copy"
751
- variant="default"
752
- size="default"
753
- delay={3000}
754
- onCopy={(content) => console.log(content)}
755
- isCopied={false}
756
- onCopyChange={(isCopied) => console.log(isCopied)}
757
- className=""
758
- />`,
759
- path: "/components/catalyst-ui/buttons/copy-button.tsx",
760
- source: null,
761
- usagePath: "/components/catalyst-ui/buttons/copy-button.tsx",
762
- usage: null,
763
- premium: true,
764
- category: "Buttons",
765
- tags: ["buttons", "copy", "clipboard", "animated", "icon"],
766
- features: ["Responsive", "TypeScript", "Accessible", "Animated", "Clipboard API", "Feedback"],
767
- dependencies: ["motion/react", "lucide-react", "react", "class-variance-authority"],
768
- props: {
769
- "CopyButton": [
770
- { name: "content", type: "string", default: "null" },
771
- { name: "variant", type: "default | muted | destructive | outline | secondary | ghost", default: "default" },
772
- { name: "size", type: "default | sm | md | lg", default: "default" },
773
- { name: "delay", type: "number", default: "3000" },
774
- { name: "onCopy", type: "(content: string) => void", default: "null" },
775
- { name: "isCopied", type: "boolean", default: "null" },
776
- { name: "onCopyChange", type: "(isCopied: boolean) => void", default: "null" },
777
- { name: "className", type: "string", default: "null" },
778
- ],
779
- },
780
- desc: null,
781
- status: null,
782
- lastUpdated: null
783
- },
784
- {
785
- // @dev app/components/catalyst-ui/buttons/flip-button.tsx:6
786
- name: "Flip Button",
787
- value: "flip-button",
788
- importPath: "~/components/catalyst-ui/buttons/flip-button",
789
- multiImport: null,
790
- basicusage: `
791
- <FlipButton
792
- frontText="Hover Me"
793
- backText="Clicked!"
794
- />
795
-
796
- <FlipButton
797
- frontText="Hover Me"
798
- backText="Clicked!"
799
- from="top"
800
- transition={{ type: 'spring', stiffness: 280, damping: 20 }}
801
- className=""
802
- frontClassName=""
803
- backClassName=""
804
- />`,
805
- path: "/components/catalyst-ui/buttons/flip-button.tsx",
806
- source: null,
807
- usagePath: "/components/catalyst-ui/buttons/flip-button.tsx",
808
- usage: null,
809
- premium: true,
810
- category: "Buttons",
811
- tags: ["buttons", "animated", "flip", "hover", "3d"],
812
- features: ["Responsive", "TypeScript", "Accessible", "Animated", "3D Transform", "Customizable"],
813
- dependencies: ["motion/react", "react"],
814
- props: {
815
- "FlipButton": [
816
- { name: "frontText", type: "string", default: "null" },
817
- { name: "backText", type: "string", default: "null" },
818
- { name: "from", type: "top | bottom | left | right", default: "top" },
819
- { name: "transition", type: "Transition", default: "{ type: 'spring', stiffness: 280, damping: 20 }" },
820
- { name: "className", type: "string", default: "null" },
821
- { name: "frontClassName", type: "string", default: "null" },
822
- { name: "backClassName", type: "string", default: "null" },
823
- ],
824
- },
825
- desc: null,
826
- status: null,
827
- lastUpdated: null
828
- },
829
- {
830
- // @dev app/components/catalyst-ui/buttons/shimmer-button.tsx:6
831
- name: "Shimmer Button",
832
- value: "shimmer-button",
833
- importPath: "~/components/catalyst-ui/buttons/shimmer-button",
834
- multiImport: null,
835
- basicusage: `
836
- <ShimmerButton>
837
- Button Text
838
- </ShimmerButton>
839
-
840
- <ShimmerButton
841
- shimmerColor="#ffffff"
842
- shimmerSize="0.05em"
843
- borderRadius="100px"
844
- shimmerDuration="3s"
845
- background="rgba(0, 0, 0, 1)"
846
- className=""
847
- >
848
- Custom Button
849
- </ShimmerButton>`,
850
- path: "/components/catalyst-ui/buttons/shimmer-button.tsx",
851
- source: null,
852
- usagePath: "/components/catalyst-ui/buttons/shimmer-button.tsx",
853
- usage: null,
854
- premium: true,
855
- category: "Buttons",
856
- tags: ["button", "shimmer", "animation", "effects"],
857
- features: ["TypeScript", "Animated", "Customizable"],
858
- dependencies: ["react"],
859
- props: {
860
- "ShimmerButton": [
861
- { name: "shimmerColor", type: "string", default: "#ffffff" },
862
- { name: "shimmerSize", type: "string", default: "0.05em" },
863
- { name: "borderRadius", type: "string", default: "100px" },
864
- { name: "shimmerDuration", type: "string", default: "3s" },
865
- { name: "background", type: "string", default: "rgba(0, 0, 0, 1)" },
866
- { name: "className", type: "string", default: "null" },
867
- { name: "children", type: "React.ReactNode", default: "null" },
868
- ],
869
- },
870
- desc: null,
871
- status: null,
872
- lastUpdated: null
873
- },
874
- {
875
- // @dev app/components/catalyst-ui/buttons/animated-theme-toggler.tsx:6
876
- name: "Animated Theme Toggler",
877
- value: "animated-theme-toggler",
878
- importPath: "~/components/catalyst-ui/buttons/animated-theme-toggler",
879
- multiImport: null,
880
- basicusage: `
881
- <AnimatedThemeToggler />
882
-
883
- <AnimatedThemeToggler
884
- duration={400}
885
- className="p-2 rounded-lg"
886
- onClick={() => console.log('Theme toggled')}
887
- />`,
888
- path: "/components/catalyst-ui/buttons/animated-theme-toggler.tsx",
889
- source: null,
890
- usagePath: "/components/catalyst-ui/buttons/animated-theme-toggler.tsx",
891
- usage: null,
892
- premium: true,
893
- category: "Buttons",
894
- tags: ["theme", "animation", "toggle", "dark-mode"],
895
- features: ["View Transitions", "Smooth Animation", "Accessible", "TypeScript"],
896
- dependencies: ["lucide-react", "react", "react-dom"],
897
- props: {
898
- "AnimatedThemeToggler": [
899
- { name: "className", type: "string", default: "null" },
900
- { name: "duration", type: "number", default: "400" },
901
- { name: "onClick", type: "React.MouseEventHandler", default: "null" }
902
- ]
903
- },
904
- desc: null,
905
- status: null,
906
- lastUpdated: null
907
- },
908
- {
909
- // @dev app/components/catalyst-ui/buttons/attract-button.tsx:6
910
- name: "Attract Button",
911
- value: "attract-button",
912
- importPath: "~/components/catalyst-ui/buttons/attract-button",
913
- multiImport: null,
914
- basicusage: `
915
- <AttractButton>
916
- Attract Me
917
- </AttractButton>
918
-
919
- <AttractButton
920
- variant="primary"
921
- size="lg"
922
- particleCount={20}
923
- particleColors={['#ff6b6b', '#4ecdc4']}
924
- attractionStrength={0.15}
925
- onClick={() => console.log('Clicked')}
926
- disabled={false}
927
- className=""
928
- >
929
- Custom Attraction
930
- </AttractButton>`,
931
- path: "/components/catalyst-ui/buttons/attract-button.tsx",
932
- source: null,
933
- usagePath: "/components/catalyst-ui/buttons/attract-button.tsx",
934
- usage: null,
935
- premium: true,
936
- category: "Buttons",
937
- tags: ["ui", "components", "effects", "animation", "button", "particles", "attract", "interactive", "physics"],
938
- features: ["Responsive", "TypeScript", "Customizable", "Animated", "Interactive", "Particle System", "Physics", "Magnetic Effect"],
939
- dependencies: ["react"],
940
- props: {
941
- "AttractButton": [
942
- { name: "children", type: "React.ReactNode", default: "null" },
943
- { name: "className", type: "string", default: "null" },
944
- { name: "variant", type: "'default' | 'primary' | 'secondary' | 'destructive'", default: "'default'" },
945
- { name: "size", type: "'sm' | 'md' | 'lg'", default: "'md'" },
946
- { name: "particleCount", type: "number", default: "15" },
947
- { name: "particleColors", type: "string[]", default: "['#ff6b6b', '#4ecdc4', '#45b7d1', '#96ceb4', '#feca57']" },
948
- { name: "attractionStrength", type: "number", default: "0.1" },
949
- { name: "onClick", type: "(event: React.MouseEvent<HTMLButtonElement>) => void", default: "null" },
950
- { name: "disabled", type: "boolean", default: "false" }
951
- ]
952
- },
953
- desc: null,
954
- status: null,
955
- lastUpdated: null
956
- },
957
- {
958
- // @dev app/components/catalyst-ui/buttons/slide-button.tsx:6
959
- name: "Slide Button",
960
- value: "slide-button",
961
- importPath: "~/components/catalyst-ui/buttons/slide-button",
962
- multiImport: null,
963
- basicusage: `<SlideButton
964
- text="Browse Components"
965
- to="/"
966
- />
967
-
968
- <SlideButton
969
- variant="default"
970
- size="default"
971
- text="Browse Components"
972
- hoverText="View All"
973
- to="/"
974
- prefetch="intent"
975
- className=""
976
- />`,
977
- path: "/components/catalyst-ui/buttons/slide-button.tsx",
978
- source: null,
979
- usagePath: "/components/catalyst-ui/buttons/slide-button.tsx",
980
- usage: null,
981
- premium: true,
982
- category: "Buttons",
983
- tags: ["ui", "components", "interactive", "button", "link", "animation", "text"],
984
- features: ["Responsive", "TypeScript", "Accessible", "Animated", "Dark Mode"],
985
- dependencies: ["react", "class-variance-authority", "@remix-run/react"],
986
- props: {
987
- "SlideButton": [
988
- { name: "className", type: "string", default: "null" },
989
- { name: "variant", type: "default | ghost", default: "default" },
990
- { name: "size", type: "sm | default | lg", default: "default" },
991
- { name: "text", type: "string", default: "Browse Components" },
992
- { name: "hoverText", type: "string", default: "null" },
993
- { name: "to", type: "string", default: "/" },
994
- { name: "prefetch", type: "intent | render | none", default: "intent" },
995
- ],
996
- },
997
- desc: null,
998
- status: null,
999
- lastUpdated: null
1000
- },
1001
- {
1002
- // @dev app/components/catalyst-ui/buttons/command-button.tsx:6
1003
- name: "Command Button",
1004
- value: "command-button",
1005
- importPath: "~/components/catalyst-ui/buttons/command-button",
1006
- multiImport: null,
1007
- basicusage: `<CommandButton>
1008
- CMD + K
1009
- </CommandButton>
1010
-
1011
- <CommandButton
1012
- variant="default"
1013
- size="default"
1014
- className=""
1015
- >
1016
- CMD + K
1017
- </CommandButton>`,
1018
- path: "/components/catalyst-ui/buttons/command-button.tsx",
1019
- source: null,
1020
- usagePath: "/components/catalyst-ui/buttons/command-button.tsx",
1021
- usage: null,
1022
- premium: true,
1023
- category: "Buttons",
1024
- tags: ["ui", "components", "interactive", "button", "keyboard", "command"],
1025
- features: ["Responsive", "TypeScript", "Accessible", "Animated", "Dark Mode"],
1026
- dependencies: ["lucide-react", "react", "class-variance-authority"],
1027
- props: {
1028
- "CommandButton": [
1029
- { name: "className", type: "string", default: "null" },
1030
- { name: "variant", type: "default | primary | secondary", default: "default" },
1031
- { name: "size", type: "sm | default | lg", default: "default" },
1032
- { name: "children", type: "React.ReactNode", default: "CMD + K" },
1033
- ],
1034
- },
1035
- desc: null,
1036
- status: null,
1037
- lastUpdated: null
1038
- },
1039
- {
1040
- // @dev app/components/catalyst-ui/buttons/hold-button.tsx:6
1041
- name: "Hold Button",
1042
- value: "hold-button",
1043
- importPath: "~/components/catalyst-ui/buttons/hold-button",
1044
- multiImport: null,
1045
- basicusage: `
1046
- <HoldButton>
1047
- Hold Me
1048
- </HoldButton>
1049
-
1050
- <HoldButton
1051
- variant="primary"
1052
- size="lg"
1053
- duration={3000}
1054
- onHoldComplete={() => console.log('Hold completed')}
1055
- onProgress={(progress) => console.log(progress)}
1056
- disabled={false}
1057
- className=""
1058
- >
1059
- Custom Hold
1060
- </HoldButton>`,
1061
- path: "/components/catalyst-ui/buttons/hold-button.tsx",
1062
- source: null,
1063
- usagePath: "/components/catalyst-ui/buttons/hold-button.tsx",
1064
- usage: null,
1065
- premium: true,
1066
- category: "Buttons",
1067
- tags: ["ui", "components", "effects", "interactive", "button", "progress", "gesture"],
1068
- features: ["Responsive", "TypeScript", "Customizable", "Progress Tracking", "Touch Support", "Accessible"],
1069
- dependencies: ["react"],
1070
- props: {
1071
- "HoldButton": [
1072
- { name: "children", type: "React.ReactNode", default: "null" },
1073
- { name: "className", type: "string", default: "null" },
1074
- { name: "variant", type: "'default' | 'primary' | 'secondary' | 'destructive'", default: "'default'" },
1075
- { name: "size", type: "'sm' | 'md' | 'lg'", default: "'md'" },
1076
- { name: "duration", type: "number", default: "2000" },
1077
- { name: "onHoldComplete", type: "() => void", default: "null" },
1078
- { name: "onProgress", type: "(progress: number) => void", default: "null" },
1079
- { name: "disabled", type: "boolean", default: "false" }
1080
- ]
1081
- },
1082
- desc: null,
1083
- status: null,
1084
- lastUpdated: null
1085
- },
1086
- {
1087
- // @dev app/components/catalyst-ui/buttons/particle-button.tsx:6
1088
- name: "Particle Button",
1089
- value: "particle-button",
1090
- importPath: "~/components/catalyst-ui/buttons/particle-button",
1091
- multiImport: null,
1092
- basicusage: `
1093
- <ParticleButton>
1094
- Click Me
1095
- </ParticleButton>
1096
-
1097
- <ParticleButton
1098
- variant="primary"
1099
- size="lg"
1100
- particleCount={15}
1101
- particleColors={['#ff6b6b', '#4ecdc4']}
1102
- onClick={() => console.log('Clicked')}
1103
- disabled={false}
1104
- className=""
1105
- >
1106
- Custom Particles
1107
- </ParticleButton>`,
1108
- path: "/components/catalyst-ui/buttons/particle-button.tsx",
1109
- source: null,
1110
- usagePath: "/components/catalyst-ui/buttons/particle-button.tsx",
1111
- usage: null,
1112
- premium: true,
1113
- category: "Buttons",
1114
- tags: ["ui", "components", "effects", "animation", "button", "particles", "interactive"],
1115
- features: ["Responsive", "TypeScript", "Customizable", "Animated", "Interactive", "Particle System"],
1116
- dependencies: ["react"],
1117
- props: {
1118
- "ParticleButton": [
1119
- { name: "children", type: "React.ReactNode", default: "null" },
1120
- { name: "className", type: "string", default: "null" },
1121
- { name: "variant", type: "'default' | 'primary' | 'secondary' | 'destructive'", default: "'default'" },
1122
- { name: "size", type: "'sm' | 'md' | 'lg'", default: "'md'" },
1123
- { name: "particleCount", type: "number", default: "10" },
1124
- { name: "particleColors", type: "string[]", default: "['#ff6b6b', '#4ecdc4', '#45b7d1', '#96ceb4', '#feca57']" },
1125
- { name: "onClick", type: "(event: React.MouseEvent<HTMLButtonElement>) => void", default: "null" },
1126
- { name: "disabled", type: "boolean", default: "false" }
1127
- ]
1128
- },
1129
- desc: null,
1130
- status: null,
1131
- lastUpdated: null
1132
- },
1133
- {
1134
- // @dev app/components/catalyst-ui/buttons/social-button.tsx:6
1135
- name: "Social Button",
1136
- value: "social-button",
1137
- importPath: "~/components/catalyst-ui/buttons/social-button",
1138
- multiImport: null,
1139
- basicusage: `
1140
- <SocialButton />
1141
-
1142
- <SocialButton
1143
- shareButtons={[
1144
- { icon: Twitter, label: "Share on Twitter", onClick: () => {} },
1145
- { icon: Instagram, label: "Share on Instagram", onClick: () => {} },
1146
- { icon: Linkedin, label: "Share on LinkedIn", onClick: () => {} },
1147
- { icon: Link, label: "Copy link", onClick: () => {} }
1148
- ]}
1149
- label="Hover me"
1150
- icon={<Link />}
1151
- variant="light"
1152
- className=""
1153
- />`,
1154
- path: "/components/catalyst-ui/buttons/social-button.tsx",
1155
- source: null,
1156
- usagePath: "/components/catalyst-ui/buttons/social-button.tsx",
1157
- usage: null,
1158
- premium: true,
1159
- category: "Buttons",
1160
- tags: ["ui", "components", "interactive", "button", "social", "share", "animation"],
1161
- features: ["Responsive", "TypeScript", "Accessible", "Customizable", "Animated", "Hover Effect"],
1162
- dependencies: ["lucide-react", "react"],
1163
- props: {
1164
- "SocialButton": [
1165
- { name: "shareButtons", type: "ShareButton[]", default: "[{ icon: Twitter, label: 'Share on Twitter' }, ...]" },
1166
- { name: "label", type: "string", default: "Hover me" },
1167
- { name: "icon", type: "React.ReactNode", default: "null" },
1168
- { name: "variant", type: "light | dark | outline", default: "light" },
1169
- { name: "className", type: "string", default: "null" },
1170
- ],
1171
- },
1172
- desc: null,
1173
- status: null,
1174
- lastUpdated: null
1175
- },
1176
- {
1177
- // @dev app/components/catalyst-ui/buttons/switch-button.tsx:6
1178
- name: "Switch Button",
1179
- value: "switch-button",
1180
- importPath: "~/components/catalyst-ui/buttons/switch-button",
1181
- multiImport: null,
1182
- basicusage: `
1183
- <SwitchButton />
1184
-
1185
- <SwitchButton
1186
- checked={true}
1187
- onCheckedChange={(checked) => console.log(checked)}
1188
- variant="primary"
1189
- size="md"
1190
- disabled={false}
1191
- labels={{ checked: "ON", unchecked: "OFF" }}
1192
- className=""
1193
- />`,
1194
- path: "/components/catalyst-ui/buttons/switch-button.tsx",
1195
- source: null,
1196
- usagePath: "/components/catalyst-ui/buttons/switch-button.tsx",
1197
- usage: null,
1198
- premium: true,
1199
- category: "Buttons",
1200
- tags: ["ui", "components", "buttons", "toggle", "switch", "interactive", "form"],
1201
- features: ["Responsive", "TypeScript", "Accessible", "Customizable", "Multiple Variants", "Label Support"],
1202
- dependencies: ["react"],
1203
- props: {
1204
- "SwitchButton": [
1205
- { name: "checked", type: "boolean", default: "false" },
1206
- { name: "onCheckedChange", type: "(checked: boolean) => void", default: "null" },
1207
- { name: "className", type: "string", default: "null" },
1208
- { name: "variant", type: "'default' | 'primary' | 'secondary' | 'destructive'", default: "'default'" },
1209
- { name: "size", type: "'sm' | 'md' | 'lg'", default: "'md'" },
1210
- { name: "disabled", type: "boolean", default: "false" },
1211
- { name: "labels", type: "{ checked: string; unchecked: string }", default: "null" }
1212
- ]
1213
- },
1214
- desc: null,
1215
- status: null,
1216
- lastUpdated: null
1217
- },
1218
- {
1219
- // @dev app/components/catalyst-ui/buttons/button-group.tsx:6
1220
- name: "Button Group",
1221
- value: "button-group",
1222
- importPath: "~/components/catalyst-ui/components/buttons/button-group",
1223
- multiImport: "ButtonGroup, connectedButtonGroup",
1224
- basicusage: `
1225
- <ButtonGroup value="option1" onValueChange={(v) => console.log(v)}>
1226
- <connectedButtonGroup value="option1">Option 1</connectedButtonGroup>
1227
- <connectedButtonGroup value="option2">Option 2</connectedButtonGroup>
1228
- </ButtonGroup>
1229
-
1230
- <ButtonGroup
1231
- value={['option1', 'option2']}
1232
- onValueChange={(v) => console.log(v)}
1233
- multiple={true}
1234
- size="md"
1235
- density="default"
1236
- className=""
1237
- >
1238
- <connectedButtonGroup value="option1" icon={<Icon />}>Option 1</connectedButtonGroup>
1239
- <connectedButtonGroup value="option2" icon={<Icon />}>Option 2</connectedButtonGroup>
1240
- </ButtonGroup>`,
1241
- path: "/components/catalyst-ui/components/buttons/button-group.tsx",
1242
- source: null,
1243
- usagePath: "/components/catalyst-ui/components/buttons/button-group.tsx",
1244
- usage: null,
1245
- premium: true,
1246
- category: "Buttons",
1247
- tags: ["ui", "components", "buttons", "group", "toggle", "material-design"],
1248
- features: ["Responsive", "TypeScript", "Accessible", "Single Select", "Multi Select", "Icon Support", "Multiple Sizes"],
1249
- dependencies: ["react", "class-variance-authority"],
1250
- props: {
1251
- "ButtonGroup": [
1252
- { name: "className", type: "string", default: "null" },
1253
- { name: "size", type: "sm | md | lg", default: "md" },
1254
- { name: "density", type: "default | compact", default: "default" },
1255
- { name: "value", type: "string | string[]", default: "undefined" },
1256
- { name: "onValueChange", type: "(value: string | string[]) => void", default: "undefined" },
1257
- { name: "multiple", type: "boolean", default: "false" },
1258
- ],
1259
- "connectedButtonGroup": [
1260
- { name: "className", type: "string", default: "null" },
1261
- { name: "size", type: "sm | md | lg", default: "md" },
1262
- { name: "icon", type: "React.ReactNode", default: "undefined" },
1263
- { name: "value", type: "string", default: "undefined" },
1264
- { name: "selected", type: "boolean", default: "false" },
1265
- ],
1266
- },
1267
- desc: null,
1268
- status: null,
1269
- lastUpdated: null
1270
- },
1271
- {
1272
- // @dev app/components/catalyst-ui/buttons/scroll-to-top.tsx:6
1273
- name: "Scroll To Top",
1274
- value: "scroll-to-top",
1275
- importPath: "~/components/catalyst-ui/buttons/scroll-to-top",
1276
- multiImport: "FloatButton, FloatButtonGroup",
1277
- path: "/components/catalyst-ui/buttons/scroll-to-top.tsx",
1278
- premium: true,
1279
- source: null,
1280
- category: "Buttons",
1281
- tags: ["ui", "components", "interactive"],
1282
- features: ["Responsive", "TypeScript", "Accessible"],
1283
- dependencies: ["react", "lucide-react"],
1284
- basicusage: `
1285
- <ScrollToTop />
1286
- `,
1287
- usage: null,
1288
- usagePath: null,
1289
- props: {
1290
- "ScrollToTop": [
1291
- { name: "visibilityHeight", type: "int", default: 400 },
1292
- { name: "duration", type: "int", default: 450 },
1293
- { name: "target", type: "function", default: "window" },
1294
- { name: "className", type: "string", default: null },
1295
- { name: "icon", type: "function", default: "ChevronUp" },
1296
- { name: "onClick", type: "function", default: null }
1297
- ],
1298
- },
1299
- desc: null,
1300
- status: null,
1301
- lastUpdated: null
1302
- },
1303
- {
1304
- // @dev app/components/catalyst-ui/buttons/float-button.tsx:6
1305
- name: "Float Button",
1306
- value: "float-button",
1307
- importPath: "~/components/catalyst-ui/buttons/float-button",
1308
- multiImport: "FloatButton, FloatButtonGroup",
1309
- path: "/components/catalyst-ui/buttons/float-button.tsx",
1310
- premium: true,
1311
- source: null,
1312
- category: "Buttons",
1313
- tags: ["ui", "components", "interactive"],
1314
- features: ["Responsive", "TypeScript", "Accessible"],
1315
- dependencies: ["react", "lucide-react"],
1316
- basicusage: `
1317
- <FloatButton>
1318
- Content
1319
- </FloatButton>
1320
-
1321
- <FloatButton icon={() => {}} description="" tooltip="" type="default" shape="circle" size="default" className="" onClick={() => {}} children="">
1322
- Content
1323
- </FloatButton>`,
1324
- usage: null,
1325
- usagePath: null,
1326
- props: {
1327
- "FloatButton": [
1328
- { name: "icon", type: "string", default: null },
1329
- { name: "description", type: "string", default: null },
1330
- { name: "tooltip", type: "string", default: null },
1331
- { name: "type", type: "string", default: "default" },
1332
- { name: "shape", type: "string", default: "circle" },
1333
- { name: "size", type: "string", default: "default" },
1334
- { name: "className", type: "string", default: null },
1335
- { name: "onClick", type: "string", default: null },
1336
- { name: "children", type: "string", default: null }
1337
- ],
1338
- "FloatButtonGroup": [
1339
- { name: "trigger", type: "string", default: "click" },
1340
- { name: "open", type: "string", default: null },
1341
- { name: "onOpenChange", type: "string", default: null },
1342
- { name: "shape", type: "string", default: "circle" },
1343
- { name: "placement", type: "string", default: "top" },
1344
- { name: "icon", type: "JSX", default: "Plus" },
1345
- { name: "closeIcon", type: "JSX", default: "X" },
1346
- { name: "className", type: "string", default: null },
1347
- { name: "children", type: "string", default: null },
1348
- { name: "onClick", type: "string", default: null }
1349
- ],
1350
- },
1351
- desc: null,
1352
- status: null,
1353
- lastUpdated: null
1354
- },
1355
- {
1356
- // @dev app/components/catalyst-ui/buttons/tooltip-button.tsx:6
1357
- name: "tooltip button",
1358
- value: "tooltip-button",
1359
- importPath: "~/components/catalyst-ui",
1360
- path: "/components/catalyst-ui/buttons/tooltip-button.tsx",
1361
- premium: true,
1362
- source: null,
1363
- category: "Buttons",
1364
- tags: ["ui", "components", "interactive"],
1365
- features: ["Responsive", "TypeScript", "Accessible"],
1366
- dependencies: ["lucide-react"],
1367
- usage: `
1368
- <TooltipButton
1369
- icon={<CheckSquare />}
1370
- onClick={() => insertFormat('- [ ] {}')}
1371
- content='Checklist'
1372
- />
1373
- `,
1374
- usagePath: null,
1375
- props: [
1376
- { "name": "icon", "type": "React.ReactNode", "default": "undefined", },
1377
- { "name": "content", "type": "React.ReactNode", "default": "undefined", },
1378
- { "name": "onClick", "type": "() => void", "default": "null" },
1379
- { "name": "size", "type": "string", "default": "'icon'" },
1380
- { "name": "variant", "type": "string", "default": "'ghost'" },
1381
- { "name": "className", "type": "string", "default": "undefined" }
1382
- ],
1383
- props2: [],
1384
- desc: null,
1385
- status: null,
1386
- lastUpdated: null
1387
- },
1388
- {
1389
- // @dev app/components/catalyst-ui/buttons/split-button.tsx:6
1390
- name: "Split Button",
1391
- value: "split-button",
1392
- importPath: "~/components/catalyst-ui/buttons/split-button",
1393
- multiImport: null,
1394
- basicusage: `
1395
- <SplitButton>
1396
- Content
1397
- </SplitButton>
1398
-
1399
- <SplitButton
1400
- items=[]
1401
- icon={}
1402
- label=""
1403
- variant=""
1404
- align="middle"
1405
- size="md"
1406
- className=""
1407
- onClick={() => }
1408
- >
1409
- Content
1410
- </SplitButton>`,
1411
- path: "/components/catalyst-ui/buttons/split-button.tsx",
1412
- source: `
1413
-
1414
-
1415
-
1416
-
1417
-
1418
-
1419
- const buttonVariants = cva(
1420
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
1421
- {
1422
- variants: {
1423
- variant: {
1424
- default:
1425
- "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
1426
- destructive:
1427
- "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
1428
- outline:
1429
- "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
1430
- secondary:
1431
- "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
1432
- ghost:
1433
- "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
1434
- link: "text-primary underline-offset-4 hover:underline",
1435
- },
1436
- size: {
1437
- default: "h-9 px-4 py-2 has-[>svg]:px-3",
1438
- sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
1439
- lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
1440
- icon: "size-9",
1441
- },
1442
- align: {
1443
- left: "justify-start text-left",
1444
- middle: "justify-center text-center",
1445
- right: "justify-end text-right",
1446
- },
1447
- },
1448
- defaultVariants: {
1449
- variant: "default",
1450
- size: "default",
1451
- align: "middle",
1452
- },
1453
- }
1454
- )
1455
-
1456
-
1457
- interface SplitButtonItem {
1458
- label: string;
1459
- icon?: React.ReactNode;
1460
- command?: () => void;
1461
- separator?: boolean;
1462
- }
1463
-
1464
- interface SplitButtonProps {
1465
- label: string;
1466
- icon?: React.ReactNode;
1467
- items: SplitButtonItem[];
1468
- onClick?: () => void;
1469
- className?: string;
1470
- variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" ;
1471
- size?: "default" | "sm" | "lg" | "icon";
1472
- disabled?: boolean;
1473
- }
1474
-
1475
- const SplitButton = ({
1476
- label = null,
1477
- icon,
1478
- items,
1479
- onClick,
1480
- className,
1481
- containerClassName,
1482
- variant = "default",
1483
- align = "default",
1484
- size = "sm",
1485
- children,
1486
- ...props
1487
- }: SplitButtonProps) => {
1488
- return (
1489
- <div className={cn("inline-flex", containerClassName)}>
1490
- <Button
1491
- onClick={onClick}
1492
- className={cn("rounded-r-none border-r-0", buttonVariants({ variant, size, className, align }))}
1493
- {...props}
1494
- >
1495
- {children}
1496
- </Button>
1497
- <DropdownMenu>
1498
- <DropdownMenuTrigger asChild>
1499
- <Button className={cn("rounded-l-none px-2", buttonVariants({ variant, size, className }))} >
1500
- {label !== null ? (
1501
- <>
1502
- {label}
1503
- </>
1504
- ) :(
1505
- <ChevronDown className="h-4 w-4" />
1506
- )}
1507
- </Button>
1508
- </DropdownMenuTrigger>
1509
- <DropdownMenuContent align="end" className="w-48">
1510
- {items.map((item, index) => (
1511
- <React.Fragment key={index}>
1512
- {item.separator && <DropdownMenuSeparator />}
1513
- <DropdownMenuItem
1514
- onClick={item.command}
1515
- className="cursor-pointer"
1516
-
1517
- >
1518
- {item.icon && <span className="mr-2">{item.icon}</span>}
1519
- {item.label}
1520
- </DropdownMenuItem>
1521
- </React.Fragment>
1522
- ))}
1523
- </DropdownMenuContent>
1524
- </DropdownMenu>
1525
- </div>
1526
- );
1527
- }
1528
-
1529
- SplitButton.displayName = "SplitButton"
1530
-
1531
-
1532
-
1533
-
1534
- export {
1535
- SplitButton
1536
- }
1537
-
1538
-
1539
- `,
1540
- usagePath: null,
1541
- usage: `
1542
- Primary Ripple
1543
- `,
1544
- premium: true,
1545
- category: "Buttons",
1546
- tags: ["ui", "components", "interactive"],
1547
- features: ["Responsive", "TypeScript", "Accessible"],
1548
- dependencies: ["lucide-react"],
1549
- props: {
1550
- "SplitButton": [
1551
- { name: "items", type: "array", default: "null" },
1552
- { name: "icon", type: "function", default: "null" },
1553
- { name: "align", type: "string", default: "middle" },
1554
- { name: "size", type: "string", default: 'sm' },
1555
- { name: "loadingText", type: "string", default: "Submitting..." },
1556
- { name: "className", type: "string", default: null },
1557
- { name: "children", type: "string", default: null },
1558
- { name: "props", type: "string", default: null }
1559
- ],
1560
- },
1561
- desc: null,
1562
- status: null,
1563
- lastUpdated: null
1564
- },
1565
- {
1566
- // @dev app/components/catalyst-ui/buttons/burger.tsx:6
1567
- name: "Burger",
1568
- value: "burger",
1569
- importPath: "~/components/catalyst-ui/buttons/burger",
1570
- multiImport: "Burger, BurgerButton, BurgerNavigation, BurgerMenuDemo",
1571
- path: "/components/catalyst-ui/buttons/burger.tsx",
1572
- premium: false,
1573
- source: `
1574
-
1575
-
1576
-
1577
-
1578
- interface BurgerMenuProps {
1579
- opened?: boolean;
1580
- onToggle?: (opened: boolean) => void;
1581
- size?: 'sm' | 'md' | 'lg' | 'xl';
1582
- color?: string;
1583
- className?: string;
1584
- 'aria-label'?: string;
1585
- disabled?: boolean;
1586
- }
1587
-
1588
- export function Burger({
1589
- opened: controlledOpened,
1590
- size = 'md',
1591
- color = 'currentColor',
1592
- }: BurgerMenuProps) {
1593
- const [internalOpened, setInternalOpened] = useState(false);
1594
- const isOpened = controlledOpened !== undefined ? controlledOpened : internalOpened;
1595
-
1596
- const sizeClasses = {
1597
- sm: 'w-4 h-4',
1598
- md: 'w-6 h-6',
1599
- lg: 'w-8 h-8',
1600
- xl: 'w-10 h-10'
1601
- };
1602
-
1603
- const lineHeight = {
1604
- sm: '2px',
1605
- md: '2px',
1606
- lg: '3px',
1607
- xl: '3px'
1608
- };
1609
-
1610
- return (
1611
- <div className={cn("relative", sizeClasses[size])}>
1612
- <span
1613
- className={cn(
1614
- "absolute left-0 block transition-all duration-300 ease-in-out rounded-full",
1615
- "bg-current"
1616
- )}
1617
- style={{
1618
- width: '100%',
1619
- height: lineHeight[size],
1620
- color: color,
1621
- top: isOpened ? '50%' : '20%',
1622
- transform: isOpened ? 'translateY(-50%) rotate(45deg)' : 'translateY(-50%) rotate(0deg)'
1623
- }}
1624
- />
1625
- <span
1626
- className={cn(
1627
- "absolute left-0 block transition-all duration-300 ease-in-out rounded-full",
1628
- "bg-current"
1629
- )}
1630
- style={{
1631
- width: '100%',
1632
- height: lineHeight[size],
1633
- color: color,
1634
- top: '50%',
1635
- opacity: isOpened ? 0 : 1,
1636
- transform: 'translateY(-50%)'
1637
- }}
1638
- />
1639
- <span
1640
- className={cn(
1641
- "absolute left-0 block transition-all duration-300 ease-in-out rounded-full",
1642
- "bg-current"
1643
- )}
1644
- style={{
1645
- width: '100%',
1646
- height: lineHeight[size],
1647
- color: color,
1648
- bottom: isOpened ? '50%' : '20%',
1649
- transform: isOpened ? 'translateY(50%) rotate(-45deg)' : 'translateY(50%) rotate(0deg)'
1650
- }}
1651
- />
1652
- </div>
1653
- );
1654
- }
1655
-
1656
- export function BurgerButton({
1657
- opened,
1658
- onToggle,
1659
- size ,
1660
- color ,
1661
- className = '',
1662
- 'aria-label': ariaLabel = 'Toggle navigation',
1663
- disabled = false
1664
- }: BurgerMenuProps) {
1665
- const [internalOpened, setInternalOpened] = useState(false);
1666
-
1667
- const isOpened = controlledOpened !== undefined ? controlledOpened : internalOpened;
1668
-
1669
- const handleToggle = () => {
1670
- if (disabled) return;
1671
-
1672
- const newOpened = !isOpened;
1673
- if (controlledOpened === undefined) {
1674
- setInternalOpened(newOpened);
1675
- }
1676
- onToggle?.(newOpened);
1677
- };
1678
-
1679
- const sizeClasses = {
1680
- sm: 'w-4 h-4',
1681
- md: 'w-6 h-6',
1682
- lg: 'w-8 h-8',
1683
- xl: 'w-10 h-10'
1684
- };
1685
-
1686
-
1687
- return (
1688
- <Button
1689
- variant="ghost"
1690
- size="icon"
1691
- onClick={handleToggle}
1692
- disabled={disabled}
1693
- aria-label={ariaLabel}
1694
- className={cn(
1695
- "relative p-2 hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring",
1696
- sizeClasses[size],
1697
- className
1698
- )}
1699
- >
1700
- <Burger
1701
- opened= {opened}
1702
- size = {size}
1703
- color ={color}
1704
- />
1705
- </Button>
1706
- );
1707
- }
1708
-
1709
- interface NavigationItem {
1710
- id: string;
1711
- label: string;
1712
- href?: string;
1713
- onClick?: () => void;
1714
- }
1715
-
1716
- interface BurgerNavigationProps {
1717
- menuItems: NavigationItem[];
1718
- isOpen: boolean;
1719
- onToggle: (open: boolean) => void;
1720
- className?: string;
1721
- }
1722
-
1723
- export function BurgerNavigation({
1724
- menuItems,
1725
- isOpen,
1726
- onToggle,
1727
- className = ''
1728
- }: BurgerNavigationProps) {
1729
- const handleItemClick = (item: NavigationItem) => {
1730
- if (item.onClick) {
1731
- item.onClick();
1732
- } else if (item.href) {
1733
- window.location.href = item.href;
1734
- }
1735
- onToggle(false);
1736
- };
1737
-
1738
- return (
1739
- <div className={cn("relative", className)}>
1740
- <Burger
1741
- opened={isOpen}
1742
- onToggle={onToggle}
1743
- size="lg"
1744
- className="z-50"
1745
- />
1746
-
1747
- <div
1748
- className={cn(
1749
- "fixed inset-0 bg-background/80 backdrop-blur-sm transition-all duration-300 z-40",
1750
- isOpen ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none"
1751
- )}
1752
- onClick={() => onToggle(false)}
1753
- />
1754
-
1755
- <nav
1756
- className={cn(
1757
- "fixed top-0 right-0 h-full w-80 bg-card border-l border-border shadow-lg transition-transform duration-300 ease-in-out z-50",
1758
- isOpen ? "translate-x-0" : "translate-x-full"
1759
- )}
1760
- >
1761
- <div className="flex items-center justify-between p-6 border-b border-border">
1762
- <h2 className="text-lg font-semibold text-foreground">Menu</h2>
1763
- <Burger
1764
- opened={isOpen}
1765
- onToggle={onToggle}
1766
- size="md"
1767
- />
1768
- </div>
1769
-
1770
- <div className="p-6">
1771
- <ul className="space-y-2">
1772
- {menuItems.map((item) => (
1773
- <li key={item.id}>
1774
- <button
1775
- onClick={() => handleItemClick(item)}
1776
- className="w-full text-left p-3 rounded-md hover:bg-accent hover:text-accent-foreground transition-colors duration-150 text-foreground font-medium"
1777
- >
1778
- {item.label}
1779
- </button>
1780
- </li>
1781
- ))}
1782
- </ul>
1783
- </div>
1784
- </nav>
1785
- </div>
1786
- );
1787
- }
1788
-
1789
- export function BurgerMenuDemo() {
1790
- const [isMenuOpen, setIsMenuOpen] = useState(false);
1791
- const [selectedItem, setSelectedItem] = useState('');
1792
-
1793
- const navigationItems: NavigationItem[] = [
1794
- { id: 'home', label: 'Home', href: '#home' },
1795
- { id: 'about', label: 'About', href: '#about' },
1796
- { id: 'services', label: 'Services', href: '#services' },
1797
- { id: 'portfolio', label: 'Portfolio', href: '#portfolio' },
1798
- { id: 'contact', label: 'Contact', href: '#contact' },
1799
- { id: 'blog', label: 'Blog', href: '#blog' }
1800
- ];
1801
-
1802
- const handleItemClick = (label: string) => {
1803
- setSelectedItem(label);
1804
- };
1805
-
1806
- return (
1807
- <div className="min-h-screen bg-background">
1808
- <header className="bg-card border-b border-border p-4">
1809
- <div className="max-w-6xl mx-auto flex items-center justify-between">
1810
- <h1 className="text-xl font-bold text-foreground">Brand Logo</h1>
1811
-
1812
- <div className="hidden md:flex space-x-6">
1813
- {navigationItems.map((item) => (
1814
- <button
1815
- key={item.id}
1816
- onClick={() => handleItemClick(item.label)}
1817
- className="text-foreground hover:text-primary transition-colors duration-150"
1818
- >
1819
- {item.label}
1820
- </button>
1821
- ))}
1822
- </div>
1823
-
1824
- <div className="md:hidden">
1825
- <BurgerNavigation
1826
- menuItems={navigationItems}
1827
- isOpen={isMenuOpen}
1828
- onToggle={setIsMenuOpen}
1829
- />
1830
- </div>
1831
- </div>
1832
- </header>
1833
-
1834
- <main className="p-8">
1835
- <div className="max-w-4xl mx-auto">
1836
- <h2 className="text-3xl font-bold text-foreground mb-8">Burger Menu Component Demo</h2>
1837
-
1838
- <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
1839
- <div className="bg-card border border-border rounded-lg p-6">
1840
- <h3 className="font-semibold text-foreground mb-4">Small</h3>
1841
- <Burger size="sm" />
1842
- </div>
1843
-
1844
- <div className="bg-card border border-border rounded-lg p-6">
1845
- <h3 className="font-semibold text-foreground mb-4">Medium</h3>
1846
- <Burger size="md" />
1847
- </div>
1848
-
1849
- <div className="bg-card border border-border rounded-lg p-6">
1850
- <h3 className="font-semibold text-foreground mb-4">Large</h3>
1851
- <Burger size="lg" />
1852
- </div>
1853
-
1854
- <div className="bg-card border border-border rounded-lg p-6">
1855
- <h3 className="font-semibold text-foreground mb-4">Extra Large</h3>
1856
- <Burger size="xl" />
1857
- </div>
1858
- </div>
1859
-
1860
- {selectedItem && (
1861
- <div className="bg-card border border-border rounded-lg p-6">
1862
- <h3 className="font-semibold text-foreground mb-2">Selected Item</h3>
1863
- <p className="text-muted-foreground">You clicked: {selectedItem}</p>
1864
- </div>
1865
- )}
1866
- </div>
1867
- </main>
1868
- </div>
1869
- );
1870
- }`,
1871
- category: "Buttons",
1872
- tags: ["ui", "components", "interactive"],
1873
- features: ["Responsive", "TypeScript", "Accessible"],
1874
- dependencies: ["react"],
1875
- basicusage: `
1876
- <Burger />
1877
-
1878
- <Burger opened="" size="sm" color="" />`,
1879
- usage: `
1880
- const [isMenuOpen, setIsMenuOpen] = useState(false);
1881
- const [selectedItem, setSelectedItem] = useState('');
1882
-
1883
- const navigationItems: NavigationItem[] = [
1884
- { id: 'home', label: 'Home', href: '#home' },
1885
- { id: 'about', label: 'About', href: '#about' },
1886
- { id: 'services', label: 'Services', href: '#services' },
1887
- { id: 'portfolio', label: 'Portfolio', href: '#portfolio' },
1888
- { id: 'contact', label: 'Contact', href: '#contact' },
1889
- { id: 'blog', label: 'Blog', href: '#blog' }
1890
- ];
1891
-
1892
- const handleItemClick = (label: string) => {
1893
- setSelectedItem(label);
1894
- };
1895
-
1896
- {navigationItems.map((item) => (
1897
- <button key={item.id} onClick={() => handleItemClick(item.label)} className="text-foreground hover:text-primary transition-colors duration-150" >
1898
- {item.label}
1899
- </button>
1900
- ))}
1901
-
1902
- <BurgerNavigation
1903
- menuItems={navigationItems}
1904
- isOpen={isMenuOpen}
1905
- onToggle={setIsMenuOpen}
1906
- />
1907
- `,
1908
- usagePath: null,
1909
- props: {
1910
- "Burger": [
1911
- { name: "opened", type: "string", default: "null" },
1912
- { name: "size", type: "string", default: "'md'" },
1913
- { name: "color", type: "string", default: "'currentColor'" }
1914
- ],
1915
- "BurgerButton": [
1916
- { name: "opened", type: "string", default: "null" },
1917
- { name: "onToggle", type: "string", default: "null" },
1918
- { name: "size", type: "string", default: "null" },
1919
- { name: "color", type: "string", default: "null" },
1920
- { name: "className", type: "string", default: "''" },
1921
- { name: "aria", type: "string", default: "null" },
1922
- { name: "disabled", type: "boolean", default: "false" }
1923
- ],
1924
- "BurgerNavigation": [
1925
- { name: "menuItems", type: "string", default: "null" },
1926
- { name: "isOpen", type: "string", default: "null" },
1927
- { name: "onToggle", type: "string", default: "null" },
1928
- { name: "className", type: "string", default: "''" }
1929
- ],
1930
- },
1931
- desc: null,
1932
- status: null,
1933
- lastUpdated: null
1934
- },
1935
- {
1936
- // @dev app/components/catalyst-ui/buttons/copy-text.tsx:6
1937
- name: "Copy Text",
1938
- value: "copy-text",
1939
- importPath: "~/components/catalyst-ui/buttons/copy-text",
1940
- path: "/components/catalyst-ui/buttons/copy-text.tsx",
1941
- premium: true,
1942
- source: null,
1943
- category: "Buttons",
1944
- tags: ["ui", "components", "interactive"],
1945
- features: ["Responsive", "TypeScript", "Accessible"],
1946
- dependencies: ["lucide-react", "class-variance-authority"],
1947
- basicusage: `
1948
- <CopyText code={content} /> `,
1949
- usage: `
1950
- <CopyText code={createTildeImport} ttText='~ - Tilde Import' icon={Tilde} />`,
1951
- usagePath: null,
1952
- props: {
1953
- "CopyText": [
1954
- { name: "code", type: "string", default: "null" },
1955
- { name: "ttText", type: "string", default: "Copy" },
1956
- { name: "icon", type: "icon function", default: "Copy" },
1957
- { name: "size", type: "string", default: "icon" },
1958
- { name: "variant", type: "string", default: "ghost" },
1959
- ],
1960
- },
1961
- desc: null,
1962
- status: null,
1963
- lastUpdated: null
1964
- },
1965
- {
1966
- // @dev app/components/catalyst-ui/buttons/export-file.tsx:6
1967
- name: "Export File",
1968
- value: "export-file",
1969
- importPath: "~/components/catalyst-ui/buttons/export-file",
1970
- path: "~/components/catalyst-ui/buttons/export-file.tsx",
1971
- premium: true,
1972
- source: `
1973
-
1974
-
1975
-
1976
-
1977
-
1978
- export function ExportFile({ code = null, filename='MyComponent.tsx' }) {
1979
- const exportFile = useExport();
1980
-
1981
- const handleClick = () => {
1982
- if (!code || !filename) return null;
1983
- exportFile(code, filename);
1984
- };
1985
- return (
1986
- <Button variant="ghost" size="icon" className="h-8 w-8 cursor-pointer hover:bg-background/80" onClick={() => handleClick()}>
1987
- <Download className="h-4 w-4 hover:text-primary" />
1988
- </Button>
1989
- );
1990
- }
1991
- `,
1992
- category: "Buttons",
1993
- tags: ["ui", "components", "interactive"],
1994
- features: ["Responsive", "TypeScript", "Accessible"],
1995
- dependencies: ["lucide-react"],
1996
- basicusage: `
1997
- <ExportFile code={content} filename='' />`,
1998
- usage: null,
1999
- usagePath: null,
2000
- props: {
2001
- "ExportFile": [
2002
- { name: "code", type: "string", default: "null" },
2003
- { name: "filename", type: "string", default: "'MyComponent.tsx'" }
2004
- ],
2005
- },
2006
- props2: [],
2007
- desc: null,
2008
- status: null,
2009
- lastUpdated: null
2010
- },
2011
- {
2012
- // @dev app/components/catalyst-ui/buttons/form-button.tsx:6
2013
- name: "Form Button",
2014
- value: "form-button",
2015
- importPath: "~/components/catalyst-ui/buttons/form-button",
2016
- multiImport: null,
2017
- path: "/components/catalyst-ui/buttons/button-form.tsx",
2018
- premium: true,
2019
- source: `
2020
-
2021
-
2022
-
2023
-
2024
-
2025
-
2026
- const buttonVariants = cva(
2027
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
2028
- {
2029
- variants: {
2030
- variant: {
2031
- default:
2032
- "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
2033
- destructive:
2034
- "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
2035
- outline:
2036
- "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
2037
- secondary:
2038
- "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
2039
- ghost:
2040
- "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
2041
- link: "text-primary underline-offset-4 hover:underline",
2042
- },
2043
- size: {
2044
- default: "h-9 px-4 py-2 has-[>svg]:px-3",
2045
- sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
2046
- lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
2047
- icon: "size-9",
2048
- },
2049
- align: {
2050
- left: "justify-start text-left",
2051
- middle: "justify-center text-center",
2052
- right: "justify-end text-right",
2053
- },
2054
- },
2055
- defaultVariants: {
2056
- variant: "default",
2057
- size: "default",
2058
- align: "middle",
2059
- },
2060
- }
2061
- )
2062
-
2063
-
2064
- interface ButtonAnchorProps
2065
- extends RemixLinkProps,
2066
- VariantProps<typeof buttonVariants> { }
2067
-
2068
-
2069
- export function FormButton ({
2070
- primary = true, // true | false | dashed
2071
- variant = "default",
2072
- align = "default",
2073
- size = 'sm',
2074
- loadingText = "Submitting...",
2075
- className,
2076
- children,
2077
- ...props
2078
- }: ButtonNavLinkProps) {
2079
- const nav = useNavigation()
2080
-
2081
- const isSubmitting = nav.state === 'submitting';
2082
-
2083
- const baseClasses = cn(
2084
- "transition duration-300 border-2 border-border w-[95%] text-center mx-auto text-foreground px-6 py-3 rounded-none",
2085
- buttonVariants({ variant, size, className, align }),
2086
- className
2087
- );
2088
-
2089
- const primaryClasses =
2090
- primary === true
2091
- ? "bg-[#2563eb] hover:bg-[#16171a]"
2092
- : primary === false
2093
- ? "bg-[#121212] hover:bg-[#2563eb]"
2094
- : primary === "dashed"
2095
- ? "h-8 border-dashed"
2096
- : "";
2097
- return (
2098
- <Button
2099
- type="submit"
2100
- className={cn(baseClasses, primaryClasses)}
2101
- disabled={isSubmitting}
2102
- {...props}
2103
- >
2104
- {isSubmitting ? (
2105
- <div className='flex items-center gap-3'>
2106
- <div className="flex items-center justify-center h-full">
2107
- <div className='animate-spin rounded-full h-6 w-6 border-t-4 border-primary border-solid'></div>
2108
- </div>
2109
- <p className='ml-3'>{loadingText}</p>
2110
- </div>
2111
- ) : (
2112
- children
2113
- )}
2114
- </Button>
2115
- );
2116
- };
2117
- `,
2118
- category: "Buttons",
2119
- tags: ["ui", "components", "interactive"],
2120
- features: ["Responsive", "TypeScript", "Accessible"],
2121
- dependencies: ["react", "class-variance-authority", "@radix-ui"],
2122
- basicusage: `
2123
- <FormButton>
2124
- Content
2125
- </FormButton>
2126
-
2127
- <FormButton
2128
- primary="" // true | false | dashed
2129
- variant=""
2130
- align="center"
2131
- size="md"
2132
- className="custom-class"
2133
- loadingText=""
2134
- >
2135
- Content
2136
- </FormButton>`,
2137
- usage: null,
2138
- usagePath: null,
2139
- props: {
2140
- "FormButton": [
2141
- { name: "primary", type: "boolean", default: true },
2142
- { name: "true", type: "string", default: null },
2143
- { name: "align", type: "string", default: "default" },
2144
- { name: "size", type: "string", default: 'sm' },
2145
- { name: "loadingText", type: "string", default: "Submitting..." },
2146
- { name: "className", type: "string", default: null },
2147
- { name: "children", type: "string", default: null },
2148
- { name: "props", type: "string", default: null }
2149
- ],
2150
- },
2151
- desc: null,
2152
- status: null,
2153
- lastUpdated: null
2154
- },
2155
- {
2156
- // @dev app/components/catalyst-ui/buttons/toggle-button.tsx:6
2157
- name: "Toggle Button",
2158
- value: "toggle-button",
2159
- importPath: "~/components/catalyst-ui/buttons/button-toggle",
2160
- multiImport: null,
2161
- path: "/components/catalyst-ui/buttons/button-toggle.tsx",
2162
- premium: true,
2163
- source: `
2164
-
2165
-
2166
-
2167
-
2168
-
2169
-
2170
- const buttonVariants = cva(
2171
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
2172
- {
2173
- variants: {
2174
- variant: {
2175
- default:
2176
- "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
2177
- destructive:
2178
- "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
2179
- outline:
2180
- "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
2181
- secondary:
2182
- "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
2183
- ghost:
2184
- "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
2185
- link: "text-primary underline-offset-4 hover:underline",
2186
- },
2187
- size: {
2188
- default: "h-9 px-4 py-2 has-[>svg]:px-3",
2189
- sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
2190
- lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
2191
- icon: "size-9",
2192
- },
2193
- align: {
2194
- left: "justify-start text-left",
2195
- middle: "justify-center text-center",
2196
- right: "justify-end text-right",
2197
- },
2198
- },
2199
- defaultVariants: {
2200
- variant: "default",
2201
- size: "default",
2202
- align: "middle",
2203
- },
2204
- }
2205
- )
2206
-
2207
-
2208
- interface ButtonToggleProps {
2209
- checked?: boolean
2210
- onChange?: (checked: boolean) => void
2211
- disabled?: boolean
2212
- className?: string
2213
- variant?: "default" | "outline" | "ghost"
2214
- size?: "sm" | "md" | "lg"
2215
- icon?: React.ReactNode
2216
- iconPos?: "left" | "right"
2217
- children?: React.ReactNode
2218
- }
2219
-
2220
- export function ToggleButton({
2221
- checked = false,
2222
- onChange,
2223
- disabled = false,
2224
- className,
2225
- variant = "default",
2226
- size = "md",
2227
- icon,
2228
- iconPos = "left",
2229
- children,
2230
- ...props
2231
- }) {
2232
- const handleClick = () => {
2233
- if (!disabled && onChange) {
2234
- onChange(!checked)
2235
- }
2236
- }
2237
-
2238
- const handleKeyDown = (e: React.KeyboardEvent) => {
2239
- if (e.key === "Enter" || e.key === " ") {
2240
- e.preventDefault()
2241
- handleClick()
2242
- }
2243
- }
2244
-
2245
- return (
2246
- <button
2247
- ref={ref}
2248
- type="button"
2249
- className={cn(
2250
- "inline-flex items-center justify-center rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
2251
- variant === "default" &&
2252
- checked
2253
- ? "bg-primary text-primary-foreground shadow hover:bg-primary/90"
2254
- : "bg-background text-foreground border border-input shadow-sm hover:bg-accent hover:text-accent-foreground",
2255
- variant === "outline" &&
2256
- checked
2257
- ? "border border-primary bg-background text-primary shadow-sm hover:bg-accent"
2258
- : "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
2259
- variant === "ghost" &&
2260
- checked
2261
- ? "bg-accent text-accent-foreground hover:bg-accent/80"
2262
- : "hover:bg-accent hover:text-accent-foreground",
2263
- size === "sm" && "h-8 px-3 text-xs",
2264
- size === "md" && "h-10 px-4 py-2 text-sm",
2265
- size === "lg" && "h-12 px-6 text-base",
2266
- className
2267
- )}
2268
- onClick={handleClick}
2269
- onKeyDown={handleKeyDown}
2270
- disabled={disabled}
2271
- role="switch"
2272
- aria-checked={checked}
2273
- aria-disabled={disabled}
2274
- {...props}
2275
- >
2276
- {icon && iconPos === "left" && (
2277
- <span className={cn(children && "mr-2")}>{icon}</span>
2278
- )}
2279
- {children}
2280
- {icon && iconPos === "right" && (
2281
- <span className={cn(children && "ml-2")}>{icon}</span>
2282
- )}
2283
- </button>
2284
- )
2285
- }
2286
-
2287
- ToggleButton.displayName = "ToggleButton"
2288
-
2289
-
2290
- export {
2291
- ToggleButton
2292
- }
2293
-
2294
- `,
2295
- category: "Buttons",
2296
- tags: ["ui", "components", "interactive"],
2297
- features: ["Responsive", "TypeScript", "Accessible"],
2298
- dependencies: ["react", "class-variance-authority", "@radix-ui"],
2299
- basicusage: `
2300
- <ToggleButton>
2301
- ToggleButton
2302
- </ToggleButton>
2303
-
2304
- <ToggleButton checked="" onChange="" disabled="" className="">
2305
- ToggleButton
2306
- </ToggleButton>`,
2307
- usage: null,
2308
- usagePath: null,
2309
- props: {
2310
- "ToggleButton": [
2311
- { name: "checked", type: "boolean", default: "false" },
2312
- { name: "onChange", type: "string", default: "null" },
2313
- { name: "disabled", type: "boolean", default: "false" },
2314
- { name: "className", type: "string", default: "null" },
2315
- { name: "variant", type: "string", default: "default" },
2316
- { name: "size", type: "string", default: "md" },
2317
- { name: "icon", type: "string", default: "null" },
2318
- { name: "iconPos", type: "string", default: "left" },
2319
- { name: "children", type: "string", default: "null" },
2320
- { name: "props", type: "string", default: "null" }
2321
- ],
2322
- },
2323
- desc: null,
2324
- status: null,
2325
- lastUpdated: null
2326
- },
2327
- ];