@oussemasahbeni/keycloakify-login-shadcn 250004.0.8 → 250004.0.10
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 +317 -0
- package/keycloak-theme/components/ui/alert.tsx +69 -61
- package/keycloak-theme/components/ui/button.tsx +44 -38
- package/keycloak-theme/components/ui/card.tsx +60 -45
- package/keycloak-theme/components/ui/checkbox.tsx +24 -22
- package/keycloak-theme/components/ui/dropdown-menu.tsx +231 -176
- package/keycloak-theme/components/ui/field.tsx +51 -48
- package/keycloak-theme/components/ui/input-otp.tsx +56 -49
- package/keycloak-theme/components/ui/input.tsx +18 -21
- package/keycloak-theme/components/ui/label.tsx +19 -20
- package/keycloak-theme/components/ui/radio-group.tsx +27 -25
- package/keycloak-theme/components/ui/select.tsx +160 -121
- package/keycloak-theme/components/ui/separator.tsx +23 -23
- package/keycloak-theme/components/ui/tooltip.tsx +54 -24
- package/keycloak-theme/login/KcPage.tsx +0 -1
- package/keycloak-theme/login/components/Template/Template.tsx +2 -2
- package/keycloak-theme/login/components/Template/useInitializeTemplate.ts +3 -19
- package/keycloak-theme/login/index.css +3 -20
- package/keycloak-theme/login/pages/login/Form.tsx +49 -51
- package/keycloak-theme/login/pages/login/SocialProviders.tsx +9 -4
- package/keycloak-theme/login/pages/login/providers/github.svg +4 -3
- package/keycloak-theme/login/pages/login/providers/x.svg +4 -3
- package/keycloak-theme/login/pages/login/useProviderLogos.tsx +2 -3
- package/keycloak-theme/login/styleLevelCustomization.tsx +1 -0
- package/keycloak-theme/public/keycloak-theme/login/js/authChecker.js +95 -0
- package/keycloak-theme/public/keycloak-theme/login/js/passkeysConditionalAuth.js +86 -0
- package/keycloak-theme/public/keycloak-theme/login/js/rfc4648.js +185 -0
- package/keycloak-theme/public/keycloak-theme/login/js/webauthnAuthenticate.js +113 -0
- package/keycloak-theme/public/keycloak-theme/login/js/webauthnRegister.js +153 -0
- package/package.json +1 -1
|
@@ -1,140 +1,178 @@
|
|
|
1
|
-
import * as SelectPrimitive from "@radix-ui/react-select"
|
|
2
|
-
import {
|
|
3
|
-
import * as React from "react"
|
|
1
|
+
import * as SelectPrimitive from "@radix-ui/react-select"
|
|
2
|
+
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react"
|
|
3
|
+
import * as React from "react"
|
|
4
4
|
|
|
5
|
-
import { cn } from
|
|
5
|
+
import { cn } from '../lib/utils'
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
function Select({
|
|
8
|
+
...props
|
|
9
|
+
}: React.ComponentProps<typeof SelectPrimitive.Root>) {
|
|
10
|
+
return <SelectPrimitive.Root data-slot="select" {...props} />
|
|
11
|
+
}
|
|
8
12
|
|
|
9
|
-
|
|
13
|
+
function SelectGroup({
|
|
14
|
+
...props
|
|
15
|
+
}: React.ComponentProps<typeof SelectPrimitive.Group>) {
|
|
16
|
+
return <SelectPrimitive.Group data-slot="select-group" {...props} />
|
|
17
|
+
}
|
|
10
18
|
|
|
11
|
-
|
|
19
|
+
function SelectValue({
|
|
20
|
+
...props
|
|
21
|
+
}: React.ComponentProps<typeof SelectPrimitive.Value>) {
|
|
22
|
+
return <SelectPrimitive.Value data-slot="select-value" {...props} />
|
|
23
|
+
}
|
|
12
24
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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", 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", 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}
|
|
25
|
+
function SelectTrigger({
|
|
26
|
+
className,
|
|
27
|
+
size = "default",
|
|
28
|
+
children,
|
|
29
|
+
...props
|
|
30
|
+
}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
|
|
31
|
+
size?: "sm" | "default"
|
|
32
|
+
}) {
|
|
33
|
+
return (
|
|
34
|
+
<SelectPrimitive.Trigger
|
|
35
|
+
data-slot="select-trigger"
|
|
36
|
+
data-size={size}
|
|
68
37
|
className={cn(
|
|
69
|
-
"
|
|
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",
|
|
38
|
+
"border-input data-placeholder:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
72
39
|
className
|
|
73
40
|
)}
|
|
74
|
-
position={position}
|
|
75
41
|
{...props}
|
|
76
42
|
>
|
|
77
|
-
|
|
78
|
-
<SelectPrimitive.
|
|
43
|
+
{children}
|
|
44
|
+
<SelectPrimitive.Icon asChild>
|
|
45
|
+
<ChevronDownIcon className="size-4 opacity-50" />
|
|
46
|
+
</SelectPrimitive.Icon>
|
|
47
|
+
</SelectPrimitive.Trigger>
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function SelectContent({
|
|
52
|
+
className,
|
|
53
|
+
children,
|
|
54
|
+
position = "popper",
|
|
55
|
+
align = "center",
|
|
56
|
+
...props
|
|
57
|
+
}: React.ComponentProps<typeof SelectPrimitive.Content>) {
|
|
58
|
+
return (
|
|
59
|
+
<SelectPrimitive.Portal>
|
|
60
|
+
<SelectPrimitive.Content
|
|
61
|
+
data-slot="select-content"
|
|
79
62
|
className={cn(
|
|
80
|
-
"
|
|
63
|
+
"bg-popover text-popover-foreground 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 relative z-50 max-h-(--radix-select-content-available-height) min-w-32 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
|
|
81
64
|
position === "popper" &&
|
|
82
|
-
|
|
65
|
+
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
66
|
+
className
|
|
83
67
|
)}
|
|
68
|
+
position={position}
|
|
69
|
+
align={align}
|
|
70
|
+
{...props}
|
|
84
71
|
>
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
))
|
|
91
|
-
|
|
72
|
+
<SelectScrollUpButton />
|
|
73
|
+
<SelectPrimitive.Viewport
|
|
74
|
+
className={cn(
|
|
75
|
+
"p-1",
|
|
76
|
+
position === "popper" &&
|
|
77
|
+
"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width) scroll-my-1"
|
|
78
|
+
)}
|
|
79
|
+
>
|
|
80
|
+
{children}
|
|
81
|
+
</SelectPrimitive.Viewport>
|
|
82
|
+
<SelectScrollDownButton />
|
|
83
|
+
</SelectPrimitive.Content>
|
|
84
|
+
</SelectPrimitive.Portal>
|
|
85
|
+
)
|
|
86
|
+
}
|
|
92
87
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
88
|
+
function SelectLabel({
|
|
89
|
+
className,
|
|
90
|
+
...props
|
|
91
|
+
}: React.ComponentProps<typeof SelectPrimitive.Label>) {
|
|
92
|
+
return (
|
|
93
|
+
<SelectPrimitive.Label
|
|
94
|
+
data-slot="select-label"
|
|
95
|
+
className={cn("text-muted-foreground px-2 py-1.5 text-xs", className)}
|
|
96
|
+
{...props}
|
|
97
|
+
/>
|
|
98
|
+
)
|
|
99
|
+
}
|
|
104
100
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
"
|
|
113
|
-
className
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
101
|
+
function SelectItem({
|
|
102
|
+
className,
|
|
103
|
+
children,
|
|
104
|
+
...props
|
|
105
|
+
}: React.ComponentProps<typeof SelectPrimitive.Item>) {
|
|
106
|
+
return (
|
|
107
|
+
<SelectPrimitive.Item
|
|
108
|
+
data-slot="select-item"
|
|
109
|
+
className={cn(
|
|
110
|
+
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
111
|
+
className
|
|
112
|
+
)}
|
|
113
|
+
{...props}
|
|
114
|
+
>
|
|
115
|
+
<span
|
|
116
|
+
data-slot="select-item-indicator"
|
|
117
|
+
className="absolute right-2 flex size-3.5 items-center justify-center"
|
|
118
|
+
>
|
|
119
|
+
<SelectPrimitive.ItemIndicator>
|
|
120
|
+
<CheckIcon className="size-4" />
|
|
121
|
+
</SelectPrimitive.ItemIndicator>
|
|
122
|
+
</span>
|
|
123
|
+
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
|
124
|
+
</SelectPrimitive.Item>
|
|
125
|
+
)
|
|
126
|
+
}
|
|
126
127
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
128
|
+
function SelectSeparator({
|
|
129
|
+
className,
|
|
130
|
+
...props
|
|
131
|
+
}: React.ComponentProps<typeof SelectPrimitive.Separator>) {
|
|
132
|
+
return (
|
|
133
|
+
<SelectPrimitive.Separator
|
|
134
|
+
data-slot="select-separator"
|
|
135
|
+
className={cn("bg-border pointer-events-none -mx-1 my-1 h-px", className)}
|
|
136
|
+
{...props}
|
|
137
|
+
/>
|
|
138
|
+
)
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
function SelectScrollUpButton({
|
|
142
|
+
className,
|
|
143
|
+
...props
|
|
144
|
+
}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {
|
|
145
|
+
return (
|
|
146
|
+
<SelectPrimitive.ScrollUpButton
|
|
147
|
+
data-slot="select-scroll-up-button"
|
|
148
|
+
className={cn(
|
|
149
|
+
"flex cursor-default items-center justify-center py-1",
|
|
150
|
+
className
|
|
151
|
+
)}
|
|
152
|
+
{...props}
|
|
153
|
+
>
|
|
154
|
+
<ChevronUpIcon className="size-4" />
|
|
155
|
+
</SelectPrimitive.ScrollUpButton>
|
|
156
|
+
)
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
function SelectScrollDownButton({
|
|
160
|
+
className,
|
|
161
|
+
...props
|
|
162
|
+
}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {
|
|
163
|
+
return (
|
|
164
|
+
<SelectPrimitive.ScrollDownButton
|
|
165
|
+
data-slot="select-scroll-down-button"
|
|
166
|
+
className={cn(
|
|
167
|
+
"flex cursor-default items-center justify-center py-1",
|
|
168
|
+
className
|
|
169
|
+
)}
|
|
170
|
+
{...props}
|
|
171
|
+
>
|
|
172
|
+
<ChevronDownIcon className="size-4" />
|
|
173
|
+
</SelectPrimitive.ScrollDownButton>
|
|
174
|
+
)
|
|
175
|
+
}
|
|
138
176
|
|
|
139
177
|
export {
|
|
140
178
|
Select,
|
|
@@ -147,4 +185,5 @@ export {
|
|
|
147
185
|
SelectSeparator,
|
|
148
186
|
SelectTrigger,
|
|
149
187
|
SelectValue
|
|
150
|
-
}
|
|
188
|
+
}
|
|
189
|
+
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator"
|
|
2
|
+
import * as React from "react"
|
|
2
3
|
|
|
3
|
-
import
|
|
4
|
-
import * as React from "react";
|
|
4
|
+
import { cn } from '../lib/utils'
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
function Separator({
|
|
7
|
+
className,
|
|
8
|
+
orientation = "horizontal",
|
|
9
|
+
decorative = true,
|
|
10
|
+
...props
|
|
11
|
+
}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
|
|
12
|
+
return (
|
|
13
|
+
<SeparatorPrimitive.Root
|
|
14
|
+
data-slot="separator"
|
|
15
|
+
decorative={decorative}
|
|
16
|
+
orientation={orientation}
|
|
17
|
+
className={cn(
|
|
18
|
+
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
19
|
+
className
|
|
20
|
+
)}
|
|
21
|
+
{...props}
|
|
22
|
+
/>
|
|
23
|
+
)
|
|
24
|
+
}
|
|
7
25
|
|
|
8
|
-
|
|
9
|
-
React.ElementRef<typeof SeparatorPrimitive.Root>,
|
|
10
|
-
React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
|
|
11
|
-
>(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => (
|
|
12
|
-
<SeparatorPrimitive.Root
|
|
13
|
-
ref={ref}
|
|
14
|
-
decorative={decorative}
|
|
15
|
-
orientation={orientation}
|
|
16
|
-
className={cn(
|
|
17
|
-
"shrink-0 bg-border",
|
|
18
|
-
orientation === "horizontal" ? "h-px w-full" : "h-full w-px",
|
|
19
|
-
className
|
|
20
|
-
)}
|
|
21
|
-
{...props}
|
|
22
|
-
/>
|
|
23
|
-
));
|
|
24
|
-
Separator.displayName = SeparatorPrimitive.Root.displayName;
|
|
25
|
-
|
|
26
|
-
export { Separator };
|
|
26
|
+
export { Separator }
|
|
@@ -1,30 +1,60 @@
|
|
|
1
|
-
import * as TooltipPrimitive from "@radix-ui/react-tooltip"
|
|
2
|
-
import * as React from "react"
|
|
1
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip"
|
|
2
|
+
import * as React from "react"
|
|
3
3
|
|
|
4
|
-
import { cn } from
|
|
4
|
+
import { cn } from '../lib/utils'
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
function TooltipProvider({
|
|
7
|
+
delayDuration = 0,
|
|
8
|
+
...props
|
|
9
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {
|
|
10
|
+
return (
|
|
11
|
+
<TooltipPrimitive.Provider
|
|
12
|
+
data-slot="tooltip-provider"
|
|
13
|
+
delayDuration={delayDuration}
|
|
14
|
+
{...props}
|
|
15
|
+
/>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
7
18
|
|
|
8
|
-
|
|
19
|
+
function Tooltip({
|
|
20
|
+
...props
|
|
21
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Root>) {
|
|
22
|
+
return (
|
|
23
|
+
<TooltipProvider>
|
|
24
|
+
<TooltipPrimitive.Root data-slot="tooltip" {...props} />
|
|
25
|
+
</TooltipProvider>
|
|
26
|
+
)
|
|
27
|
+
}
|
|
9
28
|
|
|
10
|
-
|
|
29
|
+
function TooltipTrigger({
|
|
30
|
+
...props
|
|
31
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {
|
|
32
|
+
return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />
|
|
33
|
+
}
|
|
11
34
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
35
|
+
function TooltipContent({
|
|
36
|
+
className,
|
|
37
|
+
sideOffset = 0,
|
|
38
|
+
children,
|
|
39
|
+
...props
|
|
40
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Content>) {
|
|
41
|
+
return (
|
|
42
|
+
<TooltipPrimitive.Portal>
|
|
43
|
+
<TooltipPrimitive.Content
|
|
44
|
+
data-slot="tooltip-content"
|
|
45
|
+
sideOffset={sideOffset}
|
|
46
|
+
className={cn(
|
|
47
|
+
"bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
|
|
48
|
+
className
|
|
49
|
+
)}
|
|
50
|
+
{...props}
|
|
51
|
+
>
|
|
52
|
+
{children}
|
|
53
|
+
<TooltipPrimitive.Arrow className="bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px]" />
|
|
54
|
+
</TooltipPrimitive.Content>
|
|
55
|
+
</TooltipPrimitive.Portal>
|
|
56
|
+
)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger }
|
|
29
60
|
|
|
30
|
-
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -4,7 +4,6 @@ import type { ReactNode } from "react";
|
|
|
4
4
|
import { assert } from "tsafe/assert";
|
|
5
5
|
import { type KcContext, KcContextProvider } from "./KcContext";
|
|
6
6
|
import { I18nProvider } from "./i18n";
|
|
7
|
-
import "./index.css";
|
|
8
7
|
import { PageIndex } from "./pages/PageIndex";
|
|
9
8
|
import { useStyleLevelCustomization } from "./styleLevelCustomization";
|
|
10
9
|
|
|
@@ -108,7 +108,7 @@ export function Template(props: {
|
|
|
108
108
|
<div className="flex flex-1 items-start lg:items-center justify-center lg:mt-0 ">
|
|
109
109
|
<div className="w-full max-w-xl ">
|
|
110
110
|
<Card className=" shadow-none bg-transparent lg:bg-card border-0 lg:rounded-lg lg:border lg:shadow-sm rounded-t-2xl">
|
|
111
|
-
<CardHeader className="text-center
|
|
111
|
+
<CardHeader className="text-center">
|
|
112
112
|
<CardTitle>
|
|
113
113
|
{(() => {
|
|
114
114
|
const node = !(
|
|
@@ -182,7 +182,7 @@ export function Template(props: {
|
|
|
182
182
|
})()}
|
|
183
183
|
</CardTitle>
|
|
184
184
|
</CardHeader>
|
|
185
|
-
<CardContent
|
|
185
|
+
<CardContent >
|
|
186
186
|
<div id="kc-content">
|
|
187
187
|
<div id="kc-content-wrapper">
|
|
188
188
|
{displayMessage &&
|
|
@@ -1,36 +1,20 @@
|
|
|
1
|
-
import { useEffect } from "react";
|
|
2
|
-
import { useInsertScriptTags } from "@keycloakify/login-ui/tools/useInsertScriptTags";
|
|
3
1
|
import { useInsertLinkTags } from "@keycloakify/login-ui/tools/useInsertLinkTags";
|
|
4
|
-
import {
|
|
2
|
+
import { useInsertScriptTags } from "@keycloakify/login-ui/tools/useInsertScriptTags";
|
|
3
|
+
import { useEffect } from "react";
|
|
5
4
|
import { BASE_URL } from "../../../kc.gen";
|
|
6
5
|
import { useKcContext } from "../../KcContext";
|
|
7
6
|
|
|
8
7
|
export function useInitializeTemplate() {
|
|
9
8
|
const { kcContext } = useKcContext();
|
|
10
9
|
|
|
11
|
-
const { doUseDefaultCss } = useKcClsx();
|
|
12
|
-
|
|
13
10
|
const { areAllStyleSheetsLoaded } = useInsertLinkTags({
|
|
14
11
|
effectId: "Template",
|
|
15
|
-
hrefs:
|
|
16
|
-
? []
|
|
17
|
-
: [
|
|
18
|
-
`${BASE_URL}keycloak-theme/login/resources-common/node_modules/@patternfly/patternfly/patternfly.min.css`,
|
|
19
|
-
`${BASE_URL}keycloak-theme/login/resources-common/node_modules/patternfly/dist/css/patternfly.min.css`,
|
|
20
|
-
`${BASE_URL}keycloak-theme/login/resources-common/node_modules/patternfly/dist/css/patternfly-additions.min.css`,
|
|
21
|
-
`${BASE_URL}keycloak-theme/login/resources-common/lib/pficon/pficon.css`,
|
|
22
|
-
`${BASE_URL}keycloak-theme/login/css/login.css`
|
|
23
|
-
]
|
|
12
|
+
hrefs: []
|
|
24
13
|
});
|
|
25
14
|
|
|
26
15
|
const { insertScriptTags } = useInsertScriptTags({
|
|
27
16
|
effectId: "Template",
|
|
28
17
|
scriptTags: [
|
|
29
|
-
// NOTE: The importmap is added in by the FTL script because it's too late to add it here.
|
|
30
|
-
{
|
|
31
|
-
type: "module",
|
|
32
|
-
src: `${BASE_URL}keycloak-theme/login/js/menu-button-links.js`
|
|
33
|
-
},
|
|
34
18
|
...(kcContext.scripts === undefined
|
|
35
19
|
? []
|
|
36
20
|
: kcContext.scripts.map(src => ({
|
|
@@ -2,15 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
@import "tailwindcss";
|
|
4
4
|
|
|
5
|
+
@source "../**/*.{ts,tsx}";
|
|
6
|
+
|
|
5
7
|
@custom-variant dark (&:is(.dark *));
|
|
6
8
|
|
|
7
9
|
@theme {
|
|
8
10
|
--font-geist: Geist, sans-serif;
|
|
9
11
|
|
|
10
|
-
--radius-lg: var(--radius);
|
|
11
|
-
--radius-md: calc(var(--radius) - 2px);
|
|
12
|
-
--radius-sm: calc(var(--radius) - 4px);
|
|
13
|
-
|
|
14
12
|
--color-background: var(--background);
|
|
15
13
|
--color-foreground: var(--foreground);
|
|
16
14
|
--color-card: var(--card);
|
|
@@ -70,21 +68,6 @@
|
|
|
70
68
|
@apply text-right;
|
|
71
69
|
}
|
|
72
70
|
|
|
73
|
-
/* .kcHeaderWrapperClass {
|
|
74
|
-
@apply text-3xl font-bold underline;
|
|
75
|
-
} */
|
|
76
|
-
/* input[type="checkbox"],
|
|
77
|
-
input[type="radio"] {
|
|
78
|
-
margin: 2px;
|
|
79
|
-
vertical-align: middle;
|
|
80
|
-
line-height: normal;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
input[type="checkbox"]:checked,
|
|
84
|
-
input[type="radio"]:checked {
|
|
85
|
-
@apply accent-primary;
|
|
86
|
-
} */
|
|
87
|
-
|
|
88
71
|
.required {
|
|
89
72
|
@apply text-red-600;
|
|
90
73
|
}
|
|
@@ -141,7 +124,7 @@
|
|
|
141
124
|
--muted-foreground: oklch(0.708 0 0);
|
|
142
125
|
--accent: oklch(0.269 0 0);
|
|
143
126
|
--accent-foreground: oklch(0.985 0 0);
|
|
144
|
-
--destructive: oklch(
|
|
127
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
145
128
|
--border: oklch(1 0 0 / 10%);
|
|
146
129
|
--input: oklch(1 0 0 / 15%);
|
|
147
130
|
--ring: oklch(0.556 0 0);
|