astro-component-kit 0.0.1 → 0.1.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 (353) hide show
  1. package/README.md +218 -119
  2. package/package.json +25 -52
  3. package/src/components/index.ts +207 -0
  4. package/src/components/lib/AnimatedGalaxy.astro +185 -0
  5. package/src/components/lib/Galaxy3D.astro +308 -0
  6. package/src/components/lib/GlassNavbar.astro +13 -11
  7. package/src/components/lib/LogoWithGalaxy.astro +63 -0
  8. package/src/components/lib/buttons/3dPushButton.astro +9 -0
  9. package/src/components/lib/buttons/AnimatedIconButton.astro +10 -0
  10. package/src/components/lib/buttons/BorderDrawButton.astro +9 -0
  11. package/src/components/lib/buttons/CyberpunkButton.astro +10 -0
  12. package/src/components/lib/buttons/DoubleBorderButton.astro +9 -0
  13. package/src/components/lib/buttons/GhostOutlineButton.astro +10 -0
  14. package/src/components/lib/buttons/GlassButton.astro +13 -32
  15. package/src/components/lib/buttons/GlowButton.astro +9 -0
  16. package/src/components/lib/buttons/LiquidButton.astro +9 -0
  17. package/src/components/lib/buttons/LoadingButton.astro +10 -0
  18. package/src/components/lib/buttons/MagneticButton.astro +10 -0
  19. package/src/components/lib/buttons/MinimalPillButton.astro +9 -0
  20. package/src/components/lib/buttons/NeumorphicButton.astro +10 -0
  21. package/src/components/lib/buttons/PulseButton.astro +10 -0
  22. package/src/components/lib/buttons/RetroArcadeButton.astro +9 -0
  23. package/src/components/lib/buttons/RetroShadowButton.astro +9 -0
  24. package/src/components/lib/buttons/ShimmerButton.astro +9 -0
  25. package/src/components/lib/buttons/ShinyButton.astro +9 -0
  26. package/src/components/lib/buttons/TiltGlowButton.astro +10 -0
  27. package/src/components/lib/cards/BlogHorizontalCard.astro +46 -13
  28. package/src/components/lib/cards/CyberFeatureCard.astro +50 -6
  29. package/src/components/lib/cards/EcommerceProductCard.astro +69 -16
  30. package/src/components/lib/cards/GlassCard.astro +8 -0
  31. package/src/components/lib/cards/GlassEventCard.astro +53 -12
  32. package/src/components/lib/cards/GlowPortfolioCard.astro +46 -9
  33. package/src/components/lib/cards/InteractiveTiltCard.astro +47 -7
  34. package/src/components/lib/cards/KanbanItemCard.astro +40 -9
  35. package/src/components/lib/cards/MinimalLinkCard.astro +37 -7
  36. package/src/components/lib/cards/MusicPlayerMini.astro +54 -14
  37. package/src/components/lib/cards/NeumorphicCard.astro +32 -2
  38. package/src/components/lib/cards/NotificationCard.astro +44 -9
  39. package/src/components/lib/cards/PricingCard.astro +47 -9
  40. package/src/components/lib/cards/ProfileCard.astro +50 -11
  41. package/src/components/lib/cards/RetroGameCard.astro +37 -9
  42. package/src/components/lib/cards/StatCard.astro +43 -8
  43. package/src/components/lib/cards/TaskKanbanCard.astro +50 -11
  44. package/src/components/lib/cards/TestimonialCardClean.astro +43 -12
  45. package/src/components/lib/cards/WeatherWidgetCard.astro +36 -10
  46. package/src/components/lib/feedback/AnimatedCheckmark.astro +58 -9
  47. package/src/components/lib/feedback/Badge.astro +47 -12
  48. package/src/components/lib/feedback/CircleProgress.astro +56 -13
  49. package/src/components/lib/feedback/ConfettiFeedback.astro +74 -11
  50. package/src/components/lib/feedback/CyberGlitchAlert.astro +69 -6
  51. package/src/components/lib/feedback/EmptyStateCard.astro +55 -7
  52. package/src/components/lib/feedback/GlassAlert.astro +59 -13
  53. package/src/components/lib/feedback/GlassModal.astro +99 -14
  54. package/src/components/lib/feedback/GlassProgress.astro +39 -5
  55. package/src/components/lib/feedback/IndicatorBadgeMinimal.astro +56 -3
  56. package/src/components/lib/feedback/NeonSpinner.astro +40 -3
  57. package/src/components/lib/feedback/PulseDot.astro +51 -7
  58. package/src/components/lib/feedback/RatingPill.astro +38 -8
  59. package/src/components/lib/feedback/ShakeErrorGroup.astro +44 -3
  60. package/src/components/lib/feedback/SimpleTooltip.astro +53 -4
  61. package/src/components/lib/feedback/SkeletonList.astro +59 -13
  62. package/src/components/lib/feedback/Spotlight.astro +49 -4
  63. package/src/components/lib/feedback/StepProgress.astro +96 -9
  64. package/src/components/lib/feedback/ToastNotif.astro +60 -6
  65. package/src/components/lib/feedback/TypingIndicator.astro +52 -7
  66. package/src/components/lib/forms/AnimatedInput.astro +47 -5
  67. package/src/components/lib/forms/ChipInput.astro +116 -8
  68. package/src/components/lib/forms/ColorPickerInput.astro +53 -6
  69. package/src/components/lib/forms/CurrencyInput.astro +59 -6
  70. package/src/components/lib/forms/CustomRadioGroup.astro +61 -9
  71. package/src/components/lib/forms/CyberpunkCheckbox.astro +64 -8
  72. package/src/components/lib/forms/DragDropUpload.astro +87 -7
  73. package/src/components/lib/forms/ErrorInput.astro +31 -4
  74. package/src/components/lib/forms/FloatingPassword.astro +48 -10
  75. package/src/components/lib/forms/FormGroupVertical.astro +63 -9
  76. package/src/components/lib/forms/GlassSlider.astro +84 -3
  77. package/src/components/lib/forms/GlassTextarea.astro +39 -6
  78. package/src/components/lib/forms/ModernSelect.astro +66 -10
  79. package/src/components/lib/forms/NeumorphicSwitch.astro +54 -26
  80. package/src/components/lib/forms/OTPInput.astro +84 -12
  81. package/src/components/lib/forms/RatingStars.astro +66 -10
  82. package/src/components/lib/forms/SearchReveal.astro +44 -6
  83. package/src/components/lib/forms/SegmentedControl.astro +61 -7
  84. package/src/components/lib/forms/SimpleFileInput.astro +57 -6
  85. package/src/components/lib/forms/StepperInput.astro +101 -9
  86. package/src/components/lib/layout/FeatureHero.astro +70 -6
  87. package/src/components/lib/layout/FooterCenteredMinimal.astro +5 -2
  88. package/src/components/lib/navigation/GlassNavbar.astro +10 -5
  89. package/src/components/lib/navigation/MinimalSidebar.astro +6 -3
  90. package/src/components/lib/navigation/SimpleFooterGlass.astro +6 -2
  91. package/src/components/lib/overlays/SplashIntroOverlay.astro +6 -3
  92. package/src/components/lib/sections/ButtonsShowcase.astro +182 -0
  93. package/src/components/lib/sections/CardsShowcase.astro +376 -0
  94. package/src/components/lib/sections/DataShowcase.astro +329 -0
  95. package/src/components/lib/sections/FeedbackShowcase.astro +320 -0
  96. package/src/components/lib/sections/FormsShowcase.astro +347 -0
  97. package/src/components/lib/sections/HeroGlass.astro +202 -0
  98. package/src/components/lib/sections/HeroGradient.astro +143 -0
  99. package/src/components/lib/sections/HeroSplit.astro +210 -0
  100. package/src/components/lib/sections/LayoutShowcase.astro +317 -0
  101. package/src/components/lib/sections/NavigationShowcase.astro +285 -0
  102. package/src/components/lib/sections/OverlaysShowcase.astro +373 -0
  103. package/src/components/lib/sections/TypographyShowcase.astro +239 -0
  104. package/src/components/lib/sections/index.ts +9 -0
  105. package/src/components/types.d.ts +6 -0
  106. package/{dist → src}/styles/global.css +5 -5
  107. package/dist/AnimatedInput.astro +0 -82
  108. package/dist/Badge.astro +0 -52
  109. package/dist/GlassButton.astro +0 -87
  110. package/dist/GlassCard.astro +0 -72
  111. package/dist/GlassNavbar.astro +0 -65
  112. package/dist/GlowButton.astro +0 -60
  113. package/dist/buttons/3dPushButton.astro +0 -136
  114. package/dist/buttons/AnimatedIconButton.astro +0 -146
  115. package/dist/buttons/BorderDrawButton.astro +0 -112
  116. package/dist/buttons/CyberpunkButton.astro +0 -148
  117. package/dist/buttons/DoubleBorderButton.astro +0 -131
  118. package/dist/buttons/GhostOutlineButton.astro +0 -109
  119. package/dist/buttons/GlassButton.astro +0 -165
  120. package/dist/buttons/GlowButton.astro +0 -119
  121. package/dist/buttons/LiquidButton.astro +0 -167
  122. package/dist/buttons/LoadingButton.astro +0 -148
  123. package/dist/buttons/MagneticButton.astro +0 -134
  124. package/dist/buttons/MinimalPillButton.astro +0 -102
  125. package/dist/buttons/NeumorphicButton.astro +0 -158
  126. package/dist/buttons/PulseButton.astro +0 -111
  127. package/dist/buttons/RetroArcadeButton.astro +0 -105
  128. package/dist/buttons/RetroShadowButton.astro +0 -82
  129. package/dist/buttons/ShimmerButton.astro +0 -113
  130. package/dist/buttons/ShinyButton.astro +0 -121
  131. package/dist/buttons/TiltGlowButton.astro +0 -145
  132. package/dist/buttons/index.mjs +0 -19
  133. package/dist/buttons/index.ts +0 -19
  134. package/dist/cards/BlogHorizontalCard.astro +0 -18
  135. package/dist/cards/CyberFeatureCard.astro +0 -12
  136. package/dist/cards/EcommerceProductCard.astro +0 -24
  137. package/dist/cards/GlassCard.astro +0 -17
  138. package/dist/cards/GlassEventCard.astro +0 -19
  139. package/dist/cards/GlowPortfolioCard.astro +0 -16
  140. package/dist/cards/InteractiveTiltCard.astro +0 -25
  141. package/dist/cards/KanbanItemCard.astro +0 -15
  142. package/dist/cards/MinimalLinkCard.astro +0 -12
  143. package/dist/cards/MusicPlayerMini.astro +0 -21
  144. package/dist/cards/NeumorphicCard.astro +0 -6
  145. package/dist/cards/NotificationCard.astro +0 -15
  146. package/dist/cards/PricingCard.astro +0 -17
  147. package/dist/cards/ProfileCard.astro +0 -17
  148. package/dist/cards/RetroGameCard.astro +0 -15
  149. package/dist/cards/StatCard.astro +0 -15
  150. package/dist/cards/TaskKanbanCard.astro +0 -18
  151. package/dist/cards/TestimonialCardClean.astro +0 -20
  152. package/dist/cards/WeatherWidgetCard.astro +0 -17
  153. package/dist/cards/index.mjs +0 -19
  154. package/dist/cards/index.ts +0 -19
  155. package/dist/data/AccordionGroupGlass.astro +0 -21
  156. package/dist/data/AvatarGroupStack.astro +0 -15
  157. package/dist/data/CalendarGridView.astro +0 -18
  158. package/dist/data/DataChipsGroup.astro +0 -16
  159. package/dist/data/DescriptionListHoriz.astro +0 -14
  160. package/dist/data/FileTreeView.astro +0 -22
  161. package/dist/data/GanttChartMinimal.astro +0 -12
  162. package/dist/data/GlassTable.astro +0 -23
  163. package/dist/data/KeyValuePillGroup.astro +0 -12
  164. package/dist/data/PriceCompareTable.astro +0 -22
  165. package/dist/data/ProgressListSmall.astro +0 -17
  166. package/dist/data/RatingBreakdownBar.astro +0 -13
  167. package/dist/data/SparklineStatCard.astro +0 -16
  168. package/dist/data/StatsGridDashboard.astro +0 -16
  169. package/dist/data/StepperDataVertical.astro +0 -15
  170. package/dist/data/TagCloudData.astro +0 -14
  171. package/dist/data/TimelineHorizSteps.astro +0 -18
  172. package/dist/data/TreeItemInteractive.astro +0 -18
  173. package/dist/data/UserDirectoryItem.astro +0 -15
  174. package/dist/data/VerticalTimeline.astro +0 -21
  175. package/dist/data/index.mjs +0 -20
  176. package/dist/data/index.ts +0 -20
  177. package/dist/feedback/AnimatedCheckmark.astro +0 -13
  178. package/dist/feedback/Badge.astro +0 -19
  179. package/dist/feedback/CircleProgress.astro +0 -22
  180. package/dist/feedback/ConfettiFeedback.astro +0 -18
  181. package/dist/feedback/CyberGlitchAlert.astro +0 -11
  182. package/dist/feedback/EmptyStateCard.astro +0 -13
  183. package/dist/feedback/GlassAlert.astro +0 -20
  184. package/dist/feedback/GlassModal.astro +0 -19
  185. package/dist/feedback/GlassProgress.astro +0 -10
  186. package/dist/feedback/IndicatorBadgeMinimal.astro +0 -10
  187. package/dist/feedback/NeonSpinner.astro +0 -7
  188. package/dist/feedback/PulseDot.astro +0 -12
  189. package/dist/feedback/RatingPill.astro +0 -13
  190. package/dist/feedback/ShakeErrorGroup.astro +0 -7
  191. package/dist/feedback/SimpleTooltip.astro +0 -10
  192. package/dist/feedback/SkeletonList.astro +0 -20
  193. package/dist/feedback/Spotlight.astro +0 -9
  194. package/dist/feedback/StepProgress.astro +0 -14
  195. package/dist/feedback/ToastNotif.astro +0 -11
  196. package/dist/feedback/TypingIndicator.astro +0 -12
  197. package/dist/feedback/index.mjs +0 -20
  198. package/dist/feedback/index.ts +0 -20
  199. package/dist/forms/AnimatedInput.astro +0 -16
  200. package/dist/forms/ChipInput.astro +0 -13
  201. package/dist/forms/ColorPickerInput.astro +0 -13
  202. package/dist/forms/CurrencyInput.astro +0 -11
  203. package/dist/forms/CustomRadioGroup.astro +0 -13
  204. package/dist/forms/CyberpunkCheckbox.astro +0 -15
  205. package/dist/forms/DragDropUpload.astro +0 -12
  206. package/dist/forms/ErrorInput.astro +0 -11
  207. package/dist/forms/FloatingPassword.astro +0 -20
  208. package/dist/forms/FormGroupVertical.astro +0 -14
  209. package/dist/forms/GlassSlider.astro +0 -7
  210. package/dist/forms/GlassTextarea.astro +0 -14
  211. package/dist/forms/ModernSelect.astro +0 -16
  212. package/dist/forms/NeumorphicSwitch.astro +0 -55
  213. package/dist/forms/OTPInput.astro +0 -22
  214. package/dist/forms/RatingStars.astro +0 -15
  215. package/dist/forms/SearchReveal.astro +0 -13
  216. package/dist/forms/SegmentedControl.astro +0 -13
  217. package/dist/forms/SimpleFileInput.astro +0 -11
  218. package/dist/forms/StepperInput.astro +0 -14
  219. package/dist/forms/index.mjs +0 -20
  220. package/dist/forms/index.ts +0 -20
  221. package/dist/index.js +0 -1
  222. package/dist/index.mjs +0 -1
  223. package/dist/layout/BentoGrid3.astro +0 -14
  224. package/dist/layout/CenterFixedBox.astro +0 -6
  225. package/dist/layout/CenteredContainer.astro +0 -8
  226. package/dist/layout/ClusterHorizontal.astro +0 -6
  227. package/dist/layout/FeatureHero.astro +0 -17
  228. package/dist/layout/FooterCenteredMinimal.astro +0 -11
  229. package/dist/layout/FullBleedSection.astro +0 -6
  230. package/dist/layout/GalleryGrid4.astro +0 -7
  231. package/dist/layout/GlassCardGrid.astro +0 -6
  232. package/dist/layout/GlassSectionHeader.astro +0 -15
  233. package/dist/layout/LandingSectionSplit.astro +0 -13
  234. package/dist/layout/MasonryGrid.astro +0 -7
  235. package/dist/layout/MinimalFooterGrid.astro +0 -20
  236. package/dist/layout/ScrollSnapSection.astro +0 -7
  237. package/dist/layout/SectionDividerText.astro +0 -7
  238. package/dist/layout/SidebarLayoutWrapper.astro +0 -11
  239. package/dist/layout/SplitScreenLayout.astro +0 -11
  240. package/dist/layout/StepLayoutVertical.astro +0 -21
  241. package/dist/layout/StickySidebarWrapper.astro +0 -10
  242. package/dist/layout/VerticalStack.astro +0 -8
  243. package/dist/layout/index.mjs +0 -20
  244. package/dist/layout/index.ts +0 -20
  245. package/dist/navigation/AnchorSideNav.astro +0 -13
  246. package/dist/navigation/BottomNavMobile.astro +0 -13
  247. package/dist/navigation/BreadcrumbsMinimal.astro +0 -16
  248. package/dist/navigation/BurgerMorphIcon.astro +0 -12
  249. package/dist/navigation/CommandPaletteUI.astro +0 -17
  250. package/dist/navigation/DotNavigationSlider.astro +0 -13
  251. package/dist/navigation/FloatingTabBar.astro +0 -12
  252. package/dist/navigation/GlassNavbar.astro +0 -19
  253. package/dist/navigation/LangSwitcherPill.astro +0 -17
  254. package/dist/navigation/MegaMenuGlass.astro +0 -25
  255. package/dist/navigation/MinimalSidebar.astro +0 -18
  256. package/dist/navigation/PaginationGlass.astro +0 -20
  257. package/dist/navigation/PaginationInfiniteUI.astro +0 -11
  258. package/dist/navigation/RadialIconMenu.astro +0 -15
  259. package/dist/navigation/RetroArcadeMenu.astro +0 -12
  260. package/dist/navigation/ScrollProgressTop.astro +0 -15
  261. package/dist/navigation/SimpleFooterGlass.astro +0 -21
  262. package/dist/navigation/TabUnderline.astro +0 -14
  263. package/dist/navigation/UserProfileNav.astro +0 -21
  264. package/dist/navigation/VerticalTabs.astro +0 -14
  265. package/dist/navigation/index.mjs +0 -20
  266. package/dist/navigation/index.ts +0 -20
  267. package/dist/overlays/AgeVerificationOverlay.astro +0 -20
  268. package/dist/overlays/BackdropBlurMask.astro +0 -6
  269. package/dist/overlays/BottomSheetMobile.astro +0 -16
  270. package/dist/overlays/CommandDialog.astro +0 -19
  271. package/dist/overlays/ContextMenuOverlay.astro +0 -17
  272. package/dist/overlays/CookieBannerGlass.astro +0 -14
  273. package/dist/overlays/ExitIntentOverlay.astro +0 -19
  274. package/dist/overlays/FloatingTrayActions.astro +0 -13
  275. package/dist/overlays/HelpBubbleOverlay.astro +0 -11
  276. package/dist/overlays/LightboxOverlay.astro +0 -13
  277. package/dist/overlays/LoadingOverlayFull.astro +0 -10
  278. package/dist/overlays/MobileNavOverlay.astro +0 -18
  279. package/dist/overlays/OverlayModal.astro +0 -24
  280. package/dist/overlays/PopoverMenuGlass.astro +0 -17
  281. package/dist/overlays/SearchOverlayFullscreen.astro +0 -15
  282. package/dist/overlays/SideDrawerRight.astro +0 -16
  283. package/dist/overlays/SplashIntroOverlay.astro +0 -11
  284. package/dist/overlays/SpotlightIndicator.astro +0 -6
  285. package/dist/overlays/ToastStackOverlay.astro +0 -12
  286. package/dist/overlays/TooltipActionTray.astro +0 -14
  287. package/dist/overlays/index.mjs +0 -20
  288. package/dist/overlays/index.ts +0 -20
  289. package/dist/typography/AnimatedUnderlineLink.astro +0 -10
  290. package/dist/typography/BackgroundClipMask.astro +0 -7
  291. package/dist/typography/CodeInlineGlass.astro +0 -6
  292. package/dist/typography/CyberpunkGlitchText.astro +0 -20
  293. package/dist/typography/DropCapParagraph.astro +0 -7
  294. package/dist/typography/FadedVerticalText.astro +0 -6
  295. package/dist/typography/FloatingTextLabel.astro +0 -10
  296. package/dist/typography/GlassBlockQuote.astro +0 -13
  297. package/dist/typography/GlassTextReveal.astro +0 -7
  298. package/dist/typography/GradientHeading.astro +0 -9
  299. package/dist/typography/GradientUnderlineLink.astro +0 -7
  300. package/dist/typography/KbdIndicator.astro +0 -6
  301. package/dist/typography/LetterSpacingWide.astro +0 -6
  302. package/dist/typography/MinimalListMarkers.astro +0 -10
  303. package/dist/typography/MonospaceStatLine.astro +0 -6
  304. package/dist/typography/NeonTextHighlight.astro +0 -6
  305. package/dist/typography/ShadowRevealText.astro +0 -7
  306. package/dist/typography/StrokeHeadingOutline.astro +0 -8
  307. package/dist/typography/Text3DLayer.astro +0 -7
  308. package/dist/typography/TypewriterText.astro +0 -15
  309. package/dist/typography/index.mjs +0 -20
  310. package/dist/typography/index.ts +0 -20
  311. package/dist/utilities/AspectRatioBox.astro +0 -11
  312. package/dist/utilities/BackgroundDotPattern.astro +0 -6
  313. package/dist/utilities/CircularMask.astro +0 -7
  314. package/dist/utilities/ClickRippleWrapper.astro +0 -7
  315. package/dist/utilities/FadeInWrapper.astro +0 -11
  316. package/dist/utilities/FixedRatioImage.astro +0 -7
  317. package/dist/utilities/GlassBlurLayer.astro +0 -6
  318. package/dist/utilities/GradientBorderMask.astro +0 -7
  319. package/dist/utilities/HoverLift.astro +0 -7
  320. package/dist/utilities/ResponsiveSpacer.astro +0 -15
  321. package/dist/utilities/ResponsiveVisToggle.astro +0 -11
  322. package/dist/utilities/ScrollLockParent.astro +0 -11
  323. package/dist/utilities/ScrollMarginTarget.astro +0 -10
  324. package/dist/utilities/SlideUpReveal.astro +0 -7
  325. package/dist/utilities/SmoothAnchorLink.astro +0 -22
  326. package/dist/utilities/StackLayering.astro +0 -12
  327. package/dist/utilities/StickyObserver.astro +0 -8
  328. package/dist/utilities/TextTruncate.astro +0 -10
  329. package/dist/utilities/TruncateSingleLine.astro +0 -6
  330. package/dist/utilities/VisuallyHidden.astro +0 -6
  331. package/dist/utilities/index.mjs +0 -20
  332. package/dist/utilities/index.ts +0 -20
  333. package/src/components/lib/utilities/AspectRatioBox.astro +0 -11
  334. package/src/components/lib/utilities/BackgroundDotPattern.astro +0 -6
  335. package/src/components/lib/utilities/CircularMask.astro +0 -7
  336. package/src/components/lib/utilities/ClickRippleWrapper.astro +0 -7
  337. package/src/components/lib/utilities/FadeInWrapper.astro +0 -11
  338. package/src/components/lib/utilities/FixedRatioImage.astro +0 -7
  339. package/src/components/lib/utilities/GlassBlurLayer.astro +0 -6
  340. package/src/components/lib/utilities/GradientBorderMask.astro +0 -7
  341. package/src/components/lib/utilities/HoverLift.astro +0 -7
  342. package/src/components/lib/utilities/ResponsiveSpacer.astro +0 -15
  343. package/src/components/lib/utilities/ResponsiveVisToggle.astro +0 -11
  344. package/src/components/lib/utilities/ScrollLockParent.astro +0 -11
  345. package/src/components/lib/utilities/ScrollMarginTarget.astro +0 -10
  346. package/src/components/lib/utilities/SlideUpReveal.astro +0 -7
  347. package/src/components/lib/utilities/SmoothAnchorLink.astro +0 -22
  348. package/src/components/lib/utilities/StackLayering.astro +0 -12
  349. package/src/components/lib/utilities/StickyObserver.astro +0 -8
  350. package/src/components/lib/utilities/TextTruncate.astro +0 -10
  351. package/src/components/lib/utilities/TruncateSingleLine.astro +0 -6
  352. package/src/components/lib/utilities/VisuallyHidden.astro +0 -6
  353. package/src/components/lib/utilities/index.ts +0 -20
