fulldev-ui 0.9.3 → 0.10.1

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 (269) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +100 -16
  3. package/package.json +3 -2
  4. package/public/r/accordion.json +4 -6
  5. package/public/r/alert-dialog.json +3 -3
  6. package/public/r/alert.json +0 -5
  7. package/public/r/article-1.json +1 -1
  8. package/public/r/article-2.json +1 -1
  9. package/public/r/articles-1.json +1 -1
  10. package/public/r/articles-2.json +1 -1
  11. package/public/r/articles-3.json +1 -1
  12. package/public/r/avatar.json +1 -16
  13. package/public/r/badge.json +1 -1
  14. package/public/r/banner-1.json +5 -3
  15. package/public/r/banner-2.json +1 -1
  16. package/public/r/banner.json +5 -3
  17. package/public/r/blocks-1.json +6 -3
  18. package/public/r/breadcrumb.json +4 -4
  19. package/public/r/button.json +1 -1
  20. package/public/r/card.json +4 -4
  21. package/public/r/carousel.json +5 -5
  22. package/public/r/checkbox.json +1 -1
  23. package/public/r/combobox.json +8 -8
  24. package/public/r/command.json +6 -6
  25. package/public/r/components.json +1 -7
  26. package/public/r/contact-1.json +4 -2
  27. package/public/r/contact-2.json +4 -2
  28. package/public/r/contact-3.json +11 -3
  29. package/public/r/content-1.json +11 -3
  30. package/public/r/content-2.json +11 -3
  31. package/public/r/content-3.json +7 -1
  32. package/public/r/content-4.json +11 -3
  33. package/public/r/cta-2.json +7 -1
  34. package/public/r/cta-4.json +7 -1
  35. package/public/r/cta-5.json +11 -3
  36. package/public/r/cta-6.json +7 -1
  37. package/public/r/dialog.json +7 -7
  38. package/public/r/doc-1.json +6 -3
  39. package/public/r/dropdown-menu.json +9 -11
  40. package/public/r/features-1.json +5 -3
  41. package/public/r/features-2.json +5 -3
  42. package/public/r/features-4.json +5 -3
  43. package/public/r/features-5.json +4 -2
  44. package/public/r/field.json +2 -7
  45. package/public/r/footer-1.json +5 -3
  46. package/public/r/footer-2.json +5 -3
  47. package/public/r/footer-3.json +5 -3
  48. package/public/r/header-1.json +1 -1
  49. package/public/r/header.json +3 -0
  50. package/public/r/hero-13.json +1 -1
  51. package/public/r/hero-4.json +5 -3
  52. package/public/r/hero-5.json +5 -3
  53. package/public/r/hero-6.json +5 -3
  54. package/public/r/hero-7.json +5 -3
  55. package/public/r/hero-8.json +1 -1
  56. package/public/r/hero-9.json +5 -3
  57. package/public/r/hover-card.json +4 -3
  58. package/public/r/icon.json +1 -1
  59. package/public/r/input-group.json +1 -1
  60. package/public/r/item.json +2 -20
  61. package/public/r/kbd.json +2 -2
  62. package/public/r/layout.json +4 -7
  63. package/public/r/links-2.json +5 -3
  64. package/public/r/marquee.json +1 -1
  65. package/public/r/native-select.json +3 -3
  66. package/public/r/navigation-menu.json +8 -10
  67. package/public/r/page.json +17 -0
  68. package/public/r/popover.json +1 -1
  69. package/public/r/pricing-1.json +5 -3
  70. package/public/r/pricing-2.json +5 -3
  71. package/public/r/pricing-3.json +5 -3
  72. package/public/r/products-1.json +1 -1
  73. package/public/r/products-4.json +1 -1
  74. package/public/r/products-5.json +1 -1
  75. package/public/r/radio-group.json +1 -1
  76. package/public/r/rating.json +3 -3
  77. package/public/r/registry.json +186 -450
  78. package/public/r/reviews-1.json +5 -3
  79. package/public/r/reviews-2.json +5 -3
  80. package/public/r/reviews-3.json +5 -3
  81. package/public/r/reviews-4.json +1 -1
  82. package/public/r/reviews-5.json +5 -3
  83. package/public/r/select.json +6 -8
  84. package/public/r/services-1.json +11 -3
  85. package/public/r/services-2.json +7 -1
  86. package/public/r/services-3.json +7 -1
  87. package/public/r/services-4.json +11 -3
  88. package/public/r/services-5.json +5 -3
  89. package/public/r/services-6.json +11 -3
  90. package/public/r/services-7.json +11 -3
  91. package/public/r/sheet.json +7 -4
  92. package/public/r/sidebar-1.json +4 -2
  93. package/public/r/sidebar.json +10 -7
  94. package/public/r/slider.json +1 -1
  95. package/public/r/spinner.json +3 -3
  96. package/public/r/switch.json +1 -1
  97. package/public/r/tabs.json +1 -1
  98. package/public/r/theme-toggle.json +5 -3
  99. package/public/r/toggle.json +1 -1
  100. package/public/r/tooltip.json +1 -1
  101. package/public/r/typography.json +16 -16
  102. package/public/r/video.json +1 -1
  103. package/registry.json +186 -450
  104. package/src/components/blocks/article-1.astro +1 -1
  105. package/src/components/blocks/article-2.astro +1 -1
  106. package/src/components/blocks/articles-1.astro +1 -1
  107. package/src/components/blocks/articles-2.astro +2 -2
  108. package/src/components/blocks/articles-3.astro +1 -1
  109. package/src/components/blocks/banner-1.astro +3 -5
  110. package/src/components/blocks/banner-2.astro +1 -1
  111. package/src/components/blocks/blocks-1.astro +25 -37
  112. package/src/components/blocks/contact-3.astro +4 -3
  113. package/src/components/blocks/content-1.astro +5 -4
  114. package/src/components/blocks/content-2.astro +6 -5
  115. package/src/components/blocks/content-3.astro +9 -2
  116. package/src/components/blocks/content-4.astro +6 -5
  117. package/src/components/blocks/cta-2.astro +4 -3
  118. package/src/components/blocks/cta-4.astro +3 -2
  119. package/src/components/blocks/cta-5.astro +6 -5
  120. package/src/components/blocks/cta-6.astro +4 -3
  121. package/src/components/blocks/doc-1.astro +28 -56
  122. package/src/components/blocks/features-1.astro +3 -1
  123. package/src/components/blocks/features-2.astro +4 -2
  124. package/src/components/blocks/features-4.astro +3 -1
  125. package/src/components/blocks/footer-1.astro +26 -12
  126. package/src/components/blocks/footer-2.astro +24 -12
  127. package/src/components/blocks/footer-3.astro +26 -12
  128. package/src/components/blocks/header-1.astro +2 -3
  129. package/src/components/blocks/hero-13.astro +1 -1
  130. package/src/components/blocks/hero-4.astro +2 -2
  131. package/src/components/blocks/hero-5.astro +3 -3
  132. package/src/components/blocks/hero-6.astro +3 -3
  133. package/src/components/blocks/hero-7.astro +3 -3
  134. package/src/components/blocks/hero-8.astro +1 -1
  135. package/src/components/blocks/hero-9.astro +2 -2
  136. package/src/components/blocks/links-2.astro +3 -5
  137. package/src/components/blocks/pricing-1.astro +3 -2
  138. package/src/components/blocks/pricing-2.astro +3 -2
  139. package/src/components/blocks/pricing-3.astro +3 -2
  140. package/src/components/blocks/products-1.astro +1 -1
  141. package/src/components/blocks/products-4.astro +2 -2
  142. package/src/components/blocks/products-5.astro +4 -4
  143. package/src/components/blocks/reviews-1.astro +2 -2
  144. package/src/components/blocks/reviews-2.astro +2 -2
  145. package/src/components/blocks/reviews-3.astro +2 -2
  146. package/src/components/blocks/reviews-4.astro +4 -4
  147. package/src/components/blocks/reviews-5.astro +16 -25
  148. package/src/components/blocks/services-1.astro +7 -9
  149. package/src/components/blocks/services-2.astro +5 -4
  150. package/src/components/blocks/services-3.astro +6 -5
  151. package/src/components/blocks/services-4.astro +7 -9
  152. package/src/components/blocks/services-5.astro +3 -4
  153. package/src/components/blocks/services-6.astro +7 -6
  154. package/src/components/blocks/services-7.astro +7 -9
  155. package/src/components/blocks/sidebar-1.astro +42 -97
  156. package/src/components/ui/accordion/accordion-content.astro +2 -1
  157. package/src/components/ui/accordion/accordion-trigger.astro +7 -8
  158. package/src/components/ui/alert-dialog/alert-dialog-content.astro +1 -1
  159. package/src/components/ui/alert-dialog/alert-dialog-overlay.astro +1 -1
  160. package/src/components/ui/alert-dialog/alert-dialog.astro +23 -3
  161. package/src/components/ui/avatar/avatar.astro +1 -1
  162. package/src/components/ui/badge/badge.astro +1 -0
  163. package/src/components/ui/banner/banner-container.astro +3 -3
  164. package/src/components/ui/breadcrumb/breadcrumb-ellipsis.astro +2 -2
  165. package/src/components/ui/breadcrumb/breadcrumb-separator.astro +2 -2
  166. package/src/components/ui/button/button-variants.ts +8 -7
  167. package/src/components/ui/card/card-content.astro +1 -1
  168. package/src/components/ui/card/card-footer.astro +1 -1
  169. package/src/components/ui/card/card-header.astro +1 -1
  170. package/src/components/ui/card/card.astro +1 -1
  171. package/src/components/ui/carousel/carousel-next.astro +3 -3
  172. package/src/components/ui/carousel/carousel-previous.astro +3 -3
  173. package/src/components/ui/checkbox/checkbox.astro +1 -1
  174. package/src/components/ui/combobox/combobox-input.astro +2 -2
  175. package/src/components/ui/combobox/combobox-item.astro +4 -4
  176. package/src/components/ui/combobox/combobox-list.astro +1 -1
  177. package/src/components/ui/combobox/combobox-trigger.astro +2 -5
  178. package/src/components/ui/combobox/combobox.astro +3 -0
  179. package/src/components/ui/command/command-dialog.astro +10 -10
  180. package/src/components/ui/command/command-input.astro +2 -2
  181. package/src/components/ui/command/command-item.astro +4 -5
  182. package/src/components/ui/dialog/dialog-close.astro +2 -2
  183. package/src/components/ui/dialog/dialog-content.astro +3 -3
  184. package/src/components/ui/dialog/dialog-overlay.astro +1 -1
  185. package/src/components/ui/dialog/dialog.astro +26 -3
  186. package/src/components/ui/dropdown-menu/dropdown-menu-checkbox-item.astro +4 -5
  187. package/src/components/ui/dropdown-menu/dropdown-menu-content.astro +4 -4
  188. package/src/components/ui/dropdown-menu/dropdown-menu-item.astro +1 -1
  189. package/src/components/ui/dropdown-menu/dropdown-menu-label.astro +1 -1
  190. package/src/components/ui/dropdown-menu/dropdown-menu-radio-item.astro +4 -5
  191. package/src/components/ui/dropdown-menu/dropdown-menu-shortcut.astro +1 -1
  192. package/src/components/ui/dropdown-menu/dropdown-menu.astro +3 -0
  193. package/src/components/ui/field/field-label.astro +1 -1
  194. package/src/components/ui/field/field-title.astro +1 -1
  195. package/src/components/ui/hover-card/hover-card-content.astro +4 -4
  196. package/src/components/ui/hover-card/hover-card.astro +8 -5
  197. package/src/components/ui/icon/icon.astro +8 -17
  198. package/src/components/ui/input-group/input-group-button.astro +0 -1
  199. package/src/components/ui/item/item-media.astro +1 -1
  200. package/src/components/ui/item/item.astro +0 -18
  201. package/src/components/ui/kbd/kbd-group.astro +1 -1
  202. package/src/components/ui/kbd/kbd.astro +1 -1
  203. package/src/components/ui/layout/layout-body.astro +1 -1
  204. package/src/components/ui/layout/layout-head.astro +3 -2
  205. package/src/components/ui/layout/layout-main.astro +1 -1
  206. package/src/components/ui/layout/layout.astro +4 -0
  207. package/src/components/ui/marquee/marquee.astro +50 -69
  208. package/src/components/ui/native-select/native-select.astro +2 -3
  209. package/src/components/ui/navigation-menu/navigation-menu-content.astro +3 -1
  210. package/src/components/ui/navigation-menu/navigation-menu-indicator.astro +2 -1
  211. package/src/components/ui/navigation-menu/navigation-menu-list.astro +1 -1
  212. package/src/components/ui/navigation-menu/navigation-menu-positioner.astro +2 -0
  213. package/src/components/ui/navigation-menu/navigation-menu-trigger.astro +2 -3
  214. package/src/components/ui/navigation-menu/navigation-menu.astro +1 -1
  215. package/src/components/ui/popover/popover-content.astro +1 -1
  216. package/src/components/ui/radio-group/radio-group-item.astro +3 -3
  217. package/src/components/ui/rating/rating.astro +3 -3
  218. package/src/components/ui/select/select-content.astro +1 -1
  219. package/src/components/ui/select/select-item.astro +4 -4
  220. package/src/components/ui/select/select-trigger.astro +3 -6
  221. package/src/components/ui/select/select.astro +6 -0
  222. package/src/components/ui/sheet/sheet-content.astro +6 -7
  223. package/src/components/ui/sheet/sheet.astro +1 -89
  224. package/src/components/ui/sidebar/sidebar-menu-button.astro +13 -11
  225. package/src/components/ui/sidebar/sidebar-menu-sub-button.astro +10 -8
  226. package/src/components/ui/sidebar/sidebar-provider.astro +37 -15
  227. package/src/components/ui/sidebar/sidebar-rail.astro +1 -1
  228. package/src/components/ui/sidebar/sidebar-trigger.astro +3 -3
  229. package/src/components/ui/sidebar/sidebar.astro +1 -2
  230. package/src/components/ui/slider/slider.astro +8 -6
  231. package/src/components/ui/spinner/spinner.astro +4 -4
  232. package/src/components/ui/switch/switch.astro +5 -3
  233. package/src/components/ui/tabs/tabs-content.astro +2 -1
  234. package/src/components/ui/theme-toggle/theme-toggle.astro +4 -3
  235. package/src/components/ui/toggle/toggle.astro +2 -0
  236. package/src/components/ui/tooltip/tooltip-content.astro +1 -1
  237. package/src/components/ui/typography/typography-a.astro +19 -4
  238. package/src/components/ui/typography/typography-blockquote.astro +26 -6
  239. package/src/components/ui/typography/typography-h1.astro +7 -9
  240. package/src/components/ui/typography/typography-h2.astro +12 -9
  241. package/src/components/ui/typography/typography-h3.astro +7 -9
  242. package/src/components/ui/typography/typography-h4.astro +7 -9
  243. package/src/components/ui/typography/typography-inline-code.astro +28 -12
  244. package/src/components/ui/typography/typography-lead.astro +29 -4
  245. package/src/components/ui/typography/typography-list-item.astro +25 -9
  246. package/src/components/ui/typography/typography-list.astro +29 -11
  247. package/src/components/ui/typography/typography-p.astro +26 -6
  248. package/src/components/ui/typography/typography-table-cell.astro +32 -13
  249. package/src/components/ui/typography/typography-table-head.astro +27 -13
  250. package/src/components/ui/typography/typography-table-row.astro +23 -13
  251. package/src/components/ui/typography/typography-table.astro +29 -20
  252. package/src/components/ui/typography/typography.astro +172 -46
  253. package/src/components/ui/video/video.astro +11 -27
  254. package/src/styles/global.css +2 -15
  255. package/public/r/beta-repo-setup.json +0 -125
  256. package/public/r/blocks.json +0 -91
  257. package/public/r/content-5.json +0 -17
  258. package/public/r/content-6.json +0 -17
  259. package/public/r/gradient.json +0 -17
  260. package/public/r/init.json +0 -23
  261. package/public/r/tile.json +0 -27
  262. package/src/components/blocks/content-5.astro +0 -115
  263. package/src/components/blocks/content-6.astro +0 -91
  264. package/src/components/ui/gradient/gradient.astro +0 -45
  265. package/src/components/ui/gradient/index.ts +0 -1
  266. package/src/components/ui/tile/index.ts +0 -3
  267. package/src/components/ui/tile/tile-content.astro +0 -17
  268. package/src/components/ui/tile/tile-group.astro +0 -76
  269. package/src/components/ui/tile/tile.astro +0 -46
