UNPKG

aura-glass

Version:

A comprehensive glassmorphism design system for React applications with 142+ production-ready components

40 lines (37 loc) 1.18 kB
'use client'; import { jsx } from 'react/jsx-runtime'; import { useMotionPreferenceContext } from '../../contexts/MotionPreferenceContext.js'; import { forwardRef } from 'react'; import { GlassStack } from './GlassStack.js'; /** * Horizontal Stack component * Wrapper around GlassStack with direction set to horizontal */ const HStack = /*#__PURE__*/forwardRef(({ spacing, space, respectMotionPreference = true, 'aria-label': ariaLabel, role, ...props }, ref) => { // TODO: Integrate ContrastGuard for any section titles, labels, and helper text for WCAG AA compliance const { prefersReducedMotion } = useMotionPreferenceContext(); const shouldRespectMotion = respectMotionPreference && !prefersReducedMotion; const ariaLabelledBy = props['aria-labelledby']; const resolvedRole = role ?? (ariaLabel || ariaLabelledBy ? 'group' : undefined); return jsx(GlassStack, { ref: ref, direction: "horizontal", space: spacing || space, respectMotionPreference: shouldRespectMotion, "aria-label": ariaLabel, role: resolvedRole, ...props }); }); HStack.displayName = 'HStack'; export { HStack }; //# sourceMappingURL=HStack.js.map