Skip to content

Commit 945dc2a

Browse files
authored
Merge pull request #12 from NandhakumarE/develop
Publishing beta version to check, things were working fine
2 parents cee2f00 + 72ada1c commit 945dc2a

45 files changed

Lines changed: 7773 additions & 1608 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
"react-querybuilder-lite": major
3+
---
4+
5+
Add comprehensive UI library integrations and enhanced Storybook stories
6+
7+
## Features
8+
9+
### UI Library Integrations
10+
- **Ant Design**: Complete query builder integration with custom Rule, Group, and ValueInput components supporting light/dark themes
11+
- **Chakra UI**: Full Chakra UI implementation with accessible components and theme configuration
12+
- **Material UI**: Material Design query builder components with Google-inspired palette and theme system
13+
- **Custom CSS**: Pure CSS-based query builder with unique vertical line design pattern
14+
15+
### Components & Utilities
16+
- Custom ValueInput components for each UI library handling string, number, date, and boolean field types
17+
- Range value input support for operators like `between` and `not_between`
18+
- Drag-and-drop handles for all components (when items are not locked)
19+
- Lock/unlock functionality with visual feedback
20+
- Duplicate and delete actions for rules and groups
21+
- AND/OR combinator toggles with keyboard and mouse support
22+
23+
### Story Enhancements
24+
- Complete core stories for BasicBuilder, MaxDepth, Operators, WithDragAndDrop, and LockedRules
25+
- Story component utilities with configurable features (drag, clone, lock)
26+
- Dark mode support across all stories
27+
- Improved responsive layouts with proper container styling
28+
29+
### Dependencies
30+
- Added: `@chakra-ui/react`, `@emotion/react`, `@emotion/styled`
31+
- Added: `@mui/icons-material`, `@mui/material`
32+
- Added: `antd`, `dayjs`
33+
34+
### Testing & Configuration
35+
- Updated vitest configuration for improved test setup
36+
- Enhanced TypeScript configuration support
37+
- Added GitHub workflows for CI/CD (deploy-storybook, release)
38+
39+
## Breaking Changes
40+
None
41+
42+
## Migration Guide
43+
No migration needed. This is a purely additive release with new story examples and UI library integrations.

.github/workflows/deploy-storybook.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ jobs:
3535

3636
- name: Build Storybook
3737
run: npm run build-storybook
38+
env:
39+
STORYBOOK_BASE: /react-querybuilder-lite/
3840

3941
- name: Setup Pages
4042
uses: actions/configure-pages@v4

.storybook/main.ts

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,42 @@ import tailwindcss from '@tailwindcss/vite';
33

44
const config: StorybookConfig = {
55
"stories": [
6-
"../src/**/*.mdx",
7-
"../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"
6+
"../src/stories/**/*.mdx",
7+
"../src/stories/**/*.stories.@(js|jsx|mjs|ts|tsx)"
88
],
9+
// Disable auto-composition of external storybooks from dependencies
10+
"refs": () => ({}),
911
"addons": [
10-
"@chromatic-com/storybook",
1112
"@storybook/addon-vitest",
1213
"@storybook/addon-a11y",
13-
"@storybook/addon-docs",
14-
"@storybook/addon-onboarding"
14+
{
15+
name: "@storybook/addon-docs",
16+
options: {
17+
autodocs: false,
18+
},
19+
},
1520
],
1621
"framework": "@storybook/react-vite",
1722
viteFinal: (config) => {
18-
config.plugins = [...(config.plugins || []), tailwindcss()];
23+
// Filter out vite-plugin-dts (not needed for Storybook, causes build errors)
24+
config.plugins = (config.plugins || []).filter((plugin) => {
25+
const pluginName = plugin && typeof plugin === 'object' && 'name' in plugin ? plugin.name : '';
26+
return pluginName !== 'vite:dts';
27+
});
28+
29+
// Add tailwindcss
30+
config.plugins.push(tailwindcss());
31+
32+
config.build = {
33+
...config.build,
34+
chunkSizeWarningLimit: 1500,
35+
};
36+
37+
// Set base path for GitHub Pages (when STORYBOOK_BASE env is set)
38+
if (process.env.STORYBOOK_BASE) {
39+
config.base = process.env.STORYBOOK_BASE;
40+
}
41+
1942
return config;
2043
},
2144
};

.storybook/preview.ts

Lines changed: 0 additions & 21 deletions
This file was deleted.

.storybook/preview.tsx

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import type { Preview } from '@storybook/react-vite';
2+
import type { Decorator } from '@storybook/react';
3+
import '../src/stories/stories.css';
4+
5+
const withThemeWrapper: Decorator = (Story, context) => {
6+
const theme = context.globals.theme || 'light';
7+
return (
8+
<div className={theme === 'dark' ? 'dark' : ''}>
9+
<Story />
10+
</div>
11+
);
12+
};
13+
14+
const preview: Preview = {
15+
parameters: {
16+
controls: {
17+
matchers: {
18+
color: /(background|color)$/i,
19+
date: /Date$/i,
20+
},
21+
},
22+
a11y: {
23+
test: 'todo',
24+
},
25+
},
26+
globalTypes: {
27+
theme: {
28+
description: 'Theme for components',
29+
toolbar: {
30+
title: 'Theme',
31+
icon: 'paintbrush',
32+
items: [
33+
{ value: 'light', icon: 'sun', title: 'Light' },
34+
{ value: 'dark', icon: 'moon', title: 'Dark' },
35+
],
36+
dynamicTitle: true,
37+
},
38+
},
39+
},
40+
initialGlobals: {
41+
theme: 'light',
42+
},
43+
decorators: [withThemeWrapper],
44+
};
45+
46+
export default preview;

eslint.config.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// For more info, see https://github.com/storybookjs/eslint-plugin-storybook#configuration-flat-config-format
2-
import storybook from "eslint-plugin-storybook";
3-
41
import js from '@eslint/js'
52
import globals from 'globals'
63
import reactHooks from 'eslint-plugin-react-hooks'
@@ -9,7 +6,7 @@ import tseslint from 'typescript-eslint'
96
import { defineConfig, globalIgnores } from 'eslint/config'
107

118
export default defineConfig([
12-
globalIgnores(['dist']),
9+
globalIgnores(['dist', 'storybook-static']),
1310
{
1411
files: ['**/*.{ts,tsx}'],
1512
extends: [

0 commit comments

Comments
 (0)