@thunderid/javascript 0.0.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/LICENSE +201 -0
- package/dist/DefaultCacheStore.d.ts +31 -0
- package/dist/DefaultCacheStore.d.ts.map +1 -0
- package/dist/DefaultCrypto.d.ts +30 -0
- package/dist/DefaultCrypto.d.ts.map +1 -0
- package/dist/HttpClient.d.ts +65 -0
- package/dist/HttpClient.d.ts.map +1 -0
- package/dist/IsomorphicCrypto.d.ts +64 -0
- package/dist/IsomorphicCrypto.d.ts.map +1 -0
- package/dist/StorageManager.d.ts +66 -0
- package/dist/StorageManager.d.ts.map +1 -0
- package/dist/ThunderIDJavaScriptClient.d.ts +66 -0
- package/dist/ThunderIDJavaScriptClient.d.ts.map +1 -0
- package/dist/__legacy__/client.d.ts +485 -0
- package/dist/__legacy__/client.d.ts.map +1 -0
- package/dist/__legacy__/helpers/authentication-helper.d.ts +38 -0
- package/dist/__legacy__/helpers/authentication-helper.d.ts.map +1 -0
- package/dist/__legacy__/helpers/index.d.ts +19 -0
- package/dist/__legacy__/helpers/index.d.ts.map +1 -0
- package/dist/__legacy__/models/client-config.d.ts +106 -0
- package/dist/__legacy__/models/client-config.d.ts.map +1 -0
- package/dist/__legacy__/models/index.d.ts +19 -0
- package/dist/__legacy__/models/index.d.ts.map +1 -0
- package/dist/api/createOrganization.d.ts +130 -0
- package/dist/api/createOrganization.d.ts.map +1 -0
- package/dist/api/executeEmbeddedSignInFlow.d.ts +22 -0
- package/dist/api/executeEmbeddedSignInFlow.d.ts.map +1 -0
- package/dist/api/executeEmbeddedSignUpFlow.d.ts +45 -0
- package/dist/api/executeEmbeddedSignUpFlow.d.ts.map +1 -0
- package/dist/api/getAllOrganizations.d.ts +104 -0
- package/dist/api/getAllOrganizations.d.ts.map +1 -0
- package/dist/api/getBrandingPreference.d.ts +104 -0
- package/dist/api/getBrandingPreference.d.ts.map +1 -0
- package/dist/api/getMeOrganizations.d.ts +120 -0
- package/dist/api/getMeOrganizations.d.ts.map +1 -0
- package/dist/api/getOrganization.d.ts +110 -0
- package/dist/api/getOrganization.d.ts.map +1 -0
- package/dist/api/getSchemas.d.ts +90 -0
- package/dist/api/getSchemas.d.ts.map +1 -0
- package/dist/api/getScim2Me.d.ts +90 -0
- package/dist/api/getScim2Me.d.ts.map +1 -0
- package/dist/api/getUserInfo.d.ts +38 -0
- package/dist/api/getUserInfo.d.ts.map +1 -0
- package/dist/api/initializeEmbeddedSignInFlow.d.ts +52 -0
- package/dist/api/initializeEmbeddedSignInFlow.d.ts.map +1 -0
- package/dist/api/updateMeProfile.d.ts +83 -0
- package/dist/api/updateMeProfile.d.ts.map +1 -0
- package/dist/api/updateOrganization.d.ts +119 -0
- package/dist/api/updateOrganization.d.ts.map +1 -0
- package/dist/api/v2/executeEmbeddedRecoveryFlowV2.d.ts +57 -0
- package/dist/api/v2/executeEmbeddedRecoveryFlowV2.d.ts.map +1 -0
- package/dist/api/v2/executeEmbeddedSignInFlowV2.d.ts +22 -0
- package/dist/api/v2/executeEmbeddedSignInFlowV2.d.ts.map +1 -0
- package/dist/api/v2/executeEmbeddedSignUpFlowV2.d.ts +22 -0
- package/dist/api/v2/executeEmbeddedSignUpFlowV2.d.ts.map +1 -0
- package/dist/api/v2/executeEmbeddedUserOnboardingFlowV2.d.ts +89 -0
- package/dist/api/v2/executeEmbeddedUserOnboardingFlowV2.d.ts.map +1 -0
- package/dist/api/v2/getFlowMetaV2.d.ts +56 -0
- package/dist/api/v2/getFlowMetaV2.d.ts.map +1 -0
- package/dist/api/v2/getOrganizationUnitChildren.d.ts +43 -0
- package/dist/api/v2/getOrganizationUnitChildren.d.ts.map +1 -0
- package/dist/cjs/index.cjs +7693 -0
- package/dist/constants/ApplicationNativeAuthenticationConstants.d.ts +40 -0
- package/dist/constants/ApplicationNativeAuthenticationConstants.d.ts.map +1 -0
- package/dist/constants/OIDCDiscoveryConstants.d.ts +65 -0
- package/dist/constants/OIDCDiscoveryConstants.d.ts.map +1 -0
- package/dist/constants/OIDCRequestConstants.d.ts +43 -0
- package/dist/constants/OIDCRequestConstants.d.ts.map +1 -0
- package/dist/constants/PKCEConstants.d.ts +45 -0
- package/dist/constants/PKCEConstants.d.ts.map +1 -0
- package/dist/constants/ScopeConstants.d.ts +43 -0
- package/dist/constants/ScopeConstants.d.ts.map +1 -0
- package/dist/constants/TokenConstants.d.ts +48 -0
- package/dist/constants/TokenConstants.d.ts.map +1 -0
- package/dist/constants/TokenExchangeConstants.d.ts +44 -0
- package/dist/constants/TokenExchangeConstants.d.ts.map +1 -0
- package/dist/constants/VendorConstants.d.ts +32 -0
- package/dist/constants/VendorConstants.d.ts.map +1 -0
- package/dist/constants/v2/OIDCDiscoveryConstants.d.ts +40 -0
- package/dist/constants/v2/OIDCDiscoveryConstants.d.ts.map +1 -0
- package/dist/edge/index.js +7568 -0
- package/dist/errors/ThunderIDAPIError.d.ts +59 -0
- package/dist/errors/ThunderIDAPIError.d.ts.map +1 -0
- package/dist/errors/ThunderIDError.d.ts +50 -0
- package/dist/errors/ThunderIDError.d.ts.map +1 -0
- package/dist/errors/ThunderIDRuntimeError.d.ts +51 -0
- package/dist/errors/ThunderIDRuntimeError.d.ts.map +1 -0
- package/dist/errors/exception.d.ts +27 -0
- package/dist/errors/exception.d.ts.map +1 -0
- package/dist/i18n/constants/TranslationBundleConstants.d.ts +35 -0
- package/dist/i18n/constants/TranslationBundleConstants.d.ts.map +1 -0
- package/dist/i18n/models/i18n.d.ts +127 -0
- package/dist/i18n/models/i18n.d.ts.map +1 -0
- package/dist/i18n/translations/en-US.d.ts +21 -0
- package/dist/i18n/translations/en-US.d.ts.map +1 -0
- package/dist/i18n/translations/fr-FR.d.ts +21 -0
- package/dist/i18n/translations/fr-FR.d.ts.map +1 -0
- package/dist/i18n/translations/hi-IN.d.ts +21 -0
- package/dist/i18n/translations/hi-IN.d.ts.map +1 -0
- package/dist/i18n/translations/index.d.ts +26 -0
- package/dist/i18n/translations/index.d.ts.map +1 -0
- package/dist/i18n/translations/ja-JP.d.ts +21 -0
- package/dist/i18n/translations/ja-JP.d.ts.map +1 -0
- package/dist/i18n/translations/pt-BR.d.ts +21 -0
- package/dist/i18n/translations/pt-BR.d.ts.map +1 -0
- package/dist/i18n/translations/pt-PT.d.ts +21 -0
- package/dist/i18n/translations/pt-PT.d.ts.map +1 -0
- package/dist/i18n/translations/si-LK.d.ts +21 -0
- package/dist/i18n/translations/si-LK.d.ts.map +1 -0
- package/dist/i18n/translations/ta-IN.d.ts +21 -0
- package/dist/i18n/translations/ta-IN.d.ts.map +1 -0
- package/dist/i18n/translations/te-IN.d.ts +21 -0
- package/dist/i18n/translations/te-IN.d.ts.map +1 -0
- package/dist/i18n/utils/getDefaultI18nBundles.d.ts +28 -0
- package/dist/i18n/utils/getDefaultI18nBundles.d.ts.map +1 -0
- package/dist/i18n/utils/normalizeTranslations.d.ts +42 -0
- package/dist/i18n/utils/normalizeTranslations.d.ts.map +1 -0
- package/dist/index.d.ts +143 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7568 -0
- package/dist/models/agent.d.ts +45 -0
- package/dist/models/agent.d.ts.map +1 -0
- package/dist/models/auth-code-response.d.ts +35 -0
- package/dist/models/auth-code-response.d.ts.map +1 -0
- package/dist/models/branding-preference.d.ts +249 -0
- package/dist/models/branding-preference.d.ts.map +1 -0
- package/dist/models/client.d.ts +213 -0
- package/dist/models/client.d.ts.map +1 -0
- package/dist/models/config.d.ts +483 -0
- package/dist/models/config.d.ts.map +1 -0
- package/dist/models/crypto.d.ts +101 -0
- package/dist/models/crypto.d.ts.map +1 -0
- package/dist/models/embedded-flow.d.ts +167 -0
- package/dist/models/embedded-flow.d.ts.map +1 -0
- package/dist/models/embedded-signin-flow.d.ts +100 -0
- package/dist/models/embedded-signin-flow.d.ts.map +1 -0
- package/dist/models/field.d.ts +32 -0
- package/dist/models/field.d.ts.map +1 -0
- package/dist/models/flow.d.ts +31 -0
- package/dist/models/flow.d.ts.map +1 -0
- package/dist/models/http.d.ts +46 -0
- package/dist/models/http.d.ts.map +1 -0
- package/dist/models/oauth-request.d.ts +24 -0
- package/dist/models/oauth-request.d.ts.map +1 -0
- package/dist/models/oauth-response.d.ts +19 -0
- package/dist/models/oauth-response.d.ts.map +1 -0
- package/dist/models/oidc-discovery.d.ts +370 -0
- package/dist/models/oidc-discovery.d.ts.map +1 -0
- package/dist/models/oidc-endpoints.d.ts +72 -0
- package/dist/models/oidc-endpoints.d.ts.map +1 -0
- package/dist/models/organization.d.ts +34 -0
- package/dist/models/organization.d.ts.map +1 -0
- package/dist/models/platforms.d.ts +38 -0
- package/dist/models/platforms.d.ts.map +1 -0
- package/dist/models/scim2-schema.d.ts +66 -0
- package/dist/models/scim2-schema.d.ts.map +1 -0
- package/dist/models/session.d.ts +32 -0
- package/dist/models/session.d.ts.map +1 -0
- package/dist/models/store.d.ts +84 -0
- package/dist/models/store.d.ts.map +1 -0
- package/dist/models/token-endpoint-auth.d.ts +30 -0
- package/dist/models/token-endpoint-auth.d.ts.map +1 -0
- package/dist/models/token.d.ts +181 -0
- package/dist/models/token.d.ts.map +1 -0
- package/dist/models/user.d.ts +34 -0
- package/dist/models/user.d.ts.map +1 -0
- package/dist/models/utility-types.d.ts +21 -0
- package/dist/models/utility-types.d.ts.map +1 -0
- package/dist/models/v2/embedded-flow-v2.d.ts +494 -0
- package/dist/models/v2/embedded-flow-v2.d.ts.map +1 -0
- package/dist/models/v2/embedded-recovery-flow-v2.d.ts +143 -0
- package/dist/models/v2/embedded-recovery-flow-v2.d.ts.map +1 -0
- package/dist/models/v2/embedded-signin-flow-v2.d.ts +340 -0
- package/dist/models/v2/embedded-signin-flow-v2.d.ts.map +1 -0
- package/dist/models/v2/embedded-signup-flow-v2.d.ts +272 -0
- package/dist/models/v2/embedded-signup-flow-v2.d.ts.map +1 -0
- package/dist/models/v2/extensions/components.d.ts +89 -0
- package/dist/models/v2/extensions/components.d.ts.map +1 -0
- package/dist/models/v2/flow-meta-v2.d.ts +299 -0
- package/dist/models/v2/flow-meta-v2.d.ts.map +1 -0
- package/dist/models/v2/organization-unit.d.ts +103 -0
- package/dist/models/v2/organization-unit.d.ts.map +1 -0
- package/dist/models/v2/translation.d.ts +35 -0
- package/dist/models/v2/translation.d.ts.map +1 -0
- package/dist/models/v2/vars.d.ts +36 -0
- package/dist/models/v2/vars.d.ts.map +1 -0
- package/dist/theme/createTheme.d.ts +23 -0
- package/dist/theme/createTheme.d.ts.map +1 -0
- package/dist/theme/types.d.ts +381 -0
- package/dist/theme/types.d.ts.map +1 -0
- package/dist/utils/arrayBufferToBase64url.d.ts +49 -0
- package/dist/utils/arrayBufferToBase64url.d.ts.map +1 -0
- package/dist/utils/base64Encode.d.ts +36 -0
- package/dist/utils/base64Encode.d.ts.map +1 -0
- package/dist/utils/base64urlToArrayBuffer.d.ts +56 -0
- package/dist/utils/base64urlToArrayBuffer.d.ts.map +1 -0
- package/dist/utils/bem.d.ts +47 -0
- package/dist/utils/bem.d.ts.map +1 -0
- package/dist/utils/deepMerge.d.ts +45 -0
- package/dist/utils/deepMerge.d.ts.map +1 -0
- package/dist/utils/deriveOrganizationHandleFromBaseUrl.d.ts +48 -0
- package/dist/utils/deriveOrganizationHandleFromBaseUrl.d.ts.map +1 -0
- package/dist/utils/extractPkceStorageKeyFromState.d.ts +33 -0
- package/dist/utils/extractPkceStorageKeyFromState.d.ts.map +1 -0
- package/dist/utils/extractTenantDomainFromIdTokenPayload.d.ts +32 -0
- package/dist/utils/extractTenantDomainFromIdTokenPayload.d.ts.map +1 -0
- package/dist/utils/extractUserClaimsFromIdToken.d.ts +47 -0
- package/dist/utils/extractUserClaimsFromIdToken.d.ts.map +1 -0
- package/dist/utils/flattenUserSchema.d.ts +65 -0
- package/dist/utils/flattenUserSchema.d.ts.map +1 -0
- package/dist/utils/formatDate.d.ts +34 -0
- package/dist/utils/formatDate.d.ts.map +1 -0
- package/dist/utils/generateFlattenedUserProfile.d.ts +54 -0
- package/dist/utils/generateFlattenedUserProfile.d.ts.map +1 -0
- package/dist/utils/generatePkceStorageKey.d.ts +35 -0
- package/dist/utils/generatePkceStorageKey.d.ts.map +1 -0
- package/dist/utils/generateStateParamForRequestCorrelation.d.ts +35 -0
- package/dist/utils/generateStateParamForRequestCorrelation.d.ts.map +1 -0
- package/dist/utils/generateUserProfile.d.ts +56 -0
- package/dist/utils/generateUserProfile.d.ts.map +1 -0
- package/dist/utils/get.d.ts +30 -0
- package/dist/utils/get.d.ts.map +1 -0
- package/dist/utils/getAuthorizeRequestUrlParams.d.ts +61 -0
- package/dist/utils/getAuthorizeRequestUrlParams.d.ts.map +1 -0
- package/dist/utils/getLatestStateParam.d.ts +41 -0
- package/dist/utils/getLatestStateParam.d.ts.map +1 -0
- package/dist/utils/getRedirectBasedSignUpUrl.d.ts +30 -0
- package/dist/utils/getRedirectBasedSignUpUrl.d.ts.map +1 -0
- package/dist/utils/identifyPlatform.d.ts +31 -0
- package/dist/utils/identifyPlatform.d.ts.map +1 -0
- package/dist/utils/isEmpty.d.ts +49 -0
- package/dist/utils/isEmpty.d.ts.map +1 -0
- package/dist/utils/isRecognizedBaseUrlPattern.d.ts +33 -0
- package/dist/utils/isRecognizedBaseUrlPattern.d.ts.map +1 -0
- package/dist/utils/logger.d.ts +143 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/parseApiErrorMessage.d.ts +29 -0
- package/dist/utils/parseApiErrorMessage.d.ts.map +1 -0
- package/dist/utils/processOpenIDScopes.d.ts +42 -0
- package/dist/utils/processOpenIDScopes.d.ts.map +1 -0
- package/dist/utils/processUsername.d.ts +74 -0
- package/dist/utils/processUsername.d.ts.map +1 -0
- package/dist/utils/removeTrailingSlash.d.ts +32 -0
- package/dist/utils/removeTrailingSlash.d.ts.map +1 -0
- package/dist/utils/resolveFieldName.d.ts +20 -0
- package/dist/utils/resolveFieldName.d.ts.map +1 -0
- package/dist/utils/resolveFieldType.d.ts +21 -0
- package/dist/utils/resolveFieldType.d.ts.map +1 -0
- package/dist/utils/set.d.ts +31 -0
- package/dist/utils/set.d.ts.map +1 -0
- package/dist/utils/transformBrandingPreferenceToTheme.d.ts +49 -0
- package/dist/utils/transformBrandingPreferenceToTheme.d.ts.map +1 -0
- package/dist/utils/v2/containsMetaFlowTemplateLiteral.d.ts +57 -0
- package/dist/utils/v2/containsMetaFlowTemplateLiteral.d.ts.map +1 -0
- package/dist/utils/v2/countryCodeToFlagEmoji.d.ts +26 -0
- package/dist/utils/v2/countryCodeToFlagEmoji.d.ts.map +1 -0
- package/dist/utils/v2/extractEmojiFromUri.d.ts +32 -0
- package/dist/utils/v2/extractEmojiFromUri.d.ts.map +1 -0
- package/dist/utils/v2/isEmojiUri.d.ts +34 -0
- package/dist/utils/v2/isEmojiUri.d.ts.map +1 -0
- package/dist/utils/v2/isMetaFlowTemplateLiteral.d.ts +45 -0
- package/dist/utils/v2/isMetaFlowTemplateLiteral.d.ts.map +1 -0
- package/dist/utils/v2/isTranslationFlowTemplateLiteral.d.ts +45 -0
- package/dist/utils/v2/isTranslationFlowTemplateLiteral.d.ts.map +1 -0
- package/dist/utils/v2/parseFlowTemplateLiteral.d.ts +96 -0
- package/dist/utils/v2/parseFlowTemplateLiteral.d.ts.map +1 -0
- package/dist/utils/v2/resolveFlowTemplateLiterals.d.ts +42 -0
- package/dist/utils/v2/resolveFlowTemplateLiterals.d.ts.map +1 -0
- package/dist/utils/v2/resolveLocaleDisplayName.d.ts +30 -0
- package/dist/utils/v2/resolveLocaleDisplayName.d.ts.map +1 -0
- package/dist/utils/v2/resolveLocaleEmoji.d.ts +31 -0
- package/dist/utils/v2/resolveLocaleEmoji.d.ts.map +1 -0
- package/dist/utils/v2/resolveMeta.d.ts +35 -0
- package/dist/utils/v2/resolveMeta.d.ts.map +1 -0
- package/dist/utils/withVendorCSSClassPrefix.d.ts +33 -0
- package/dist/utils/withVendorCSSClassPrefix.d.ts.map +1 -0
- package/package.json +65 -0
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
export interface ThemeTypography {
|
|
19
|
+
fontFamily: string;
|
|
20
|
+
fontSizes: {
|
|
21
|
+
'2xl': string;
|
|
22
|
+
'3xl': string;
|
|
23
|
+
lg: string;
|
|
24
|
+
md: string;
|
|
25
|
+
sm: string;
|
|
26
|
+
xl: string;
|
|
27
|
+
xs: string;
|
|
28
|
+
};
|
|
29
|
+
fontWeights: {
|
|
30
|
+
bold: number;
|
|
31
|
+
medium: number;
|
|
32
|
+
normal: number;
|
|
33
|
+
semibold: number;
|
|
34
|
+
};
|
|
35
|
+
lineHeights: {
|
|
36
|
+
normal: number;
|
|
37
|
+
relaxed: number;
|
|
38
|
+
tight: number;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export interface ThemeColors {
|
|
42
|
+
action: {
|
|
43
|
+
activatedOpacity: number;
|
|
44
|
+
active: string;
|
|
45
|
+
disabled: string;
|
|
46
|
+
disabledBackground: string;
|
|
47
|
+
disabledOpacity: number;
|
|
48
|
+
focus: string;
|
|
49
|
+
focusOpacity: number;
|
|
50
|
+
hover: string;
|
|
51
|
+
hoverOpacity: number;
|
|
52
|
+
selected: string;
|
|
53
|
+
selectedOpacity: number;
|
|
54
|
+
};
|
|
55
|
+
background: {
|
|
56
|
+
body: {
|
|
57
|
+
dark?: string;
|
|
58
|
+
main: string;
|
|
59
|
+
};
|
|
60
|
+
dark?: string;
|
|
61
|
+
disabled: string;
|
|
62
|
+
surface: string;
|
|
63
|
+
};
|
|
64
|
+
border: string;
|
|
65
|
+
error: {
|
|
66
|
+
contrastText: string;
|
|
67
|
+
dark?: string;
|
|
68
|
+
light?: string;
|
|
69
|
+
main: string;
|
|
70
|
+
};
|
|
71
|
+
info: {
|
|
72
|
+
contrastText: string;
|
|
73
|
+
dark?: string;
|
|
74
|
+
light?: string;
|
|
75
|
+
main: string;
|
|
76
|
+
};
|
|
77
|
+
primary: {
|
|
78
|
+
contrastText: string;
|
|
79
|
+
dark?: string;
|
|
80
|
+
main: string;
|
|
81
|
+
};
|
|
82
|
+
secondary: {
|
|
83
|
+
contrastText: string;
|
|
84
|
+
dark?: string;
|
|
85
|
+
light?: string;
|
|
86
|
+
main: string;
|
|
87
|
+
};
|
|
88
|
+
success: {
|
|
89
|
+
contrastText: string;
|
|
90
|
+
dark?: string;
|
|
91
|
+
light?: string;
|
|
92
|
+
main: string;
|
|
93
|
+
};
|
|
94
|
+
text: {
|
|
95
|
+
dark?: string;
|
|
96
|
+
primary: string;
|
|
97
|
+
secondary: string;
|
|
98
|
+
};
|
|
99
|
+
warning: {
|
|
100
|
+
contrastText: string;
|
|
101
|
+
dark?: string;
|
|
102
|
+
light?: string;
|
|
103
|
+
main: string;
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
export interface ThemeComponentStyleOverrides {
|
|
107
|
+
[slot: string]: Record<string, any> | undefined;
|
|
108
|
+
/**
|
|
109
|
+
* Style overrides for the root element or slots.
|
|
110
|
+
* Example: { root: { borderRadius: '8px' } }
|
|
111
|
+
*/
|
|
112
|
+
root?: Record<string, any>;
|
|
113
|
+
}
|
|
114
|
+
export interface ThemeComponents {
|
|
115
|
+
[componentName: string]: {
|
|
116
|
+
defaultProps?: Record<string, any>;
|
|
117
|
+
styleOverrides?: ThemeComponentStyleOverrides;
|
|
118
|
+
variants?: Record<string, any>[];
|
|
119
|
+
} | undefined;
|
|
120
|
+
Button?: {
|
|
121
|
+
defaultProps?: Record<string, any>;
|
|
122
|
+
styleOverrides?: {
|
|
123
|
+
[slot: string]: Record<string, any> | undefined;
|
|
124
|
+
root?: {
|
|
125
|
+
[key: string]: any;
|
|
126
|
+
borderRadius?: string;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
variants?: Record<string, any>[];
|
|
130
|
+
};
|
|
131
|
+
Field?: {
|
|
132
|
+
defaultProps?: Record<string, any>;
|
|
133
|
+
styleOverrides?: {
|
|
134
|
+
[slot: string]: Record<string, any> | undefined;
|
|
135
|
+
root?: {
|
|
136
|
+
[key: string]: any;
|
|
137
|
+
borderRadius?: string;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
variants?: Record<string, any>[];
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
export interface ThemeConfig {
|
|
144
|
+
borderRadius: {
|
|
145
|
+
large: string;
|
|
146
|
+
medium: string;
|
|
147
|
+
small: string;
|
|
148
|
+
};
|
|
149
|
+
colors: ThemeColors;
|
|
150
|
+
/**
|
|
151
|
+
* Component style overrides
|
|
152
|
+
*/
|
|
153
|
+
components?: ThemeComponents;
|
|
154
|
+
/**
|
|
155
|
+
* The prefix used for CSS variables.
|
|
156
|
+
* @default 'thunderid' (from VendorConstants.VENDOR_PREFIX)
|
|
157
|
+
*/
|
|
158
|
+
cssVarPrefix?: string;
|
|
159
|
+
/**
|
|
160
|
+
* The text direction for the UI.
|
|
161
|
+
* @default 'ltr'
|
|
162
|
+
*/
|
|
163
|
+
direction?: 'ltr' | 'rtl';
|
|
164
|
+
/**
|
|
165
|
+
* Image assets configuration
|
|
166
|
+
*/
|
|
167
|
+
images?: ThemeImages;
|
|
168
|
+
shadows: {
|
|
169
|
+
large: string;
|
|
170
|
+
medium: string;
|
|
171
|
+
small: string;
|
|
172
|
+
};
|
|
173
|
+
spacing: {
|
|
174
|
+
unit: number;
|
|
175
|
+
};
|
|
176
|
+
typography: {
|
|
177
|
+
fontFamily: string;
|
|
178
|
+
fontSizes: {
|
|
179
|
+
'2xl': string;
|
|
180
|
+
'3xl': string;
|
|
181
|
+
lg: string;
|
|
182
|
+
md: string;
|
|
183
|
+
sm: string;
|
|
184
|
+
xl: string;
|
|
185
|
+
xs: string;
|
|
186
|
+
};
|
|
187
|
+
fontWeights: {
|
|
188
|
+
bold: number;
|
|
189
|
+
medium: number;
|
|
190
|
+
normal: number;
|
|
191
|
+
semibold: number;
|
|
192
|
+
};
|
|
193
|
+
lineHeights: {
|
|
194
|
+
normal: number;
|
|
195
|
+
relaxed: number;
|
|
196
|
+
tight: number;
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
export interface ThemeComponentVars {
|
|
201
|
+
[componentName: string]: Record<string, Record<string, any> | undefined> | undefined;
|
|
202
|
+
Button?: {
|
|
203
|
+
[slot: string]: Record<string, any> | undefined;
|
|
204
|
+
root?: {
|
|
205
|
+
[key: string]: any;
|
|
206
|
+
borderRadius?: string;
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
Field?: {
|
|
210
|
+
[slot: string]: Record<string, any> | undefined;
|
|
211
|
+
root?: {
|
|
212
|
+
[key: string]: any;
|
|
213
|
+
borderRadius?: string;
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
export interface ThemeVars {
|
|
218
|
+
borderRadius: {
|
|
219
|
+
large: string;
|
|
220
|
+
medium: string;
|
|
221
|
+
small: string;
|
|
222
|
+
};
|
|
223
|
+
colors: {
|
|
224
|
+
action: {
|
|
225
|
+
activatedOpacity: string;
|
|
226
|
+
active: string;
|
|
227
|
+
disabled: string;
|
|
228
|
+
disabledBackground: string;
|
|
229
|
+
disabledOpacity: string;
|
|
230
|
+
focus: string;
|
|
231
|
+
focusOpacity: string;
|
|
232
|
+
hover: string;
|
|
233
|
+
hoverOpacity: string;
|
|
234
|
+
selected: string;
|
|
235
|
+
selectedOpacity: string;
|
|
236
|
+
};
|
|
237
|
+
background: {
|
|
238
|
+
body: {
|
|
239
|
+
dark?: string;
|
|
240
|
+
main: string;
|
|
241
|
+
};
|
|
242
|
+
dark?: string;
|
|
243
|
+
disabled: string;
|
|
244
|
+
surface: string;
|
|
245
|
+
};
|
|
246
|
+
border: string;
|
|
247
|
+
error: {
|
|
248
|
+
contrastText: string;
|
|
249
|
+
dark?: string;
|
|
250
|
+
main: string;
|
|
251
|
+
};
|
|
252
|
+
info: {
|
|
253
|
+
contrastText: string;
|
|
254
|
+
dark?: string;
|
|
255
|
+
main: string;
|
|
256
|
+
};
|
|
257
|
+
primary: {
|
|
258
|
+
contrastText: string;
|
|
259
|
+
dark?: string;
|
|
260
|
+
main: string;
|
|
261
|
+
};
|
|
262
|
+
secondary: {
|
|
263
|
+
contrastText: string;
|
|
264
|
+
dark?: string;
|
|
265
|
+
main: string;
|
|
266
|
+
};
|
|
267
|
+
success: {
|
|
268
|
+
contrastText: string;
|
|
269
|
+
dark?: string;
|
|
270
|
+
main: string;
|
|
271
|
+
};
|
|
272
|
+
text: {
|
|
273
|
+
dark?: string;
|
|
274
|
+
primary: string;
|
|
275
|
+
secondary: string;
|
|
276
|
+
};
|
|
277
|
+
warning: {
|
|
278
|
+
contrastText: string;
|
|
279
|
+
dark?: string;
|
|
280
|
+
main: string;
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
/**
|
|
284
|
+
* Component CSS variable references (e.g., for overrides)
|
|
285
|
+
*/
|
|
286
|
+
components?: ThemeComponentVars;
|
|
287
|
+
images?: {
|
|
288
|
+
[key: string]: {
|
|
289
|
+
alt?: string;
|
|
290
|
+
title?: string;
|
|
291
|
+
url?: string;
|
|
292
|
+
} | undefined;
|
|
293
|
+
favicon?: {
|
|
294
|
+
alt?: string;
|
|
295
|
+
title?: string;
|
|
296
|
+
url?: string;
|
|
297
|
+
};
|
|
298
|
+
logo?: {
|
|
299
|
+
alt?: string;
|
|
300
|
+
title?: string;
|
|
301
|
+
url?: string;
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
shadows: {
|
|
305
|
+
large: string;
|
|
306
|
+
medium: string;
|
|
307
|
+
small: string;
|
|
308
|
+
};
|
|
309
|
+
spacing: {
|
|
310
|
+
unit: string;
|
|
311
|
+
};
|
|
312
|
+
typography: {
|
|
313
|
+
fontFamily: string;
|
|
314
|
+
fontSizes: {
|
|
315
|
+
'2xl': string;
|
|
316
|
+
'3xl': string;
|
|
317
|
+
lg: string;
|
|
318
|
+
md: string;
|
|
319
|
+
sm: string;
|
|
320
|
+
xl: string;
|
|
321
|
+
xs: string;
|
|
322
|
+
};
|
|
323
|
+
fontWeights: {
|
|
324
|
+
bold: string;
|
|
325
|
+
medium: string;
|
|
326
|
+
normal: string;
|
|
327
|
+
semibold: string;
|
|
328
|
+
};
|
|
329
|
+
lineHeights: {
|
|
330
|
+
normal: string;
|
|
331
|
+
relaxed: string;
|
|
332
|
+
tight: string;
|
|
333
|
+
};
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
export interface Theme extends ThemeConfig {
|
|
337
|
+
cssVariables: Record<string, string>;
|
|
338
|
+
vars: ThemeVars;
|
|
339
|
+
}
|
|
340
|
+
export type ThemeMode = 'light' | 'dark' | 'system' | 'class';
|
|
341
|
+
export interface ThemeDetection {
|
|
342
|
+
/**
|
|
343
|
+
* The CSS class name to detect for dark mode (without the dot)
|
|
344
|
+
* @default 'dark'
|
|
345
|
+
*/
|
|
346
|
+
darkClass?: string;
|
|
347
|
+
/**
|
|
348
|
+
* The CSS class name to detect for light mode (without the dot)
|
|
349
|
+
* @default 'light'
|
|
350
|
+
*/
|
|
351
|
+
lightClass?: string;
|
|
352
|
+
}
|
|
353
|
+
export interface ThemeImage {
|
|
354
|
+
/**
|
|
355
|
+
* Alternative text for accessibility
|
|
356
|
+
*/
|
|
357
|
+
alt?: string;
|
|
358
|
+
/**
|
|
359
|
+
* The title/alt text for the image
|
|
360
|
+
*/
|
|
361
|
+
title?: string;
|
|
362
|
+
/**
|
|
363
|
+
* The URL of the image
|
|
364
|
+
*/
|
|
365
|
+
url?: string;
|
|
366
|
+
}
|
|
367
|
+
export interface ThemeImages {
|
|
368
|
+
/**
|
|
369
|
+
* Allow for additional custom images
|
|
370
|
+
*/
|
|
371
|
+
[key: string]: ThemeImage | undefined;
|
|
372
|
+
/**
|
|
373
|
+
* Favicon configuration
|
|
374
|
+
*/
|
|
375
|
+
favicon?: ThemeImage;
|
|
376
|
+
/**
|
|
377
|
+
* Logo configuration
|
|
378
|
+
*/
|
|
379
|
+
logo?: ThemeImage;
|
|
380
|
+
}
|
|
381
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/theme/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE;QACT,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,EAAE,EAAE,MAAM,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;KACZ,CAAC;IACF,WAAW,EAAE;QACX,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,WAAW,EAAE;QACX,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE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f,QAAQ,EAAE,MAAM,CAAC;SAClB,CAAC;QACF,WAAW,EAAE;YACX,MAAM,EAAE,MAAM,CAAC;YACf,OAAO,EAAE,MAAM,CAAC;YAChB,KAAK,EAAE,MAAM,CAAC;SACf,CAAC;KACH,CAAC;CACH;AAED,MAAM,WAAW,KAAM,SAAQ,WAAW;IACxC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE9D,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;IACtC;;OAEG;IACH,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB;;OAEG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Converts an ArrayBuffer to a base64url encoded string.
|
|
20
|
+
*
|
|
21
|
+
* Base64url encoding is a URL-safe variant of base64 encoding that:
|
|
22
|
+
* - Replaces '+' with '-'
|
|
23
|
+
* - Replaces '/' with '_'
|
|
24
|
+
* - Removes padding '=' characters
|
|
25
|
+
*
|
|
26
|
+
* This encoding is commonly used in JWT tokens, OAuth2 PKCE challenges,
|
|
27
|
+
* and other web standards where the encoded data needs to be safely
|
|
28
|
+
* transmitted in URLs or HTTP headers.
|
|
29
|
+
*
|
|
30
|
+
* @param buffer - The ArrayBuffer to convert to base64url string
|
|
31
|
+
* @returns The base64url encoded string representation of the input buffer
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```typescript
|
|
35
|
+
* const buffer = new TextEncoder().encode('Hello World');
|
|
36
|
+
* const encoded = arrayBufferToBase64url(buffer);
|
|
37
|
+
* console.log(encoded); // "SGVsbG8gV29ybGQ"
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```typescript
|
|
42
|
+
* // Converting crypto random bytes for PKCE challenge
|
|
43
|
+
* const randomBytes = crypto.getRandomValues(new Uint8Array(32));
|
|
44
|
+
* const codeVerifier = arrayBufferToBase64url(randomBytes.buffer);
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
declare const arrayBufferToBase64url: (buffer: ArrayBuffer) => string;
|
|
48
|
+
export default arrayBufferToBase64url;
|
|
49
|
+
//# sourceMappingURL=arrayBufferToBase64url.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrayBufferToBase64url.d.ts","sourceRoot":"","sources":["../../src/utils/arrayBufferToBase64url.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,QAAA,MAAM,sBAAsB,GAAI,QAAQ,WAAW,KAAG,MASrD,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Encodes a string to standard base64 using `jose` (already a package dependency).
|
|
20
|
+
*
|
|
21
|
+
* `jose.base64url.encode` is environment-agnostic (browser, Node.js, Deno, Bun,
|
|
22
|
+
* edge/service-worker runtimes). It produces base64url output, which is then
|
|
23
|
+
* converted to standard base64 by restoring the `+`/`/` characters and adding
|
|
24
|
+
* `=` padding.
|
|
25
|
+
*
|
|
26
|
+
* @param value - The UTF-8 string to encode.
|
|
27
|
+
* @returns The standard base64-encoded string (with `+`, `/`, and `=` padding).
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```typescript
|
|
31
|
+
* base64Encode('clientId:clientSecret'); // "Y2xpZW50SWQ6Y2xpZW50U2VjcmV0"
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
declare const base64Encode: (value: string) => string;
|
|
35
|
+
export default base64Encode;
|
|
36
|
+
//# sourceMappingURL=base64Encode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base64Encode.d.ts","sourceRoot":"","sources":["../../src/utils/base64Encode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,YAAY,GAAI,OAAO,MAAM,KAAG,MAMrC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Converts a base64url encoded string back to an ArrayBuffer.
|
|
20
|
+
*
|
|
21
|
+
* This function performs the inverse operation of base64url encoding by:
|
|
22
|
+
* - Replacing URL-safe characters: '-' becomes '+', '_' becomes '/'
|
|
23
|
+
* - Adding back padding '=' characters that were removed during base64url encoding
|
|
24
|
+
* - Decoding the resulting base64 string to binary data
|
|
25
|
+
* - Converting the binary data to an ArrayBuffer
|
|
26
|
+
*
|
|
27
|
+
* This is commonly used for decoding JWT tokens, OAuth2 PKCE code verifiers,
|
|
28
|
+
* and other cryptographic data that was encoded using base64url format.
|
|
29
|
+
*
|
|
30
|
+
* @param base64url - The base64url encoded string to decode
|
|
31
|
+
* @returns The ArrayBuffer containing the decoded binary data
|
|
32
|
+
*
|
|
33
|
+
* @throws {DOMException} Throws an error if the input string is not valid base64url
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```typescript
|
|
37
|
+
* const encoded = 'SGVsbG8gV29ybGQ';
|
|
38
|
+
* const buffer = base64urlToArrayBuffer(encoded);
|
|
39
|
+
* const text = new TextDecoder().decode(buffer);
|
|
40
|
+
* console.log(text); // "Hello World"
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```typescript
|
|
45
|
+
* // Decoding a JWT payload
|
|
46
|
+
* const jwtPayload = 'eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ';
|
|
47
|
+
* const payloadBuffer = base64urlToArrayBuffer(jwtPayload);
|
|
48
|
+
* const payloadJson = new TextDecoder().decode(payloadBuffer);
|
|
49
|
+
* const payload = JSON.parse(payloadJson);
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* @see {@link arrayBufferToBase64url} - The inverse function for encoding ArrayBuffer to base64url
|
|
53
|
+
*/
|
|
54
|
+
declare const base64urlToArrayBuffer: (base64url: string) => ArrayBuffer;
|
|
55
|
+
export default base64urlToArrayBuffer;
|
|
56
|
+
//# sourceMappingURL=base64urlToArrayBuffer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base64urlToArrayBuffer.d.ts","sourceRoot":"","sources":["../../src/utils/base64urlToArrayBuffer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,QAAA,MAAM,sBAAsB,GAAI,WAAW,MAAM,KAAG,WAYnD,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Creates a BEM-style class name by combining a base class with element and/or modifier
|
|
20
|
+
*
|
|
21
|
+
* @param baseClass - The base CSS class string (usually from emotion's css function)
|
|
22
|
+
* @param element - The BEM element name (optional)
|
|
23
|
+
* @param modifier - The BEM modifier name (optional)
|
|
24
|
+
* @returns The combined class name string
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* const baseClass = css`
|
|
29
|
+
* display: flex;
|
|
30
|
+
* &__element {
|
|
31
|
+
* color: red;
|
|
32
|
+
* }
|
|
33
|
+
* &--modifier {
|
|
34
|
+
* background: blue;
|
|
35
|
+
* }
|
|
36
|
+
* `;
|
|
37
|
+
*
|
|
38
|
+
* import bem from './utils/bem';
|
|
39
|
+
*
|
|
40
|
+
* const elementClass = bem(baseClass, 'element');
|
|
41
|
+
* const modifierClass = bem(baseClass, null, 'modifier');
|
|
42
|
+
* const elementWithModifierClass = bem(baseClass, 'element', 'modifier');
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
declare const bem: (baseClass: string, element?: string | null, modifier?: string | null) => string;
|
|
46
|
+
export default bem;
|
|
47
|
+
//# sourceMappingURL=bem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bem.d.ts","sourceRoot":"","sources":["../../src/utils/bem.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,QAAA,MAAM,GAAG,GAAI,WAAW,MAAM,EAAE,UAAU,MAAM,GAAG,IAAI,EAAE,WAAW,MAAM,GAAG,IAAI,KAAG,MAYnF,CAAC;AAEF,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Recursively merges the properties of source objects into a target object.
|
|
20
|
+
* Similar to Lodash's merge function, this creates a deep copy and merges
|
|
21
|
+
* nested objects recursively. Arrays and non-plain objects are replaced entirely.
|
|
22
|
+
*
|
|
23
|
+
* @param target - The target object to merge into
|
|
24
|
+
* @param sources - One or more source objects to merge from
|
|
25
|
+
* @returns A new object with merged properties
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```typescript
|
|
29
|
+
* const obj1 = { a: 1, b: { x: 1, y: 2 } };
|
|
30
|
+
* const obj2 = { b: { y: 3, z: 4 }, c: 3 };
|
|
31
|
+
* const result = deepMerge(obj1, obj2);
|
|
32
|
+
* // Result: { a: 1, b: { x: 1, y: 3, z: 4 }, c: 3 }
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```typescript
|
|
37
|
+
* const config = { theme: { colors: { primary: 'blue' } } };
|
|
38
|
+
* const userPrefs = { theme: { colors: { secondary: 'red' } } };
|
|
39
|
+
* const merged = deepMerge(config, userPrefs);
|
|
40
|
+
* // Result: { theme: { colors: { primary: 'blue', secondary: 'red' } } }
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
declare const deepMerge: <T extends Record<string, any>>(target: T, ...sources: (Record<string, any> | undefined | null)[]) => T;
|
|
44
|
+
export default deepMerge;
|
|
45
|
+
//# sourceMappingURL=deepMerge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deepMerge.d.ts","sourceRoot":"","sources":["../../src/utils/deepMerge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAgBH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,QAAA,MAAM,SAAS,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC9C,QAAQ,CAAC,EACT,GAAG,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC,EAAE,KACrD,CAyBF,CAAC;AAEF,eAAe,SAAS,CAAC"}
|