Refactored components to avoid synchronous setState calls in effects
by using proper React patterns:
- TableOfContents: Use requestAnimationFrame to defer setState calls
and useLayoutEffect for DOM measurements
- CustomTheme: Use lazy state initialization for isClient and defer
theme loading with requestAnimationFrame
- PlaygroundContext: Use lazy initialization for localStorage hydration
These changes maintain functionality while satisfying the strict
react-hooks/set-state-in-effect ESLint rule.
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Next.js 16 requires ESLint 9 for proper flat config support. This commit:
- Upgrades eslint from ^8 to ^9
- Migrates from .eslintrc.json to eslint.config.mjs (flat config)
- Updates lint script to use eslint directly (next lint removed in Next.js 16)
- Adds tsconfig.json includes for Next.js 16 dev types
- Fixes layout.tsx to use proper theme CSS link tags
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Improves Container documentation to better explain its purpose as
a page-level wrapper for plugin content.
- Added Core Concepts section explaining centering, max-width, and gutters
- Removed redundant Basic Usage example
- Updated examples to use DecorativeBox
- Improved PageTitle description
Signed-off-by: Johan Persson <johanopersson@gmail.com>
Restores the striped DecorativeBox pattern for visualizing layout
in Box, Flex, and Grid documentation examples.
- Enhanced DecorativeBox to accept children and style props
- Updated Box examples to use DecorativeBox with width/height props
- Replaced inline boxStyle/labelBoxStyle in Flex and Grid with DecorativeBox
- Improved Box surface example description
Signed-off-by: Johan Persson <johanopersson@gmail.com>
Added a `danger` variant for destructive actions like delete or remove.
Uses solid red background with white text in both light and dark modes.
- Added CSS styles with custom properties for future token migration
- Updated Storybook stories to include danger variant examples
- Updated docs-ui documentation to reflect the new variant
Signed-off-by: Johan Persson <johanopersson@gmail.com>
Improves documentation quality and consistency across all UI components.
Props documentation:
- Added descriptions to all props across all components
- Fixed prop types to match source implementations
- Added missing props (onAction, isInvalid, aria-label, etc.)
- Corrected default values and removed non-existent props
- Converted props-definition files to .tsx for Chip component usage
Examples and snippets:
- Added side-by-side layout option to Snippet component
- Fixed snippet/preview mismatches
- Improved example code indentation and formatting
- Added live previews to Container, Box, Grid examples
- Wrapped Skeleton examples in themed Box for visibility
API reference:
- Added ReactAriaLinks to all components
- Updated React Aria URLs to react-aria.adobe.com format
- Cleaned up verbose prose and standardized descriptions
Other:
- Updated PageTitle descriptions to 5-12 word format
- Varied example intro phrasing for consistency
Signed-off-by: Johan Persson <johanopersson@gmail.com>
Comprehensive rewrite of the Table component documentation including:
- Updated prop definitions with JSX descriptions
- New interactive examples for sorting, search, pagination, selection
- Expanded code snippets covering all major use cases
- Added custom row and primitives examples
- Improved MDX structure and styling
Signed-off-by: Johan Persson <johanopersson@gmail.com>
- Add ReactAriaLink component for linking to React Aria docs
- Make PropsTable columns configurable
- Improve Chip styling to support multiline content
- Allow ReactNode in PropDef descriptions
Signed-off-by: Johan Persson <johanopersson@gmail.com>