@@ -17,7 +17,7 @@ const variants = cva(
17
17
  variant: {
18
18
  default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
19
19
  outline:
20
- "bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]",
20
+ "bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_var(--sidebar-border)] hover:shadow-[0_0_0_1px_var(--sidebar-accent)]",
21
21
  },
22
22
  size: {
23
23
  default: "h-8 text-sm",
@@ -45,14 +45,17 @@ type TooltipValue =
45
45
  collisionPadding?: number
46
46
  })
47
47
 
48
- interface Props
49
- extends VariantProps<typeof variants>, HTMLAttributes<"button"> {
50
- as?: "a" | "button" | "div" | "span"
51
- href?: string
52
- isActive?: boolean
53
- active?: boolean
54
- tooltip?: TooltipValue
55
- }
48
+ type Props = VariantProps<typeof variants> &
49
+ HTMLAttributes<"button"> &
50
+ HTMLAttributes<"a"> &
51
+ HTMLAttributes<"div"> &
52
+ HTMLAttributes<"span"> & {
53
+ as?: "a" | "button" | "div" | "span"
54
+ href?: string
55
+ isActive?: boolean
56
+ active?: boolean
57
+ tooltip?: TooltipValue
58
+ }
56
59
 
57
60
  const {
58
61
  as: explicitTag,
@@ -64,7 +67,7 @@ const {
64
67
  tooltip,
65
68
  type,
66
69
  ...props
67
- } = Astro.props satisfies Props
70
+ } = Astro.props
68
71
 
