fulldev-ui 0.10.0 → 0.11.0

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 (262) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +7 -1
  3. package/package.json +6 -4
  4. package/public/r/accordion.json +8 -2
  5. package/public/r/alert-dialog.json +9 -3
  6. package/public/r/alert.json +6 -0
  7. package/public/r/article-1.json +7 -1
  8. package/public/r/article-2.json +7 -1
  9. package/public/r/articles-1.json +7 -1
  10. package/public/r/articles-2.json +7 -1
  11. package/public/r/articles-3.json +7 -1
  12. package/public/r/articles-4.json +7 -1
  13. package/public/r/avatar.json +6 -0
  14. package/public/r/badge.json +6 -0
  15. package/public/r/banner-1.json +7 -1
  16. package/public/r/banner-2.json +7 -1
  17. package/public/r/banner.json +6 -0
  18. package/public/r/blocks-1.json +6 -1
  19. package/public/r/blocks.json +92 -0
  20. package/public/r/breadcrumb.json +6 -0
  21. package/public/r/button.json +6 -0
  22. package/public/r/card.json +6 -0
  23. package/public/r/carousel.json +6 -0
  24. package/public/r/checkbox.json +6 -0
  25. package/public/r/collapsible.json +7 -1
  26. package/public/r/combobox.json +6 -0
  27. package/public/r/command.json +6 -0
  28. package/public/r/components.json +14 -3
  29. package/public/r/contact-1.json +10 -2
  30. package/public/r/contact-2.json +10 -2
  31. package/public/r/contact-3.json +10 -2
  32. package/public/r/content-1.json +7 -1
  33. package/public/r/content-2.json +7 -1
  34. package/public/r/content-3.json +7 -1
  35. package/public/r/content-4.json +7 -1
  36. package/public/r/cta-1.json +7 -1
  37. package/public/r/cta-2.json +7 -1
  38. package/public/r/cta-3.json +7 -1
  39. package/public/r/cta-4.json +7 -1
  40. package/public/r/cta-5.json +7 -1
  41. package/public/r/cta-6.json +7 -1
  42. package/public/r/cta-7.json +7 -1
  43. package/public/r/cta-8.json +7 -1
  44. package/public/r/dialog.json +9 -3
  45. package/public/r/doc-1.json +7 -1
  46. package/public/r/dropdown-menu.json +7 -1
  47. package/public/r/empty.json +6 -0
  48. package/public/r/faqs-1.json +7 -1
  49. package/public/r/faqs-2.json +7 -1
  50. package/public/r/faqs-3.json +7 -1
  51. package/public/r/faqs-4.json +7 -1
  52. package/public/r/features-1.json +7 -1
  53. package/public/r/features-2.json +7 -1
  54. package/public/r/features-3.json +7 -1
  55. package/public/r/features-4.json +7 -1
  56. package/public/r/features-5.json +7 -1
  57. package/public/r/features-6.json +7 -1
  58. package/public/r/field.json +6 -0
  59. package/public/r/footer-1.json +7 -1
  60. package/public/r/footer-2.json +7 -1
  61. package/public/r/footer-3.json +7 -1
  62. package/public/r/form.json +6 -0
  63. package/public/r/header-1.json +7 -1
  64. package/public/r/header-2.json +7 -1
  65. package/public/r/header-3.json +7 -1
  66. package/public/r/header-4.json +7 -1
  67. package/public/r/header-5.json +7 -1
  68. package/public/r/header.json +6 -0
  69. package/public/r/hero-1.json +7 -1
  70. package/public/r/hero-10.json +7 -1
  71. package/public/r/hero-11.json +7 -1
  72. package/public/r/hero-12.json +7 -1
  73. package/public/r/hero-13.json +7 -1
  74. package/public/r/hero-2.json +7 -1
  75. package/public/r/hero-3.json +7 -1
  76. package/public/r/hero-4.json +7 -1
  77. package/public/r/hero-5.json +7 -1
  78. package/public/r/hero-6.json +7 -1
  79. package/public/r/hero-7.json +7 -1
  80. package/public/r/hero-8.json +7 -1
  81. package/public/r/hero-9.json +7 -1
  82. package/public/r/hover-card.json +9 -2
  83. package/public/r/icon.json +7 -1
  84. package/public/r/init.json +28 -0
  85. package/public/r/input-group.json +6 -0
  86. package/public/r/input.json +6 -0
  87. package/public/r/item.json +6 -0
  88. package/public/r/kbd.json +6 -0
  89. package/public/r/label.json +6 -0
  90. package/public/r/layout.json +6 -0
  91. package/public/r/links-2.json +7 -1
  92. package/public/r/logo.json +6 -0
  93. package/public/r/logos-1.json +7 -1
  94. package/public/r/logos-2.json +7 -1
  95. package/public/r/logos-3.json +7 -1
  96. package/public/r/marquee.json +6 -0
  97. package/public/r/native-select.json +6 -0
  98. package/public/r/navigation-menu.json +11 -5
  99. package/public/r/popover.json +7 -1
  100. package/public/r/price.json +6 -0
  101. package/public/r/pricing-1.json +7 -1
  102. package/public/r/pricing-2.json +7 -1
  103. package/public/r/pricing-3.json +7 -1
  104. package/public/r/product-1.json +7 -1
  105. package/public/r/products-1.json +7 -1
  106. package/public/r/products-2.json +7 -1
  107. package/public/r/products-3.json +7 -1
  108. package/public/r/products-4.json +7 -1
  109. package/public/r/products-5.json +7 -1
  110. package/public/r/radio-group.json +7 -1
  111. package/public/r/rating.json +6 -0
  112. package/public/r/registry.json +1645 -457
  113. package/public/r/reviews-1.json +7 -1
  114. package/public/r/reviews-2.json +7 -1
  115. package/public/r/reviews-3.json +7 -1
  116. package/public/r/reviews-4.json +7 -1
  117. package/public/r/reviews-5.json +7 -1
  118. package/public/r/section.json +18 -2
  119. package/public/r/select.json +6 -0
  120. package/public/r/separator.json +6 -0
  121. package/public/r/services-1.json +7 -1
  122. package/public/r/services-2.json +7 -1
  123. package/public/r/services-3.json +7 -1
  124. package/public/r/services-4.json +7 -1
  125. package/public/r/services-5.json +7 -1
  126. package/public/r/services-6.json +7 -1
  127. package/public/r/services-7.json +7 -1
  128. package/public/r/sheet.json +9 -3
  129. package/public/r/sidebar-1.json +5 -0
  130. package/public/r/sidebar.json +9 -3
  131. package/public/r/skeleton.json +6 -0
  132. package/public/r/slider.json +7 -1
  133. package/public/r/spinner.json +6 -0
  134. package/public/r/switch.json +7 -1
  135. package/public/r/table.json +6 -0
  136. package/public/r/tabs.json +8 -2
  137. package/public/r/textarea.json +6 -0
  138. package/public/r/theme-toggle.json +6 -0
  139. package/public/r/toc.json +6 -0
  140. package/public/r/toggle.json +7 -1
  141. package/public/r/tooltip.json +7 -1
  142. package/public/r/typography.json +6 -0
  143. package/public/r/video.json +6 -0
  144. package/registry/init/global.css +187 -0
  145. package/registry.json +1138 -455
  146. package/src/components/blocks/article-1.astro +4 -3
  147. package/src/components/blocks/article-2.astro +4 -3
  148. package/src/components/blocks/articles-1.astro +18 -9
  149. package/src/components/blocks/articles-2.astro +4 -3
  150. package/src/components/blocks/articles-3.astro +11 -9
  151. package/src/components/blocks/articles-4.astro +11 -4
  152. package/src/components/blocks/banner-1.astro +4 -3
  153. package/src/components/blocks/banner-2.astro +10 -4
  154. package/src/components/blocks/blocks-1.astro +1 -1
  155. package/src/components/blocks/contact-1.astro +72 -39
  156. package/src/components/blocks/contact-2.astro +69 -35
  157. package/src/components/blocks/contact-3.astro +61 -34
  158. package/src/components/blocks/content-1.astro +15 -10
  159. package/src/components/blocks/content-2.astro +15 -10
  160. package/src/components/blocks/content-3.astro +14 -12
  161. package/src/components/blocks/content-4.astro +15 -10
  162. package/src/components/blocks/cta-1.astro +14 -10
  163. package/src/components/blocks/cta-2.astro +11 -8
  164. package/src/components/blocks/cta-3.astro +15 -8
  165. package/src/components/blocks/cta-4.astro +14 -9
  166. package/src/components/blocks/cta-5.astro +12 -8
  167. package/src/components/blocks/cta-6.astro +11 -8
  168. package/src/components/blocks/cta-7.astro +17 -10
  169. package/src/components/blocks/cta-8.astro +15 -10
  170. package/src/components/blocks/doc-1.astro +1 -1
  171. package/src/components/blocks/faqs-1.astro +22 -11
  172. package/src/components/blocks/faqs-2.astro +19 -9
  173. package/src/components/blocks/faqs-3.astro +19 -9
  174. package/src/components/blocks/faqs-4.astro +12 -9
  175. package/src/components/blocks/features-1.astro +21 -13
  176. package/src/components/blocks/features-2.astro +22 -13
  177. package/src/components/blocks/features-3.astro +14 -13
  178. package/src/components/blocks/features-4.astro +18 -9
  179. package/src/components/blocks/features-5.astro +22 -13
  180. package/src/components/blocks/features-6.astro +19 -9
  181. package/src/components/blocks/footer-1.astro +4 -3
  182. package/src/components/blocks/footer-2.astro +4 -3
  183. package/src/components/blocks/footer-3.astro +4 -3
  184. package/src/components/blocks/header-1.astro +13 -7
  185. package/src/components/blocks/header-2.astro +12 -6
  186. package/src/components/blocks/header-3.astro +12 -6
  187. package/src/components/blocks/header-4.astro +13 -6
  188. package/src/components/blocks/header-5.astro +16 -6
  189. package/src/components/blocks/hero-1.astro +11 -8
  190. package/src/components/blocks/hero-10.astro +7 -3
  191. package/src/components/blocks/hero-11.astro +4 -2
  192. package/src/components/blocks/hero-12.astro +11 -4
  193. package/src/components/blocks/hero-13.astro +11 -4
  194. package/src/components/blocks/hero-2.astro +11 -8
  195. package/src/components/blocks/hero-3.astro +11 -3
  196. package/src/components/blocks/hero-4.astro +4 -2
  197. package/src/components/blocks/hero-5.astro +4 -3
  198. package/src/components/blocks/hero-6.astro +4 -3
  199. package/src/components/blocks/hero-7.astro +4 -3
  200. package/src/components/blocks/hero-8.astro +11 -4
  201. package/src/components/blocks/hero-9.astro +4 -3
  202. package/src/components/blocks/links-2.astro +4 -4
  203. package/src/components/blocks/logos-1.astro +14 -16
  204. package/src/components/blocks/logos-2.astro +14 -12
  205. package/src/components/blocks/logos-3.astro +5 -4
  206. package/src/components/blocks/pricing-1.astro +13 -16
  207. package/src/components/blocks/pricing-2.astro +14 -13
  208. package/src/components/blocks/pricing-3.astro +20 -16
  209. package/src/components/blocks/product-1.astro +4 -3
  210. package/src/components/blocks/products-1.astro +11 -9
  211. package/src/components/blocks/products-2.astro +12 -9
  212. package/src/components/blocks/products-3.astro +12 -9
  213. package/src/components/blocks/products-4.astro +18 -9
  214. package/src/components/blocks/products-5.astro +18 -9
  215. package/src/components/blocks/reviews-1.astro +13 -12
  216. package/src/components/blocks/reviews-2.astro +4 -4
  217. package/src/components/blocks/reviews-3.astro +13 -12
  218. package/src/components/blocks/reviews-4.astro +13 -12
  219. package/src/components/blocks/reviews-5.astro +13 -12
  220. package/src/components/blocks/services-1.astro +19 -9
  221. package/src/components/blocks/services-2.astro +11 -8
  222. package/src/components/blocks/services-3.astro +11 -8
  223. package/src/components/blocks/services-4.astro +19 -9
  224. package/src/components/blocks/services-5.astro +11 -8
  225. package/src/components/blocks/services-6.astro +4 -3
  226. package/src/components/blocks/services-7.astro +12 -8
  227. package/src/components/ui/accordion/accordion-content.astro +2 -1
  228. package/src/components/ui/accordion/accordion.astro +1 -0
  229. package/src/components/ui/alert-dialog/alert-dialog-content.astro +1 -1
  230. package/src/components/ui/alert-dialog/alert-dialog-overlay.astro +1 -1
  231. package/src/components/ui/alert-dialog/alert-dialog.astro +1 -0
  232. package/src/components/ui/collapsible/collapsible.astro +1 -0
  233. package/src/components/ui/dialog/dialog-content.astro +1 -1
  234. package/src/components/ui/dialog/dialog-overlay.astro +1 -1
  235. package/src/components/ui/dialog/dialog.astro +1 -0
  236. package/src/components/ui/dropdown-menu/dropdown-menu.astro +1 -0
  237. package/src/components/ui/hover-card/hover-card.astro +10 -3
  238. package/src/components/ui/icon/icon.astro +46 -29
  239. package/src/components/ui/navigation-menu/navigation-menu-content.astro +2 -0
  240. package/src/components/ui/navigation-menu/navigation-menu-indicator.astro +2 -1
  241. package/src/components/ui/navigation-menu/navigation-menu-list.astro +1 -1
  242. package/src/components/ui/navigation-menu/navigation-menu-positioner.astro +2 -0
  243. package/src/components/ui/navigation-menu/navigation-menu.astro +1 -0
  244. package/src/components/ui/popover/popover.astro +1 -0
  245. package/src/components/ui/radio-group/radio-group.astro +1 -0
  246. package/src/components/ui/section/index.ts +2 -0
  247. package/src/components/ui/section/section-container.astro +1 -0
  248. package/src/components/ui/section/section-description.astro +20 -0
  249. package/src/components/ui/section/section-title.astro +20 -0
  250. package/src/components/ui/sheet/sheet-close.astro +4 -2
  251. package/src/components/ui/sheet/sheet-content.astro +2 -2
  252. package/src/components/ui/sheet/sheet.astro +2 -89
  253. package/src/components/ui/sidebar/sidebar-menu-button.astro +0 -1
  254. package/src/components/ui/sidebar/sidebar-provider.astro +36 -2
  255. package/src/components/ui/sidebar/sidebar.astro +0 -1
  256. package/src/components/ui/slider/slider.astro +4 -3
  257. package/src/components/ui/switch/switch.astro +5 -2
  258. package/src/components/ui/tabs/tabs-content.astro +2 -1
  259. package/src/components/ui/tabs/tabs.astro +1 -0
  260. package/src/components/ui/toggle/toggle.astro +3 -0
  261. package/src/components/ui/tooltip/tooltip.astro +1 -0
  262. package/src/lib/pages.ts +12 -0
