livemark 0.0.0-dev

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 (187) hide show
  1. package/LICENSE.md +9 -0
  2. package/README.md +3 -0
  3. package/build/actions/config/define.d.ts +6 -0
  4. package/build/actions/config/define.js +8 -0
  5. package/build/actions/config/define.unit.d.ts +1 -0
  6. package/build/actions/config/define.unit.js +34 -0
  7. package/build/actions/config/load.d.ts +5 -0
  8. package/build/actions/config/load.js +22 -0
  9. package/build/actions/config/load.unit.d.ts +1 -0
  10. package/build/actions/config/load.unit.js +23 -0
  11. package/build/commands/build.d.ts +5 -0
  12. package/build/commands/build.js +13 -0
  13. package/build/commands/preview.d.ts +5 -0
  14. package/build/commands/preview.js +18 -0
  15. package/build/commands/start.d.ts +5 -0
  16. package/build/commands/start.js +19 -0
  17. package/build/docs/markdown/includes/example.d.ts +9 -0
  18. package/build/docs/markdown/includes/example.js +5 -0
  19. package/build/entrypoints/main.d.ts +2 -0
  20. package/build/entrypoints/main.js +12 -0
  21. package/build/helpers/program.d.ts +2 -0
  22. package/build/helpers/program.js +5 -0
  23. package/build/index.d.ts +1 -0
  24. package/build/index.js +2 -0
  25. package/build/livemark.config.d.ts +9 -0
  26. package/build/livemark.config.js +5 -0
  27. package/build/models/config.d.ts +33 -0
  28. package/build/models/config.js +14 -0
  29. package/build/program.d.ts +2 -0
  30. package/build/program.js +14 -0
  31. package/build/vite.config.d.ts +2 -0
  32. package/build/vite.config.js +48 -0
  33. package/build/website/client.tsx +10 -0
  34. package/build/website/components/Abbr.tsx +17 -0
  35. package/build/website/components/AnsiCode.tsx +15 -0
  36. package/build/website/components/Banner.tsx +32 -0
  37. package/build/website/components/Breadcrumbs.tsx +19 -0
  38. package/build/website/components/Callout.tsx +72 -0
  39. package/build/website/components/Cards.tsx +66 -0
  40. package/build/website/components/CodeBlock.tsx +118 -0
  41. package/build/website/components/CodeTabs.tsx +83 -0
  42. package/build/website/components/Columns.tsx +17 -0
  43. package/build/website/components/Content.tsx +7 -0
  44. package/build/website/components/ContentTab.tsx +7 -0
  45. package/build/website/components/ContentTabs.tsx +82 -0
  46. package/build/website/components/DefaultCatchBoundary.tsx +54 -0
  47. package/build/website/components/DefinitionList.tsx +21 -0
  48. package/build/website/components/Details.tsx +30 -0
  49. package/build/website/components/FileTree.tsx +52 -0
  50. package/build/website/components/Footer.tsx +9 -0
  51. package/build/website/components/FootnoteRef.tsx +52 -0
  52. package/build/website/components/Heading.tsx +20 -0
  53. package/build/website/components/InlineBadge.tsx +9 -0
  54. package/build/website/components/InlineIcon.tsx +21 -0
  55. package/build/website/components/InlineToc.tsx +31 -0
  56. package/build/website/components/Layout.tsx +220 -0
  57. package/build/website/components/LinkButton.tsx +31 -0
  58. package/build/website/components/Mermaid.tsx +37 -0
  59. package/build/website/components/NotFound.tsx +27 -0
  60. package/build/website/components/PackageTabs.tsx +74 -0
  61. package/build/website/components/PageToolbar.tsx +65 -0
  62. package/build/website/components/PrevNext.tsx +52 -0
  63. package/build/website/components/SearchDialog.tsx +245 -0
  64. package/build/website/components/Section.tsx +24 -0
  65. package/build/website/components/SectionHeader.tsx +35 -0
  66. package/build/website/components/SiteTitle.tsx +16 -0
  67. package/build/website/components/SortableTable.tsx +81 -0
  68. package/build/website/components/SoundCloud.tsx +16 -0
  69. package/build/website/components/Theme.tsx +40 -0
  70. package/build/website/components/Toc.tsx +99 -0
  71. package/build/website/components/YouTube.tsx +16 -0
  72. package/build/website/components/ZoomImage.tsx +30 -0
  73. package/build/website/content-collections.ts +181 -0
  74. package/build/website/elements/accordion.tsx +78 -0
  75. package/build/website/elements/alert-dialog.tsx +185 -0
  76. package/build/website/elements/alert.tsx +74 -0
  77. package/build/website/elements/aspect-ratio.tsx +22 -0
  78. package/build/website/elements/avatar.tsx +107 -0
  79. package/build/website/elements/badge.tsx +51 -0
  80. package/build/website/elements/breadcrumb.tsx +120 -0
  81. package/build/website/elements/button-group.tsx +87 -0
  82. package/build/website/elements/button.tsx +57 -0
  83. package/build/website/elements/calendar.tsx +229 -0
  84. package/build/website/elements/card.tsx +102 -0
  85. package/build/website/elements/carousel.tsx +240 -0
  86. package/build/website/elements/chart.tsx +372 -0
  87. package/build/website/elements/checkbox.tsx +26 -0
  88. package/build/website/elements/collapsible.tsx +19 -0
  89. package/build/website/elements/command.tsx +210 -0
  90. package/build/website/elements/context-menu.tsx +270 -0
  91. package/build/website/elements/dialog.tsx +152 -0
  92. package/build/website/elements/direction.tsx +4 -0
  93. package/build/website/elements/drawer.tsx +127 -0
  94. package/build/website/elements/dropdown-menu.tsx +260 -0
  95. package/build/website/elements/empty.tsx +104 -0
  96. package/build/website/elements/field.tsx +235 -0
  97. package/build/website/elements/hover-card.tsx +49 -0
  98. package/build/website/elements/input-group.tsx +171 -0
  99. package/build/website/elements/input-otp.tsx +84 -0
  100. package/build/website/elements/input.tsx +18 -0
  101. package/build/website/elements/item.tsx +199 -0
  102. package/build/website/elements/kbd.tsx +26 -0
  103. package/build/website/elements/label.tsx +17 -0
  104. package/build/website/elements/menubar.tsx +282 -0
  105. package/build/website/elements/native-select.tsx +56 -0
  106. package/build/website/elements/navigation-menu.tsx +171 -0
  107. package/build/website/elements/pagination.tsx +133 -0
  108. package/build/website/elements/popover.tsx +88 -0
  109. package/build/website/elements/progress.tsx +81 -0
  110. package/build/website/elements/radio-group.tsx +36 -0
  111. package/build/website/elements/resizable.tsx +48 -0
  112. package/build/website/elements/scroll-area.tsx +51 -0
  113. package/build/website/elements/select.tsx +200 -0
  114. package/build/website/elements/separator.tsx +22 -0
  115. package/build/website/elements/sheet.tsx +130 -0
  116. package/build/website/elements/sidebar.tsx +717 -0
  117. package/build/website/elements/skeleton.tsx +13 -0
  118. package/build/website/elements/slider.tsx +57 -0
  119. package/build/website/elements/sonner.tsx +40 -0
  120. package/build/website/elements/spinner.tsx +16 -0
  121. package/build/website/elements/switch.tsx +30 -0
  122. package/build/website/elements/table.tsx +112 -0
  123. package/build/website/elements/tabs.tsx +79 -0
  124. package/build/website/elements/textarea.tsx +16 -0
  125. package/build/website/elements/toggle-group.tsx +87 -0
  126. package/build/website/elements/toggle.tsx +43 -0
  127. package/build/website/elements/tooltip.tsx +67 -0
  128. package/build/website/env.d.ts +10 -0
  129. package/build/website/globals.d.ts +8 -0
  130. package/build/website/helpers/article-icon.ts +59 -0
  131. package/build/website/helpers/articles.ts +24 -0
  132. package/build/website/helpers/resolve-includes.ts +131 -0
  133. package/build/website/helpers/resolve-includes.unit.ts +126 -0
  134. package/build/website/helpers/search-text.ts +15 -0
  135. package/build/website/helpers/style.ts +6 -0
  136. package/build/website/helpers/theme.ts +27 -0
  137. package/build/website/helpers/toc-context.ts +10 -0
  138. package/build/website/helpers/toc.ts +51 -0
  139. package/build/website/helpers/toc.unit.ts +74 -0
  140. package/build/website/hooks/in-view.ts +30 -0
  141. package/build/website/hooks/media.ts +19 -0
  142. package/build/website/models/article.ts +40 -0
  143. package/build/website/plugins/rehype-inline-code.ts +107 -0
  144. package/build/website/plugins/remark-abbr.ts +46 -0
  145. package/build/website/plugins/remark-abbr.unit.ts +99 -0
  146. package/build/website/plugins/remark-ansi.ts +247 -0
  147. package/build/website/plugins/remark-ansi.unit.ts +197 -0
  148. package/build/website/plugins/remark-badge.ts +50 -0
  149. package/build/website/plugins/remark-badge.unit.ts +96 -0
  150. package/build/website/plugins/remark-button.ts +60 -0
  151. package/build/website/plugins/remark-button.unit.ts +147 -0
  152. package/build/website/plugins/remark-callout.ts +57 -0
  153. package/build/website/plugins/remark-card.ts +80 -0
  154. package/build/website/plugins/remark-code-tabs.ts +87 -0
  155. package/build/website/plugins/remark-columns.ts +66 -0
  156. package/build/website/plugins/remark-custom-heading-id.ts +70 -0
  157. package/build/website/plugins/remark-custom-heading-id.unit.ts +131 -0
  158. package/build/website/plugins/remark-deflist.ts +36 -0
  159. package/build/website/plugins/remark-details.ts +49 -0
  160. package/build/website/plugins/remark-filetree.ts +89 -0
  161. package/build/website/plugins/remark-filetree.unit.ts +137 -0
  162. package/build/website/plugins/remark-github-callout.ts +71 -0
  163. package/build/website/plugins/remark-icon.ts +42 -0
  164. package/build/website/plugins/remark-image.ts +25 -0
  165. package/build/website/plugins/remark-media.ts +62 -0
  166. package/build/website/plugins/remark-media.unit.ts +74 -0
  167. package/build/website/plugins/remark-mermaid.ts +23 -0
  168. package/build/website/plugins/remark-npm.ts +52 -0
  169. package/build/website/plugins/remark-steps.ts +36 -0
  170. package/build/website/plugins/remark-steps.unit.ts +97 -0
  171. package/build/website/plugins/remark-tab.ts +100 -0
  172. package/build/website/plugins/remark-tab.unit.ts +181 -0
  173. package/build/website/plugins/remark-toc.ts +39 -0
  174. package/build/website/plugins/remark-toc.unit.ts +82 -0
  175. package/build/website/plugins/shiki-icon.ts +82 -0
  176. package/build/website/plugins/shiki-line-highlight.ts +174 -0
  177. package/build/website/public/logo.svg +72 -0
  178. package/build/website/routeTree.gen.ts +86 -0
  179. package/build/website/router.tsx +34 -0
  180. package/build/website/routes/$.tsx +149 -0
  181. package/build/website/routes/__root.tsx +84 -0
  182. package/build/website/routes/index.tsx +13 -0
  183. package/build/website/server.ts +7 -0
  184. package/build/website/styles/general.css +347 -0
  185. package/build/website/vite.config.ts +36 -0
  186. package/entrypoints/main.ts +12 -0
  187. package/package.json +120 -0
