feat(theme): custom className on ThemeProvider + subpath JS emit#95
Conversation
Add optional `className` to ThemeContextValue and thread it through every Base-UI portal wrapper (alert-dialog, combobox, dialog, dropdown-menu, modal, popover, select, sheet, tooltip) so consumers can scope plugin-ui styles to a custom root class. Also fall back to a default placeholder in SettingsSidebar search.
Add multi-entry webpack config so `./components/ui`, `./components/settings`, `./providers`, `./themes`, and `./utils` resolve to real JS files. Repoint the `./utils` export at `dist/lib/utils.*` (where `cn` already lives) rather than a nonexistent `dist/utils/` path. Note: each entry is a self-contained CJS bundle, so mixing subpath imports with the root barrel can duplicate modules and break React context identity. Pick one import style per consumer.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (17)
📝 WalkthroughWalkthroughThis PR extends theme styling infrastructure across UI components, adds configurable confirmation button tones for destructive DataViews actions, and updates build exports. Theme context now exposes an optional className field, which is applied to portal elements in nine UI components. DataViews destructive actions gain a new confirmTone type with a variant mapping. Type exports and build configuration are updated to support the changes. ChangesTheme context and DataViews confirm tone feature
🎯 2 (Simple) | ⏱️ ~12 minutes Possibly Related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Adds `confirmTone` ('destructive' | 'positive' | 'default') to action
config so the confirm button color matches intent. Defaults to
'destructive' for backward compatibility.
Summary
classNametoThemeProvider; propagated through portal containers (Modal,Sheet,Dialog,AlertDialog,Popover,Tooltip,DropdownMenu,Select,Combobox) so consumers can scope portal styling.components/ui,components/settings,providers,themes,lib/utils) via webpack entries; fix./utilsexport to point atdist/lib/utils.*.'Search...'placeholder inSettingsSidebar.Test plan
npm run lintnpm run typecheck@wedevs/plugin-ui/utils,/settings,/providers,/themes,/components/ui)ThemeProviderclassName(Modal, Sheet, Tooltip, etc.)Summary by CodeRabbit
New Features
Bug Fixes
Chores