@@ -1,19 +1,104 @@
1
1
  ---
2
+ /**
3
+ * GlassModal — A premium overlay dialog for critical confirmations or focused interactions.
4
+ *
5
+ * @param {string} id - HTML ID for toggle and script and association.
6
+ * @param {string} title - Header text. Default is "Confirm Action".
7
+ * @param {string} confirmLabel - Label for the primary button. Default is "Confirm".
8
+ * @param {string} cancelLabel - Label for the secondary button. Default is "Cancel".
9
+ */
10
+ interface Props {
11
+ id: string;
12
+ title?: string;
13
+ confirmLabel?: string;
14
+ cancelLabel?: string;
15
+ }
16
+
17
+ const {
18
+ id,
19
+ title = "Confirm Action",
20
+ confirmLabel = "Confirm",
21
+ cancelLabel = "Cancel"
22
+ } = Astro.props;
2
23
  ---
3
- <div class="modal-overlay">
4
- <div class="modal-box anim-scale-up">
5
- <div class="modal-header"><h3>Confirm Action</h3></div>
6
- <div class="modal-body"><p>Are you sure you want to delete this resource? This cannot be undone.</p></div>
7
- <div class="modal-footer"><button class="btn-sec">Cancel</button><button class="btn-pri">Confirm</button></div>
24
+
25
+ <dialog id={id} class="modal-dialog">
26
+ <div class="modal-box">
27
+ <div class="modal-header"><h3>{title}</h3></div>
28
+ <div class="modal-body">
29
+ <slot />
30
+ </div>
31
+ <div class="modal-footer">
32
+ <form method="dialog">
33
+ <button class="modal-btn modal-btn--sec" type="submit">{cancelLabel}</button>
34
+ </form>
35
+ <button class="modal-btn modal-btn--pri" data-modal-confirm>{confirmLabel}</button>
36
+ </div>
8
37
  </div>