@@ -0,0 +1,171 @@
1
+ import { NavigationMenu as NavigationMenuPrimitive } from "@base-ui/react/navigation-menu"
2
+ import { cva } from "class-variance-authority"
3
+ import { ChevronDownIcon } from "lucide-react"
4
+
5
+ import { cn } from "../helpers/style.ts"
6
+
7
+ function NavigationMenu({
8
+ align = "start",
9
+ className,
10
+ children,
11
+ ...props
12
+ }: NavigationMenuPrimitive.Root.Props &
13
+ Pick<NavigationMenuPrimitive.Positioner.Props, "align">) {
14
+ return (
15
+ <NavigationMenuPrimitive.Root
16
+ data-slot="navigation-menu"
17
+ className={cn(
18
+ "group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
19
+ className,
20
+ )}
21
+ {...props}
22
+ >
23
+ {children}
24
+ <NavigationMenuPositioner align={align} />
25
+ </NavigationMenuPrimitive.Root>
26
+ )
27
+ }
28
+
29
+ function NavigationMenuList({
30
+ className,
31
+ ...props
32
+ }: React.ComponentPropsWithRef<typeof NavigationMenuPrimitive.List>) {
33
+ return (
34
+ <NavigationMenuPrimitive.List
35
+ data-slot="navigation-menu-list"
36
+ className={cn(
37
+ "group flex flex-1 list-none items-center justify-center gap-0",
38
+ className,
39
+ )}
40
+ {...props}
41
+ />
42
+ )
43
+ }
44
+
45
+ function NavigationMenuItem({
46
+ className,
47
+ ...props
48
+ }: React.ComponentPropsWithRef<typeof NavigationMenuPrimitive.Item>) {
49
+ return (
50
+ <NavigationMenuPrimitive.Item
51
+ data-slot="navigation-menu-item"
52
+ className={cn("relative", className)}
53
+ {...props}
54
+ />
55
+ )
56
+ }
57
+
58
+ const navigationMenuTriggerStyle = cva(
59
+ "group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted",
60
+ )
61
+
62
+ function NavigationMenuTrigger({
63
+ className,
64
+ children,
65
+ ...props
66
+ }: NavigationMenuPrimitive.Trigger.Props) {
67
+ return (
68
+ <NavigationMenuPrimitive.Trigger
69
+ data-slot="navigation-menu-trigger"
70
+ className={cn(navigationMenuTriggerStyle(), "group", className)}
71
+ {...props}
72
+ >
73
+ {children}{" "}
74
+ <ChevronDownIcon
75
+ className="relative top-px ml-1 size-3 transition duration-300 group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180"
76
+ aria-hidden="true"
77
+ />
78
+ </NavigationMenuPrimitive.Trigger>
79
+ )
80
+ }
81
+
82
+ function NavigationMenuContent({
83
+ className,
84
+ ...props
85
+ }: NavigationMenuPrimitive.Content.Props) {
86
+ return (
87
+ <NavigationMenuPrimitive.Content
88
+ data-slot="navigation-menu-content"
89
+ className={cn(
90
+ "data-ending-style:data-activation-direction=left:translate-x-[50%] data-ending-style:data-activation-direction=right:translate-x-[-50%] data-starting-style:data-activation-direction=left:translate-x-[-50%] data-starting-style:data-activation-direction=right:translate-x-[50%] h-full w-auto p-2 pr-2.5 transition-[opacity,transform,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:ring-foreground/10 group-data-[viewport=false]/navigation-menu:duration-300 data-ending-style:opacity-0 data-starting-style:opacity-0 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95",
91
+ className,
92
+ )}
93
+ {...props}
94
+ />
95
+ )
96
+ }
97
+
98
+ function NavigationMenuPositioner({
99
+ className,
100
+ side = "bottom",
101
+ sideOffset = 8,
102
+ align = "start",
103
+ alignOffset = 0,
104
+ ...props
105
+ }: NavigationMenuPrimitive.Positioner.Props) {
106
+ return (
107
+ <NavigationMenuPrimitive.Portal>
108
+ <NavigationMenuPrimitive.Positioner
109
+ side={side}
110
+ sideOffset={sideOffset}
111
+ align={align}
112
+ alignOffset={alignOffset}
113
+ className={cn(
114
+ "isolate z-50 h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0",
115
+ className,
116
+ )}
117
+ {...props}
118
+ >
119
+ <NavigationMenuPrimitive.Popup className="data-[ending-style]:easing-[ease] xs:w-(--popup-width) relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) rounded-lg bg-popover text-popover-foreground shadow ring-1 ring-foreground/10 transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0">
120
+ <NavigationMenuPrimitive.Viewport className="relative size-full overflow-hidden" />
121
+ </NavigationMenuPrimitive.Popup>
122
+ </NavigationMenuPrimitive.Positioner>
123
+ </NavigationMenuPrimitive.Portal>
124
+ )
125
+ }
126
+
127
+ function NavigationMenuLink({
128
+ className,
129
+ ...props
130
+ }: NavigationMenuPrimitive.Link.Props) {
131
+ return (
132
+ <NavigationMenuPrimitive.Link
133
+ data-slot="navigation-menu-link"
134
+ className={cn(
135
+ "flex items-center gap-1.5 rounded-md p-2 text-sm transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-sm data-[active=true]:bg-muted/50 data-[active=true]:hover:bg-muted data-[active=true]:focus:bg-muted [&_svg:not([class*='size-'])]:size-4",
136
+ className,
137
+ )}
138
+ {...props}
139
+ />
140
+ )
141
+ }
142
+
143
+ function NavigationMenuIndicator({
144
+ className,
145
+ ...props
146
+ }: React.ComponentPropsWithRef<typeof NavigationMenuPrimitive.Icon>) {
147
+ return (
148
+ <NavigationMenuPrimitive.Icon
149
+ data-slot="navigation-menu-indicator"
150
+ className={cn(
151
+ "top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in",
152
+ className,
153
+ )}
154
+ {...props}
155
+ >
156
+ <div className="relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" />
157
+ </NavigationMenuPrimitive.Icon>
158
+ )
159
+ }
160
+
161
+ export {
162
+ NavigationMenu,
163
+ NavigationMenuContent,
164
+ NavigationMenuIndicator,
165
+ NavigationMenuItem,
166
+ NavigationMenuLink,
167
+ NavigationMenuList,
168
+ NavigationMenuTrigger,
169
+ navigationMenuTriggerStyle,
170
+ NavigationMenuPositioner,
171
+ }
@@ -0,0 +1,133 @@
1
+ import * as React from "react"
2
+ import {
3
+ ChevronLeftIcon,
4
+ ChevronRightIcon,
5
+ MoreHorizontalIcon,
6
+ } from "lucide-react"
7
+
8
+ import { cn } from "../helpers/style.ts"
9
+ import { Button } from "./button.tsx"
10
+
11
+ function Pagination({ className, ...props }: React.ComponentProps<"nav">) {
12
+ return (
13
+ <nav
14
+ role="navigation"
15
+ aria-label="pagination"
16
+ data-slot="pagination"
17
+ className={cn("mx-auto flex w-full justify-center", className)}
18
+ {...props}
19
+ />
20
+ )
21
+ }
22
+
23
+ function PaginationContent({
24
+ className,
25
+ ...props
26
+ }: React.ComponentProps<"ul">) {
27
+ return (
28
+ <ul
29
+ data-slot="pagination-content"
30
+ className={cn("flex items-center gap-1", className)}
31
+ {...props}
32
+ />
33
+ )
34
+ }
35
+
36
+ function PaginationItem({ ...props }: React.ComponentProps<"li">) {
37
+ return <li data-slot="pagination-item" {...props} />
38
+ }
39
+
40
+ type PaginationLinkProps = {
41
+ isActive?: boolean
42
+ } & Pick<React.ComponentProps<typeof Button>, "size"> &
43
+ React.ComponentProps<"a">
44
+
45
+ function PaginationLink({
46
+ className,
47
+ isActive,
48
+ size = "icon",
49
+ ...props
50
+ }: PaginationLinkProps) {
51
+ return (
52
+ <Button
53
+ variant={isActive ? "outline" : "ghost"}
54
+ size={size}
55
+ className={cn(className)}
56
+ nativeButton={false}
57
+ render={
58
+ <a
59
+ aria-current={isActive ? "page" : undefined}
60
+ data-slot="pagination-link"
61
+ data-active={isActive}
62
+ {...props}
63
+ />
64
+ }
65
+ />
66
+ )
67
+ }
68
+
69
+ function PaginationPrevious({
70
+ className,
71
+ text = "Previous",
72
+ ...props
73
+ }: React.ComponentProps<typeof PaginationLink> & { text?: string }) {
74
+ return (
75
+ <PaginationLink
76
+ aria-label="Go to previous page"
77
+ size="default"
78
+ className={cn("pl-2!", className)}
79
+ {...props}
80
+ >
81
+ <ChevronLeftIcon data-icon="inline-start" className="cn-rtl-flip" />
82
+ <span className="hidden sm:block">{text}</span>
83
+ </PaginationLink>
84
+ )
85
+ }
86
+
87
+ function PaginationNext({
88
+ className,
89
+ text = "Next",
90
+ ...props
91
+ }: React.ComponentProps<typeof PaginationLink> & { text?: string }) {
92
+ return (
93
+ <PaginationLink
94
+ aria-label="Go to next page"
95
+ size="default"
96
+ className={cn("pr-2!", className)}
97
+ {...props}
98
+ >
99
+ <span className="hidden sm:block">{text}</span>
100
+ <ChevronRightIcon data-icon="inline-end" className="cn-rtl-flip" />
101
+ </PaginationLink>
102
+ )
103
+ }
104
+
105
+ function PaginationEllipsis({
106
+ className,
107
+ ...props
108
+ }: React.ComponentProps<"span">) {
109
+ return (
110
+ <span
111
+ aria-hidden
112
+ data-slot="pagination-ellipsis"
113
+ className={cn(
114
+ "flex size-9 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
115
+ className,
116
+ )}
117
+ {...props}
118
+ >
119
+ <MoreHorizontalIcon />
120
+ <span className="sr-only">More pages</span>
121
+ </span>
122
+ )
123
+ }
124
+
125
+ export {
126
+ Pagination,
127
+ PaginationContent,
128
+ PaginationEllipsis,
129
+ PaginationItem,
130
+ PaginationLink,
131
+ PaginationNext,
132
+ PaginationPrevious,
133
+ }
@@ -0,0 +1,88 @@
1
+ import * as React from "react"
2
+ import { Popover as PopoverPrimitive } from "@base-ui/react/popover"
3
+
4
+ import { cn } from "../helpers/style.ts"
5
+
6
+ function Popover({ ...props }: PopoverPrimitive.Root.Props) {
7
+ return <PopoverPrimitive.Root data-slot="popover" {...props} />
8
+ }
9
+
10
+ function PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props) {
11
+ return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />
12
+ }
13
+
14
+ function PopoverContent({
15
+ className,
16
+ align = "center",
17
+ alignOffset = 0,
18
+ side = "bottom",
19
+ sideOffset = 4,
20
+ ...props
21
+ }: PopoverPrimitive.Popup.Props &
22
+ Pick<
23
+ PopoverPrimitive.Positioner.Props,
24
+ "align" | "alignOffset" | "side" | "sideOffset"
25
+ >) {
26
+ return (
27
+ <PopoverPrimitive.Portal>
28
+ <PopoverPrimitive.Positioner
29
+ align={align}
30
+ alignOffset={alignOffset}
31
+ side={side}
32
+ sideOffset={sideOffset}
33
+ className="isolate z-50"
34
+ >
35
+ <PopoverPrimitive.Popup
36
+ data-slot="popover-content"
37
+ className={cn(
38
+ "z-50 flex w-72 origin-(--transform-origin) flex-col gap-4 rounded-md bg-popover p-4 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
39
+ className,
40
+ )}
41
+ {...props}
42
+ />
43
+ </PopoverPrimitive.Positioner>
44
+ </PopoverPrimitive.Portal>
45
+ )
46
+ }
47
+
48
+ function PopoverHeader({ className, ...props }: React.ComponentProps<"div">) {
49
+ return (
50
+ <div
51
+ data-slot="popover-header"
52
+ className={cn("flex flex-col gap-1 text-sm", className)}
53
+ {...props}
54
+ />
55
+ )
56
+ }
57
+
58
+ function PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {
59
+ return (
60
+ <PopoverPrimitive.Title
61
+ data-slot="popover-title"
62
+ className={cn("cn-font-heading font-medium", className)}
63
+ {...props}
64
+ />
65
+ )
66
+ }
67
+
68
+ function PopoverDescription({
69
+ className,
70
+ ...props
71
+ }: PopoverPrimitive.Description.Props) {
72
+ return (
73
+ <PopoverPrimitive.Description
74
+ data-slot="popover-description"
75
+ className={cn("text-muted-foreground", className)}
76
+ {...props}
77
+ />
78
+ )
79
+ }
80
+
81
+ export {
82
+ Popover,
83
+ PopoverContent,
84
+ PopoverDescription,
85
+ PopoverHeader,
86
+ PopoverTitle,
87
+ PopoverTrigger,
88
+ }
@@ -0,0 +1,81 @@
1
+ import { Progress as ProgressPrimitive } from "@base-ui/react/progress"
2
+
3
+ import { cn } from "../helpers/style.ts"
4
+
5
+ function Progress({
6
+ className,
7
+ children,
8
+ value,
9
+ ...props
10
+ }: ProgressPrimitive.Root.Props) {
11
+ return (
12
+ <ProgressPrimitive.Root
13
+ value={value}
14
+ data-slot="progress"
15
+ className={cn("flex flex-wrap gap-3", className)}
16
+ {...props}
17
+ >
18
+ {children}
19
+ <ProgressTrack>
20
+ <ProgressIndicator />
21
+ </ProgressTrack>
22
+ </ProgressPrimitive.Root>
23
+ )
24
+ }
25
+
26
+ function ProgressTrack({ className, ...props }: ProgressPrimitive.Track.Props) {
27
+ return (
28
+ <ProgressPrimitive.Track
29
+ className={cn(
30
+ "relative flex h-1.5 w-full items-center overflow-x-hidden rounded-full bg-muted",
31
+ className,
32
+ )}
33
+ data-slot="progress-track"
34
+ {...props}
35
+ />
36
+ )
37
+ }
38
+
39
+ function ProgressIndicator({
40
+ className,
41
+ ...props
42
+ }: ProgressPrimitive.Indicator.Props) {
43
+ return (
44
+ <ProgressPrimitive.Indicator
45
+ data-slot="progress-indicator"
46
+ className={cn("h-full bg-primary transition-all", className)}
47
+ {...props}
48
+ />
49
+ )
50
+ }
51
+
52
+ function ProgressLabel({ className, ...props }: ProgressPrimitive.Label.Props) {
53
+ return (
54
+ <ProgressPrimitive.Label
55
+ className={cn("text-sm font-medium", className)}
56
+ data-slot="progress-label"
57
+ {...props}
58
+ />
59
+ )
60
+ }
61
+
62
+ function ProgressValue({ className, ...props }: ProgressPrimitive.Value.Props) {
63
+ return (
64
+ <ProgressPrimitive.Value
65
+ className={cn(
66
+ "ml-auto text-sm text-muted-foreground tabular-nums",
67
+ className,
68
+ )}
69
+ data-slot="progress-value"
70
+ {...props}
71
+ />
72
+ )
73
+ }
74
+
75
+ export {
76
+ Progress,
77
+ ProgressTrack,
78
+ ProgressIndicator,
79
+ ProgressLabel,
80
+ ProgressValue,
81
+ }
@@ -0,0 +1,36 @@
1
+ import { Radio as RadioPrimitive } from "@base-ui/react/radio"
2
+ import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group"
3
+
4
+ import { cn } from "../helpers/style.ts"
5
+
6
+ function RadioGroup({ className, ...props }: RadioGroupPrimitive.Props) {
7
+ return (
8
+ <RadioGroupPrimitive
9
+ data-slot="radio-group"
10
+ className={cn("grid w-full gap-3", className)}
11
+ {...props}
12
+ />
13
+ )
14
+ }
15
+
16
+ function RadioGroupItem({ className, ...props }: RadioPrimitive.Root.Props) {
17
+ return (
18
+ <RadioPrimitive.Root
19
+ data-slot="radio-group-item"
20
+ className={cn(
21
+ "group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",
22
+ className,
23
+ )}
24
+ {...props}
25
+ >
26
+ <RadioPrimitive.Indicator
27
+ data-slot="radio-group-indicator"
28
+ className="flex size-4 items-center justify-center"
29
+ >
30
+ <span className="absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground" />
31
+ </RadioPrimitive.Indicator>
32
+ </RadioPrimitive.Root>
33
+ )
34
+ }
35
+
36
+ export { RadioGroup, RadioGroupItem }
@@ -0,0 +1,48 @@
1
+ import * as ResizablePrimitive from "react-resizable-panels"
2
+
3
+ import { cn } from "../helpers/style.ts"
4
+
5
+ function ResizablePanelGroup({
6
+ className,
7
+ ...props
8
+ }: ResizablePrimitive.GroupProps) {
9
+ return (
10
+ <ResizablePrimitive.Group
11
+ data-slot="resizable-panel-group"
12
+ className={cn(
13
+ "flex h-full w-full aria-[orientation=vertical]:flex-col",
14
+ className,
15
+ )}
16
+ {...props}
17
+ />
18
+ )
19
+ }
20
+
21
+ function ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) {
22
+ return <ResizablePrimitive.Panel data-slot="resizable-panel" {...props} />
23
+ }
24
+
25
+ function ResizableHandle({
26
+ withHandle,
27
+ className,
28
+ ...props
29
+ }: ResizablePrimitive.SeparatorProps & {
30
+ withHandle?: boolean
31
+ }) {
32
+ return (
33
+ <ResizablePrimitive.Separator
34
+ data-slot="resizable-handle"
35
+ className={cn(
36
+ "relative flex w-px items-center justify-center bg-border ring-offset-background 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-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90",
37
+ className,
38
+ )}
39
+ {...props}
40
+ >
41
+ {withHandle && (
42
+ <div className="z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border" />
43
+ )}
44
+ </ResizablePrimitive.Separator>
45
+ )
46
+ }
47
+
48
+ export { ResizableHandle, ResizablePanel, ResizablePanelGroup }
@@ -0,0 +1,51 @@
1
+ import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area"
2
+ import { cn } from "../helpers/style.ts"
3
+
4
+ function ScrollArea({
5
+ className,
6
+ children,
7
+ ...props
8
+ }: ScrollAreaPrimitive.Root.Props) {
9
+ return (
10
+ <ScrollAreaPrimitive.Root
11
+ data-slot="scroll-area"
12
+ className={cn("relative", className)}
13
+ {...props}
14
+ >
15
+ <ScrollAreaPrimitive.Viewport
16
+ data-slot="scroll-area-viewport"
17
+ className="focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"
18
+ >
19
+ {children}
20
+ </ScrollAreaPrimitive.Viewport>
21
+ <ScrollBar />
22
+ <ScrollAreaPrimitive.Corner />
23
+ </ScrollAreaPrimitive.Root>
24
+ )
25
+ }
26
+
27
+ function ScrollBar({
28
+ className,
29
+ orientation = "vertical",
30
+ ...props
31
+ }: ScrollAreaPrimitive.Scrollbar.Props) {
32
+ return (
33
+ <ScrollAreaPrimitive.Scrollbar
34
+ data-slot="scroll-area-scrollbar"
35
+ data-orientation={orientation}
36
+ orientation={orientation}
37
+ className={cn(
38
+ "data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent flex touch-none p-px transition-colors select-none",
39
+ className,
40
+ )}
41
+ {...props}
42
+ >
43
+ <ScrollAreaPrimitive.Thumb
44
+ data-slot="scroll-area-thumb"
45
+ className="rounded-full bg-border relative flex-1"
46
+ />
47
+ </ScrollAreaPrimitive.Scrollbar>
48
+ )
49
+ }
50
+
51
+ export { ScrollArea, ScrollBar }