@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,56 +0,0 @@
1
- import * as React from "react"
2
- import { GripVerticalIcon } from "lucide-react"
3
- import * as ResizablePrimitive from "react-resizable-panels"
4
-
5
- import { cn } from "~/components/catalyst-ui"
6
-
7
- // @dev app/components/catalyst-ui/data/primitive-data.tsx:956
8
-
9
- function ResizablePanelGroup({
10
- className,
11
- ...props
12
- }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) {
13
- return (
14
- <ResizablePrimitive.PanelGroup
15
- data-slot="resizable-panel-group"
16
- className={cn(
17
- "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
18
- className
19
- )}
20
- {...props}
21
- />
22
- )
23
- }
24
-
25
- function ResizablePanel({
26
- ...props
27
- }: React.ComponentProps<typeof ResizablePrimitive.Panel>) {
28
- return <ResizablePrimitive.Panel data-slot="resizable-panel" {...props} />
29
- }
30
-
31
- function ResizableHandle({
32
- withHandle,
33
- className,
34
- ...props
35
- }: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
36
- withHandle?: boolean
37
- }) {
38
- return (
39
- <ResizablePrimitive.PanelResizeHandle
40
- data-slot="resizable-handle"
41
- className={cn(
42
- "bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",
43
- className
44
- )}
45
- {...props}
46
- >
47
- {withHandle && (
48
- <div className="bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border">
49
- <GripVerticalIcon className="size-2.5" />
50
- </div>
51
- )}
52
- </ResizablePrimitive.PanelResizeHandle>
53
- )
54
- }
55
-
56
- export { ResizablePanelGroup, ResizablePanel, ResizableHandle }
@@ -1,155 +0,0 @@
1
- import * as SelectPrimitive from "@radix-ui/react-select";
2
- import { Check, ChevronDown, ChevronRight, ChevronsUpDown, ChevronUp } from "lucide-react";
3
- import React from "react";
4
- import { cn } from "~/components/catalyst-ui";
5
-
6
- // @dev app/components/catalyst-ui/data/primitive-data.tsx:3678
7
- const Select = SelectPrimitive.Root;
8
- const SelectGroup = SelectPrimitive.Group;
9
- const SelectValue = SelectPrimitive.Value;
10
-
11
- const SelectTrigger = React.forwardRef<
12
- React.ElementRef<typeof SelectPrimitive.Trigger>,
13
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>
14
- >(({ className, children, ...props }, ref) => (
15
- <SelectPrimitive.Trigger
16
- ref={ref}
17
- className={cn(
18
- "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
19
- className
20
- )}
21
- {...props}
22
- >
23
- {children}
24
- <SelectPrimitive.Icon asChild>
25
- <ChevronsUpDown className="h-4 w-4 opacity-50" />
26
- </SelectPrimitive.Icon>
27
- </SelectPrimitive.Trigger>
28
- ));
29
- SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
30
-
31
- const SelectScrollUpButton = React.forwardRef<
32
- React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,
33
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>
34
- >(({ className, ...props }, ref) => (
35
- <SelectPrimitive.ScrollUpButton
36
- ref={ref}
37
- className={cn(
38
- "flex cursor-default items-center justify-center py-1",
39
- className
40
- )}
41
- {...props}
42
- >
43
- <ChevronUp className="h-4 w-4" />
44
- </SelectPrimitive.ScrollUpButton>
45
- ));
46
- SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
47
-
48
- const SelectScrollDownButton = React.forwardRef<
49
- React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,
50
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>
51
- >(({ className, ...props }, ref) => (
52
- <SelectPrimitive.ScrollDownButton
53
- ref={ref}
54
- className={cn(
55
- "flex cursor-default items-center justify-center py-1",
56
- className
57
- )}
58
- {...props}
59
- >
60
- <ChevronDown className="h-4 w-4" />
61
- </SelectPrimitive.ScrollDownButton>
62
- ));
63
- SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
64
-
65
- const SelectContent = React.forwardRef<
66
- React.ElementRef<typeof SelectPrimitive.Content>,
67
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>
68
- >(({ className, children, position = "popper", ...props }, ref) => (
69
- <SelectPrimitive.Portal>
70
- <SelectPrimitive.Content
71
- ref={ref}
72
- className={cn(
73
- "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
74
- position === "popper" &&
75
- "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
76
- className
77
- )}
78
- position={position}
79
- {...props}
80
- >
81
- <SelectScrollUpButton />
82
- <SelectPrimitive.Viewport
83
- className={cn(
84
- "p-1",
85
- position === "popper" &&
86
- "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
87
- )}
88
- >
89
- {children}
90
- </SelectPrimitive.Viewport>
91
- <SelectScrollDownButton />
92
- </SelectPrimitive.Content>
93
- </SelectPrimitive.Portal>
94
- ));
95
- SelectContent.displayName = SelectPrimitive.Content.displayName;
96
-
97
- const SelectLabel = React.forwardRef<
98
- React.ElementRef<typeof SelectPrimitive.Label>,
99
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>
100
- >(({ className, ...props }, ref) => (
101
- <SelectPrimitive.Label
102
- ref={ref}
103
- className={cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)}
104
- {...props}
105
- />
106
- ));
107
- SelectLabel.displayName = SelectPrimitive.Label.displayName;
108
-
109
- const SelectItem = React.forwardRef<
110
- React.ElementRef<typeof SelectPrimitive.Item>,
111
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>
112
- >(({ className, children, ...props }, ref) => (
113
- <SelectPrimitive.Item
114
- ref={ref}
115
- className={cn(
116
- "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
117
- className
118
- )}
119
- {...props}
120
- >
121
- <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
122
- <SelectPrimitive.ItemIndicator>
123
- <Check className="h-4 w-4" />
124
- </SelectPrimitive.ItemIndicator>
125
- </span>
126
-
127
- <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
128
- </SelectPrimitive.Item>
129
- ));
130
- SelectItem.displayName = SelectPrimitive.Item.displayName;
131
-
132
- const SelectSeparator = React.forwardRef<
133
- React.ElementRef<typeof SelectPrimitive.Separator>,
134
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>
135
- >(({ className, ...props }, ref) => (
136
- <SelectPrimitive.Separator
137
- ref={ref}
138
- className={cn("-mx-1 my-1 h-px bg-muted", className)}
139
- {...props}
140
- />
141
- ));
142
- SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
143
-
144
- export {
145
- Select,
146
- SelectGroup,
147
- SelectValue,
148
- SelectTrigger,
149
- SelectContent,
150
- SelectLabel,
151
- SelectItem,
152
- SelectSeparator,
153
- SelectScrollUpButton,
154
- SelectScrollDownButton,
155
- }
@@ -1,74 +0,0 @@
1
- import React from 'react'
2
- import * as SeparatorPrimitive from '@radix-ui/react-separator'
3
- import { cn } from '~/components/catalyst-ui'
4
-
5
- // @dev app/components/catalyst-ui/data/primitive-data.tsx:3426
6
- const Separator = React.forwardRef<
7
- React.ElementRef<typeof SeparatorPrimitive.Root>,
8
- React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
9
- >(
10
- (
11
- { className, orientation = 'horizontal', decorative = true, ...props },
12
- ref
13
- ) => (
14
- <SeparatorPrimitive.Root
15
- ref={ref}
16
- decorative={decorative}
17
- orientation={orientation}
18
- className={cn(
19
- 'shrink-0 bg-border/30 border-border',
20
- orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[2px]',
21
- className
22
- )}
23
- {...props}
24
- />
25
- )
26
- )
27
- Separator.displayName = SeparatorPrimitive.Root.displayName
28
-
29
-
30
- const SeparatorWithText = React.forwardRef<
31
- HTMLDivElement,
32
- React.HTMLAttributes<HTMLDivElement> & {
33
- children: React.ReactNode
34
- orientation?: 'horizontal' | 'vertical'
35
- }
36
- >(({ className, children, orientation = 'horizontal', ...props }, ref) => (
37
- <div
38
- ref={ref}
39
- className={cn(
40
- 'flex items-center',
41
- orientation === 'horizontal' ? 'w-full' : 'h-full flex-col',
42
- className
43
- )}
44
- {...props}
45
- >
46
- <Separator className="flex-1" orientation={orientation} />
47
- <span className={cn(
48
- 'text-muted-foreground text-sm',
49
- orientation === 'horizontal' ? 'px-3' : 'py-3'
50
- )}>
51
- {children}
52
- </span>
53
- <Separator className="flex-1" orientation={orientation} />
54
- </div>
55
- ))
56
- SeparatorWithText.displayName = 'SeparatorWithText'
57
-
58
- export { Separator, SeparatorWithText }
59
-
60
- /**usage
61
- *
62
- * // Horizontal (default)
63
- <SeparatorWithText>OR</SeparatorWithText>
64
-
65
- // With custom styling
66
- <SeparatorWithText className="my-4">
67
- Continue with
68
- </SeparatorWithText>
69
-
70
- // Vertical
71
- <SeparatorWithText orientation="vertical">
72
- OR
73
- </SeparatorWithText>
74
- */
@@ -1,126 +0,0 @@
1
- import * as DialogPrimitive from "@radix-ui/react-dialog";
2
- import { cva } from "class-variance-authority";
3
- import { X } from "lucide-react";
4
- import React from "react";
5
- import { cn } from "~/components/catalyst-ui";
6
-
7
- // @dev app/components/catalyst-ui/data/primitive-data.tsx:4773
8
- const Sheet = DialogPrimitive.Root;
9
- const SheetTrigger = DialogPrimitive.Trigger;
10
- const SheetClose = DialogPrimitive.Close;
11
- const SheetPortal = DialogPrimitive.Portal;
12
-
13
- const SheetOverlay = React.forwardRef<
14
- React.ElementRef<typeof DialogPrimitive.Overlay>,
15
- React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>
16
- >(({ className, ...props }, ref) => (
17
- <DialogPrimitive.Overlay
18
- className={cn(
19
- "fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
20
- className
21
- )}
22
- {...props}
23
- ref={ref}
24
- />
25
- ));
26
- SheetOverlay.displayName = DialogPrimitive.Overlay.displayName;
27
-
28
- const sheetVariants = cva(
29
- "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
30
- {
31
- variants: {
32
- side: {
33
- top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
34
- bottom:
35
- "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
36
- left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
37
- right:
38
- "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",
39
- },
40
- },
41
- defaultVariants: {
42
- side: "right",
43
- },
44
- }
45
- );
46
-
47
- interface SheetContentProps
48
- extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>,
49
- VariantProps<typeof sheetVariants> { }
50
-
51
- const SheetContent = React.forwardRef<
52
- React.ElementRef<typeof DialogPrimitive.Content>,
53
- SheetContentProps
54
- >(({ side = "right", className, children, ...props }, ref) => (
55
- <SheetPortal>
56
- <SheetOverlay />
57
- <DialogPrimitive.Content
58
- ref={ref}
59
- className={cn(sheetVariants({ side }), className)}
60
- {...props}
61
- >
62
- {children}
63
- <DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary">
64
- <X className="h-4 w-4" />
65
- <span className="sr-only">Close</span>
66
- </DialogPrimitive.Close>
67
- </DialogPrimitive.Content>
68
- </SheetPortal>
69
- ));
70
- SheetContent.displayName = DialogPrimitive.Content.displayName;
71
-
72
- const SheetHeader = ({
73
- className,
74
- ...props
75
- }: React.HTMLAttributes<HTMLDivElement>) => (
76
- <div
77
- className={cn(
78
- "flex flex-col space-y-2 text-center sm:text-left",
79
- className
80
- )}
81
- {...props}
82
- />
83
- );
84
- SheetHeader.displayName = "SheetHeader";
85
-
86
- const SheetFooter = ({
87
- className,
88
- ...props
89
- }: React.HTMLAttributes<HTMLDivElement>) => (
90
- <div
91
- className={cn(
92
- "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
93
- className
94
- )}
95
- {...props}
96
- />
97
- );
98
- SheetFooter.displayName = "SheetFooter";
99
-
100
- const SheetTitle = React.forwardRef<
101
- React.ElementRef<typeof DialogPrimitive.Title>,
102
- React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>
103
- >(({ className, ...props }, ref) => (
104
- <DialogPrimitive.Title
105
- ref={ref}
106
- className={cn("text-lg font-semibold text-foreground", className)}
107
- {...props}
108
- />
109
- ));
110
- SheetTitle.displayName = DialogPrimitive.Title.displayName;
111
-
112
- const SheetDescription = React.forwardRef<
113
- React.ElementRef<typeof DialogPrimitive.Description>,
114
- React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>
115
- >(({ className, ...props }, ref) => (
116
- <DialogPrimitive.Description
117
- ref={ref}
118
- className={cn("text-sm text-muted-foreground", className)}
119
- {...props}
120
- />
121
- ));
122
- SheetDescription.displayName = DialogPrimitive.Description.displayName;
123
-
124
- export {
125
- Sheet, SheetPortal, SheetOverlay, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, type SheetContentProps
126
- }
@@ -1,15 +0,0 @@
1
- import { cn } from "~/components/catalyst-ui"
2
-
3
- // @dev app/components/catalyst-ui/data/primitive-data.tsx:288
4
-
5
- function Skeleton({ className, ...props }: React.ComponentProps<"div">) {
6
- return (
7
- <div
8
- data-slot="skeleton"
9
- className={cn("bg-accent animate-pulse rounded-md", className)}
10
- {...props}
11
- />
12
- )
13
- }
14
-
15
- export { Skeleton }
@@ -1,27 +0,0 @@
1
- import * as SliderPrimitive from "@radix-ui/react-slider";
2
- import { cn } from "~/components/catalyst-ui";
3
- import React from "react";
4
-
5
- // @dev app/components/catalyst-ui/data/primitive-data.tsx:2559
6
- const Slider = React.forwardRef<
7
- React.ElementRef<typeof SliderPrimitive.Root>,
8
- React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root>
9
- >(({ className, ...props }, ref) => (
10
- <SliderPrimitive.Root
11
- ref={ref}
12
- className={cn(
13
- "relative flex w-full touch-none select-none items-center",
14
- className
15
- )}
16
- {...props}
17
- >
18
- <SliderPrimitive.Track className="relative h-2 w-full grow overflow-hidden rounded-full bg-secondary">
19
- <SliderPrimitive.Range className="absolute h-full bg-primary" />
20
- </SliderPrimitive.Track>
21
- <SliderPrimitive.Thumb className="block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background 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" />
22
- </SliderPrimitive.Root>
23
- ));
24
- Slider.displayName = SliderPrimitive.Root.displayName;
25
-
26
-
27
- export { Slider }
@@ -1,187 +0,0 @@
1
-
2
-
3
- import * as SwitchPrimitive from "@radix-ui/react-switch";
4
- import { cva, type VariantProps } from "class-variance-authority";
5
- import { cn } from "~/components/catalyst-ui";
6
- import React from "react";
7
-
8
- // @dev app/components/catalyst-ui/data/primitive-data.tsx:2921
9
-
10
- type SwitchVariantContextValue = {
11
- size?: "sm" | "md" | "lg";
12
- variant?: "default" | "destructive" | "success" | "info" | "warning";
13
- shape?: "default" | "square";
14
- style?: "solid" | "outline";
15
- mini?: boolean;
16
- };
17
-
18
- const SwitchVariantContext = React.createContext<SwitchVariantContextValue>({});
19
-
20
- export const switchRootVariants = cva(
21
- "peer inline-flex shrink-0 cursor-pointer items-center border transition-colors focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",
22
- {
23
- variants: {
24
- size: {
25
- sm: "h-5 w-9",
26
- md: "h-6 w-10",
27
- lg: "h-7 w-12",
28
- },
29
- variant: {
30
- default: "focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
31
- destructive: "focus-visible:border-destructive focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 data-[state=checked]:bg-destructive data-[state=unchecked]:bg-input",
32
- success: "focus-visible:border-green-600 dark:focus-visible:border-green-400 focus-visible:ring-green-600/20 dark:focus-visible:ring-green-400/40 data-[state=checked]:bg-green-600 dark:data-[state=checked]:bg-green-400 data-[state=unchecked]:bg-input",
33
- info: "focus-visible:border-sky-600 dark:focus-visible:border-sky-400 focus-visible:ring-sky-600/20 dark:focus-visible:ring-sky-400/40 data-[state=checked]:bg-sky-600 dark:data-[state=checked]:bg-sky-400 data-[state=unchecked]:bg-input",
34
- warning: "focus-visible:border-amber-600 dark:focus-visible:border-amber-400 focus-visible:ring-amber-600/20 dark:focus-visible:ring-amber-400/40 data-[state=checked]:bg-amber-600 dark:data-[state=checked]:bg-amber-400 data-[state=unchecked]:bg-input",
35
- },
36
- shape: {
37
- default: "rounded-full",
38
- square: "rounded-xs",
39
- },
40
- style: {
41
- solid: "border-transparent",
42
- outline: "data-[state=checked]:bg-transparent",
43
- },
44
- mini: {
45
- true: "h-3 border-none",
46
- false: "",
47
- },
48
- },
49
- compoundVariants: [
50
- {
51
- style: "outline",
52
- variant: "default",
53
- className: "focus-visible:border-primary data-[state=checked]:border-primary",
54
- },
55
- {
56
- style: "outline",
57
- variant: "destructive",
58
- className: "data-[state=checked]:border-destructive",
59
- },
60
- {
61
- style: "outline",
62
- variant: "success",
63
- className: "data-[state=checked]:border-green-600 dark:data-[state=checked]:border-green-400",
64
- },
65
- {
66
- style: "outline",
67
- variant: "info",
68
- className: "data-[state=checked]:border-sky-600 dark:data-[state=checked]:border-sky-400",
69
- },
70
- {
71
- style: "outline",
72
- variant: "warning",
73
- className: "data-[state=checked]:border-amber-600 dark:data-[state=checked]:border-amber-400",
74
- },
75
- ],
76
- defaultVariants: {
77
- size: "sm",
78
- variant: "default",
79
- shape: "default",
80
- style: "solid",
81
- mini: false,
82
- },
83
- }
84
- );
85
-
86
- export const switchThumbVariants = cva(
87
- "pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform",
88
- {
89
- variants: {
90
- size: {
91
- sm: "h-4 w-4 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-1 data-[state=checked]:rtl:-translate-x-4 data-[state=unchecked]:rtl:-translate-x-1",
92
- md: "h-5 w-5 data-[state=checked]:translate-x-4.5 data-[state=unchecked]:translate-x-1 data-[state=checked]:rtl:-translate-x-4.5 data-[state=unchecked]:rtl:-translate-x-1",
93
- lg: "h-6 w-6 data-[state=checked]:translate-x-5.5 data-[state=unchecked]:translate-x-1 data-[state=checked]:rtl:-translate-x-5.5 data-[state=unchecked]:rtl:-translate-x-1",
94
- },
95
- shape: {
96
- default: "rounded-full",
97
- square: "rounded-xs",
98
- },
99
- style: {
100
- solid: "",
101
- outline: "border",
102
- },
103
- mini: {
104
- true: "size-4.5 border border-input",
105
- false: "",
106
- },
107
- },
108
- compoundVariants: [
109
- {
110
- style: "outline",
111
- className: "data-[state=checked]:border-background",
112
- },
113
- {
114
- style: "outline",
115
- variant: "default",
116
- className: "data-[state=checked]:bg-primary dark:data-[state=checked]:bg-primary",
117
- },
118
- {
119
- style: "outline",
120
- variant: "destructive",
121
- className: "data-[state=checked]:bg-destructive dark:data-[state=checked]:bg-destructive",
122
- },
123
- {
124
- style: "outline",
125
- variant: "success",
126
- className: "data-[state=checked]:bg-green-600 dark:data-[state=checked]:bg-green-400",
127
- },
128
- {
129
- style: "outline",
130
- variant: "info",
131
- className: "data-[state=checked]:bg-sky-600 dark:data-[state=checked]:bg-sky-400",
132
- },
133
- {
134
- style: "outline",
135
- variant: "warning",
136
- className: "data-[state=checked]:bg-amber-600 dark:data-[state=checked]:bg-amber-400",
137
- },
138
- ],
139
- defaultVariants: {
140
- size: "sm",
141
- shape: "default",
142
- style: "solid",
143
- mini: false,
144
- },
145
- }
146
- );
147
-
148
- const Switch = React.forwardRef<
149
- React.ElementRef<typeof SwitchPrimitive.Root>,
150
- React.ComponentPropsWithoutRef<typeof SwitchPrimitive.Root> &
151
- VariantProps<typeof switchRootVariants> &
152
- SwitchVariantContextValue
153
- >(({ className, size, variant, shape, style, mini, children, ...props }, ref) => {
154
- const contextValue = { size, variant, shape, style, mini };
155
-
156
- return (
157
- <SwitchVariantContext.Provider value={contextValue}>
158
- <SwitchPrimitive.Root
159
- className={cn(switchRootVariants({ size, variant, shape, style, mini }), className)}
160
- {...props}
161
- ref={ref}
162
- >
163
- {children || <SwitchThumb />}
164
- </SwitchPrimitive.Root>
165
- </SwitchVariantContext.Provider>
166
- );
167
- });
168
- Switch.displayName = SwitchPrimitive.Root.displayName;
169
-
170
- // Thumb component consuming context
171
- const SwitchThumb = React.forwardRef<
172
- React.ElementRef<typeof SwitchPrimitive.Thumb>,
173
- React.ComponentPropsWithoutRef<typeof SwitchPrimitive.Thumb>
174
- >(({ className, ...props }, ref) => {
175
- const { size, shape, style, mini, variant } = React.useContext(SwitchVariantContext);
176
-
177
- return (
178
- <SwitchPrimitive.Thumb
179
- ref={ref}
180
- className={cn(switchThumbVariants({ size, shape, style, mini, variant }), className)}
181
- {...props}
182
- />
183
- );
184
- });
185
- SwitchThumb.displayName = SwitchPrimitive.Thumb.displayName;
186
-
187
- export { Switch, SwitchThumb };