@salesforce/webapp-template-feature-react-chart-experimental 1.44.0 → 1.45.1
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/dist/CHANGELOG.md +16 -0
- package/dist/force-app/main/default/webapplications/feature-react-chart/package-lock.json +1183 -402
- package/dist/force-app/main/default/webapplications/feature-react-chart/package.json +1 -3
- package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/alert.tsx +17 -13
- package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/button.tsx +35 -22
- package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/card.tsx +27 -12
- package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/dialog.tsx +143 -0
- package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/field.tsx +157 -46
- package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/index.ts +1 -0
- package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/input.tsx +3 -3
- package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/label.tsx +2 -2
- package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/pagination.tsx +87 -74
- package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/select.tsx +156 -124
- package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/separator.tsx +26 -0
- package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/skeleton.tsx +1 -0
- package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/spinner.tsx +5 -16
- package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/table.tsx +68 -95
- package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/tabs.tsx +47 -84
- package/dist/package.json +1 -1
- package/package.json +3 -3
package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/table.tsx
CHANGED
|
@@ -1,114 +1,87 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { cn } from "../../lib/utils";
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
* Shadcn-style Table components
|
|
6
|
-
* These components follow shadcn/ui patterns for consistent styling
|
|
7
|
-
*/
|
|
3
|
+
import { cn } from "../../lib/utils";
|
|
8
4
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<div className="relative w-full overflow-auto">
|
|
12
|
-
<table
|
|
5
|
+
function Table({ className, ...props }: React.ComponentProps<"table">) {
|
|
6
|
+
return (
|
|
7
|
+
<div data-slot="table-container" className="relative w-full overflow-x-auto">
|
|
8
|
+
<table
|
|
9
|
+
data-slot="table"
|
|
10
|
+
className={cn("w-full caption-bottom text-sm", className)}
|
|
11
|
+
{...props}
|
|
12
|
+
/>
|
|
13
13
|
</div>
|
|
14
|
-
)
|
|
15
|
-
|
|
16
|
-
Table.displayName = "Table";
|
|
17
|
-
|
|
18
|
-
const TableHeader = React.forwardRef<
|
|
19
|
-
HTMLTableSectionElement,
|
|
20
|
-
React.HTMLAttributes<HTMLTableSectionElement>
|
|
21
|
-
>(({ className, ...props }, ref) => (
|
|
22
|
-
<thead
|
|
23
|
-
ref={ref}
|
|
24
|
-
className={cn(
|
|
25
|
-
// 1. Existing border style
|
|
26
|
-
"[&_tr]:border-b",
|
|
14
|
+
);
|
|
15
|
+
}
|
|
27
16
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"[&_th]:sticky [&_th]:top-0 [&_th]:z-10",
|
|
32
|
-
// 3. CRITICAL: Add background color
|
|
33
|
-
// Without this, content scrolls "under" the transparent text
|
|
34
|
-
"[&_th]:bg-background",
|
|
17
|
+
function TableHeader({ className, ...props }: React.ComponentProps<"thead">) {
|
|
18
|
+
return <thead data-slot="table-header" className={cn("[&_tr]:border-b", className)} {...props} />;
|
|
19
|
+
}
|
|
35
20
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const TableBody = React.forwardRef<
|
|
46
|
-
HTMLTableSectionElement,
|
|
47
|
-
React.HTMLAttributes<HTMLTableSectionElement>
|
|
48
|
-
>(({ className, ...props }, ref) => (
|
|
49
|
-
<tbody ref={ref} className={cn("[&_tr:last-child]:border-0", className)} {...props} />
|
|
50
|
-
));
|
|
51
|
-
TableBody.displayName = "TableBody";
|
|
21
|
+
function TableBody({ className, ...props }: React.ComponentProps<"tbody">) {
|
|
22
|
+
return (
|
|
23
|
+
<tbody
|
|
24
|
+
data-slot="table-body"
|
|
25
|
+
className={cn("[&_tr:last-child]:border-0", className)}
|
|
26
|
+
{...props}
|
|
27
|
+
/>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
52
30
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
));
|
|
63
|
-
TableFooter.displayName = "TableFooter";
|
|
31
|
+
function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">) {
|
|
32
|
+
return (
|
|
33
|
+
<tfoot
|
|
34
|
+
data-slot="table-footer"
|
|
35
|
+
className={cn("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", className)}
|
|
36
|
+
{...props}
|
|
37
|
+
/>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
64
40
|
|
|
65
|
-
|
|
66
|
-
|
|
41
|
+
function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
|
|
42
|
+
return (
|
|
67
43
|
<tr
|
|
68
|
-
|
|
44
|
+
data-slot="table-row"
|
|
69
45
|
className={cn(
|
|
70
|
-
"
|
|
46
|
+
"hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",
|
|
71
47
|
className,
|
|
72
48
|
)}
|
|
73
49
|
{...props}
|
|
74
50
|
/>
|
|
75
|
-
)
|
|
76
|
-
|
|
77
|
-
TableRow.displayName = "TableRow";
|
|
51
|
+
);
|
|
52
|
+
}
|
|
78
53
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
));
|
|
92
|
-
TableHead.displayName = "TableHead";
|
|
54
|
+
function TableHead({ className, ...props }: React.ComponentProps<"th">) {
|
|
55
|
+
return (
|
|
56
|
+
<th
|
|
57
|
+
data-slot="table-head"
|
|
58
|
+
className={cn(
|
|
59
|
+
"text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0",
|
|
60
|
+
className,
|
|
61
|
+
)}
|
|
62
|
+
{...props}
|
|
63
|
+
/>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
93
66
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
));
|
|
104
|
-
TableCell.displayName = "TableCell";
|
|
67
|
+
function TableCell({ className, ...props }: React.ComponentProps<"td">) {
|
|
68
|
+
return (
|
|
69
|
+
<td
|
|
70
|
+
data-slot="table-cell"
|
|
71
|
+
className={cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0", className)}
|
|
72
|
+
{...props}
|
|
73
|
+
/>
|
|
74
|
+
);
|
|
75
|
+
}
|
|
105
76
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
77
|
+
function TableCaption({ className, ...props }: React.ComponentProps<"caption">) {
|
|
78
|
+
return (
|
|
79
|
+
<caption
|
|
80
|
+
data-slot="table-caption"
|
|
81
|
+
className={cn("text-muted-foreground mt-4 text-sm", className)}
|
|
82
|
+
{...props}
|
|
83
|
+
/>
|
|
84
|
+
);
|
|
85
|
+
}
|
|
113
86
|
|
|
114
87
|
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };
|
package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/tabs.tsx
CHANGED
|
@@ -1,115 +1,78 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
interface TabsContextValue {
|
|
5
|
-
value: string;
|
|
6
|
-
onValueChange: (value: string) => void;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const TabsContext = React.createContext<TabsContextValue | undefined>(undefined);
|
|
10
|
-
|
|
11
|
-
interface TabsProps extends React.ComponentProps<"div"> {
|
|
12
|
-
value?: string;
|
|
13
|
-
defaultValue?: string;
|
|
14
|
-
onValueChange?: (value: string) => void;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function Tabs({ value, defaultValue, onValueChange, className, children, ...props }: TabsProps) {
|
|
18
|
-
const [internalValue, setInternalValue] = React.useState(defaultValue || "");
|
|
19
|
-
const controlled = value !== undefined;
|
|
20
|
-
const currentValue = controlled ? value : internalValue;
|
|
2
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
|
+
import { Tabs as TabsPrimitive } from "radix-ui";
|
|
21
4
|
|
|
22
|
-
|
|
23
|
-
(newValue: string) => {
|
|
24
|
-
if (!controlled) {
|
|
25
|
-
setInternalValue(newValue);
|
|
26
|
-
}
|
|
27
|
-
onValueChange?.(newValue);
|
|
28
|
-
},
|
|
29
|
-
[controlled, onValueChange],
|
|
30
|
-
);
|
|
5
|
+
import { cn } from "../../lib/utils";
|
|
31
6
|
|
|
7
|
+
function Tabs({
|
|
8
|
+
className,
|
|
9
|
+
orientation = "horizontal",
|
|
10
|
+
...props
|
|
11
|
+
}: React.ComponentProps<typeof TabsPrimitive.Root>) {
|
|
32
12
|
return (
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
13
|
+
<TabsPrimitive.Root
|
|
14
|
+
data-slot="tabs"
|
|
15
|
+
data-orientation={orientation}
|
|
16
|
+
className={cn("gap-2 group/tabs flex data-horizontal:flex-col", className)}
|
|
17
|
+
{...props}
|
|
18
|
+
/>
|
|
38
19
|
);
|
|
39
20
|
}
|
|
40
21
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
22
|
+
const tabsListVariants = cva(
|
|
23
|
+
"rounded-lg p-[3px] group-data-horizontal/tabs:h-8 data-[variant=line]:rounded-none group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col",
|
|
24
|
+
{
|
|
25
|
+
variants: {
|
|
26
|
+
variant: {
|
|
27
|
+
default: "bg-muted",
|
|
28
|
+
line: "gap-1 bg-transparent",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
defaultVariants: {
|
|
32
|
+
variant: "default",
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
);
|
|
48
36
|
|
|
49
|
-
function TabsList({
|
|
37
|
+
function TabsList({
|
|
38
|
+
className,
|
|
39
|
+
variant = "default",
|
|
40
|
+
...props
|
|
41
|
+
}: React.ComponentProps<typeof TabsPrimitive.List> & VariantProps<typeof tabsListVariants>) {
|
|
50
42
|
return (
|
|
51
|
-
<
|
|
43
|
+
<TabsPrimitive.List
|
|
52
44
|
data-slot="tabs-list"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
className,
|
|
56
|
-
)}
|
|
45
|
+
data-variant={variant}
|
|
46
|
+
className={cn(tabsListVariants({ variant }), className)}
|
|
57
47
|
{...props}
|
|
58
48
|
/>
|
|
59
49
|
);
|
|
60
50
|
}
|
|
61
51
|
|
|
62
|
-
|
|
63
|
-
value: string;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function TabsTrigger({ className, value, ...props }: TabsTriggerProps) {
|
|
67
|
-
const { value: selectedValue, onValueChange } = useTabsContext();
|
|
68
|
-
const isSelected = selectedValue === value;
|
|
69
|
-
|
|
52
|
+
function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>) {
|
|
70
53
|
return (
|
|
71
|
-
<
|
|
54
|
+
<TabsPrimitive.Trigger
|
|
72
55
|
data-slot="tabs-trigger"
|
|
73
|
-
data-selected={isSelected}
|
|
74
|
-
type="button"
|
|
75
|
-
role="tab"
|
|
76
|
-
aria-selected={isSelected}
|
|
77
56
|
className={cn(
|
|
78
|
-
"
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
57
|
+
"gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg:not([class*='size-'])]:size-4 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center whitespace-nowrap transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
58
|
+
"group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent",
|
|
59
|
+
"data-active:bg-background dark:data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 data-active:text-foreground",
|
|
60
|
+
"after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",
|
|
82
61
|
className,
|
|
83
62
|
)}
|
|
84
|
-
onClick={() => onValueChange(value)}
|
|
85
63
|
{...props}
|
|
86
64
|
/>
|
|
87
65
|
);
|
|
88
66
|
}
|
|
89
67
|
|
|
90
|
-
|
|
91
|
-
value: string;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function TabsContent({ className, value, children, ...props }: TabsContentProps) {
|
|
95
|
-
const { value: selectedValue } = useTabsContext();
|
|
96
|
-
if (selectedValue !== value) {
|
|
97
|
-
return null;
|
|
98
|
-
}
|
|
99
|
-
|
|
68
|
+
function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>) {
|
|
100
69
|
return (
|
|
101
|
-
<
|
|
70
|
+
<TabsPrimitive.Content
|
|
102
71
|
data-slot="tabs-content"
|
|
103
|
-
|
|
104
|
-
className={cn(
|
|
105
|
-
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
106
|
-
className,
|
|
107
|
-
)}
|
|
72
|
+
className={cn("text-sm flex-1 outline-none", className)}
|
|
108
73
|
{...props}
|
|
109
|
-
|
|
110
|
-
{children}
|
|
111
|
-
</div>
|
|
74
|
+
/>
|
|
112
75
|
);
|
|
113
76
|
}
|
|
114
77
|
|
|
115
|
-
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
78
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants };
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/webapp-template-feature-react-chart-experimental",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.45.1",
|
|
4
4
|
"description": "Chart feature with analytics chart components, agent skills, and rules (Recharts)",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"clean": "rm -rf dist"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@salesforce/webapp-experimental": "^1.
|
|
30
|
+
"@salesforce/webapp-experimental": "^1.45.1",
|
|
31
31
|
"@types/react": "^19.2.7",
|
|
32
32
|
"@types/react-dom": "^19.2.3",
|
|
33
33
|
"react-dom": "^19.2.1",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "091ae5ef0b936a7d51ca59a06c10ae4c301022c4"
|
|
55
55
|
}
|