@hanzo/ui 0.5.10

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 (166) hide show
  1. package/assets/lux-site-icons/android-chrome-192x192.png +0 -0
  2. package/assets/lux-site-icons/android-chrome-512x512.png +0 -0
  3. package/assets/lux-site-icons/apple-touch-icon.png +0 -0
  4. package/assets/lux-site-icons/favicon-16x16.png +0 -0
  5. package/assets/lux-site-icons/favicon-32x32.png +0 -0
  6. package/assets/lux-site-icons/favicon.ico +0 -0
  7. package/assets/standard-docs/LUX-NFT-Terms-and-Conditions.pdf +0 -0
  8. package/assets/standard-docs/LUX-Privacy-Policy.pdf +0 -0
  9. package/blocks/components/accordian-block.tsx +48 -0
  10. package/blocks/components/block-component-props.ts +11 -0
  11. package/blocks/components/bullet-cards-block.tsx +43 -0
  12. package/blocks/components/card-block.tsx +213 -0
  13. package/blocks/components/carte-blanche-block/index.tsx +98 -0
  14. package/blocks/components/content.tsx +70 -0
  15. package/blocks/components/cta-block.tsx +98 -0
  16. package/blocks/components/enh-heading-block.tsx +194 -0
  17. package/blocks/components/grid-block/grid-block-mutator.ts +12 -0
  18. package/blocks/components/grid-block/index.tsx +83 -0
  19. package/blocks/components/grid-block/mutator-registry.ts +10 -0
  20. package/blocks/components/grid-block/table-borders.mutator.ts +47 -0
  21. package/blocks/components/group-block.tsx +83 -0
  22. package/blocks/components/heading-block.tsx +88 -0
  23. package/blocks/components/image-block.tsx +108 -0
  24. package/blocks/components/index.ts +30 -0
  25. package/blocks/components/screenful-block/content.tsx +115 -0
  26. package/blocks/components/screenful-block/index.tsx +77 -0
  27. package/blocks/components/screenful-block/poster-background.tsx +34 -0
  28. package/blocks/components/screenful-block/video-background.tsx +45 -0
  29. package/blocks/components/space-block.tsx +66 -0
  30. package/blocks/components/video-block.tsx +137 -0
  31. package/blocks/def/accordian-block.ts +14 -0
  32. package/blocks/def/block.ts +7 -0
  33. package/blocks/def/bullet-cards-block.ts +20 -0
  34. package/blocks/def/card-block.ts +24 -0
  35. package/blocks/def/carte-blanche-block.ts +20 -0
  36. package/blocks/def/cta-block.ts +19 -0
  37. package/blocks/def/element-block.ts +11 -0
  38. package/blocks/def/enh-heading-block.ts +45 -0
  39. package/blocks/def/grid-block.ts +16 -0
  40. package/blocks/def/group-block.ts +11 -0
  41. package/blocks/def/heading-block.ts +15 -0
  42. package/blocks/def/image-block.ts +36 -0
  43. package/blocks/def/index.ts +35 -0
  44. package/blocks/def/screenful-block.ts +51 -0
  45. package/blocks/def/space-block.ts +64 -0
  46. package/blocks/def/video-block.ts +28 -0
  47. package/blocks/index.ts +2 -0
  48. package/common/chat-widget.tsx +75 -0
  49. package/common/contact-dialog/contact-form.tsx +111 -0
  50. package/common/contact-dialog/disclaimer.tsx +13 -0
  51. package/common/contact-dialog/index.tsx +48 -0
  52. package/common/copyright.tsx +21 -0
  53. package/common/drawer-menu.tsx +51 -0
  54. package/common/footer.tsx +77 -0
  55. package/common/head-metadata/from-next/metadata-types.ts +158 -0
  56. package/common/head-metadata/from-next/opengraph-types.ts +267 -0
  57. package/common/head-metadata/from-next/twitter-types.ts +92 -0
  58. package/common/head-metadata/index.tsx +208 -0
  59. package/common/header/index.tsx +57 -0
  60. package/common/header/mobile-nav.tsx +72 -0
  61. package/common/header/theme-toggle.tsx +26 -0
  62. package/common/icons/github.tsx +14 -0
  63. package/common/icons/index.tsx +34 -0
  64. package/common/icons/lux-logo.tsx +10 -0
  65. package/common/icons/secure-delivery.tsx +13 -0
  66. package/common/icons/social-icon.tsx +35 -0
  67. package/common/icons/youtube-logo.tsx +59 -0
  68. package/common/index.ts +14 -0
  69. package/common/logo.tsx +71 -0
  70. package/common/mini-chart/index.tsx +8 -0
  71. package/common/mini-chart/mini-chart-props.ts +44 -0
  72. package/common/mini-chart/mini-chart.tsx +76 -0
  73. package/common/mini-chart/wrapper.tsx +23 -0
  74. package/context-providers/index.ts +1 -0
  75. package/context-providers/theme-provider.tsx +20 -0
  76. package/next/README.md +11 -0
  77. package/next/determine-device-middleware.ts +16 -0
  78. package/next/fonts/DrukTextWide-Bold-Trial.otf +0 -0
  79. package/next/fonts/DrukTextWide-Heavy-Trial.otf +0 -0
  80. package/next/fonts/DrukTextWide-Medium-Trial.otf +0 -0
  81. package/next/get-app-router-font-classes.ts +12 -0
  82. package/next/load-and-return-lux-next-fonts-on-import.ts +68 -0
  83. package/next/next-font-desc.ts +28 -0
  84. package/next/not-found-content.mdx +4 -0
  85. package/next/not-found.tsx +23 -0
  86. package/next/pages-router-font-vars.tsx +18 -0
  87. package/next/root-layout.tsx +53 -0
  88. package/package.json +105 -0
  89. package/primitives/accordion.tsx +61 -0
  90. package/primitives/action-button.tsx +46 -0
  91. package/primitives/apply-typography.tsx +55 -0
  92. package/primitives/avatar.tsx +49 -0
  93. package/primitives/badge.tsx +36 -0
  94. package/primitives/button.tsx +73 -0
  95. package/primitives/calendar.tsx +72 -0
  96. package/primitives/card.tsx +83 -0
  97. package/primitives/checkbox.tsx +32 -0
  98. package/primitives/command.tsx +155 -0
  99. package/primitives/dialog-video-controller.tsx +38 -0
  100. package/primitives/dialog.tsx +152 -0
  101. package/primitives/form.tsx +179 -0
  102. package/primitives/index.ts +144 -0
  103. package/primitives/inline-icon.tsx +37 -0
  104. package/primitives/input.tsx +30 -0
  105. package/primitives/label.tsx +28 -0
  106. package/primitives/link-element.tsx +104 -0
  107. package/primitives/main.tsx +17 -0
  108. package/primitives/mdx-link.tsx +22 -0
  109. package/primitives/nav-items.tsx +48 -0
  110. package/primitives/popover.tsx +35 -0
  111. package/primitives/progress.tsx +27 -0
  112. package/primitives/scroll-area.tsx +47 -0
  113. package/primitives/select.tsx +169 -0
  114. package/primitives/separator.tsx +29 -0
  115. package/primitives/sheet.tsx +175 -0
  116. package/primitives/skeleton.tsx +15 -0
  117. package/primitives/switch.tsx +33 -0
  118. package/primitives/table.tsx +117 -0
  119. package/primitives/tabs.tsx +60 -0
  120. package/primitives/tailwind-indicator.tsx +19 -0
  121. package/primitives/text-area.tsx +26 -0
  122. package/primitives/toast.tsx +129 -0
  123. package/primitives/toaster.tsx +37 -0
  124. package/primitives/use-toast.ts +192 -0
  125. package/primitives/video-player.tsx +26 -0
  126. package/primitives/youtube-embed.tsx +83 -0
  127. package/siteDef/footer/community.tsx +67 -0
  128. package/siteDef/footer/company.ts +37 -0
  129. package/siteDef/footer/ecosystem.ts +37 -0
  130. package/siteDef/footer/index.tsx +26 -0
  131. package/siteDef/footer/legal.ts +28 -0
  132. package/siteDef/footer/network.ts +33 -0
  133. package/siteDef/footer/svg/warpcast-logo.svg +12 -0
  134. package/siteDef/main-nav.ts +35 -0
  135. package/style/globals.css +13 -0
  136. package/style/hanzo-common.css +32 -0
  137. package/style/hanzo-default-colors.css +79 -0
  138. package/style/social-svg.css +3 -0
  139. package/tailwind/colors.tailwind.js +46 -0
  140. package/tailwind/fonts.tailwind.ts +31 -0
  141. package/tailwind/index.ts +18 -0
  142. package/tailwind/lux-tw-fonts.ts +32 -0
  143. package/tailwind/safelist.tailwind.js +26 -0
  144. package/tailwind/screens.tailwind.js +8 -0
  145. package/tailwind/spacing.tailwind.js +57 -0
  146. package/tailwind/tailwind.config.base.js +905 -0
  147. package/tailwind/tw-font-desc.ts +15 -0
  148. package/tailwind/typo-plugin/get-plugin-styles.js +676 -0
  149. package/tailwind/typo-plugin/index.d.ts +9 -0
  150. package/tailwind/typo-plugin/index.js +141 -0
  151. package/tailwind/typo-plugin/utils.js +60 -0
  152. package/tailwind/typography-test.mdx +36 -0
  153. package/types/breakpoints.ts +11 -0
  154. package/types/bullet-item.ts +10 -0
  155. package/types/button-def.ts +39 -0
  156. package/types/contact-info.ts +11 -0
  157. package/types/dimensions.ts +20 -0
  158. package/types/grid-def.ts +37 -0
  159. package/types/icon.ts +10 -0
  160. package/types/image-def.ts +28 -0
  161. package/types/index.ts +29 -0
  162. package/types/link-def.ts +59 -0
  163. package/types/site-def.ts +31 -0
  164. package/types/t-shirt-size.ts +5 -0
  165. package/util/index.ts +76 -0
  166. package/util/specifier.ts +43 -0