69
72
  const Tag = explicitTag || ("href" in Astro.props ? "a" : "button")
70
73
  const resolvedActive = isActive ?? active
@@ -88,7 +91,6 @@ const {
88
91
  <Tooltip>
89
92
  <TooltipTrigger
90
93
  as={Tag}
91
- data-slot="sidebar-menu-button"
92
94
  data-sidebar="menu-button"
93
95
  data-size={size}
94
96
  data-active={resolvedActive ? "true" : undefined}
@@ -19,13 +19,15 @@ const variants = cva(
19
19
  }
20
20
  )
21
21
 
22
- interface Props
23
- extends VariantProps<typeof variants>, HTMLAttributes<"button"> {
24
- as?: "a" | "button" | "span"
25
- href?: string
26
- isActive?: boolean
27
- active?: boolean
28
- }
22
+ type Props = VariantProps<typeof variants> &
23
+ HTMLAttributes<"button"> &
24
+ HTMLAttributes<"a"> &
25
+ HTMLAttributes<"span"> & {
26
+ as?: "a" | "button" | "span"
27
+ href?: string
28
+ isActive?: boolean
29
+ active?: boolean
30
+ }
29
31
 
30
32
  const {
31
33
  as: explicitTag,
@@ -35,7 +37,7 @@ const {
35
37
  active = false,
36
38
  type,
37
39
  ...props
38
- } = Astro.props satisfies Props
40
+ } = Astro.props
39
41
 