9
- </div>
38
+ </dialog>
39
+
10
40
  <style>
11
- .modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.3); backdrop-filter: blur(8px); display: grid; place-items: center; z-index: 2000; }
12
- .modal-box { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 24px; padding: 2rem; width: 100%; max-width: 400px; box-shadow: 0 30px 100px rgba(0,0,0,0.5); }
13
- .modal-header h3 { margin: 0; color: #fff; }
14
- .modal-body p { color: #94a3b8; font-size: 0.9rem; line-height: 1.6; }
15
- .modal-footer { display: flex; justify-content: flex-end; gap: 1rem; margin-top: 2rem; }
16
- button { padding: 0.6rem 1.2rem; border-radius: 10px; border: none; font-weight: 700; cursor: pointer; }
17
- .btn-sec { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.1); }
18
- .btn-pri { background: #6366f1; color: #fff; }
41
+ .modal-dialog {
42
+ background: transparent;
43
+ border: none;
44
+ padding: 0;
45
+ max-width: 400px;
46
+ width: 100%;
47
+ overflow: visible;
48
+ }
49
+
50
+ .modal-dialog::backdrop {
51
+ background: rgba(0, 0, 0, 0.4);
52
+ backdrop-filter: blur(8px);
53
+ animation: fade-in 0.3s forwards;
54
+ }
55
+
56
+ .modal-box {
57
+ background: var(--c-bg-elev, rgba(255,255,255,0.05));
58
+ border: 1px solid var(--c-border, rgba(255,255,255,0.1));
59
+ border-radius: var(--r-xl, 24px);
60
+ padding: var(--sp-8, 2rem);
61
+ box-shadow: 0 30px 100px rgba(0,0,0,0.6);
62
+ color: var(--c-text-1, #fff);
63
+ }
64
+
65
+ .animate-open { animation: scale-up 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
66
+
67
+ .modal-header h3 { margin: 0 0 var(--sp-4, 1rem); color: var(--c-text-1, #fff); font-size: 1.25rem; }
68
+
69
+ .modal-body { color: var(--c-text-2, #94a3b8); font-size: 0.95rem; line-height: 1.6; }
70
+
71
+ .modal-footer { display: flex; justify-content: flex-end; gap: var(--sp-4, 1rem); margin-top: var(--sp-8, 2rem); }
72
+
73
+ .modal-btn {
74
+ padding: 0.7rem 1.4rem;
75
+ border-radius: var(--r-md, 12px);
76
+ border: none;
77
+ font-weight: 700;
78
+ cursor: pointer;
79
+ font-family: inherit;
80
+ transition: 0.2s;
81
+ }
82
+
83
+ .modal-btn--sec { background: transparent; color: var(--c-text-1, #fff); border: 1px solid var(--c-border, rgba(255,255,255,0.1)); }
84
+ .modal-btn--sec:hover { background: rgba(255,255,255,0.05); }
85
+
86
+ .modal-btn--pri {
87
+ background: var(--c-primary, #6366f1);
88
+ color: #fff;
89
+ box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
90
+ }
91
+ .modal-btn--pri:hover { transform: translateY(-2px); filter: brightness(1.1); }
92
+
93
+ @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
94
+ @keyframes scale-up { 0% { transform: scale(0.8); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
19
95
  </style>
96
+
97
+ <script>
98
+ // Add simple show/hide logic helper if needed, but <dialog> works natively
99
+ document.querySelectorAll('dialog').forEach(modal => {
100
+ modal.addEventListener('click', (e) => {
101
+ if (e.target === modal) modal.close();
102
+ });
103
+ });
104
+ </script>
@@ -1,10 +1,44 @@
1
1
  ---
2
- interface Props { value: number; }
2
+ /**
3
+ * GlassProgress — A horizontal linear progress bar with glassmorphism and gradient fill.
4
+ *
5
+ * @param {number} value - The current progress from 0 to 100.
6
+ * @param {string} label - Optional accessible label message.
7
+ */
8
+ interface Props {
9
+ value: number;
10
+ label?: string;
11
+ }
12
+
13
+ const { value, label = "Progress bar" } = Astro.props;
3
14
  ---
4
- <div class="progress-container">
5
- <div class="progress-fill" style={`width: ${Astro.props.value}%`}></div>
15
+
16
+ <div
17
+ class="progress-container"
18
+ role="progressbar"
19
+ aria-valuenow={value}
20
+ aria-valuemin="0"
21
+ aria-valuemax="100"
22
+ aria-label={label}
23
+ >
24
+ <div class="progress-fill" style={`width: ${Math.min(100, Math.max(0, value))}%`}></div>
6
25
  </div>
26
+
7
27
  <style>
8
- .progress-container { height: 10px; background: rgba(255,255,255,0.05); border-radius: 10px; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); }
9
- .progress-fill { height: 100%; background: linear-gradient(90deg, #6366f1, #c084fc); border-radius: inherit; transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 0 10px rgba(99,102,241,0.4); }
28
+ .progress-container {
29
+ height: 10px;
30
+ background: var(--c-bg-elev, rgba(255,255,255,0.05));
31
+ border-radius: var(--r-full, 10px);
32
+ overflow: hidden;
33
+ border: 1px solid var(--c-border, rgba(255,255,255,0.1));
34
+ width: 100%;
35
+ }
36
+
37
+ .progress-fill {
38
+ height: 100%;
39
+ background: linear-gradient(90deg, var(--c-primary, #6366f1), var(--c-primary-light, #c084fc));
40
+ border-radius: inherit;
41
+ transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
42
+ box-shadow: 0 0 10px rgba(99,102,241,0.3);
43
+ }
10
44
  </style>
@@ -1,10 +1,63 @@
1
1
  ---
2
+ /**
3
+ * IndicatorBadgeMinimal — A small notification dot typically placed on the corner of an icon or avatar.
4
+ *
5
+ * @param {string} color - CSS color for the indicator dot. Default is 'var(--c-primary)'.
6
+ * @param {string} position - Corner position (top-right|top-left|bottom-right|bottom-left). Default is 'top-right'.
7
+ * @param {boolean} pulse - If true, adds a glowing pulse animation.
8
+ */
9
+ interface Props {
10
+ color?: string;
11
+ position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
12
+ pulse?: boolean;
13
+ }
14
+
15
+ const {
16
+ color = 'var(--c-primary, #6366f1)',
17
+ position = 'top-right',
18
+ pulse = false
19
+ } = Astro.props;
20
+
21
+ const positionStyles = {
22
+ 'top-right': 'top: 0; right: 0; transform: translate(25%, -25%);',
23
+ 'top-left': 'top: 0; left: 0; transform: translate(-25%, -25%);',
24
+ 'bottom-right': 'bottom: 0; right: 0; transform: translate(25%, 25%);',
25
+ 'bottom-left': 'bottom: 0; left: 0; transform: translate(-25%, 25%);'
26
+ };
2
27
  ---
28
+
3
29
  <div class="indicator-wrap">
4
30
  <slot />
5
- <span class="dot-indicator"></span>
31
+ <span
32
+ class:list={['dot-indicator', { 'dot-indicator--pulse': pulse }]}
33
+ style={`background: ${color}; ${positionStyles[position]}`}
34
+ aria-hidden="true"
35
+ ></span>
6
36
  </div>
37
+
7
38
  <style>
8
- .indicator-wrap { position: relative; width: fit-content; }
9
- .dot-indicator { position: absolute; top: 0; right: 0; width: 10px; height: 10px; background: #6366f1; border: 2px solid #080b14; border-radius: 50%; }
39
+ .indicator-wrap { position: relative; width: fit-content; display: inline-flex; }
40
+ .dot-indicator {
41
+ position: absolute;
42
+ width: 10px; height: 10px;
43
+ border: 2px solid var(--c-bg, #080b14);
44
+ border-radius: var(--r-full, 50%);
45
+ z-index: 10;
46
+ }
47
+
48
+ .dot-indicator--pulse::after {
49
+ content: "";
50
+ position: absolute;
51
+ inset: -2px;
52
+ border-radius: inherit;
53
+ border: 2px solid inherit;
54
+ background: inherit;
55
+ opacity: 0.6;
56
+ animation: indicator-pulse 2s infinite;
57
+ }
58
+
59
+ @keyframes indicator-pulse {
60
+ 0% { transform: scale(1); opacity: 0.6; }
61
+ 100% { transform: scale(2.5); opacity: 0; }
62
+ }
10
63
  </style>
@@ -1,7 +1,44 @@
1
1
  ---
2
+ /**
3
+ * NeonSpinner — A sleek, glowing loading spinner with customizable color and size.
4
+ *
5
+ * @param {string} color - CSS color for the primary spinning segment. Default is 'var(--c-primary)'.
6
+ * @param {'sm'|'md'|'lg'} size - Predetermined size variant. Default is 'md'.
7
+ */
8
+ interface Props {
9
+ color?: string;
10
+ size?: 'sm' | 'md' | 'lg';
11
+ }
12
+
13
+ const { color = 'var(--c-primary, #6366f1)', size = 'md' } = Astro.props;
14
+
15
+ const dimensions = {
16
+ sm: '24px',
17
+ md: '40px',
18
+ lg: '64px'
19
+ };
2
20
  ---
3
- <div class="neon-ring"></div>
21
+
22
+ <div
23
+ class="neon-spinner"
24
+ style={`--spinner-color: ${color}; --spinner-size: ${dimensions[size]};`}
25
+ role="status"
26
+ aria-label="Loading"
27
+ ></div>
28
+
4
29
  <style>
5
- .neon-ring { width: 40px; height: 40px; border: 4px solid #111; border-top-color: #6366f1; border-radius: 50%; animation: spin 0.8s linear infinite; box-shadow: 0 0 10px rgba(99,102,241,0.5); }
6
- @keyframes spin { to { transform: rotate(360deg); } }
30
+ .neon-spinner {
31
+ width: var(--spinner-size);
32
+ height: var(--spinner-size);
33
+ border: 3px solid var(--c-bg-elev, #111);
34
+ border-top-color: var(--spinner-color);
35
+ border-radius: var(--r-full, 50%);
36
+ animation: neon-spin 0.8s linear infinite;
37
+ filter: drop-shadow(0 0 5px var(--spinner-color));
38
+ }
39
+
40
+ @keyframes neon-spin {
41
+ from { transform: rotate(0deg); }
42
+ to { transform: rotate(360deg); }
43
+ }
7
44
  </style>
@@ -1,12 +1,56 @@
1
1
  ---
2
+ /**
3
+ * PulseDot — A status indicator with a labeled text and a pulsing dot animation.
4
+ *
5
+ * @param {string} label - Text label (e.g. "System Active").
6
+ * @param {string} color - CSS color for the pulse and text. Default is '#34d399' (Success).
7
+ */
8
+ interface Props {
9
+ label: string;
10
+ color?: string;
11
+ }
12
+
13
+ const { label, color = '#34d399' } = Astro.props;
2
14
  ---
3
- <div class="status-wrap">
4
- <div class="pulse-dot"></div>
5
- <span>System Active</span>
15
+
16
+ <div class="status-wrap" style={`--status-color: ${color};`}>
17
+ <div class="pulse-dot" aria-hidden="true"></div>
18
+ <span class="status-text">{label}</span>
6
19
  </div>
20
+
7
21
  <style>
8
- .status-wrap { display: flex; align-items: center; gap: 0.6rem; color: #34d399; font-weight: 700; font-size: 0.75rem; text-transform: uppercase; }
9
- .pulse-dot { width: 8px; height: 8px; background: #34d399; border-radius: 50%; position: relative; }
10
- .pulse-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #34d399; animation: pulse 1.5s infinite; }
11
- @keyframes pulse { 100% { opacity: 0; transform: scale(3.5); } }
22
+ .status-wrap {
23
+ display: flex;
24
+ align-items: center;
25
+ gap: var(--sp-3, 0.6rem);
26
+ color: var(--status-color);
27
+ font-weight: 700;
28
+ font-size: 0.75rem;
29
+ text-transform: uppercase;
30
+ letter-spacing: 0.05em;
31
+ }
32
+
33
+ .pulse-dot {
34
+ width: 8px;
35
+ height: 8px;
36
+ background: var(--status-color);
37
+ border-radius: var(--r-full, 50%);
38
+ position: relative;
39
+ }
40
+
41
+ .pulse-dot::after {
42
+ content: "";
43
+ position: absolute;
44
+ inset: 0;
45
+ border-radius: 50%;
46
+ border: 2px solid var(--status-color);
47
+ animation: status-pulse 1.8s infinite;
48
+ }
49
+
50
+ @keyframes status-pulse {
51
+ 0% { transform: scale(1); opacity: 0.8; }
52
+ 100% { transform: scale(3.5); opacity: 0; }
53
+ }
54
+
55
+ .status-text { white-space: nowrap; }
12
56
  </style>
@@ -1,13 +1,43 @@
1
1
  ---
2
- interface Props { score: number; }
3
- const { score } = Astro.props;
2
+ /**
3
+ * RatingPill — A compact badge displaying a numeric score or rating stars.
4
+ *
5
+ * @param {number} score - The rating value (0 to 5).
6
+ * @param {boolean} showStar - If true, displays a star icon suffix. Default is true.
7
+ */
8
+ interface Props {
9
+ score: number;
10
+ showStar?: boolean;
11
+ }
12
+
13
+ const { score, showStar = true } = Astro.props;
14
+
15
+ const status = score >= 4 ? 'high' : score >= 3 ? 'mid' : 'low';
4
16
  ---
5
- <div class:list={["rate-pill", { "high": score >= 4, "mid": score >= 3 && score < 4, "low": score < 3 }]}>
6
- {score.toFixed(1)} ★
17
+
18
+ <div class:list={["rate-pill", `rate-pill--${status}`]}>
19
+ <span class="rate-pill__val">{score.toFixed(1)}</span>
20
+ {showStar && <span class="rate-pill__star" aria-hidden="true">★</span>}
7
21
  </div>
22
+
8
23
  <style>
9
- .rate-pill { padding: 4px 12px; border-radius: 100px; font-weight: 800; font-size: 0.75rem; color: #fff; width: fit-content; }
10
- .high { background: #10b981; }
11
- .mid { background: #f59e0b; }
12
- .low { background: #ef4444; }
24
+ .rate-pill {
25
+ display: inline-flex;
26
+ align-items: center;
27
+ gap: 4px;
28
+ padding: var(--sp-1, 4px) var(--sp-3, 12px);
29
+ border-radius: var(--r-full, 100px);
30
+ font-weight: 800;
31
+ font-size: 0.75rem;
32
+ color: #fff;
33
+ width: fit-content;
34
+ box-shadow: 0 4px 10px rgba(0,0,0,0.1);
35
+ }
36
+
37
+ .rate-pill--high { background: #10b981; }
38
+ .rate-pill--mid { background: #f59e0b; }
39
+ .rate-pill--low { background: #ef4444; }
40
+
41
+ .rate-pill__star { font-size: 0.8rem; margin-top: -1px; }
42
+ .rate-pill__val { font-family: inherit; }
13
43
  </style>
@@ -1,7 +1,48 @@
1
1
  ---
2
+ /**
3
+ * ShakeError — A feedback container that shakes horizontally to indicate failure or invalid input.
4
+ *
5
+ * @param {string} message - The error message to display.
6
+ * @param {boolean} active - If true, triggers the shake animation once.
7
+ */
8
+ interface Props {
9
+ message: string;
10
+ active?: boolean;
11
+ }
12
+
13
+ const { message, active = false } = Astro.props;
2
14
  ---
3
- <div class="shake-box error"><span>Invalid Credentials</span></div>
15
+
16
+ <div class:list={["shake-box", { "shake-box--active": active }]} role="alert">
17
+ <span class="shake-box__icon" aria-hidden="true">⚠️</span>
18
+ <span class="shake-box__msg">{message}</span>
19
+ </div>
20
+
4
21
  <style>
5
- .shake-box.error { animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both; background: rgba(239, 68, 68, 0.1); border: 1px solid #ef4444; color: #f87171; padding: 1rem; border-radius: 10px; text-align: center; font-weight: 600; }
6
- @keyframes shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(2px); } 30%, 50%, 70% { transform: translateX(-4px); } 40%, 60% { transform: translateX(4px); } }
22
+ .shake-box {
23
+ display: flex;
24
+ align-items: center;
25
+ gap: var(--sp-3, 0.75rem);
26
+ background: rgba(239, 68, 68, 0.08);
27
+ border: 1px solid var(--c-error, #ef4444);
28
+ color: #f87171;
29
+ padding: var(--sp-4, 1rem);
30
+ border-radius: var(--r-md, 10px);
31
+ text-align: center;
32
+ font-weight: 600;
33
+ width: 100%;
34
+ box-sizing: border-box;
35
+ }
36
+
37
+ .shake-box--active { animation: shake-kb 0.5s cubic-bezier(.36,.07,.19,.97) both; }
38
+
39
+ .shake-box__icon { font-size: 1rem; }
40
+ .shake-box__msg { font-size: 0.9rem; }
41
+
42
+ @keyframes shake-kb {
43
+ 10%, 90% { transform: translateX(-1px); }
44
+ 20%, 80% { transform: translateX(2px); }
45
+ 30%, 50%, 70% { transform: translateX(-4px); }
46
+ 40%, 60% { transform: translateX(4px); }
47
+ }
7
48
  </style>
@@ -1,10 +1,59 @@
1
1
  ---
2
+ /**
3
+ * SimpleTooltip — A lightweight hover-based hint for buttons or icons.
4
+ *
5
+ * @param {string} text - The tooltip content text.
6
+ * @param {'top'|'bottom'|'left'|'right'} position - Preferred placement relative to the child. Default is 'top'.
7
+ */
8
+ interface Props {
9
+ text: string;
10
+ position?: 'top' | 'bottom' | 'left' | 'right';
11
+ }
12
+
13
+ const { text, position = 'top' } = Astro.props;
2
14
  ---
3
- <div class="tooltip-wrap" data-tip="Click to copy ID">
15
+
16
+ <div class:list={["tooltip-wrap", `tooltip-wrap--${position}`]} data-tip={text}>
4
17
  <slot />
5
18
  </div>
19
+
6
20
  <style>
7
- .tooltip-wrap { position: relative; display: inline-block; cursor: help; }
8
- .tooltip-wrap::after { content: attr(data-tip); position: absolute; bottom: 125%; left: 50%; transform: translateX(-50%); padding: 5px 10px; background: #111; color: #fff; font-size: 0.75rem; border-radius: 6px; white-space: nowrap; opacity: 0; pointer-events: none; transition: 0.2s; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 5px 15px rgba(0,0,0,0.4); }
9
- .tooltip-wrap:hover::after { opacity: 1; bottom: 110%; }
21
+ .tooltip-wrap {
22
+ position: relative;
23
+ display: inline-flex;
24
+ cursor: help;
25
+ }
26
+
27
+ .tooltip-wrap::after {
28
+ content: attr(data-tip);
29
+ position: absolute;
30
+ padding: var(--sp-2, 6px) var(--sp-3, 12px);
31
+ background: var(--c-bg-elev, #111);
32
+ color: var(--c-text-1, #fff);
33
+ font-size: 0.72rem;
34
+ font-weight: 600;
35
+ border-radius: var(--r-sm, 6px);
36
+ white-space: nowrap;
37
+ opacity: 0;
38
+ pointer-events: none;
39
+ transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
40
+ border: 1px solid var(--c-border, rgba(255,255,255,0.1));
41
+ box-shadow: 0 10px 30px rgba(0,0,0,0.5);
42
+ z-index: 100;
43
+ }
44
+
45
+ /* Positions */
46
+ .tooltip-wrap--top::after { bottom: 125%; left: 50%; transform: translateX(-50%) translateY(5px); }
47
+ .tooltip-wrap--bottom::after { top: 125%; left: 50%; transform: translateX(-50%) translateY(-5px); }
48
+ .tooltip-wrap--left::after { right: 125%; top: 50%; transform: translateY(-50%) translateX(5px); }
49
+ .tooltip-wrap--right::after { left: 125%; top: 50%; transform: translateY(-50%) translateX(-5px); }
50
+
51
+ /* Hover States */
52
+ .tooltip-wrap:hover::after {
53
+ opacity: 1;
54
+ }
55
+ .tooltip-wrap--top:hover::after { transform: translateX(-50%) translateY(0); }
56
+ .tooltip-wrap--bottom:hover::after { transform: translateX(-50%) translateY(0); }
57
+ .tooltip-wrap--left:hover::after { transform: translateY(-50%) translateX(0); }
58
+ .tooltip-wrap--right:hover::after { transform: translateY(-50%) translateX(0); }
10
59
  </style>
@@ -1,20 +1,66 @@
1
1
  ---
2
+ /**
3
+ * SkeletonList — Shimmering loading placeholder for lists or feed items.
4
+ *
5
+ * @param {number} count - Number of skeleton items to render. Default is 3.
6
+ */
7
+ interface Props {
8
+ count?: number;
9
+ }
10
+
11
+ const { count = 3 } = Astro.props;
2
12
  ---
3
- <div class="skeleton-list">
4
- {[1,2,3].map(() => (
5
- <div class="skel-item">
6
- <div class="skel-avatar"></div>
7
- <div class="skel-lines"><div></div><div></div></div>
13
+
14
+ <div class="skeleton-list" aria-hidden="true">
15
+ {Array.from({ length: count }).map(() => (
16
+ <div class="skeleton-item">
17
+ <div class="skeleton-avatar"></div>
18
+ <div class="skeleton-content">
19
+ <div class="skeleton-line skeleton-line--title"></div>
20
+ <div class="skeleton-line skeleton-line--body"></div>
21
+ </div>
8
22
  </div>
9
23
  ))}
10
24
  </div>
25
+
11
26
  <style>
12
- .skel-item { display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
13
- .skel-avatar { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.05); }
14
- .skel-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
15
- .skel-lines div { height: 10px; background: rgba(255,255,255,0.05); border-radius: 5px; }
16
- .skel-lines div:last-child { width: 60%; }
17
- .skel-item div { position: relative; overflow: hidden; }
18
- .skel-item div::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent); animation: shimmer 1.5s infinite; }
19
- @keyframes shimmer { 100% { transform: translateX(100%); } }
27
+ .skeleton-list { display: flex; flex-direction: column; width: 100%; }
28
+
29
+ .skeleton-item {
30
+ display: flex; gap: var(--sp-4, 1rem);
31
+ padding: var(--sp-4, 1rem) 0;
32
+ border-bottom: 1px solid var(--c-border, rgba(255,255,255,0.05));
33
+ }
34
+
35
+ .skeleton-avatar {
36
+ width: 48px; height: 48px;
37
+ border-radius: var(--r-full, 50%);
38
+ background: var(--c-bg-elev, rgba(255,255,255,0.05));
39
+ flex-shrink: 0;
40
+ }
41
+
42
+ .skeleton-content { flex: 1; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
43
+
44
+ .skeleton-line {
45
+ height: 12px;
46
+ background: var(--c-bg-elev, rgba(255,255,255,0.05));
47
+ border-radius: var(--r-sm, 6px);
48
+ position: relative; overflow: hidden;
49
+ }
50
+
51
+ .skeleton-line--title { width: 40%; height: 14px; }
52
+ .skeleton-line--body { width: 85%; }
53
+
54
+ .skeleton-item div::after {
55
+ content: "";
56
+ position: absolute;
57
+ inset: 0;
58
+ background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
59
+ animation: skeleton-shimmer 1.8s infinite;
60
+ transform: translateX(-100%);
61
+ }
62
+
63
+ @keyframes skeleton-shimmer {
64
+ 100% { transform: translateX(100%); }
65
+ }
20
66
  </style>
@@ -1,9 +1,54 @@
1
1
  ---
2
+ /**
3
+ * Spotlight — A visual emphasis component that dims the page and highlights its children.
4
+ *
5
+ * @param {boolean} active - If true, the spotlight overlay is visible. Default is false.
6
+ * @param {number} opacity - Background overlay opacity (0 to 1). Default is 0.7.
7
+ */
8
+ interface Props {
9
+ active?: boolean;
10
+ opacity?: number;
11
+ }
12
+
13
+ const { active = false, opacity = 0.7 } = Astro.props;
2
14
  ---
3
- <div class="spotlight">
4
- <div class="focused-content"><slot /></div>
15
+
16
+ <div class:list={["spotlight-wrap", { "spotlight-wrap--active": active }]} style={`--spotlight-opacity: ${opacity};`}>
17
+ <div class="spotlight-content">
18
+ <slot />
19
+ </div>
5
20
  </div>
21
+
6
22
  <style>
7
- .spotlight { position: relative; z-index: 100; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0,0,0,0.7); }
8
- .focused-content { background: #fff; border-radius: inherit; overflow: hidden; }
23
+ .spotlight-wrap {
24
+ position: relative;
25
+ display: inline-block;
26
+ transition: z-index 0.3s;
27
+ }
28
+
29
+ .spotlight-wrap--active { z-index: 2000; }
30
+
31
+ .spotlight-wrap--active::after {
32
+ content: "";
33
+ position: fixed;
34
+ inset: 0;
35
+ background: rgba(0,0,0,var(--spotlight-opacity));
36
+ backdrop-filter: blur(4px);
37
+ z-index: -1;
38
+ animation: spotlight-fade 0.3s forwards;
39
+ pointer-events: none;
40
+ }
41
+
42
+ .spotlight-content {
43
+ position: relative;
44
+ border-radius: var(--r-md, 12px);
45
+ transition: transform 0.3s;
46
+ }
47
+
48
+ .spotlight-wrap--active .spotlight-content {
49
+ transform: scale(1.05);
50
+ box-shadow: 0 0 50px rgba(255,255,255,0.1);
51
+ }
52
+
53
+ @keyframes spotlight-fade { from { opacity: 0; } to { opacity: 1; } }
9
54
  </style>