@asgardeo/react 0.12.0 → 0.13.2

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.
Files changed (39) hide show
  1. package/dist/api/createOrganization.d.ts +5 -1
  2. package/dist/api/getAllOrganizations.d.ts +5 -1
  3. package/dist/api/getMeOrganizations.d.ts +5 -1
  4. package/dist/api/getOrganization.d.ts +5 -1
  5. package/dist/api/getSchemas.d.ts +5 -1
  6. package/dist/api/getScim2Me.d.ts +5 -1
  7. package/dist/api/updateMeProfile.d.ts +5 -1
  8. package/dist/api/updateOrganization.d.ts +5 -1
  9. package/dist/cjs/index.js +2603 -2087
  10. package/dist/cjs/index.js.map +4 -4
  11. package/dist/components/actions/SignInButton/BaseSignInButton.d.ts +5 -1
  12. package/dist/components/actions/SignOutButton/BaseSignOutButton.d.ts +5 -1
  13. package/dist/components/actions/SignUpButton/BaseSignUpButton.d.ts +5 -1
  14. package/dist/components/presentation/UserDropdown/UserDropdown.d.ts +3 -0
  15. package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.d.ts +5 -0
  16. package/dist/components/presentation/auth/AuthOptionFactory.d.ts +14 -1
  17. package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.d.ts +5 -0
  18. package/dist/components/presentation/auth/SignIn/v2/BaseSignIn.d.ts +5 -1
  19. package/dist/components/presentation/auth/SignIn/v2/SignIn.d.ts +5 -1
  20. package/dist/{utils/v2/resolveTranslation.d.ts → components/primitives/Icons/ArrowLeftRight.d.ts} +11 -9
  21. package/dist/components/primitives/Icons/flowIconRegistry.d.ts +28 -0
  22. package/dist/components/primitives/Icons/index.d.ts +1 -0
  23. package/dist/contexts/Asgardeo/AsgardeoContext.d.ts +23 -1
  24. package/dist/contexts/FlowMeta/FlowMetaContext.d.ts +39 -0
  25. package/dist/contexts/FlowMeta/FlowMetaProvider.d.ts +50 -0
  26. package/dist/contexts/FlowMeta/useFlowMeta.d.ts +20 -0
  27. package/dist/contexts/I18n/I18nContext.d.ts +5 -0
  28. package/dist/contexts/Theme/ThemeProvider.d.ts +36 -39
  29. package/dist/contexts/Theme/v1/ThemeProvider.d.ts +88 -0
  30. package/dist/contexts/Theme/v2/ThemeProvider.d.ts +57 -0
  31. package/dist/index.js +2056 -1540
  32. package/dist/index.js.map +4 -4
  33. package/dist/utils/applyThemeToDOM.d.ts +24 -0
  34. package/dist/utils/normalizeThemeConfig.d.ts +30 -0
  35. package/dist/utils/v2/buildThemeConfigFromFlowMeta.d.ts +33 -0
  36. package/dist/utils/v2/flowTransformer.d.ts +3 -3
  37. package/dist/utils/v2/resolveTranslationsInArray.d.ts +4 -2
  38. package/dist/utils/v2/resolveTranslationsInObject.d.ts +5 -3
  39. package/package.json +6 -5
@@ -0,0 +1,57 @@
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
+ import { ThemeConfig, RecursivePartial } from '@asgardeo/browser';
19
+ import { FC, PropsWithChildren } from 'react';
20
+ export interface ThemeProviderProps {
21
+ /**
22
+ * Optional theme overrides merged on top of the server-side flow meta theme.
23
+ * User-supplied values take highest precedence.
24
+ */
25
+ theme?: RecursivePartial<ThemeConfig>;
26
+ }
27
+ /**
28
+ * ThemeProvider is the v2 drop-in replacement for `ThemeProvider`.
29
+ *
30
+ * It reads the design theme from the nearest `FlowMetaContext` (provided by
31
+ * `FlowMetaProvider`) and publishes a resolved `Theme` object through the
32
+ * **same** `ThemeContext` that `useTheme` consumes. This means all existing
33
+ * components that call `useTheme` continue to work without any changes.
34
+ *
35
+ * The `defaultColorScheme` field returned by the server is used to seed the
36
+ * active color scheme; the user can still toggle it locally via the
37
+ * `toggleTheme` value exposed in the context.
38
+ *
39
+ * @example
40
+ * ```tsx
41
+ * <FlowMetaProvider config={{ baseUrl, type: FlowMetaType.App, id: appId }}>
42
+ * <ThemeProvider>
43
+ * <App /> {/* useTheme() works here as usual *\/}
44
+ * </ThemeProvider>
45
+ * </FlowMetaProvider>
46
+ * ```
47
+ *
48
+ * @example
49
+ * With user theme overrides (user values win over server values):
50
+ * ```tsx
51
+ * <ThemeProvider theme={{ colors: { primary: { main: '#ff0000' } } }}>
52
+ * <App />
53
+ * </ThemeProvider>
54
+ * ```
55
+ */
56
+ declare const ThemeProvider: FC<PropsWithChildren<ThemeProviderProps>>;
57
+ export default ThemeProvider;