@@ -15,7 +15,7 @@ const { class: className, style, ...props } = Astro.props
15
15
  "data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 fixed inset-0 isolate z-(--alert-dialog-overlay-stack-index) bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs",
16
16
  className
17
17
  )}
18
- style={`z-index: calc(var(--alert-dialog-overlay-stack-index, 0) + 110);${style ? ` ${style}` : ""}`}
18
+ style={`z-index: calc(var(--alert-dialog-overlay-stack-index, 0) * 2 + 100);${style ? ` ${style}` : ""}`}
19
19
  {...props}
20
20
  >
21
21
  </div>
@@ -34,4 +34,5 @@ const {
34
34
  import { create } from "@data-slot/alert-dialog"
35
35
 
36
36
  create()
37
+ document.addEventListener("astro:page-load", () => create())
37
38
  </script>
@@ -30,4 +30,5 @@ const {
30
30
  import { create } from "@data-slot/collapsible"
31
31
 
32
32
  create()
33
+ document.addEventListener("astro:page-load", () => create())
33
34
  </script>
@@ -28,7 +28,7 @@ const {
28
28
  "bg-popover text-popover-foreground ring-foreground/10 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 fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl p-6 text-sm ring-1 duration-100 outline-none sm:max-w-md",
29
29
  className
30
30
  )}
31
- style={`z-index: calc(var(--dialog-content-stack-index, 0) + 101);${style ? ` ${style}` : ""}`}
31
+ style={`z-index: calc(var(--dialog-content-stack-index, 0) * 2 + 101);${style ? ` ${style}` : ""}`}
32
32
  {...props}
33
33
  >
34
34
  {
@@ -15,7 +15,7 @@ const { class: className, style, ...props } = Astro.props
15
15
  "data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs",
16
16
  className
17
17
  )}
