@salesforce/webapp-template-app-react-template-b2e-experimental 1.43.0 → 1.43.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/.a4drules/skills/install-feature/SKILL.md +0 -1
- package/dist/CHANGELOG.md +11 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/e2e/app.spec.ts +0 -7
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/package-lock.json +3589 -3223
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/package.json +2 -10
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/app.tsx +19 -13
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/appLayout.tsx +9 -1
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/AgentforceConversationClient.tsx +127 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/index.ts +6 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/navigationMenu.tsx +73 -74
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/router-utils.tsx +24 -23
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/routes.tsx +0 -66
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/styles/global.css +10 -129
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/types/conversation.ts +21 -0
- package/dist/package.json +1 -1
- package/package.json +2 -2
- package/dist/force-app/main/default/classes/WebAppAuthUtils.cls +0 -68
- package/dist/force-app/main/default/classes/WebAppAuthUtils.cls-meta.xml +0 -5
- package/dist/force-app/main/default/classes/WebAppChangePassword.cls +0 -77
- package/dist/force-app/main/default/classes/WebAppChangePassword.cls-meta.xml +0 -5
- package/dist/force-app/main/default/classes/WebAppForgotPassword.cls +0 -71
- package/dist/force-app/main/default/classes/WebAppForgotPassword.cls-meta.xml +0 -5
- package/dist/force-app/main/default/classes/WebAppLogin.cls +0 -97
- package/dist/force-app/main/default/classes/WebAppLogin.cls-meta.xml +0 -5
- package/dist/force-app/main/default/classes/WebAppRegistration.cls +0 -162
- package/dist/force-app/main/default/classes/WebAppRegistration.cls-meta.xml +0 -5
- package/dist/force-app/main/default/digitalExperienceConfigs/appreacttemplateb2e1.digitalExperienceConfig +0 -8
- package/dist/force-app/main/default/digitalExperiences/site/appreacttemplateb2e1/appreacttemplateb2e1.digitalExperience-meta.xml +0 -11
- package/dist/force-app/main/default/digitalExperiences/site/appreacttemplateb2e1/sfdc_cms__site/appreacttemplateb2e1/_meta.json +0 -5
- package/dist/force-app/main/default/digitalExperiences/site/appreacttemplateb2e1/sfdc_cms__site/appreacttemplateb2e1/content.json +0 -10
- package/dist/force-app/main/default/networks/appreacttemplateb2e.network +0 -60
- package/dist/force-app/main/default/package.xml +0 -20
- package/dist/force-app/main/default/sites/appreacttemplateb2e.site +0 -31
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/alerts/status-alert.tsx +0 -45
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/auth/authentication-route.tsx +0 -21
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/auth/private-route.tsx +0 -36
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/footers/footer-link.tsx +0 -36
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/forms/auth-form.tsx +0 -81
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/forms/submit-button.tsx +0 -49
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/layout/card-layout.tsx +0 -23
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/layout/card-skeleton.tsx +0 -38
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/layout/centered-page-layout.tsx +0 -73
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/alert.tsx +0 -65
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/button.tsx +0 -54
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/card.tsx +0 -77
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/field.tsx +0 -111
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/index.ts +0 -71
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/input.tsx +0 -19
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/label.tsx +0 -19
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/pagination.tsx +0 -99
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/select.tsx +0 -151
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/skeleton.tsx +0 -13
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/spinner.tsx +0 -26
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/table.tsx +0 -114
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/tabs.tsx +0 -115
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/context/AuthContext.tsx +0 -83
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/hooks/form.tsx +0 -116
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/lib/utils.ts +0 -6
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/pages/About.tsx +0 -12
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/pages/ChangePassword.tsx +0 -98
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/pages/ForgotPassword.tsx +0 -67
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/pages/Login.tsx +0 -89
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/pages/Profile.tsx +0 -177
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/pages/Register.tsx +0 -130
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/pages/ResetPassword.tsx +0 -101
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/pages/new.tsx +0 -10
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/utils/authenticationConfig.ts +0 -52
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/utils/helpers.ts +0 -195
package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/field.tsx
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
import { cn } from "../../lib/utils";
|
|
4
|
-
import { Label } from "./label";
|
|
5
|
-
|
|
6
|
-
function Field({
|
|
7
|
-
className,
|
|
8
|
-
orientation = "vertical",
|
|
9
|
-
...props
|
|
10
|
-
}: React.ComponentProps<"div"> & {
|
|
11
|
-
orientation?: "horizontal" | "vertical";
|
|
12
|
-
}) {
|
|
13
|
-
return (
|
|
14
|
-
<div
|
|
15
|
-
data-slot="field"
|
|
16
|
-
data-orientation={orientation}
|
|
17
|
-
className={cn(
|
|
18
|
-
"grid gap-2",
|
|
19
|
-
orientation === "horizontal" && "flex flex-wrap items-center gap-x-3 gap-y-1.5",
|
|
20
|
-
className,
|
|
21
|
-
)}
|
|
22
|
-
{...props}
|
|
23
|
-
/>
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>) {
|
|
28
|
-
return (
|
|
29
|
-
<Label
|
|
30
|
-
data-slot="field-label"
|
|
31
|
-
className={cn(
|
|
32
|
-
"data-[disabled]:opacity-50 group-data-[disabled]:opacity-50 peer-disabled:opacity-50",
|
|
33
|
-
className,
|
|
34
|
-
)}
|
|
35
|
-
{...props}
|
|
36
|
-
/>
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function FieldDescription({ className, ...props }: React.ComponentProps<"p">) {
|
|
41
|
-
return (
|
|
42
|
-
<p
|
|
43
|
-
data-slot="field-description"
|
|
44
|
-
className={cn("text-muted-foreground text-sm", className)}
|
|
45
|
-
{...props}
|
|
46
|
-
/>
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function FieldError({
|
|
51
|
-
className,
|
|
52
|
-
errors,
|
|
53
|
-
...props
|
|
54
|
-
}: React.ComponentProps<"p"> & { errors?: (Error | undefined | null)[] }) {
|
|
55
|
-
const errorMessages = errors?.filter(Boolean).map((e) => e?.message);
|
|
56
|
-
|
|
57
|
-
if (!errorMessages?.length) {
|
|
58
|
-
return null;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
return (
|
|
62
|
-
<p
|
|
63
|
-
data-slot="field-error"
|
|
64
|
-
className={cn("text-destructive text-sm", className)}
|
|
65
|
-
aria-live="polite"
|
|
66
|
-
{...props}
|
|
67
|
-
>
|
|
68
|
-
{errorMessages.join(", ")}
|
|
69
|
-
</p>
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
function FieldGroup({ className, ...props }: React.ComponentProps<"div">) {
|
|
74
|
-
return <div data-slot="field-group" className={cn("grid gap-6", className)} {...props} />;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">) {
|
|
78
|
-
return <fieldset data-slot="field-set" className={cn("grid gap-4", className)} {...props} />;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
function FieldLegend({ className, ...props }: React.ComponentProps<"legend">) {
|
|
82
|
-
return (
|
|
83
|
-
<legend
|
|
84
|
-
data-slot="field-legend"
|
|
85
|
-
className={cn("text-foreground font-medium leading-none", className)}
|
|
86
|
-
{...props}
|
|
87
|
-
/>
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
function FieldSeparator({ className, ...props }: React.ComponentProps<"div">) {
|
|
92
|
-
return (
|
|
93
|
-
<div
|
|
94
|
-
data-slot="field-separator"
|
|
95
|
-
role="separator"
|
|
96
|
-
className={cn("bg-border -mx-6 h-px", className)}
|
|
97
|
-
{...props}
|
|
98
|
-
/>
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export {
|
|
103
|
-
Field,
|
|
104
|
-
FieldDescription,
|
|
105
|
-
FieldError,
|
|
106
|
-
FieldGroup,
|
|
107
|
-
FieldLabel,
|
|
108
|
-
FieldLegend,
|
|
109
|
-
FieldSeparator,
|
|
110
|
-
FieldSet,
|
|
111
|
-
};
|
package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/index.ts
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* UI Components Index
|
|
3
|
-
*
|
|
4
|
-
* Re-exports all UI components for easier imports.
|
|
5
|
-
*
|
|
6
|
-
* Usage:
|
|
7
|
-
* import { Button, Input, Tabs } from "@/components/ui"
|
|
8
|
-
*
|
|
9
|
-
* Instead of:
|
|
10
|
-
* import { Button } from "@/components/ui/button"
|
|
11
|
-
* import { Input } from "@/components/ui/input"
|
|
12
|
-
* import { Tabs } from "@/components/ui/tabs"
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
export { Alert, AlertTitle, AlertDescription } from "./alert";
|
|
16
|
-
export { Button, buttonVariants } from "./button";
|
|
17
|
-
export {
|
|
18
|
-
Card,
|
|
19
|
-
CardHeader,
|
|
20
|
-
CardFooter,
|
|
21
|
-
CardTitle,
|
|
22
|
-
CardAction,
|
|
23
|
-
CardDescription,
|
|
24
|
-
CardContent,
|
|
25
|
-
} from "./card";
|
|
26
|
-
export {
|
|
27
|
-
Field,
|
|
28
|
-
FieldDescription,
|
|
29
|
-
FieldError,
|
|
30
|
-
FieldGroup,
|
|
31
|
-
FieldLabel,
|
|
32
|
-
FieldLegend,
|
|
33
|
-
FieldSeparator,
|
|
34
|
-
FieldSet,
|
|
35
|
-
} from "./field";
|
|
36
|
-
export { Input } from "./input";
|
|
37
|
-
export { Label } from "./label";
|
|
38
|
-
export {
|
|
39
|
-
Select,
|
|
40
|
-
SelectGroup,
|
|
41
|
-
SelectValue,
|
|
42
|
-
SelectTrigger,
|
|
43
|
-
SelectContent,
|
|
44
|
-
SelectLabel,
|
|
45
|
-
SelectItem,
|
|
46
|
-
SelectSeparator,
|
|
47
|
-
SelectScrollUpButton,
|
|
48
|
-
SelectScrollDownButton,
|
|
49
|
-
} from "./select";
|
|
50
|
-
export { Spinner } from "./spinner";
|
|
51
|
-
export { Skeleton } from "./skeleton";
|
|
52
|
-
export {
|
|
53
|
-
Table,
|
|
54
|
-
TableHeader,
|
|
55
|
-
TableBody,
|
|
56
|
-
TableFooter,
|
|
57
|
-
TableHead,
|
|
58
|
-
TableRow,
|
|
59
|
-
TableCell,
|
|
60
|
-
TableCaption,
|
|
61
|
-
} from "./table";
|
|
62
|
-
export { Tabs, TabsList, TabsTrigger, TabsContent } from "./tabs";
|
|
63
|
-
export {
|
|
64
|
-
Pagination,
|
|
65
|
-
PaginationContent,
|
|
66
|
-
PaginationEllipsis,
|
|
67
|
-
PaginationItem,
|
|
68
|
-
PaginationLink,
|
|
69
|
-
PaginationNext,
|
|
70
|
-
PaginationPrevious,
|
|
71
|
-
} from "./pagination";
|
package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/input.tsx
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { cn } from "../../lib/utils";
|
|
2
|
-
|
|
3
|
-
function Input({ className, type, ...props }: React.ComponentProps<"input">) {
|
|
4
|
-
return (
|
|
5
|
-
<input
|
|
6
|
-
type={type}
|
|
7
|
-
data-slot="input"
|
|
8
|
-
className={cn(
|
|
9
|
-
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
10
|
-
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
11
|
-
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
12
|
-
className,
|
|
13
|
-
)}
|
|
14
|
-
{...props}
|
|
15
|
-
/>
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export { Input };
|
package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/label.tsx
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
|
-
|
|
4
|
-
import { cn } from "../../lib/utils";
|
|
5
|
-
|
|
6
|
-
function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {
|
|
7
|
-
return (
|
|
8
|
-
<LabelPrimitive.Root
|
|
9
|
-
data-slot="label"
|
|
10
|
-
className={cn(
|
|
11
|
-
"flex items-center gap-2 text-sm font-medium leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
12
|
-
className,
|
|
13
|
-
)}
|
|
14
|
-
{...props}
|
|
15
|
-
/>
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export { Label };
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react";
|
|
3
|
-
|
|
4
|
-
import { cn } from "../../lib/utils";
|
|
5
|
-
import { Button, buttonVariants } from "./button";
|
|
6
|
-
|
|
7
|
-
const Pagination = ({ className, ...props }: React.ComponentProps<"nav">) => (
|
|
8
|
-
<nav
|
|
9
|
-
role="navigation"
|
|
10
|
-
aria-label="pagination"
|
|
11
|
-
className={cn("flex justify-center", className)}
|
|
12
|
-
{...props}
|
|
13
|
-
/>
|
|
14
|
-
);
|
|
15
|
-
Pagination.displayName = "Pagination";
|
|
16
|
-
|
|
17
|
-
const PaginationContent = React.forwardRef<HTMLUListElement, React.ComponentProps<"ul">>(
|
|
18
|
-
({ className, ...props }, ref) => (
|
|
19
|
-
<ul ref={ref} className={cn("flex flex-row items-center gap-1", className)} {...props} />
|
|
20
|
-
),
|
|
21
|
-
);
|
|
22
|
-
PaginationContent.displayName = "PaginationContent";
|
|
23
|
-
|
|
24
|
-
const PaginationItem = React.forwardRef<HTMLLIElement, React.ComponentProps<"li">>(
|
|
25
|
-
({ className, ...props }, ref) => <li ref={ref} className={cn("", className)} {...props} />,
|
|
26
|
-
);
|
|
27
|
-
PaginationItem.displayName = "PaginationItem";
|
|
28
|
-
|
|
29
|
-
type PaginationLinkProps = {
|
|
30
|
-
isActive?: boolean;
|
|
31
|
-
} & React.ComponentProps<"button">;
|
|
32
|
-
|
|
33
|
-
const PaginationLink = ({ className, isActive, disabled, ...props }: PaginationLinkProps) => (
|
|
34
|
-
<button
|
|
35
|
-
aria-current={isActive ? "page" : undefined}
|
|
36
|
-
disabled={disabled}
|
|
37
|
-
className={cn(
|
|
38
|
-
buttonVariants({
|
|
39
|
-
variant: isActive ? "default" : "outline",
|
|
40
|
-
size: "sm",
|
|
41
|
-
}),
|
|
42
|
-
className,
|
|
43
|
-
)}
|
|
44
|
-
{...props}
|
|
45
|
-
/>
|
|
46
|
-
);
|
|
47
|
-
PaginationLink.displayName = "PaginationLink";
|
|
48
|
-
|
|
49
|
-
const PaginationPrevious = ({
|
|
50
|
-
className,
|
|
51
|
-
disabled,
|
|
52
|
-
...props
|
|
53
|
-
}: React.ComponentProps<typeof Button>) => (
|
|
54
|
-
<PaginationLink
|
|
55
|
-
aria-label="Go to previous page"
|
|
56
|
-
className={cn("gap-1 pl-2.5", className)}
|
|
57
|
-
disabled={disabled}
|
|
58
|
-
{...props}
|
|
59
|
-
>
|
|
60
|
-
<ChevronLeft className="h-4 w-4" />
|
|
61
|
-
<span>Previous</span>
|
|
62
|
-
</PaginationLink>
|
|
63
|
-
);
|
|
64
|
-
PaginationPrevious.displayName = "PaginationPrevious";
|
|
65
|
-
|
|
66
|
-
const PaginationNext = ({ className, disabled, ...props }: React.ComponentProps<typeof Button>) => (
|
|
67
|
-
<PaginationLink
|
|
68
|
-
aria-label="Go to next page"
|
|
69
|
-
className={cn("gap-1 pr-2.5", className)}
|
|
70
|
-
disabled={disabled}
|
|
71
|
-
{...props}
|
|
72
|
-
>
|
|
73
|
-
<span>Next</span>
|
|
74
|
-
<ChevronRight className="h-4 w-4" />
|
|
75
|
-
</PaginationLink>
|
|
76
|
-
);
|
|
77
|
-
PaginationNext.displayName = "PaginationNext";
|
|
78
|
-
|
|
79
|
-
const PaginationEllipsis = ({ className, ...props }: React.ComponentProps<"span">) => (
|
|
80
|
-
<span
|
|
81
|
-
aria-hidden
|
|
82
|
-
className={cn("flex h-9 w-9 items-center justify-center", className)}
|
|
83
|
-
{...props}
|
|
84
|
-
>
|
|
85
|
-
<MoreHorizontal className="h-4 w-4" />
|
|
86
|
-
<span className="sr-only">More pages</span>
|
|
87
|
-
</span>
|
|
88
|
-
);
|
|
89
|
-
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
90
|
-
|
|
91
|
-
export {
|
|
92
|
-
Pagination,
|
|
93
|
-
PaginationContent,
|
|
94
|
-
PaginationEllipsis,
|
|
95
|
-
PaginationItem,
|
|
96
|
-
PaginationLink,
|
|
97
|
-
PaginationNext,
|
|
98
|
-
PaginationPrevious,
|
|
99
|
-
};
|
package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/select.tsx
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3
|
-
import { Check, ChevronDown, ChevronUp } from "lucide-react";
|
|
4
|
-
|
|
5
|
-
import { cn } from "../../lib/utils";
|
|
6
|
-
|
|
7
|
-
const Select = SelectPrimitive.Root;
|
|
8
|
-
|
|
9
|
-
const SelectGroup = SelectPrimitive.Group;
|
|
10
|
-
|
|
11
|
-
const SelectValue = SelectPrimitive.Value;
|
|
12
|
-
|
|
13
|
-
const SelectTrigger = React.forwardRef<
|
|
14
|
-
React.ElementRef<typeof SelectPrimitive.Trigger>,
|
|
15
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>
|
|
16
|
-
>(({ className, children, ...props }, ref) => (
|
|
17
|
-
<SelectPrimitive.Trigger
|
|
18
|
-
ref={ref}
|
|
19
|
-
className={cn(
|
|
20
|
-
"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-xs ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
21
|
-
className,
|
|
22
|
-
)}
|
|
23
|
-
{...props}
|
|
24
|
-
>
|
|
25
|
-
{children}
|
|
26
|
-
<SelectPrimitive.Icon asChild>
|
|
27
|
-
<ChevronDown className="h-4 w-4 opacity-50" />
|
|
28
|
-
</SelectPrimitive.Icon>
|
|
29
|
-
</SelectPrimitive.Trigger>
|
|
30
|
-
));
|
|
31
|
-
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
32
|
-
|
|
33
|
-
const SelectScrollUpButton = React.forwardRef<
|
|
34
|
-
React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,
|
|
35
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>
|
|
36
|
-
>(({ className, ...props }, ref) => (
|
|
37
|
-
<SelectPrimitive.ScrollUpButton
|
|
38
|
-
ref={ref}
|
|
39
|
-
className={cn("flex cursor-default items-center justify-center py-1 bg-white", className)}
|
|
40
|
-
{...props}
|
|
41
|
-
>
|
|
42
|
-
<ChevronUp className="h-4 w-4" />
|
|
43
|
-
</SelectPrimitive.ScrollUpButton>
|
|
44
|
-
));
|
|
45
|
-
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
46
|
-
|
|
47
|
-
const SelectScrollDownButton = React.forwardRef<
|
|
48
|
-
React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,
|
|
49
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>
|
|
50
|
-
>(({ className, ...props }, ref) => (
|
|
51
|
-
<SelectPrimitive.ScrollDownButton
|
|
52
|
-
ref={ref}
|
|
53
|
-
className={cn("flex cursor-default items-center justify-center py-1 bg-white", className)}
|
|
54
|
-
{...props}
|
|
55
|
-
>
|
|
56
|
-
<ChevronDown className="h-4 w-4" />
|
|
57
|
-
</SelectPrimitive.ScrollDownButton>
|
|
58
|
-
));
|
|
59
|
-
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
60
|
-
|
|
61
|
-
const SelectContent = React.forwardRef<
|
|
62
|
-
React.ElementRef<typeof SelectPrimitive.Content>,
|
|
63
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>
|
|
64
|
-
>(({ className, children, position = "popper", ...props }, ref) => (
|
|
65
|
-
<SelectPrimitive.Portal>
|
|
66
|
-
<SelectPrimitive.Content
|
|
67
|
-
ref={ref}
|
|
68
|
-
className={cn(
|
|
69
|
-
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-white text-gray-900 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
70
|
-
position === "popper" &&
|
|
71
|
-
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
72
|
-
className,
|
|
73
|
-
)}
|
|
74
|
-
position={position}
|
|
75
|
-
{...props}
|
|
76
|
-
>
|
|
77
|
-
<SelectScrollUpButton />
|
|
78
|
-
<SelectPrimitive.Viewport
|
|
79
|
-
className={cn(
|
|
80
|
-
"p-1 bg-white",
|
|
81
|
-
position === "popper" &&
|
|
82
|
-
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",
|
|
83
|
-
)}
|
|
84
|
-
>
|
|
85
|
-
{children}
|
|
86
|
-
</SelectPrimitive.Viewport>
|
|
87
|
-
<SelectScrollDownButton />
|
|
88
|
-
</SelectPrimitive.Content>
|
|
89
|
-
</SelectPrimitive.Portal>
|
|
90
|
-
));
|
|
91
|
-
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
92
|
-
|
|
93
|
-
const SelectLabel = React.forwardRef<
|
|
94
|
-
React.ElementRef<typeof SelectPrimitive.Label>,
|
|
95
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>
|
|
96
|
-
>(({ className, ...props }, ref) => (
|
|
97
|
-
<SelectPrimitive.Label
|
|
98
|
-
ref={ref}
|
|
99
|
-
className={cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)}
|
|
100
|
-
{...props}
|
|
101
|
-
/>
|
|
102
|
-
));
|
|
103
|
-
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
104
|
-
|
|
105
|
-
const SelectItem = React.forwardRef<
|
|
106
|
-
React.ElementRef<typeof SelectPrimitive.Item>,
|
|
107
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>
|
|
108
|
-
>(({ className, children, ...props }, ref) => (
|
|
109
|
-
<SelectPrimitive.Item
|
|
110
|
-
ref={ref}
|
|
111
|
-
className={cn(
|
|
112
|
-
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-gray-100 focus:text-gray-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
113
|
-
className,
|
|
114
|
-
)}
|
|
115
|
-
{...props}
|
|
116
|
-
>
|
|
117
|
-
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
118
|
-
<SelectPrimitive.ItemIndicator>
|
|
119
|
-
<Check className="h-4 w-4" />
|
|
120
|
-
</SelectPrimitive.ItemIndicator>
|
|
121
|
-
</span>
|
|
122
|
-
|
|
123
|
-
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
|
124
|
-
</SelectPrimitive.Item>
|
|
125
|
-
));
|
|
126
|
-
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
127
|
-
|
|
128
|
-
const SelectSeparator = React.forwardRef<
|
|
129
|
-
React.ElementRef<typeof SelectPrimitive.Separator>,
|
|
130
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>
|
|
131
|
-
>(({ className, ...props }, ref) => (
|
|
132
|
-
<SelectPrimitive.Separator
|
|
133
|
-
ref={ref}
|
|
134
|
-
className={cn("-mx-1 my-1 h-px bg-muted", className)}
|
|
135
|
-
{...props}
|
|
136
|
-
/>
|
|
137
|
-
));
|
|
138
|
-
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
139
|
-
|
|
140
|
-
export {
|
|
141
|
-
Select,
|
|
142
|
-
SelectGroup,
|
|
143
|
-
SelectValue,
|
|
144
|
-
SelectTrigger,
|
|
145
|
-
SelectContent,
|
|
146
|
-
SelectLabel,
|
|
147
|
-
SelectItem,
|
|
148
|
-
SelectSeparator,
|
|
149
|
-
SelectScrollUpButton,
|
|
150
|
-
SelectScrollDownButton,
|
|
151
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { cn } from "../../lib/utils";
|
|
2
|
-
|
|
3
|
-
function Skeleton({ className, ...props }: React.ComponentProps<"div">) {
|
|
4
|
-
return (
|
|
5
|
-
<div
|
|
6
|
-
data-slot="skeleton"
|
|
7
|
-
className={cn("bg-accent animate-pulse rounded-md", className)}
|
|
8
|
-
{...props}
|
|
9
|
-
/>
|
|
10
|
-
);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { Skeleton };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { LoaderIcon } from "lucide-react";
|
|
3
|
-
|
|
4
|
-
import { cn } from "../../lib/utils";
|
|
5
|
-
|
|
6
|
-
const Spinner = React.forwardRef<SVGSVGElement, React.ComponentProps<"svg">>(function Spinner(
|
|
7
|
-
{ className, ...props },
|
|
8
|
-
ref,
|
|
9
|
-
) {
|
|
10
|
-
return (
|
|
11
|
-
<LoaderIcon
|
|
12
|
-
ref={ref}
|
|
13
|
-
role="status"
|
|
14
|
-
aria-label="Loading"
|
|
15
|
-
className={cn(
|
|
16
|
-
"size-4 animate-spin",
|
|
17
|
-
// A11y: Respect user's motion preferences
|
|
18
|
-
"motion-reduce:animate-none",
|
|
19
|
-
className,
|
|
20
|
-
)}
|
|
21
|
-
{...props}
|
|
22
|
-
/>
|
|
23
|
-
);
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
export { Spinner };
|
package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/table.tsx
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { cn } from "../../lib/utils";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Shadcn-style Table components
|
|
6
|
-
* These components follow shadcn/ui patterns for consistent styling
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
const Table = React.forwardRef<HTMLTableElement, React.HTMLAttributes<HTMLTableElement>>(
|
|
10
|
-
({ className, ...props }, ref) => (
|
|
11
|
-
<div className="relative w-full overflow-auto">
|
|
12
|
-
<table ref={ref} className={cn("w-full caption-bottom text-sm", className)} {...props} />
|
|
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",
|
|
27
|
-
|
|
28
|
-
// 2. Make headers sticky
|
|
29
|
-
// We apply this to the 'th' children using the [&_th] selector
|
|
30
|
-
// This is often more robust across browsers than applying sticky to the <thead> itself
|
|
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",
|
|
35
|
-
|
|
36
|
-
// 4. Optional: Add a subtle shadow for better visual separation when scrolling
|
|
37
|
-
"[&_th]:shadow-[0_1px_0_0_theme(colors.border)]",
|
|
38
|
-
className,
|
|
39
|
-
)}
|
|
40
|
-
{...props}
|
|
41
|
-
/>
|
|
42
|
-
));
|
|
43
|
-
TableHeader.displayName = "TableHeader";
|
|
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";
|
|
52
|
-
|
|
53
|
-
const TableFooter = React.forwardRef<
|
|
54
|
-
HTMLTableSectionElement,
|
|
55
|
-
React.HTMLAttributes<HTMLTableSectionElement>
|
|
56
|
-
>(({ className, ...props }, ref) => (
|
|
57
|
-
<tfoot
|
|
58
|
-
ref={ref}
|
|
59
|
-
className={cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className)}
|
|
60
|
-
{...props}
|
|
61
|
-
/>
|
|
62
|
-
));
|
|
63
|
-
TableFooter.displayName = "TableFooter";
|
|
64
|
-
|
|
65
|
-
const TableRow = React.forwardRef<HTMLTableRowElement, React.HTMLAttributes<HTMLTableRowElement>>(
|
|
66
|
-
({ className, ...props }, ref) => (
|
|
67
|
-
<tr
|
|
68
|
-
ref={ref}
|
|
69
|
-
className={cn(
|
|
70
|
-
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
|
71
|
-
className,
|
|
72
|
-
)}
|
|
73
|
-
{...props}
|
|
74
|
-
/>
|
|
75
|
-
),
|
|
76
|
-
);
|
|
77
|
-
TableRow.displayName = "TableRow";
|
|
78
|
-
|
|
79
|
-
const TableHead = React.forwardRef<
|
|
80
|
-
HTMLTableCellElement,
|
|
81
|
-
React.ThHTMLAttributes<HTMLTableCellElement>
|
|
82
|
-
>(({ className, ...props }, ref) => (
|
|
83
|
-
<th
|
|
84
|
-
ref={ref}
|
|
85
|
-
className={cn(
|
|
86
|
-
"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
|
|
87
|
-
className,
|
|
88
|
-
)}
|
|
89
|
-
{...props}
|
|
90
|
-
/>
|
|
91
|
-
));
|
|
92
|
-
TableHead.displayName = "TableHead";
|
|
93
|
-
|
|
94
|
-
const TableCell = React.forwardRef<
|
|
95
|
-
HTMLTableCellElement,
|
|
96
|
-
React.TdHTMLAttributes<HTMLTableCellElement>
|
|
97
|
-
>(({ className, ...props }, ref) => (
|
|
98
|
-
<td
|
|
99
|
-
ref={ref}
|
|
100
|
-
className={cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className)}
|
|
101
|
-
{...props}
|
|
102
|
-
/>
|
|
103
|
-
));
|
|
104
|
-
TableCell.displayName = "TableCell";
|
|
105
|
-
|
|
106
|
-
const TableCaption = React.forwardRef<
|
|
107
|
-
HTMLTableCaptionElement,
|
|
108
|
-
React.HTMLAttributes<HTMLTableCaptionElement>
|
|
109
|
-
>(({ className, ...props }, ref) => (
|
|
110
|
-
<caption ref={ref} className={cn("mt-4 text-sm text-muted-foreground", className)} {...props} />
|
|
111
|
-
));
|
|
112
|
-
TableCaption.displayName = "TableCaption";
|
|
113
|
-
|
|
114
|
-
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };
|