40
42
  const Tag = explicitTag || "a"
41
43
  const resolvedActive = isActive ?? active
@@ -34,7 +34,6 @@ const resolvedStyle = [
34
34
  data-slot="sidebar-wrapper"
35
35
  data-default-open={defaultOpen ? "true" : "false"}
36
36
  data-open={open === undefined ? undefined : open ? "true" : "false"}
37
- data-sidebar-initializing="true"
38
37
  style={resolvedStyle}
39
38
  class={cn(
40
39
  "group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",
@@ -43,14 +42,6 @@ const resolvedStyle = [
43
42
  {...props}
44
43
  >
45
44
  <slot />
46
- <style is:inline>
47
- [data-slot="sidebar-wrapper"][data-sidebar-initializing="true"]
48
- [data-slot="sidebar-gap"],
49
- [data-slot="sidebar-wrapper"][data-sidebar-initializing="true"]
50
- [data-slot="sidebar-container"] {
51
- transition: none !important;
52
- }
53
- </style>
54
45
  <script is:inline>
55
46
  ;(() => {
56
47
  window.__fulldevSyncSidebarProvider ??= (provider, open) => {
@@ -76,9 +67,16 @@ const resolvedStyle = [
76
67
  })
77
68
 
78
69
  provider
79
- .querySelectorAll("[data-sidebar='menu-tooltip']")
70
+ .querySelectorAll("[data-slot='tooltip']")
80
71
  .forEach((tooltip) => {
81
- 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
+ }
82
80
  })
83
81
  }
84
82
 
@@ -102,9 +100,6 @@ const resolvedStyle = [
102
100
 
103
101
  provider.dataset.openMobile = "false"
104
102
  window.__fulldevSyncSidebarProvider(provider, isOpen)
105
- requestAnimationFrame(() => {
106
- provider.removeAttribute("data-sidebar-initializing")
107
- })
108
103
  })()
109
104
  </script>
110
105
  </div>
@@ -144,6 +139,33 @@ const resolvedStyle = [
144
139
  window.__fulldevSyncSidebarProvider?.(provider, open)
145
140
  }
146
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
+
147
169
  document.addEventListener("click", (event) => {
148
170
  const control = event.target?.closest?.(
149
171
  "[data-sidebar='trigger'], [data-sidebar='rail']"
@@ -160,7 +182,7 @@ const resolvedStyle = [
160
182
 
161
183
  document.addEventListener("keydown", (event) => {
162
184
  if (event.key.toLowerCase() !== "b") return
163
- if (!event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) {
185
+ if (!(event.metaKey || event.ctrlKey) || event.shiftKey || event.altKey) {
164
186
  return
165
187
  }
166
188
  if (event.defaultPrevented) return
@@ -16,7 +16,7 @@ const { class: className, type = "button", ...props } = Astro.props
16
16
  title="Toggle Sidebar"
17
17
  type={type}
18
18
  class={cn(
19
- "hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex",
19
+ "hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2",
20
20
  "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
21
21
  "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
22
22
  "hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full",
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  import type { HTMLAttributes } from "astro/types"
3
+ import PanelLeftIcon from "@lucide/astro/icons/panel-left"
3
4
 
4
5
  import { Button } from "@/components/ui/button"
5
- import { Icon } from "@/components/ui/icon"
6
6
 
7
7
  type Props = HTMLAttributes<"button"> & {
8
8
  variant?: "ghost" | "secondary"
@@ -17,10 +17,10 @@ const { class: className, ...props } = Astro.props
17
17
  variant="ghost"
18
18
  size="icon-sm"
19
19
  class={className}
20
- aria-keyshortcuts="Meta+B"
20
+ aria-keyshortcuts="Control+B Meta+B"
21
21
  {...props}
22
22
  >
23
- <Icon name="panel-left" />
23
+ <PanelLeftIcon />
24
24
  <span class="sr-only">Toggle Sidebar</span>
25
25
  <slot />
26
26
  </Button>
@@ -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(
@@ -96,7 +95,7 @@ const desktopCollapsible = desktopState === "collapsed" ? collapsible : ""
96
95
  data-slot="sidebar-container"
97
96
  data-side={side}
98
97
  class={cn(
99
- "fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:-left-(--sidebar-width) data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:-right-(--sidebar-width) md:flex",
98
+ "fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",
100
99
  variant === "floating" || variant === "inset"
101
100
  ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]"
102
101
  : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
@@ -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,16 +45,18 @@ 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
- "relative flex touch-none items-center select-none data-disabled:opacity-50 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-40 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
50
+ "data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full",
51
51
  className
52
52
  )}
53
53
  {...props}
54
54
  >
55
55
  <div
56
56
  data-slot="slider-control"
57
- 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"
57
+ data-orientation={orientation}
58
+ data-disabled={disabled ? "true" : undefined}
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"
58
60
  >
59
61
  <div
60
62
  data-slot="slider-track"
@@ -62,7 +64,7 @@ const thumbCount = Array.isArray(defaultValue) ? defaultValue.length : 1
62
64
  >
63
65
  <div
64
66
  data-slot="slider-range"
65
- class="bg-primary rounded-full select-none data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
67
+ class="bg-primary select-none data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
66
68
  >
67
69
  </div>
68
70
  </div>
@@ -70,7 +72,7 @@ const thumbCount = Array.isArray(defaultValue) ? defaultValue.length : 1
70
72
  Array.from({ length: thumbCount }).map(() => (
71
73
  <div
72
74
  data-slot="slider-thumb"
73
- class="border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] select-none hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden data-disabled:pointer-events-none data-disabled:opacity-50"
75
+ class="border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] select-none hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden data-[disabled]:pointer-events-none data-[disabled]:opacity-50"
74
76
  />
75
77
  ))
76
78
  }
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  import type { HTMLAttributes } from "astro/types"
3
+ import LoaderCircle from "@lucide/astro/icons/loader-circle"
3
4
 
4
5
  import { cn } from "@/lib/utils"
5
- import { Icon } from "@/components/ui/icon"
6
6
 
7
7
  type Props = HTMLAttributes<"svg"> & {
8
8
  color?: string
@@ -15,10 +15,10 @@ type Props = HTMLAttributes<"svg"> & {
15
15
  const { class: className, ...props } = Astro.props
16
16
  ---
17
17
 
18
- <Icon
19
- {...props}
18
+ <LoaderCircle
19
+ data-slot="spinner"
20
20
  role="status"
21
21
  aria-label="Loading"
22
- name="loader-circle"
23
22
  class={cn("size-4 animate-spin", className)}
23
+ {...props}
24
24
  />
@@ -29,7 +29,7 @@ const {
29
29
 
30
30
  const initialChecked = defaultChecked === true
31
31
  const switchStyle =
32
- "peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 relative inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 aria-invalid:ring-3 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-readonly:cursor-default"
32
+ "peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 relative inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none group-has-[:focus-visible]/field-label:border-transparent group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 aria-invalid:ring-3 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-readonly:cursor-default"
33
33
  const switchSizeStyle = {
34
34
  sm: "h-[14px] w-[24px]",
35
35
  default: "h-[18.4px] w-[32px]",
@@ -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>
@@ -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}
@@ -1,9 +1,10 @@
1
1
  ---
2
2
  import type { ComponentProps } from "astro/types"
3
+ import Moon from "@lucide/astro/icons/moon"
4
+ import Sun from "@lucide/astro/icons/sun"
3
5
 
4
6
  import { cn } from "@/lib/utils"
5
7
  import { Button } from "@/components/ui/button"
6
- import { Icon } from "@/components/ui/icon"
7
8
 
8
9
  type Props = ComponentProps<typeof Button>
9
10
 
@@ -23,8 +24,8 @@ const {
23
24
  class={cn("relative", className)}
24
25
  {...props}
25
26
  >
26
- <Icon name="sun" class="dark:hidden" />
27
- <Icon name="moon" class="hidden dark:block" />
27
+ <Sun class="dark:hidden" />
28
+ <Moon class="hidden dark:block" />
28
29
  <span class="sr-only">Toggle theme</span>
29
30
  </Button>
30
31
 
@@ -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
  >
@@ -35,7 +35,7 @@ const {
35
35
  data-align-offset={alignOffset}
36
36
  data-avoid-collisions={avoidCollisions}
37
37
  data-collision-padding={collisionPadding}
38
- class="z-50"
38
+ class="isolate z-50"
39
39
  >
40
40
  <div
41
41
  data-slot="tooltip-content"
@@ -3,12 +3,15 @@ import type { HTMLAttributes } from "astro/types"
3
3
 
4
4
  import { cn } from "@/lib/utils"
5
5
 
6
- type Props = HTMLAttributes<"a">
6
+ type Size = "sm" | "default" | "lg"
7
+ type Props = HTMLAttributes<"a"> & {
8
+ size?: Size
9
+ }
7
10
 
8
- const { class: className, ...props } = Astro.props
11
+ const { class: className, size = "default", ...props } = Astro.props
9
12
  ---
10
13
 
11
- <a data-slot="typography-a" class={cn(className)} {...props}>
14
+ <a data-slot="typography-a" data-size={size} class={cn(className)} {...props}>
12
15
  <slot />
13
16
  </a>
14
17
 
@@ -16,7 +19,19 @@ const { class: className, ...props } = Astro.props
16
19
  @reference "@/styles/global.css";
17
20
 
18
21
  [data-slot="typography-a"],
19
- [data-slot="typography"] a:not(.no-typography):not(.no-typography *) {
22
+ [data-slot="typography"] > a:not([data-slot]) {
20
23
  @apply text-primary font-medium underline underline-offset-4;
21
24
  }
25
+
26
+ [data-slot="typography-a"][data-size="sm"] {
27
+ @apply text-sm;
28
+ }
29
+
30
+ [data-slot="typography-a"][data-size="default"] {
31
+ @apply text-base;
32
+ }
33
+
34
+ [data-slot="typography-a"][data-size="lg"] {
35
+ @apply text-lg;
36
+ }
22
37
  </style>
@@ -3,12 +3,20 @@ import type { HTMLAttributes } from "astro/types"
3
3
 
4
4
  import { cn } from "@/lib/utils"
5
5
 
6
- type Props = HTMLAttributes<"blockquote">
6
+ type Size = "sm" | "default" | "lg"
7
+ type Props = HTMLAttributes<"blockquote"> & {
8
+ size?: Size
9
+ }
7
10
 
8
- const { class: className, ...props } = Astro.props
11
+ const { class: className, size = "default", ...props } = Astro.props
9
12
  ---
10
13
 
11
- <blockquote data-slot="typography-blockquote" class={cn(className)} {...props}>
14
+ <blockquote
15
+ data-slot="typography-blockquote"
16
+ data-size={size}
17
+ class={cn(className)}
18
+ {...props}
19
+ >
12
20
  <slot />
13
21
  </blockquote>
14
22
 
@@ -16,8 +24,20 @@ const { class: className, ...props } = Astro.props
16
24
  @reference "@/styles/global.css";
17
25
 
18
26
  [data-slot="typography-blockquote"],
19
- [data-slot="typography"]
20
- blockquote:not(.no-typography):not(.no-typography *) {
21
- @apply border-l-2 pl-6 text-base italic;
27
+ [data-slot="typography"] > blockquote {
28
+ @apply mt-6 border-l-2 pl-6 italic;
29
+ }
30
+
31
+ [data-slot="typography-blockquote"][data-size="sm"] {
32
+ @apply text-sm;
33
+ }
34
+
35
+ [data-slot="typography-blockquote"][data-size="default"],
36
+ [data-slot="typography"] > blockquote {
37
+ @apply text-base;
38
+ }
39
+
40
+ [data-slot="typography-blockquote"][data-size="lg"] {
41
+ @apply text-lg;
22
42
  }
23
43
  </style>
@@ -3,8 +3,9 @@ import type { HTMLAttributes } from "astro/types"
3
3
 
4
4
  import { cn } from "@/lib/utils"
5
5
 
6
+ type Size = "sm" | "default" | "lg"
6
7
  type Props = HTMLAttributes<"h1"> & {
7
- size?: "sm" | "default" | "lg"
8
+ size?: Size
8
9
  }
9
10
 
10
11
  const { class: className, size = "default", ...props } = Astro.props
@@ -18,26 +19,23 @@ const { class: className, size = "default", ...props } = Astro.props
18
19
  @reference "@/styles/global.css";
19
20
 
20
21
  [data-slot="typography-h1"],
21
- [data-slot="typography"] h1:not(.no-typography):not(.no-typography *) {
22
+ [data-slot="typography"] > h1 {
22
23
  @apply scroll-m-20 font-semibold tracking-tight text-balance;
23
24
  }
24
25
 
25
26
  [data-slot="typography-h1"][data-size="sm"],
26
- [data-slot="typography"][data-size="sm"]
27
- h1:not(.no-typography):not(.no-typography *) {
27
+ [data-slot="typography"][data-size="sm"] > h1 {
28
28
  @apply text-3xl;
29
29
  }
30
30
 
31
31
  [data-slot="typography-h1"][data-size="default"],
32
- [data-slot="typography"] h1:not(.no-typography):not(.no-typography *),
33
- [data-slot="typography"][data-size="default"]
34
- h1:not(.no-typography):not(.no-typography *) {
32
+ [data-slot="typography"] > h1,
33
+ [data-slot="typography"][data-size="default"] > h1 {
35
34
  @apply text-4xl;
36
35
  }
37
36
 
38
37
  [data-slot="typography-h1"][data-size="lg"],
39
- [data-slot="typography"][data-size="lg"]
40
- h1:not(.no-typography):not(.no-typography *) {
38
+ [data-slot="typography"][data-size="lg"] > h1 {
41
39
  @apply text-5xl;
42
40
  }
43
41
  </style>
@@ -3,8 +3,9 @@ import type { HTMLAttributes } from "astro/types"
3
3
 
4
4
  import { cn } from "@/lib/utils"
5
5
 
6
+ type Size = "sm" | "default" | "lg"
6
7
  type Props = HTMLAttributes<"h2"> & {
7
- size?: "sm" | "default" | "lg"
8
+ size?: Size
8
9
  }
9
10
 
10
11
  const { class: className, size = "default", ...props } = Astro.props
@@ -18,26 +19,28 @@ const { class: className, size = "default", ...props } = Astro.props
18
19
  @reference "@/styles/global.css";
19
20
 
20
21
  [data-slot="typography-h2"],
21
- [data-slot="typography"] h2:not(.no-typography):not(.no-typography *) {
22
+ [data-slot="typography"] > h2 {
22
23
  @apply scroll-m-20 font-semibold tracking-tight;
23
24
  }
24
25
 
25
26
  [data-slot="typography-h2"][data-size="sm"],
26
- [data-slot="typography"][data-size="sm"]
27
- h2:not(.no-typography):not(.no-typography *) {
27
+ [data-slot="typography"][data-size="sm"] > h2 {
28
28
  @apply text-2xl;
29
29
  }
30
30
 
31
31
  [data-slot="typography-h2"][data-size="default"],
32
- [data-slot="typography"] h2:not(.no-typography):not(.no-typography *),
33
- [data-slot="typography"][data-size="default"]
34
- h2:not(.no-typography):not(.no-typography *) {
32
+ [data-slot="typography"] > h2,
33
+ [data-slot="typography"][data-size="default"] > h2 {
35
34
  @apply text-3xl;
36
35
  }
37
36
 
38
37
  [data-slot="typography-h2"][data-size="lg"],
39
- [data-slot="typography"][data-size="lg"]
40
- h2:not(.no-typography):not(.no-typography *) {
38
+ [data-slot="typography"][data-size="lg"] > h2 {
41
39
  @apply text-4xl;
42
40
  }
41
+
42
+ [data-slot="typography-h2"]:first-child,
43
+ [data-slot="typography"] > h2:first-child {
44
+ @apply mt-0;
45
+ }
43
46
  </style>
@@ -3,8 +3,9 @@ import type { HTMLAttributes } from "astro/types"
3
3
 
4
4
  import { cn } from "@/lib/utils"
5
5
 
6
+ type Size = "sm" | "default" | "lg"
6
7
  type Props = HTMLAttributes<"h3"> & {
7
- size?: "sm" | "default" | "lg"
8
+ size?: Size
8
9
  }
9
10
 
10
11
  const { class: className, size = "default", ...props } = Astro.props
@@ -18,26 +19,23 @@ const { class: className, size = "default", ...props } = Astro.props
18
19
  @reference "@/styles/global.css";
19
20
 
20
21
  [data-slot="typography-h3"],
21
- [data-slot="typography"] h3:not(.no-typography):not(.no-typography *) {
22
+ [data-slot="typography"] > h3 {
22
23
  @apply scroll-m-20 font-semibold tracking-tight;
23
24
  }
24
25
 
25
26
  [data-slot="typography-h3"][data-size="sm"],
26
- [data-slot="typography"][data-size="sm"]
27
- h3:not(.no-typography):not(.no-typography *) {
27
+ [data-slot="typography"][data-size="sm"] > h3 {
28
28
  @apply text-xl;
29
29
  }
30
30
 
31
31
  [data-slot="typography-h3"][data-size="default"],
32
- [data-slot="typography"] h3:not(.no-typography):not(.no-typography *),
33
- [data-slot="typography"][data-size="default"]
34
- h3:not(.no-typography):not(.no-typography *) {
32
+ [data-slot="typography"] > h3,
33
+ [data-slot="typography"][data-size="default"] > h3 {
35
34
  @apply text-2xl;
36
35
  }
37
36
 
38
37
  [data-slot="typography-h3"][data-size="lg"],
39
- [data-slot="typography"][data-size="lg"]
40
- h3:not(.no-typography):not(.no-typography *) {
38
+ [data-slot="typography"][data-size="lg"] > h3 {
41
39
  @apply text-3xl;
42
40
  }
43
41
  </style>
@@ -3,8 +3,9 @@ import type { HTMLAttributes } from "astro/types"
3
3
 
4
4
  import { cn } from "@/lib/utils"
5
5
 
6
+ type Size = "sm" | "default" | "lg"
6
7
  type Props = HTMLAttributes<"h4"> & {
7
- size?: "sm" | "default" | "lg"
8
+ size?: Size
8
9
  }
9
10
 
10
11
  const { class: className, size = "default", ...props } = Astro.props
@@ -18,26 +19,23 @@ const { class: className, size = "default", ...props } = Astro.props
18
19
  @reference "@/styles/global.css";
19
20
 
20
21
  [data-slot="typography-h4"],
21
- [data-slot="typography"] h4:not(.no-typography):not(.no-typography *) {
22
+ [data-slot="typography"] > h4 {
22
23
  @apply scroll-m-20 font-semibold tracking-tight;
23
24
  }
24
25
 
25
26
  [data-slot="typography-h4"][data-size="sm"],
26
- [data-slot="typography"][data-size="sm"]
27
- h4:not(.no-typography):not(.no-typography *) {
27
+ [data-slot="typography"][data-size="sm"] > h4 {
28
28
  @apply text-lg;
29
29
  }
30
30
 
31
31
  [data-slot="typography-h4"][data-size="default"],
32
- [data-slot="typography"] h4:not(.no-typography):not(.no-typography *),
33
- [data-slot="typography"][data-size="default"]
34
- h4:not(.no-typography):not(.no-typography *) {
32
+ [data-slot="typography"] > h4,
33
+ [data-slot="typography"][data-size="default"] > h4 {
35
34
  @apply text-xl;
36
35
  }
37
36
 
38
37
  [data-slot="typography-h4"][data-size="lg"],
39
- [data-slot="typography"][data-size="lg"]
40
- h4:not(.no-typography):not(.no-typography *) {
38
+ [data-slot="typography"][data-size="lg"] > h4 {
41
39
  @apply text-2xl;
42
40
  }
43
41
  </style>