@@ -0,0 +1,47 @@
1
+ 'use client'
2
+ import React from 'react'
3
+ import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area'
4
+
5
+ import { cn } from '../util'
6
+
7
+ const ScrollArea = React.forwardRef<
8
+ React.ElementRef<typeof ScrollAreaPrimitive.Root>,
9
+ React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>
10
+ >(({ className, children, ...props }, ref) => (
11
+ <ScrollAreaPrimitive.Root
12
+ ref={ref}
13
+ className={cn('relative overflow-hidden', className)}
14
+ {...props}
15
+ >
16
+ <ScrollAreaPrimitive.Viewport className='h-full w-full rounded-[inherit]'>
17
+ {children}
18
+ </ScrollAreaPrimitive.Viewport>
19
+ <ScrollBar />
20
+ <ScrollAreaPrimitive.Corner />
21
+ </ScrollAreaPrimitive.Root>
22
+ ))
23
+ ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName
24
+
25
+ const ScrollBar = React.forwardRef<
26
+ React.ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,
27
+ React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>
28
+ >(({ className, orientation = 'vertical', ...props }, ref) => (
29
+ <ScrollAreaPrimitive.ScrollAreaScrollbar
30
+ ref={ref}
31
+ orientation={orientation}
32
+ className={cn(
33
+ 'flex touch-none select-none transition-colors',
34
+ orientation === 'vertical' &&
35
+ 'h-full w-2.5 border-l border-l-transparent p-[1px]',
36
+ orientation === 'horizontal' &&
37
+ 'h-2.5 flex-col border-t border-t-transparent p-[1px]',
38
+ className
39
+ )}
40
+ {...props}
41
+ >
42
+ <ScrollAreaPrimitive.ScrollAreaThumb className='relative flex-1 rounded-full bg-muted-2' />
43
+ </ScrollAreaPrimitive.ScrollAreaScrollbar>
44
+ ))
45
+ ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName
46
+
47
+ export { ScrollArea, ScrollBar }
@@ -0,0 +1,169 @@
1
+ 'use client'
2
+
3
+ import React from 'react'
4
+ import * as SelectPrimitive from '@radix-ui/react-select'
5
+ import { Check, ChevronDown, ChevronUp } from 'lucide-react'
6
+
7
+ import { cn } from '../util'
8
+
9
+ const Select = SelectPrimitive.Root
10
+ const SelectGroup = SelectPrimitive.Group
11
+ const SelectValue = SelectPrimitive.Value
12
+
13
+ const SelectTrigger = React.forwardRef<
14
+ React.ElementRef<typeof SelectPrimitive.Trigger>,
15
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>
16
+ >(({ className, children, ...props }, ref) => (
17
+ <SelectPrimitive.Trigger
18
+ ref={ref}
19
+ className={cn(
20
+ 'flex h-10 w-full items-center justify-between rounded-md border border-muted-2 ' +
21
+ 'bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-3 ' +
22
+ 'focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 ' +
23
+ 'disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1',
24
+ className
25
+ )}
26
+ {...props}
27
+ >
28
+ {children}
29
+ <SelectPrimitive.Icon asChild>
30
+ <ChevronDown className='h-4 w-4 opacity-50' />
31
+ </SelectPrimitive.Icon>
32
+ </SelectPrimitive.Trigger>
33
+ ))
34
+ SelectTrigger.displayName = SelectPrimitive.Trigger.displayName
35
+
36
+ const SelectScrollUpButton = React.forwardRef<
37
+ React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,
38
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>
39
+ >(({ className, ...props }, ref) => (
40
+ <SelectPrimitive.ScrollUpButton
41
+ ref={ref}
42
+ className={cn(
43
+ 'flex cursor-default items-center justify-center py-1',
44
+ className
45
+ )}
46
+ {...props}
47
+ >
48
+ <ChevronUp className='h-4 w-4' />
49
+ </SelectPrimitive.ScrollUpButton>
50
+ ))
51
+ SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName
52
+
53
+ const SelectScrollDownButton = React.forwardRef<
54
+ React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,
55
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>
56
+ >(({ className, ...props }, ref) => (
57
+ <SelectPrimitive.ScrollDownButton
58
+ ref={ref}
59
+ className={cn(
60
+ 'flex cursor-default items-center justify-center py-1',
61
+ className
62
+ )}
63
+ {...props}
64
+ >
65
+ <ChevronDown className='h-4 w-4' />
66
+ </SelectPrimitive.ScrollDownButton>
67
+ ))
68
+ SelectScrollDownButton.displayName =
69
+ SelectPrimitive.ScrollDownButton.displayName
70
+
71
+ const SelectContent = React.forwardRef<
72
+ React.ElementRef<typeof SelectPrimitive.Content>,
73
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>
74
+ >(({ className, children, position = 'popper', ...props }, ref) => (
75
+ <SelectPrimitive.Portal>
76
+ <SelectPrimitive.Content
77
+ ref={ref}
78
+ className={cn(
79
+ 'relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border ' +
80
+ 'bg-level-1 text-foreground shadow-md data-[state=open]:animate-in ' +
81
+ 'data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 ' +
82
+ 'data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 ' +
83
+ 'data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 ' +
84
+ 'data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
85
+ (position === 'popper') &&
86
+ 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 ' +
87
+ 'data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',
88
+ className
89
+ )}
90
+ position={position}
91
+ {...props}
92
+ >
93
+ <SelectScrollUpButton />
94
+ <SelectPrimitive.Viewport
95
+ className={cn(
96
+ 'p-1',
97
+ position === 'popper' &&
98
+ 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]'
99
+ )}
100
+ >
101
+ {children}
102
+ </SelectPrimitive.Viewport>
103
+ <SelectScrollDownButton />
104
+ </SelectPrimitive.Content>
105
+ </SelectPrimitive.Portal>
106
+ ))
107
+ SelectContent.displayName = SelectPrimitive.Content.displayName
108
+
109
+ const SelectLabel = React.forwardRef<
110
+ React.ElementRef<typeof SelectPrimitive.Label>,
111
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>
112
+ >(({ className, ...props }, ref) => (
113
+ <SelectPrimitive.Label
114
+ ref={ref}
115
+ className={cn('py-1.5 pl-8 pr-2 text-sm font-semibold', className)}
116
+ {...props}
117
+ />
118
+ ))
119
+ SelectLabel.displayName = SelectPrimitive.Label.displayName
120
+
121
+ const SelectItem = React.forwardRef<
122
+ React.ElementRef<typeof SelectPrimitive.Item>,
123
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>
124
+ >(({ className, children, ...props }, ref) => (
125
+ <SelectPrimitive.Item
126
+ ref={ref}
127
+ className={cn(
128
+ 'relative flex w-full cursor-default select-none items-center rounded-sm ' +
129
+ 'py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-level-2 focus:text-accent ' +
130
+ 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
131
+ className
132
+ )}
133
+ {...props}
134
+ >
135
+ <span className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>
136
+ <SelectPrimitive.ItemIndicator>
137
+ <Check className='h-4 w-4' />
138
+ </SelectPrimitive.ItemIndicator>
139
+ </span>
140
+
141
+ <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
142
+ </SelectPrimitive.Item>
143
+ ))
144
+ SelectItem.displayName = SelectPrimitive.Item.displayName
145
+
146
+ const SelectSeparator = React.forwardRef<
147
+ React.ElementRef<typeof SelectPrimitive.Separator>,
148
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>
149
+ >(({ className, ...props }, ref) => (
150
+ <SelectPrimitive.Separator
151
+ ref={ref}
152
+ className={cn('-mx-1 my-1 h-px bg-level-1', className)}
153
+ {...props}
154
+ />
155
+ ))
156
+ SelectSeparator.displayName = SelectPrimitive.Separator.displayName
157
+
158
+ export {
159
+ Select,
160
+ SelectGroup,
161
+ SelectValue,
162
+ SelectTrigger,
163
+ SelectContent,
164
+ SelectLabel,
165
+ SelectItem,
166
+ SelectSeparator,
167
+ SelectScrollUpButton,
168
+ SelectScrollDownButton,
169
+ }
@@ -0,0 +1,29 @@
1
+ 'use client'
2
+ import React from 'react'
3
+ import * as SeparatorPrimitive from '@radix-ui/react-separator'
4
+
5
+ import { cn } from '../util'
6
+
7
+ const Separator = React.forwardRef<
8
+ React.ElementRef<typeof SeparatorPrimitive.Root>,
9
+ React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
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-muted-2',
20
+ orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',
21
+ className
22
+ )}
23
+ {...props}
24
+ />
25
+ )
26
+ )
27
+ Separator.displayName = SeparatorPrimitive.Root.displayName
28
+
29
+ export default Separator
@@ -0,0 +1,175 @@
1
+ // @ts-nocheck
2
+
3
+ 'use client'
4
+
5
+ import * as React from 'react'
6
+ import * as SheetPrimitive from '@radix-ui/react-dialog'
7
+ import { cva, type VariantProps } from 'class-variance-authority'
8
+
9
+ import { cn } from '../util'
10
+
11
+ const Sheet = SheetPrimitive.Root
12
+
13
+ const SheetTrigger = SheetPrimitive.Trigger
14
+
15
+ const SheetClose = SheetPrimitive.Close
16
+
17
+ const SheetPortal = SheetPrimitive.Portal
18
+
19
+ const SheetOverlay = React.forwardRef<
20
+ React.ElementRef<typeof SheetPrimitive.Overlay>,
21
+ React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>
22
+ >(({ className, ...props }, ref) => (
23
+ <SheetPrimitive.Overlay
24
+ className={cn(
25
+ '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',
26
+ className
27
+ )}
28
+ {...props}
29
+ ref={ref}
30
+ />
31
+ ))
32
+ SheetOverlay.displayName = SheetPrimitive.Overlay.displayName
33
+
34
+ const sheetVariants = cva(
35
+ '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-300',
36
+ {
37
+ variants: {
38
+ side: {
39
+ //top: 'inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top',
40
+ //bottom: 'inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom',
41
+ left: 'inset-y-0 left-0 h-full w-5/6 sm:w-2/3 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm',
42
+ right:
43
+ 'inset-y-0 right-0 h-full w-5/6 sm:w-2/3 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm',
44
+ },
45
+ },
46
+ defaultVariants: {
47
+ side: 'right',
48
+ },
49
+ }
50
+ )
51
+
52
+ interface SheetContentProps
53
+ extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,
54
+ VariantProps<typeof sheetVariants> {}
55
+
56
+ const closeUIclx = 'rounded-sm opacity-70 ring-offset-background ' +
57
+ 'transition-opacity hover:opacity-100 disabled:pointer-events-none data-[state=open]:bg-secondary'
58
+
59
+ const SheetContent = React.forwardRef<
60
+ React.ElementRef<typeof SheetPrimitive.Content>,
61
+ SheetContentProps &
62
+ {
63
+ closeButtonClass? : string
64
+ closeElement: ReactNode
65
+ centerElement?: ReactNode
66
+ duplicateCloseOnBottom?: boolean
67
+ }
68
+ >(({
69
+ side = 'right',
70
+ className,
71
+ children,
72
+ closeElement,
73
+ centerElement,
74
+ duplicateCloseOnBottom=false,
75
+ closeButtonClass,
76
+ ...props
77
+ }, ref ) => {
78
+
79
+ const xOfCloseUIClass = (side === 'right') ? 'left-2' : 'right-2'
80
+
81
+ return (
82
+ <SheetPortal>
83
+ <SheetOverlay />
84
+ <SheetPrimitive.Content
85
+ ref={ref}
86
+ className={cn(sheetVariants({ side }), className)}
87
+ {...props}
88
+ >
89
+ {children}
90
+
91
+ <SheetPrimitive.Close className={cn(closeUIclx, 'absolute z-10 top-3', xOfCloseUIClass, closeButtonClass)}>
92
+ {closeElement}
93
+ </SheetPrimitive.Close>
94
+ {duplicateCloseOnBottom && (
95
+ <SheetPrimitive.Close className={cn(closeUIclx, 'absolute z-10 bottom-3', xOfCloseUIClass, closeButtonClass)}>
96
+ {closeElement}
97
+ </SheetPrimitive.Close>
98
+ )}
99
+ {centerElement && (
100
+ <div className={'absolute z-0 top-3 left-0 right-0 flex flex-row justify-center align-start'} >
101
+ {centerElement}
102
+ </div>
103
+ )}
104
+ </SheetPrimitive.Content>
105
+ </SheetPortal>
106
+ )
107
+ }
108
+ )
109
+
110
+ SheetContent.displayName = SheetPrimitive.Content.displayName
111
+
112
+ const SheetHeader = ({
113
+ className,
114
+ ...props
115
+ }: React.HTMLAttributes<HTMLDivElement>) => (
116
+ <div
117
+ className={cn(
118
+ 'flex flex-col space-y-2 text-center sm:text-left',
119
+ className
120
+ )}
121
+ {...props}
122
+ />
123
+ )
124
+ SheetHeader.displayName = 'SheetHeader'
125
+
126
+ const SheetFooter = ({
127
+ className,
128
+ ...props
129
+ }: React.HTMLAttributes<HTMLDivElement>) => (
130
+ <div
131
+ className={cn(
132
+ 'flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2',
133
+ className
134
+ )}
135
+ {...props}
136
+ />
137
+ )
138
+ SheetFooter.displayName = 'SheetFooter'
139
+
140
+ const SheetTitle = React.forwardRef<
141
+ React.ElementRef<typeof SheetPrimitive.Title>,
142
+ React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>
143
+ >(({ className, ...props }, ref) => (
144
+ <SheetPrimitive.Title
145
+ ref={ref}
146
+ className={cn('text-lg font-semibold text-foreground', className)}
147
+ {...props}
148
+ />
149
+ ))
150
+ SheetTitle.displayName = SheetPrimitive.Title.displayName
151
+
152
+ const SheetDescription = React.forwardRef<
153
+ React.ElementRef<typeof SheetPrimitive.Description>,
154
+ React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>
155
+ >(({ className, ...props }, ref) => (
156
+ <SheetPrimitive.Description
157
+ ref={ref}
158
+ className={cn('text-sm text-muted-1', className)}
159
+ {...props}
160
+ />
161
+ ))
162
+ SheetDescription.displayName = SheetPrimitive.Description.displayName
163
+
164
+ export {
165
+ Sheet,
166
+ SheetPortal,
167
+ SheetOverlay,
168
+ SheetTrigger,
169
+ SheetClose,
170
+ SheetContent,
171
+ SheetHeader,
172
+ SheetFooter,
173
+ SheetTitle,
174
+ SheetDescription,
175
+ }
@@ -0,0 +1,15 @@
1
+ import { cn } from '../util'
2
+
3
+ function Skeleton({
4
+ className,
5
+ ...props
6
+ }: React.HTMLAttributes<HTMLDivElement>) {
7
+ return (
8
+ <div
9
+ className={cn('animate-pulse rounded-md bg-muted', className)}
10
+ {...props}
11
+ />
12
+ )
13
+ }
14
+
15
+ export default Skeleton
@@ -0,0 +1,33 @@
1
+ 'use client'
2
+ import React from 'react'
3
+ import * as SwitchPrimitives from '@radix-ui/react-switch'
4
+
5
+ import { cn } from '../util'
6
+
7
+ const Switch = React.forwardRef<
8
+ React.ElementRef<typeof SwitchPrimitives.Root>,
9
+ React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>
10
+ >(({ className, ...props }, ref) => (
11
+ <SwitchPrimitives.Root
12
+ className={cn(
13
+ 'peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full ' +
14
+ 'border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none ' +
15
+ 'focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ' +
16
+ 'focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 ' +
17
+ 'data-[state=checked]:bg-primary data-[state=unchecked]:bg-input',
18
+ className
19
+ )}
20
+ {...props}
21
+ ref={ref}
22
+ >
23
+ <SwitchPrimitives.Thumb
24
+ className={
25
+ 'pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ' +
26
+ 'ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0'
27
+ }
28
+ />
29
+ </SwitchPrimitives.Root>
30
+ ))
31
+ Switch.displayName = SwitchPrimitives.Root.displayName
32
+
33
+ export default Switch
@@ -0,0 +1,117 @@
1
+ import * as React from 'react'
2
+
3
+ import { cn } from '../util'
4
+
5
+ const Table = React.forwardRef<
6
+ HTMLTableElement,
7
+ React.HTMLAttributes<HTMLTableElement>
8
+ >(({ className, ...props }, ref) => (
9
+ <div className='relative w-full overflow-auto'>
10
+ <table
11
+ ref={ref}
12
+ className={cn('w-full caption-bottom text-sm', className)}
13
+ {...props}
14
+ />
15
+ </div>
16
+ ))
17
+ Table.displayName = 'Table'
18
+
19
+ const TableHeader = React.forwardRef<
20
+ HTMLTableSectionElement,
21
+ React.HTMLAttributes<HTMLTableSectionElement>
22
+ >(({ className, ...props }, ref) => (
23
+ <thead ref={ref} className={cn('[&_tr]:border-b', className)} {...props} />
24
+ ))
25
+ TableHeader.displayName = 'TableHeader'
26
+
27
+ const TableBody = React.forwardRef<
28
+ HTMLTableSectionElement,
29
+ React.HTMLAttributes<HTMLTableSectionElement>
30
+ >(({ className, ...props }, ref) => (
31
+ <tbody
32
+ ref={ref}
33
+ className={cn('[&_tr:last-child]:border-0', className)}
34
+ {...props}
35
+ />
36
+ ))
37
+ TableBody.displayName = 'TableBody'
38
+
39
+ const TableFooter = React.forwardRef<
40
+ HTMLTableSectionElement,
41
+ React.HTMLAttributes<HTMLTableSectionElement>
42
+ >(({ className, ...props }, ref) => (
43
+ <tfoot
44
+ ref={ref}
45
+ className={cn(
46
+ 'border-t bg-level-1 font-medium [&>tr]:last:border-b-0',
47
+ className
48
+ )}
49
+ {...props}
50
+ />
51
+ ))
52
+ TableFooter.displayName = 'TableFooter'
53
+
54
+ const TableRow = React.forwardRef<
55
+ HTMLTableRowElement,
56
+ React.HTMLAttributes<HTMLTableRowElement>
57
+ >(({ className, ...props }, ref) => (
58
+ <tr
59
+ ref={ref}
60
+ className={cn(
61
+ 'border-b transition-colors hover:bg-level-1 data-[state=selected]:bg-level-1',
62
+ className
63
+ )}
64
+ {...props}
65
+ />
66
+ ))
67
+ TableRow.displayName = 'TableRow'
68
+
69
+ const TableHead = React.forwardRef<
70
+ HTMLTableCellElement,
71
+ React.ThHTMLAttributes<HTMLTableCellElement>
72
+ >(({ className, ...props }, ref) => (
73
+ <th
74
+ ref={ref}
75
+ className={cn(
76
+ 'h-12 px-4 text-left align-middle font-medium text-muted [&:has([role=checkbox])]:pr-0',
77
+ className
78
+ )}
79
+ {...props}
80
+ />
81
+ ))
82
+ TableHead.displayName = 'TableHead'
83
+
84
+ const TableCell = React.forwardRef<
85
+ HTMLTableCellElement,
86
+ React.TdHTMLAttributes<HTMLTableCellElement>
87
+ >(({ className, ...props }, ref) => (
88
+ <td
89
+ ref={ref}
90
+ className={cn('p-4 align-middle [&:has([role=checkbox])]:pr-0', className)}
91
+ {...props}
92
+ />
93
+ ))
94
+ TableCell.displayName = 'TableCell'
95
+
96
+ const TableCaption = React.forwardRef<
97
+ HTMLTableCaptionElement,
98
+ React.HTMLAttributes<HTMLTableCaptionElement>
99
+ >(({ className, ...props }, ref) => (
100
+ <caption
101
+ ref={ref}
102
+ className={cn('mt-4 text-sm text-muted', className)}
103
+ {...props}
104
+ />
105
+ ))
106
+ TableCaption.displayName = 'TableCaption'
107
+
108
+ export {
109
+ Table,
110
+ TableHeader,
111
+ TableBody,
112
+ TableFooter,
113
+ TableHead,
114
+ TableRow,
115
+ TableCell,
116
+ TableCaption,
117
+ }
@@ -0,0 +1,60 @@
1
+ 'use client'
2
+ import React from 'react'
3
+ import * as TabsPrimitive from '@radix-ui/react-tabs'
4
+
5
+ import { cn } from '../util'
6
+
7
+ const Tabs = TabsPrimitive.Root
8
+
9
+ const TabsList = React.forwardRef<
10
+ React.ElementRef<typeof TabsPrimitive.List>,
11
+ React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>
12
+ >(({ className, ...props }, ref) => (
13
+ <TabsPrimitive.List
14
+ ref={ref}
15
+ className={cn(
16
+ 'inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-foreground',
17
+ className
18
+ )}
19
+ {...props}
20
+ />
21
+ ))
22
+ TabsList.displayName = TabsPrimitive.List.displayName
23
+
24
+ const TabsTrigger = React.forwardRef<
25
+ React.ElementRef<typeof TabsPrimitive.Trigger>,
26
+ React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>
27
+ >(({ className, ...props }, ref) => (
28
+ <TabsPrimitive.Trigger
29
+ ref={ref}
30
+ className={cn(
31
+ 'inline-flex items-center justify-center whitespace-nowrap rounded-sm ' +
32
+ 'px-3 py-1.5 text-sm font-medium ring-offset-background transition-all ' +
33
+ 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ' +
34
+ 'focus-visible:ring-offset-2 disabled:pointer-events-none ' +
35
+ 'disabled:opacity-50 data-[state=active]:bg-background ' +
36
+ 'data-[state=active]:text-foreground data-[state=active]:shadow-sm',
37
+ className
38
+ )}
39
+ {...props}
40
+ />
41
+ ))
42
+ TabsTrigger.displayName = TabsPrimitive.Trigger.displayName
43
+
44
+ const TabsContent = React.forwardRef<
45
+ React.ElementRef<typeof TabsPrimitive.Content>,
46
+ React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>
47
+ >(({ className, ...props }, ref) => (
48
+ <TabsPrimitive.Content
49
+ ref={ref}
50
+ className={cn(
51
+ 'mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 ' +
52
+ 'focus-visible:ring-ring focus-visible:ring-offset-2',
53
+ className
54
+ )}
55
+ {...props}
56
+ />
57
+ ))
58
+ TabsContent.displayName = TabsPrimitive.Content.displayName
59
+
60
+ export { Tabs, TabsList, TabsTrigger, TabsContent }
@@ -0,0 +1,19 @@
1
+ import React from 'react'
2
+
3
+ const TailwindIndicator: React.FC = () => {
4
+
5
+ if (process.env.NODE_ENV === "production") return null
6
+
7
+ return (
8
+ <div className="fixed bottom-1 left-1 z-50 flex h-6 w-6 items-center justify-center rounded-full bg-gray-800 p-3 font-mono text-xs text-primary">
9
+ <div className="block sm:hidden">xs</div>
10
+ <div className="hidden sm:block md:hidden">sm</div>
11
+ <div className="hidden md:block lg:hidden">md</div>
12
+ <div className="hidden lg:block xl:hidden">lg</div>
13
+ <div className="hidden xl:block 2xl:hidden">xl</div>
14
+ <div className="hidden 2xl:block">2xl</div>
15
+ </div>
16
+ )
17
+ }
18
+
19
+ export default TailwindIndicator
@@ -0,0 +1,26 @@
1
+ import React from 'react'
2
+
3
+ import { cn } from '../util'
4
+
5
+ export interface TextAreaProps
6
+ extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}
7
+
8
+ const TextArea = React.forwardRef<HTMLTextAreaElement, TextAreaProps>(
9
+ ({ className, ...props }, ref) => {
10
+ return (
11
+ <textarea
12
+ className={cn(
13
+ 'flex min-h-[80px] w-full rounded-md border border-muted-2 px-3 py-2 text-sm ' +
14
+ 'placeholder:text-muted-3 focus-visible:outline-none focus-visible:ring-2 ' +
15
+ 'focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
16
+ className
17
+ )}
18
+ ref={ref}
19
+ {...props}
20
+ />
21
+ )
22
+ }
23
+ )
24
+ TextArea.displayName = 'TextArea'
25
+
26
+ export default TextArea