18
- style={`z-index: calc(var(--dialog-overlay-stack-index, 0) + 100);${style ? ` ${style}` : ""}`}
18
+ style={`z-index: calc(var(--dialog-overlay-stack-index, 0) * 2 + 100);${style ? ` ${style}` : ""}`}
19
19
  {...props}
20
20
  >
21
21
  <slot />
@@ -37,4 +37,5 @@ const {
37
37
  import { create } from "@data-slot/dialog"
38
38
 
39
39
  create()
40
+ document.addEventListener("astro:page-load", () => create())
40
41
  </script>
@@ -68,4 +68,5 @@ const defaultValuesAttr =
68
68
  import { create } from "@data-slot/dropdown-menu"
69
69
 
70
70
  create()
71
+ document.addEventListener("astro:page-load", () => create())
71
72
  </script>
@@ -43,7 +43,7 @@ const {
43
43
  <div
44
44
  data-slot="hover-card"
45
45
  data-default-open={defaultOpen}
46
- data-open={open}
46
+ data-controlled-open={open}
47
47
  data-delay={delay}
48
48
  data-skip-delay-duration={skipDelayDuration}
49
49
  data-close-delay={closeDelay}
@@ -63,7 +63,14 @@ const {
63
63
  </div>
64
64
 
65
65
  <script>
66
- import { create } from "@data-slot/hover-card"
66
+ import { getDataBool } from "@data-slot/core"
67
+ import { createHoverCard } from "@data-slot/hover-card"
67
68
 
68
- create()
69
+ const initialize = () => {
70
+ document.querySelectorAll('[data-slot="hover-card"]').forEach((root) => {
71
+ createHoverCard(root, { open: getDataBool(root, "controlledOpen") })
72
+ })
73
+ }
74
+ initialize()
75
+ document.addEventListener("astro:page-load", initialize)
69
76
  </script>
@@ -37,51 +37,68 @@ const hrefMap = {
37
37
  linkedin: "linkedin",
38
38
  } as const
39
39
 
40
- const icons = import.meta.glob([
41
- "node_modules/lucide-static/icons/*.svg",
42
- "node_modules/simple-icons/icons/*.svg",
43
- ])
40
+ type Source = "lucide" | "simple"
44
41
 
45
- const foundPath = () => {
46
- let foundPath: string | undefined = undefined
42
+ const icons: Record<Source, Record<string, () => Promise<unknown>>> = {
43
+ lucide: import.meta.glob("/node_modules/lucide-static/icons/*.svg"),
44
+ simple: import.meta.glob("/node_modules/simple-icons/icons/*.svg"),
45
+ }
46
+
47
+ const pathFor = (source: Source, icon: string) =>
48
+ source === "lucide"
49
+ ? `/node_modules/lucide-static/icons/${icon}.svg`
50
+ : `/node_modules/simple-icons/icons/${icon}.svg`
51
+
52
+ // Resolve an icon by explicit name, or derive one from a link href.
53
+ // Names may be prefixed with `lucide:` or `simple:` to pick a set when both
54
+ // sets contain the same name (for example `github` or `figma`).
55
+ const resolve = () => {
56
+ let key = name != null && name !== "" ? String(name) : undefined
57
+ let order: Source[] = ["lucide", "simple"]
47
58
 
48
- // For x.com, use the Simple Icons X instead of Lucide's X icon.
49
- if (name === "x.com") {
50
- foundPath = "/node_modules/simple-icons/icons/x.svg"
51
- } else if (name) {
52
- foundPath = Object.keys(icons).find((key) => key.includes(`/${name}.svg`))
53
- } else if (href) {
54
- const hrefKey = Object.keys(hrefMap).find((key) =>
55
- href.toString().includes(key)
59
+ if (!key && href) {
60
+ const hrefKey = Object.keys(hrefMap).find((candidate) =>
61
+ href.toString().includes(candidate)
56
62
  )
57
- const hrefValue = hrefMap[hrefKey as keyof typeof hrefMap]
58
- foundPath = Object.keys(icons)
59
- .reverse()
60
- .find((key) => key.includes(`/${hrefValue}.svg`))
63
+ if (hrefKey) {
64
+ key = hrefMap[hrefKey as keyof typeof hrefMap]
65
+ order = ["simple", "lucide"]
66
+ }
67
+ }
68
+
69
+ if (!key) return undefined
70
+ if (key === "x.com") key = "simple:x"
71
+
72
+ const [prefix, icon] = key.includes(":") ? key.split(":") : [undefined, key]
73
+ if (prefix === "lucide" || prefix === "simple") order = [prefix]
74
+
75
+ for (const source of order) {
76
+ const path = pathFor(source, icon)
77
+ if (path in icons[source]) return { source, path }
61
78
  }
62
79
 
63
- return foundPath
80
+ return undefined
64
81
  }
65
82
 
66
- const foundModule = foundPath() && icons[foundPath() as keyof typeof icons]
67
- const module = foundModule && ((await foundModule()) as any)
83
+ const resolved = resolve()
84
+ const module = resolved
85
+ ? ((await icons[resolved.source][resolved.path]()) as { default?: any })
86
+ : undefined
68
87
  const Comp = module?.default
88
+
89
+ const isLabelled =
90
+ "aria-label" in props || "aria-labelledby" in props || "role" in props
69
91
  ---
70
92
 
71
93
  {
72
- Comp && foundPath()?.includes("simple-icons") && (
94
+ Comp && resolved && (
73
95
  <Comp
74
96
  height={24}
75
97
  width={24}
76
- fill="currentColor"
98
+ fill={resolved.source === "simple" ? "currentColor" : "none"}
77
99
  class="size-[1em] text-base"
100
+ aria-hidden={isLabelled ? undefined : "true"}
78
101
  {...props}
79
102
  />
80
103
  )
81
104
  }
82
-
83
- {
84
- Comp && foundPath()?.includes("lucide-static") && (
85
- <Comp height={24} width={24} class="size-[1em] text-base" {...props} />
86
- )
87
- }
@@ -13,6 +13,7 @@ type Props = {
13
13
 
14
14
  const {
15
15
  class: className = "",
16
+ hidden = true,
16
17
  align,
17
18
  alignOffset,
18
19
  side,
@@ -24,6 +25,7 @@ const {
24
25
  <div
25
26
  {...props}
26
27
  data-slot="navigation-menu-content"
28
+ hidden={hidden}
27
29
  data-align={align}
28
30
  data-align-offset={alignOffset}
29
31
  data-side={side}
@@ -10,8 +10,9 @@ const { class: className, ...props } = Astro.props
10
10
 
11
11
  <div
12
12
  data-slot="navigation-menu-indicator"
13
+ data-state="hidden"
13
14
  class={cn(
14
- "data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in top-full z-1 flex h-1.5 items-end justify-center overflow-hidden",
15
+ "data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in absolute top-full left-(--indicator-left) z-1 flex h-1.5 w-(--indicator-width) items-end justify-center overflow-hidden data-[state=hidden]:invisible",
15
16
  className
16
17
  )}
17
18
  {...props}
@@ -11,7 +11,7 @@ const { class: className, ...props } = Astro.props
11
11
  <ul
12
12
  data-slot="navigation-menu-list"
13
13
  class={cn(
14
- "group flex flex-1 list-none items-center justify-center gap-0",
14
+ "group relative flex flex-1 list-none items-center justify-center gap-0",
15
15
  className
16
16
  )}
17
17
  {...props}
@@ -35,10 +35,12 @@ const {
35
35
  >
36
36
  <div
37
37
  data-slot="navigation-menu-popup"
38
+ hidden
38
39
  class="data-[ending-style]:easing-[ease] xs:w-(--popup-width) bg-popover text-popover-foreground ring-foreground/10 relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) rounded-lg shadow ring-1 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"
39
40
  >
40
41
  <div
41
42
  data-slot="navigation-menu-viewport"
43
+ hidden
42
44
  class="relative size-full overflow-hidden"
43
45
  >
44
46
  </div>
@@ -60,4 +60,5 @@ const {
60
60
  import { create } from "@data-slot/navigation-menu"
61
61
 
62
62
  create()
63
+ document.addEventListener("astro:page-load", () => create())
63
64
  </script>
@@ -56,4 +56,5 @@ const {
56
56
  import { create } from "@data-slot/popover"
57
57
 
58
58
  create()
59
+ document.addEventListener("astro:page-load", () => create())
59
60
  </script>
@@ -39,4 +39,5 @@ const {
39
39
  import { create } from "@data-slot/radio-group"
40
40
 
41
41
  create()
42
+ document.addEventListener("astro:page-load", () => create())
42
43
  </script>
@@ -1,2 +1,4 @@
1
1
  export { default as Section } from "./section.astro"
2
2
  export { default as SectionContainer } from "./section-container.astro"
3
+ export { default as SectionDescription } from "./section-description.astro"
4
+ export { default as SectionTitle } from "./section-title.astro"
@@ -9,6 +9,7 @@ const { class: className, ...props } = Astro.props
9
9
  ---
10
10
 
11
11
  <div
12
+ data-slot="section-container"
12
13
  class={cn(
13
14
  "relative mx-auto flex w-full max-w-7xl flex-col gap-8 px-4",
14
15
  className
@@ -0,0 +1,20 @@
1
+ ---
2
+ import type { HTMLAttributes } from "astro/types"
3
+
4
+ import { cn } from "@/lib/utils"
5
+
6
+ type Props = HTMLAttributes<"p">
7
+
8
+ const { class: className, ...props } = Astro.props
9
+ ---
10
+
11
+ <p
12
+ data-slot="section-description"
13
+ class={cn(
14
+ "text-muted-foreground text-lg leading-relaxed text-balance",
15
+ className
16
+ )}
17
+ {...props}
18
+ >
19
+ <slot />
20
+ </p>
@@ -0,0 +1,20 @@
1
+ ---
2
+ import type { HTMLTag, Polymorphic } from "astro/types"
3
+
4
+ import { cn } from "@/lib/utils"
5
+
6
+ type Props<Tag extends HTMLTag = "h2"> = Polymorphic<{ as: Tag }>
7
+
8
+ const { as: Tag = "h2", class: className, ...props } = Astro.props
9
+ ---
10
+
11
+ <Tag
12
+ data-slot="section-title"
13
+ class={cn(
14
+ "text-foreground text-3xl font-semibold tracking-tight text-balance sm:text-4xl",
15
+ className
16
+ )}
17
+ {...props}
18
+ >
19
+ <slot />
20
+ </Tag>
@@ -1,9 +1,11 @@
1
1
  ---
2
- import type { ComponentProps } from "astro/types"
2
+ import type { HTMLTag, Polymorphic } from "astro/types"
3
3
 
4
4
  import { Button } from "@/components/ui/button"
5
+ import type { ButtonVariantProps } from "@/components/ui/button/button-variants"
5
6
 
6
- type Props = ComponentProps<typeof Button>
7
+ type Props<Tag extends HTMLTag = "button"> = Polymorphic<{ as: Tag }> &
8
+ ButtonVariantProps
7
9
 
8
10
  const { ...props } = Astro.props
9
11
  ---
@@ -25,7 +25,7 @@ const {
25
25
  data-slot="dialog-overlay"
26
26
  hidden
27
27
  class="fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs"
28
- style="z-index: calc(var(--dialog-overlay-stack-index, 0) + 100);"
28
+ style="z-index: calc(var(--dialog-overlay-stack-index, 0) * 2 + 100);"
29
29
  >
30
30
  </div>
31
31
  <div
@@ -36,7 +36,7 @@ const {
36
36
  "bg-popover text-popover-foreground fixed z-50 flex flex-col gap-4 bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out outline-none data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",
37
37
  className
38
38
  )}
39
- style={`z-index: calc(var(--dialog-content-stack-index, 0) + 101);${style ? ` ${style}` : ""}`}
39
+ style={`z-index: calc(var(--dialog-content-stack-index, 0) * 2 + 101);${style ? ` ${style}` : ""}`}
40
40
  {...props}
41
41
  >
42
42
  <slot />
@@ -16,18 +16,15 @@ const {
16
16
  lockScroll,
17
17
  ...props
18
18
  } = Astro.props
19
-
20
- const manageScrollLock = lockScroll !== false
21
19
  ---
22
20
 
23
21
  <div
24
22
  data-slot="dialog"
25
- data-sheet-lock-scroll={manageScrollLock ? "" : undefined}
26
23
  class={className}
27
24
  data-default-open={defaultOpen}
28
25
  data-close-on-click-outside={closeOnClickOutside}
29
26
  data-close-on-escape={closeOnEscape}
30
- data-lock-scroll="false"
27
+ data-lock-scroll={lockScroll}
31
28
  {...props}
32
29
  >
33
30
  <slot />
@@ -37,89 +34,5 @@ const manageScrollLock = lockScroll !== false
37
34
  import { create } from "@data-slot/dialog"
38
35
 
39
36
  create()
40
-
41
- declare global {
42
- interface Window {
43
- __fulldevSheetScrollLock?: {
44
- roots: Set<HTMLElement>
45
- savedHtmlOverflow: string
46
- savedHtmlScrollbarGutter: string
47
- savedBodyPaddingRight: string
48
- }
49
- __fulldevSheetScrollLockBound?: boolean
50
- }
51
- }
52
-
53
- const state =
54
- window.__fulldevSheetScrollLock ??
55
- (window.__fulldevSheetScrollLock = {
56
- roots: new Set<HTMLElement>(),
57
- savedHtmlOverflow: "",
58
- savedHtmlScrollbarGutter: "",
59
- savedBodyPaddingRight: "",
60
- })
61
-
62
- const applyScrollLock = () => {
63
- const html = document.documentElement
64
- const body = document.body
65
-
66
- if (state.roots.size === 0) {
67
- html.style.overflow = state.savedHtmlOverflow
68
- html.style.scrollbarGutter = state.savedHtmlScrollbarGutter
69
- body.style.paddingRight = state.savedBodyPaddingRight
70
- return
71
- }
72
-
73
- if (state.roots.size === 1) {
74
- state.savedHtmlOverflow = html.style.overflow
75
- state.savedHtmlScrollbarGutter = html.style.scrollbarGutter
76
- state.savedBodyPaddingRight = body.style.paddingRight
77
- }
78
-
79
- const scrollbarWidth = window.innerWidth - html.clientWidth
80
- const bodyPaddingRight = Number.parseFloat(
81
- window.getComputedStyle(body).paddingRight || "0"
82
- )
83
-
84
- html.style.overflow = "hidden"
85
- html.style.scrollbarGutter = "auto"
86
- body.style.paddingRight = `${bodyPaddingRight + Math.max(scrollbarWidth, 0)}px`
87
- }
88
-
89
- const syncRoot = (root: HTMLElement, open: boolean) => {
90
- const hasRoot = state.roots.has(root)
91
- if (open === hasRoot) return
92
-
93
- if (open) state.roots.add(root)
94
- else state.roots.delete(root)
95
-
96
- applyScrollLock()
97
- }
98
-
99
- if (!window.__fulldevSheetScrollLockBound) {
100
- window.__fulldevSheetScrollLockBound = true
101
-
102
- document.addEventListener("dialog:change", (event) => {
103
- const target = event.target
104
-
105
- if (
106
- !(target instanceof HTMLElement) ||
107
- target.dataset.slot !== "dialog" ||
108
- target.dataset.sheetLockScroll === undefined
109
- ) {
110
- return
111
- }
112
-
113
- const detail = (event as CustomEvent<{ open?: boolean }>).detail
114
- syncRoot(target, Boolean(detail?.open))
115
- })
116
- }
117
-
118
- document
119
- .querySelectorAll<HTMLElement>(
120
- '[data-slot="dialog"][data-sheet-lock-scroll]'
121
- )
122
- .forEach((root) => {
123
- syncRoot(root, root.hasAttribute("data-open"))
124
- })
37
+ document.addEventListener("astro:page-load", () => create())
125
38
  </script>
@@ -91,7 +91,6 @@ const {
91
91
  <Tooltip>
92
92
  <TooltipTrigger
93
93
  as={Tag}
94
- data-slot="sidebar-menu-button"
95
94
  data-sidebar="menu-button"
96
95
  data-size={size}
97
96
  data-active={resolvedActive ? "true" : undefined}
@@ -67,9 +67,16 @@ const resolvedStyle = [
67
67
  })
68
68
 
69
69
  provider
70
- .querySelectorAll("[data-sidebar='menu-tooltip']")
70
+ .querySelectorAll("[data-slot='tooltip']")
71
71
  .forEach((tooltip) => {
72
- tooltip.hidden = state !== "collapsed"
72
+ if (
73
+ state !== "collapsed" &&
74
+ tooltip.querySelector("[data-sidebar='menu-button']")
75
+ ) {
76
+ tooltip.dispatchEvent(
77
+ new CustomEvent("tooltip:set", { detail: { open: false } })
78
+ )
79
+ }
73
80
  })
74
81
  }
75
82
 
@@ -132,6 +139,33 @@ const resolvedStyle = [
132
139
  window.__fulldevSyncSidebarProvider?.(provider, open)
133
140
  }
134
141
 
142
+ document.addEventListener("dialog:change", (event) => {
143
+ const root = event.target
144
+ if (!(root instanceof HTMLElement) || root.dataset.sidebar !== "sheet")
145
+ return
146
+ const provider = root.closest("[data-slot='sidebar-wrapper']")
147
+ if (provider)
148
+ provider.dataset.openMobile = String(Boolean(event.detail?.open))
149
+ })
150
+
151
+ document.addEventListener("tooltip:change", (event) => {
152
+ if (!event.detail?.open) return
153
+ const root = event.target
154
+ if (!(root instanceof HTMLElement)) return
155
+ if (!root.querySelector("[data-sidebar='menu-button']")) return
156
+ const provider = root.closest("[data-slot='sidebar-wrapper']")
157
+ const sidebar = root.closest("[data-slot='sidebar']")
158
+ if (
159
+ provider?.dataset.state !== "collapsed" ||
160
+ sidebar?.dataset.collapsible !== "icon" ||
161
+ !window.matchMedia("(min-width: 768px)").matches
162
+ ) {
163
+ root.dispatchEvent(
164
+ new CustomEvent("tooltip:set", { detail: { open: false } })
165
+ )
166
+ }
167
+ })
168
+
135
169
  document.addEventListener("click", (event) => {
136
170
  const control = event.target?.closest?.(
137
171
  "[data-sidebar='trigger'], [data-sidebar='rail']"
@@ -54,7 +54,6 @@ const desktopCollapsible = desktopState === "collapsed" ? collapsible : ""
54
54
  side={side}
55
55
  showCloseButton={false}
56
56
  data-sidebar="sidebar"
57
- data-slot="sidebar"
58
57
  data-mobile="true"
59
58
  style="--sidebar-width: var(--sidebar-width-mobile);"
60
59
  class={cn(
@@ -33,7 +33,7 @@ const {
33
33
  const serializedDefaultValue = Array.isArray(defaultValue)
34
34
  ? defaultValue.join(",")
35
35
  : defaultValue
36
- const thumbCount = Array.isArray(defaultValue) ? defaultValue.length : 1
36
+ const thumbCount = String(serializedDefaultValue ?? "").includes(",") ? 2 : 1
37
37
  ---
38
38
 
39
39
  <div
@@ -45,7 +45,7 @@ const thumbCount = Array.isArray(defaultValue) ? defaultValue.length : 1
45
45
  data-large-step={largeStep}
46
46
  data-orientation={orientation}
47
47
  data-thumb-alignment={thumbAlignment}
48
- data-disabled={disabled}
48
+ data-disabled={disabled ? "true" : undefined}
49
49
  class={cn(
50
50
  "data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full",
51
51
  className
@@ -55,7 +55,7 @@ const thumbCount = Array.isArray(defaultValue) ? defaultValue.length : 1
55
55
  <div
56
56
  data-slot="slider-control"
57
57
  data-orientation={orientation}
58
- data-disabled={disabled}
58
+ data-disabled={disabled ? "true" : undefined}
59
59
  class="relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-40 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col"
60
60
  >
61
61
  <div
@@ -83,4 +83,5 @@ const thumbCount = Array.isArray(defaultValue) ? defaultValue.length : 1
83
83
  import { create } from "@data-slot/slider"
84
84
 
85
85
  create()
86
+ document.addEventListener("astro:page-load", () => create())
86
87
  </script>
@@ -47,9 +47,9 @@ const switchSizeStyle = {
47
47
  data-checked={initialChecked ? "" : undefined}
48
48
  data-unchecked={initialChecked ? undefined : ""}
49
49
  data-default-checked={defaultChecked}
50
- data-disabled={disabled}
50
+ data-disabled={disabled ? "true" : undefined}
51
51
  data-read-only={readOnly}
52
- data-readonly={readOnly}
52
+ data-readonly={readOnly ? "" : undefined}
53
53
  data-required={required}
54
54
  data-name={name}
55
55
  data-value={value}
@@ -60,6 +60,8 @@ const switchSizeStyle = {
60
60
  <span
61
61
  aria-hidden="true"
62
62
  data-slot="switch-thumb"
63
+ data-checked={initialChecked ? "" : undefined}
64
+ data-unchecked={initialChecked ? undefined : ""}
63
65
  class="bg-background dark:data-checked:bg-primary-foreground dark:data-unchecked:bg-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0"
64
66
  ></span>
65
67
  </span>
@@ -68,4 +70,5 @@ const switchSizeStyle = {
68
70
  import { create } from "@data-slot/switch"
69
71
 
70
72
  create()
73
+ document.addEventListener("astro:page-load", () => create())
71
74
  </script>
@@ -7,11 +7,12 @@ type Props = HTMLAttributes<"div"> & {
7
7
  value?: string
8
8
  }
9
9
 
10
- const { class: className, value, ...props } = Astro.props
10
+ const { class: className, hidden = true, value, ...props } = Astro.props
11
11
  ---
12
12
 
13
13
  <div
14
14
  data-slot="tabs-content"
15
+ hidden={hidden}
15
16
  data-value={value}
16
17
  class={cn("flex-1 text-sm outline-none", className)}
17
18
  {...props}
@@ -35,4 +35,5 @@ const {
35
35
  import { create } from "@data-slot/tabs"
36
36
 
37
37
  create()
38
+ document.addEventListener("astro:page-load", () => create())
38
39
  </script>
@@ -27,6 +27,8 @@ const {
27
27
  data-default-pressed={defaultPressed}
28
28
  data-disabled={disabled}
29
29
  type={type}
30
+ disabled={disabled}
31
+ aria-pressed={defaultPressed === true ? "true" : "false"}
30
32
  class={cn(toggleVariants({ variant, size }), className)}
31
33
  {...props}
32
34
  >
@@ -37,4 +39,5 @@ const {
37
39
  import { create } from "@data-slot/toggle"
38
40
 
39
41
  create()
42
+ document.addEventListener("astro:page-load", () => create())
40
43
  </script>
@@ -52,4 +52,5 @@ const {
52
52
  import { create } from "@data-slot/tooltip"
53
53
 
54
54
  create()
55
+ document.addEventListener("astro:page-load", () => create())
55
56
  </script>
package/src/lib/pages.ts CHANGED
@@ -83,3 +83,15 @@ export const getPageBreadcrumbItems = async (
83
83
  }),
84
84
  ]
85
85
  }
86
+
87
+ export const getMarkdownHref = (href: string) =>
88
+ href === "/" ? "/index.md" : `${href.replace(/\/$/, "")}.md`
89
+
90
+ export const getInstallCommand = (source: string) => {
91
+ const names = [
92
+ ...source.matchAll(/props=\{\{\s*name:\s*['"]([^'"]+)['"]/g),
93
+ ].map((match) => `@fulldev/${match[1]}`)
94
+ return names.length
95
+ ? `npx shadcn@latest add ${[...new Set(names)].join(" ")}`
96
+ : undefined
97
+ }