gbs-add-block 1.2.4 → 1.2.5

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.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # GBS Building Blocks 2.0 (v1.2.4)
1
+ # GBS Building Blocks 2.0 (v1.2.5)
2
2
 
3
3
  Latest and upgraded version of GBS building blocks with headless UI and removed dependencies.
4
4
 
@@ -6,9 +6,10 @@ Latest and upgraded version of GBS building blocks with headless UI and removed
6
6
 
7
7
  For detailed documentation on usage and props, Please visit: [Building Block Documentation v2.0](https://gramprokit.vercel.app)
8
8
 
9
- ## What's New 🎉 (Ver 1.2.4)
9
+ ## What's New 🎉 (Ver 1.2.5)
10
10
 
11
- - Bug Fix For Server Side Pagination in Data Grid Component
11
+ - Bar Chart Improvement
12
+ - Data Grid Style Update
12
13
 
13
14
  ## Authors
14
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gbs-add-block",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "React Component Library",
5
5
  "type": "module",
6
6
  "files": [
@@ -7,6 +7,7 @@ export const BarChart: React.FC<BarChartProps> = ({
7
7
  height = 300,
8
8
  title = "Title",
9
9
  showXValue = true,
10
+ barColor = "bg-black dark:bg-zinc-800",
10
11
  }) => {
11
12
  const [hoveredBar, setHoveredBar] = useState<number | null>(null);
12
13
  const maxValue = Math.max(...data.map((d) => d.value));
@@ -14,11 +15,11 @@ export const BarChart: React.FC<BarChartProps> = ({
14
15
 
15
16
  // Calculate y-axis ticks
16
17
  const yAxisTicks = Array.from({ length: 6 }, (_, i) =>
17
- Math.round((maxValue * i) / 5)
18
+ Math.round((maxValue * i) / 5),
18
19
  );
19
20
 
20
21
  return (
21
- <div className="w-full p-4">
22
+ <div className="w-100 p-4">
22
23
  <h2 className="text-sm font-bold mb-16 text-gray-800 text-left">
23
24
  {title}
24
25
  </h2>
@@ -57,7 +58,7 @@ export const BarChart: React.FC<BarChartProps> = ({
57
58
  {/* Bar */}
58
59
  <div
59
60
  className={`w-full ${
60
- isHovered ? "bg-zinc-800" : "bg-black"
61
+ isHovered ? "bg-zinc-800" : barColor
61
62
  } rounded-t transition-all duration-200 ease-in-out relative`}
62
63
  style={{
63
64
  height: `${barHeight}px`,
@@ -8,4 +8,5 @@ export type BarChartProps = {
8
8
  height?: number;
9
9
  title?: string;
10
10
  showXValue?: boolean;
11
+ barColor?: string;
11
12
  };
@@ -31,7 +31,7 @@ export const GridProvider: React.FC<{
31
31
  onSelectRow,
32
32
  isFetching,
33
33
  tableHeaderStyle = "text-left px-2 py-4 bg-zinc-200 dark:bg-zinc-800",
34
- gridContainerClass = "flex flex-col rounded-md overflow-hidden",
34
+ gridContainerClass = "flex flex-col rounded-md overflow-hidden dark:text-white",
35
35
  gridColumnStyleSelectAll = "px-4 text-xs",
36
36
  gridColumnStyle = "p-2 text-xs",
37
37
  rowChange = () => {},
@@ -57,7 +57,7 @@ export const GridProvider: React.FC<{
57
57
  // Column management
58
58
  const { workingColumns, setWorkingColumns } = useColumns(
59
59
  columns,
60
- workingDataSource
60
+ workingDataSource,
61
61
  );
62
62
 
63
63
  // Pagination management
@@ -76,7 +76,7 @@ export const GridProvider: React.FC<{
76
76
  lazy,
77
77
  workingDataSource,
78
78
  pageSettings,
79
- pageStatus
79
+ pageStatus,
80
80
  );
81
81
 
82
82
  // Search functionality