keycloakify 11.1.0 → 11.2.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/account/TemplateProps.d.ts +2 -1
- package/account/lib/kcClsx.d.ts +1 -2
- package/account/lib/kcClsx.js.map +1 -1
- package/bin/31.index.js +28 -18
- package/bin/{499.index.js → 573.index.js} +97 -120
- package/bin/main.js +1 -1
- package/bin/shared/buildContext.js.map +1 -1
- package/login/TemplateProps.d.ts +2 -1
- package/login/lib/kcClsx.d.ts +1 -2
- package/login/lib/kcClsx.js.map +1 -1
- package/package.json +2 -4
- package/src/account/TemplateProps.ts +2 -14
- package/src/account/lib/kcClsx.ts +15 -3
- package/src/bin/keycloakify/generateResources/generateResources.ts +477 -19
- package/src/bin/shared/buildContext.ts +35 -18
- package/src/login/TemplateProps.ts +2 -125
- package/src/login/lib/kcClsx.ts +126 -3
- package/vite-plugin/index.js +28 -18
- package/src/bin/keycloakify/generateResources/generateResourcesForMainTheme.ts +0 -426
- package/src/bin/keycloakify/generateResources/generateResourcesForThemeVariant.ts +0 -76
@@ -1,4 +1,5 @@
|
|
1
1
|
import type { ReactNode } from "react";
|
2
|
+
import type { ClassKey } from "keycloakify/login/lib/kcClsx";
|
2
3
|
|
3
4
|
export type TemplateProps<KcContext, I18n> = {
|
4
5
|
kcContext: KcContext;
|
@@ -18,128 +19,4 @@ export type TemplateProps<KcContext, I18n> = {
|
|
18
19
|
bodyClassName?: string;
|
19
20
|
};
|
20
21
|
|
21
|
-
export type ClassKey
|
22
|
-
| "kcBodyClass"
|
23
|
-
| "kcHeaderWrapperClass"
|
24
|
-
| "kcLocaleWrapperClass"
|
25
|
-
| "kcInfoAreaWrapperClass"
|
26
|
-
| "kcFormButtonsWrapperClass"
|
27
|
-
| "kcFormOptionsWrapperClass"
|
28
|
-
| "kcCheckboxInputClass"
|
29
|
-
| "kcLocaleDropDownClass"
|
30
|
-
| "kcLocaleListItemClass"
|
31
|
-
| "kcContentWrapperClass"
|
32
|
-
| "kcLogoIdP-facebook"
|
33
|
-
| "kcAuthenticatorOTPClass"
|
34
|
-
| "kcLogoIdP-bitbucket"
|
35
|
-
| "kcAuthenticatorWebAuthnClass"
|
36
|
-
| "kcWebAuthnDefaultIcon"
|
37
|
-
| "kcLogoIdP-stackoverflow"
|
38
|
-
| "kcSelectAuthListItemClass"
|
39
|
-
| "kcLogoIdP-microsoft"
|
40
|
-
| "kcLoginOTPListItemHeaderClass"
|
41
|
-
| "kcLocaleItemClass"
|
42
|
-
| "kcLoginOTPListItemIconBodyClass"
|
43
|
-
| "kcInputHelperTextAfterClass"
|
44
|
-
| "kcFormClass"
|
45
|
-
| "kcSelectAuthListClass"
|
46
|
-
| "kcInputClassRadioCheckboxLabelDisabled"
|
47
|
-
| "kcSelectAuthListItemIconClass"
|
48
|
-
| "kcRecoveryCodesWarning"
|
49
|
-
| "kcFormSettingClass"
|
50
|
-
| "kcWebAuthnBLE"
|
51
|
-
| "kcInputWrapperClass"
|
52
|
-
| "kcSelectAuthListItemArrowIconClass"
|
53
|
-
| "kcFeedbackAreaClass"
|
54
|
-
| "kcFormPasswordVisibilityButtonClass"
|
55
|
-
| "kcLogoIdP-google"
|
56
|
-
| "kcCheckLabelClass"
|
57
|
-
| "kcSelectAuthListItemFillClass"
|
58
|
-
| "kcAuthenticatorDefaultClass"
|
59
|
-
| "kcLogoIdP-gitlab"
|
60
|
-
| "kcFormAreaClass"
|
61
|
-
| "kcFormButtonsClass"
|
62
|
-
| "kcInputClassRadioLabel"
|
63
|
-
| "kcAuthenticatorWebAuthnPasswordlessClass"
|
64
|
-
| "kcSelectAuthListItemHeadingClass"
|
65
|
-
| "kcInfoAreaClass"
|
66
|
-
| "kcLogoLink"
|
67
|
-
| "kcContainerClass"
|
68
|
-
| "kcSelectAuthListItemTitle"
|
69
|
-
| "kcHtmlClass"
|
70
|
-
| "kcLoginOTPListItemTitleClass"
|
71
|
-
| "kcLogoIdP-openshift-v4"
|
72
|
-
| "kcWebAuthnUnknownIcon"
|
73
|
-
| "kcFormSocialAccountNameClass"
|
74
|
-
| "kcLogoIdP-openshift-v3"
|
75
|
-
| "kcLoginOTPListInputClass"
|
76
|
-
| "kcWebAuthnUSB"
|
77
|
-
| "kcInputClassRadio"
|
78
|
-
| "kcWebAuthnKeyIcon"
|
79
|
-
| "kcFeedbackInfoIcon"
|
80
|
-
| "kcCommonLogoIdP"
|
81
|
-
| "kcRecoveryCodesActions"
|
82
|
-
| "kcFormGroupHeader"
|
83
|
-
| "kcFormSocialAccountSectionClass"
|
84
|
-
| "kcLogoIdP-instagram"
|
85
|
-
| "kcAlertClass"
|
86
|
-
| "kcHeaderClass"
|
87
|
-
| "kcLabelWrapperClass"
|
88
|
-
| "kcFormPasswordVisibilityIconShow"
|
89
|
-
| "kcFormSocialAccountLinkClass"
|
90
|
-
| "kcLocaleMainClass"
|
91
|
-
| "kcInputGroup"
|
92
|
-
| "kcTextareaClass"
|
93
|
-
| "kcButtonBlockClass"
|
94
|
-
| "kcButtonClass"
|
95
|
-
| "kcWebAuthnNFC"
|
96
|
-
| "kcLocaleClass"
|
97
|
-
| "kcInputClassCheckboxInput"
|
98
|
-
| "kcFeedbackErrorIcon"
|
99
|
-
| "kcInputLargeClass"
|
100
|
-
| "kcInputErrorMessageClass"
|
101
|
-
| "kcRecoveryCodesList"
|
102
|
-
| "kcFormSocialAccountListClass"
|
103
|
-
| "kcAlertTitleClass"
|
104
|
-
| "kcAuthenticatorPasswordClass"
|
105
|
-
| "kcCheckInputClass"
|
106
|
-
| "kcLogoIdP-linkedin"
|
107
|
-
| "kcLogoIdP-twitter"
|
108
|
-
| "kcFeedbackWarningIcon"
|
109
|
-
| "kcResetFlowIcon"
|
110
|
-
| "kcSelectAuthListItemIconPropertyClass"
|
111
|
-
| "kcFeedbackSuccessIcon"
|
112
|
-
| "kcLoginOTPListClass"
|
113
|
-
| "kcSrOnlyClass"
|
114
|
-
| "kcFormSocialAccountListGridClass"
|
115
|
-
| "kcButtonDefaultClass"
|
116
|
-
| "kcFormGroupErrorClass"
|
117
|
-
| "kcSelectAuthListItemDescriptionClass"
|
118
|
-
| "kcSelectAuthListItemBodyClass"
|
119
|
-
| "kcWebAuthnInternal"
|
120
|
-
| "kcSelectAuthListItemArrowClass"
|
121
|
-
| "kcCheckClass"
|
122
|
-
| "kcContentClass"
|
123
|
-
| "kcLogoClass"
|
124
|
-
| "kcLoginOTPListItemIconClass"
|
125
|
-
| "kcLoginClass"
|
126
|
-
| "kcSignUpClass"
|
127
|
-
| "kcButtonLargeClass"
|
128
|
-
| "kcFormCardClass"
|
129
|
-
| "kcLocaleListClass"
|
130
|
-
| "kcInputClass"
|
131
|
-
| "kcFormGroupClass"
|
132
|
-
| "kcLogoIdP-paypal"
|
133
|
-
| "kcInputClassCheckbox"
|
134
|
-
| "kcRecoveryCodesConfirmation"
|
135
|
-
| "kcFormPasswordVisibilityIconHide"
|
136
|
-
| "kcInputClassRadioInput"
|
137
|
-
| "kcFormSocialAccountListButtonClass"
|
138
|
-
| "kcInputClassCheckboxLabel"
|
139
|
-
| "kcFormOptionsClass"
|
140
|
-
| "kcFormHeaderClass"
|
141
|
-
| "kcFormSocialAccountGridItem"
|
142
|
-
| "kcButtonPrimaryClass"
|
143
|
-
| "kcInputHelperTextBeforeClass"
|
144
|
-
| "kcLogoIdP-github"
|
145
|
-
| "kcLabelClass";
|
22
|
+
export type { ClassKey };
|
package/src/login/lib/kcClsx.ts
CHANGED
@@ -1,5 +1,130 @@
|
|
1
1
|
import { createGetKcClsx } from "keycloakify/lib/getKcClsx";
|
2
|
-
|
2
|
+
|
3
|
+
export type ClassKey =
|
4
|
+
| "kcBodyClass"
|
5
|
+
| "kcHeaderWrapperClass"
|
6
|
+
| "kcLocaleWrapperClass"
|
7
|
+
| "kcInfoAreaWrapperClass"
|
8
|
+
| "kcFormButtonsWrapperClass"
|
9
|
+
| "kcFormOptionsWrapperClass"
|
10
|
+
| "kcCheckboxInputClass"
|
11
|
+
| "kcLocaleDropDownClass"
|
12
|
+
| "kcLocaleListItemClass"
|
13
|
+
| "kcContentWrapperClass"
|
14
|
+
| "kcLogoIdP-facebook"
|
15
|
+
| "kcAuthenticatorOTPClass"
|
16
|
+
| "kcLogoIdP-bitbucket"
|
17
|
+
| "kcAuthenticatorWebAuthnClass"
|
18
|
+
| "kcWebAuthnDefaultIcon"
|
19
|
+
| "kcLogoIdP-stackoverflow"
|
20
|
+
| "kcSelectAuthListItemClass"
|
21
|
+
| "kcLogoIdP-microsoft"
|
22
|
+
| "kcLoginOTPListItemHeaderClass"
|
23
|
+
| "kcLocaleItemClass"
|
24
|
+
| "kcLoginOTPListItemIconBodyClass"
|
25
|
+
| "kcInputHelperTextAfterClass"
|
26
|
+
| "kcFormClass"
|
27
|
+
| "kcSelectAuthListClass"
|
28
|
+
| "kcInputClassRadioCheckboxLabelDisabled"
|
29
|
+
| "kcSelectAuthListItemIconClass"
|
30
|
+
| "kcRecoveryCodesWarning"
|
31
|
+
| "kcFormSettingClass"
|
32
|
+
| "kcWebAuthnBLE"
|
33
|
+
| "kcInputWrapperClass"
|
34
|
+
| "kcSelectAuthListItemArrowIconClass"
|
35
|
+
| "kcFeedbackAreaClass"
|
36
|
+
| "kcFormPasswordVisibilityButtonClass"
|
37
|
+
| "kcLogoIdP-google"
|
38
|
+
| "kcCheckLabelClass"
|
39
|
+
| "kcSelectAuthListItemFillClass"
|
40
|
+
| "kcAuthenticatorDefaultClass"
|
41
|
+
| "kcLogoIdP-gitlab"
|
42
|
+
| "kcFormAreaClass"
|
43
|
+
| "kcFormButtonsClass"
|
44
|
+
| "kcInputClassRadioLabel"
|
45
|
+
| "kcAuthenticatorWebAuthnPasswordlessClass"
|
46
|
+
| "kcSelectAuthListItemHeadingClass"
|
47
|
+
| "kcInfoAreaClass"
|
48
|
+
| "kcLogoLink"
|
49
|
+
| "kcContainerClass"
|
50
|
+
| "kcSelectAuthListItemTitle"
|
51
|
+
| "kcHtmlClass"
|
52
|
+
| "kcLoginOTPListItemTitleClass"
|
53
|
+
| "kcLogoIdP-openshift-v4"
|
54
|
+
| "kcWebAuthnUnknownIcon"
|
55
|
+
| "kcFormSocialAccountNameClass"
|
56
|
+
| "kcLogoIdP-openshift-v3"
|
57
|
+
| "kcLoginOTPListInputClass"
|
58
|
+
| "kcWebAuthnUSB"
|
59
|
+
| "kcInputClassRadio"
|
60
|
+
| "kcWebAuthnKeyIcon"
|
61
|
+
| "kcFeedbackInfoIcon"
|
62
|
+
| "kcCommonLogoIdP"
|
63
|
+
| "kcRecoveryCodesActions"
|
64
|
+
| "kcFormGroupHeader"
|
65
|
+
| "kcFormSocialAccountSectionClass"
|
66
|
+
| "kcLogoIdP-instagram"
|
67
|
+
| "kcAlertClass"
|
68
|
+
| "kcHeaderClass"
|
69
|
+
| "kcLabelWrapperClass"
|
70
|
+
| "kcFormPasswordVisibilityIconShow"
|
71
|
+
| "kcFormSocialAccountLinkClass"
|
72
|
+
| "kcLocaleMainClass"
|
73
|
+
| "kcInputGroup"
|
74
|
+
| "kcTextareaClass"
|
75
|
+
| "kcButtonBlockClass"
|
76
|
+
| "kcButtonClass"
|
77
|
+
| "kcWebAuthnNFC"
|
78
|
+
| "kcLocaleClass"
|
79
|
+
| "kcInputClassCheckboxInput"
|
80
|
+
| "kcFeedbackErrorIcon"
|
81
|
+
| "kcInputLargeClass"
|
82
|
+
| "kcInputErrorMessageClass"
|
83
|
+
| "kcRecoveryCodesList"
|
84
|
+
| "kcFormSocialAccountListClass"
|
85
|
+
| "kcAlertTitleClass"
|
86
|
+
| "kcAuthenticatorPasswordClass"
|
87
|
+
| "kcCheckInputClass"
|
88
|
+
| "kcLogoIdP-linkedin"
|
89
|
+
| "kcLogoIdP-twitter"
|
90
|
+
| "kcFeedbackWarningIcon"
|
91
|
+
| "kcResetFlowIcon"
|
92
|
+
| "kcSelectAuthListItemIconPropertyClass"
|
93
|
+
| "kcFeedbackSuccessIcon"
|
94
|
+
| "kcLoginOTPListClass"
|
95
|
+
| "kcSrOnlyClass"
|
96
|
+
| "kcFormSocialAccountListGridClass"
|
97
|
+
| "kcButtonDefaultClass"
|
98
|
+
| "kcFormGroupErrorClass"
|
99
|
+
| "kcSelectAuthListItemDescriptionClass"
|
100
|
+
| "kcSelectAuthListItemBodyClass"
|
101
|
+
| "kcWebAuthnInternal"
|
102
|
+
| "kcSelectAuthListItemArrowClass"
|
103
|
+
| "kcCheckClass"
|
104
|
+
| "kcContentClass"
|
105
|
+
| "kcLogoClass"
|
106
|
+
| "kcLoginOTPListItemIconClass"
|
107
|
+
| "kcLoginClass"
|
108
|
+
| "kcSignUpClass"
|
109
|
+
| "kcButtonLargeClass"
|
110
|
+
| "kcFormCardClass"
|
111
|
+
| "kcLocaleListClass"
|
112
|
+
| "kcInputClass"
|
113
|
+
| "kcFormGroupClass"
|
114
|
+
| "kcLogoIdP-paypal"
|
115
|
+
| "kcInputClassCheckbox"
|
116
|
+
| "kcRecoveryCodesConfirmation"
|
117
|
+
| "kcFormPasswordVisibilityIconHide"
|
118
|
+
| "kcInputClassRadioInput"
|
119
|
+
| "kcFormSocialAccountListButtonClass"
|
120
|
+
| "kcInputClassCheckboxLabel"
|
121
|
+
| "kcFormOptionsClass"
|
122
|
+
| "kcFormHeaderClass"
|
123
|
+
| "kcFormSocialAccountGridItem"
|
124
|
+
| "kcButtonPrimaryClass"
|
125
|
+
| "kcInputHelperTextBeforeClass"
|
126
|
+
| "kcLogoIdP-github"
|
127
|
+
| "kcLabelClass";
|
3
128
|
|
4
129
|
export const { getKcClsx } = createGetKcClsx<ClassKey>({
|
5
130
|
defaultClasses: {
|
@@ -138,6 +263,4 @@ export const { getKcClsx } = createGetKcClsx<ClassKey>({
|
|
138
263
|
}
|
139
264
|
});
|
140
265
|
|
141
|
-
export type { ClassKey };
|
142
|
-
|
143
266
|
export type KcClsx = ReturnType<typeof getKcClsx>["kcClsx"];
|
package/vite-plugin/index.js
CHANGED
@@ -235,9 +235,7 @@ function getBuildContext(params) {
|
|
235
235
|
})
|
236
236
|
.parse(JSON.parse(external_fs_.readFileSync(packageJsonFilePath).toString("utf8")));
|
237
237
|
if (((_a = parsedPackageJson.dependencies) === null || _a === void 0 ? void 0 : _a.keycloakify) === undefined &&
|
238
|
-
((_b = parsedPackageJson.devDependencies) === null || _b === void 0 ? void 0 : _b.keycloakify) === undefined
|
239
|
-
parsedPackageJson.name !== "keycloakify" // NOTE: For local storybook build
|
240
|
-
) {
|
238
|
+
((_b = parsedPackageJson.devDependencies) === null || _b === void 0 ? void 0 : _b.keycloakify) === undefined) {
|
241
239
|
break success;
|
242
240
|
}
|
243
241
|
return packageJsonFilePath;
|
@@ -380,22 +378,34 @@ function getBuildContext(params) {
|
|
380
378
|
process.exit(-1);
|
381
379
|
}
|
382
380
|
const themeNames = (() => {
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
.
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
381
|
+
const themeNames = (() => {
|
382
|
+
if (buildOptions.themeName === undefined) {
|
383
|
+
return parsedPackageJson.name === undefined
|
384
|
+
? ["keycloakify"]
|
385
|
+
: [
|
386
|
+
parsedPackageJson.name
|
387
|
+
.replace(/^@(.*)/, "$1")
|
388
|
+
.split("/")
|
389
|
+
.join("-")
|
390
|
+
];
|
391
|
+
}
|
392
|
+
if (typeof buildOptions.themeName === "string") {
|
393
|
+
return [buildOptions.themeName];
|
394
|
+
}
|
395
|
+
const [mainThemeName, ...themeVariantNames] = buildOptions.themeName;
|
396
|
+
(0,assert.assert)(mainThemeName !== undefined);
|
397
|
+
return [mainThemeName, ...themeVariantNames];
|
398
|
+
})();
|
399
|
+
for (const themeName of themeNames) {
|
400
|
+
if (!/^[a-zA-Z0-9_-]+$/.test(themeName)) {
|
401
|
+
console.error(source_default().red([
|
402
|
+
`Invalid theme name: ${themeName}`,
|
403
|
+
`Theme names should only contain letters, numbers, and "_" or "-"`
|
404
|
+
].join(" ")));
|
405
|
+
process.exit(-1);
|
406
|
+
}
|
395
407
|
}
|
396
|
-
|
397
|
-
(0,assert.assert)(mainThemeName !== undefined);
|
398
|
-
return [mainThemeName, ...themeVariantNames];
|
408
|
+
return themeNames;
|
399
409
|
})();
|
400
410
|
const projectBuildDirPath = (() => {
|
401
411
|
webpack: {
|