@thunderid/react 0.3.3 → 0.3.4

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 (255) hide show
  1. package/dist/ThunderIDReactClient.d.ts +1 -5
  2. package/dist/ThunderIDReactClient.d.ts.map +1 -1
  3. package/dist/ThunderIDReactClient.js +1 -68
  4. package/dist/ThunderIDReactClient.js.map +1 -1
  5. package/dist/cjs/ThunderIDReactClient.cjs +0 -67
  6. package/dist/cjs/ThunderIDReactClient.cjs.map +1 -1
  7. package/dist/cjs/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.cjs +1 -1
  8. package/dist/cjs/components/presentation/UserAvatar/BaseUserAvatar.cjs +57 -0
  9. package/dist/cjs/components/presentation/UserAvatar/BaseUserAvatar.cjs.map +1 -0
  10. package/dist/cjs/components/presentation/UserAvatar/UserAvatar.cjs +36 -0
  11. package/dist/cjs/components/presentation/UserAvatar/UserAvatar.cjs.map +1 -0
  12. package/dist/cjs/components/presentation/UserDropdown/BaseUserDropdown.cjs +6 -5
  13. package/dist/cjs/components/presentation/UserDropdown/BaseUserDropdown.cjs.map +1 -1
  14. package/dist/cjs/components/presentation/auth/AuthOptionFactory.cjs +3 -15
  15. package/dist/cjs/components/presentation/auth/AuthOptionFactory.cjs.map +1 -1
  16. package/dist/cjs/contexts/Theme/ThemeContext.cjs.map +1 -1
  17. package/dist/cjs/contexts/Theme/ThemeProvider.cjs +2 -5
  18. package/dist/cjs/contexts/Theme/ThemeProvider.cjs.map +1 -1
  19. package/dist/cjs/contexts/ThunderID/ThunderIDContext.cjs +0 -2
  20. package/dist/cjs/contexts/ThunderID/ThunderIDContext.cjs.map +1 -1
  21. package/dist/cjs/contexts/ThunderID/ThunderIDProvider.cjs +14 -90
  22. package/dist/cjs/contexts/ThunderID/ThunderIDProvider.cjs.map +1 -1
  23. package/dist/cjs/index.cjs +6 -51
  24. package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.js +1 -1
  25. package/dist/components/presentation/UserAvatar/BaseUserAvatar.d.ts +50 -0
  26. package/dist/components/presentation/UserAvatar/BaseUserAvatar.d.ts.map +1 -0
  27. package/dist/components/presentation/UserAvatar/BaseUserAvatar.js +55 -0
  28. package/dist/components/presentation/UserAvatar/BaseUserAvatar.js.map +1 -0
  29. package/dist/components/presentation/UserAvatar/UserAvatar.d.ts +46 -0
  30. package/dist/components/presentation/UserAvatar/UserAvatar.d.ts.map +1 -0
  31. package/dist/components/presentation/UserAvatar/UserAvatar.js +34 -0
  32. package/dist/components/presentation/UserAvatar/UserAvatar.js.map +1 -0
  33. package/dist/components/presentation/UserDropdown/BaseUserDropdown.d.ts.map +1 -1
  34. package/dist/components/presentation/UserDropdown/BaseUserDropdown.js +6 -5
  35. package/dist/components/presentation/UserDropdown/BaseUserDropdown.js.map +1 -1
  36. package/dist/components/presentation/auth/AuthOptionFactory.d.ts +2 -2
  37. package/dist/components/presentation/auth/AuthOptionFactory.d.ts.map +1 -1
  38. package/dist/components/presentation/auth/AuthOptionFactory.js +3 -15
  39. package/dist/components/presentation/auth/AuthOptionFactory.js.map +1 -1
  40. package/dist/contexts/Theme/ThemeContext.d.ts +0 -12
  41. package/dist/contexts/Theme/ThemeContext.d.ts.map +1 -1
  42. package/dist/contexts/Theme/ThemeContext.js.map +1 -1
  43. package/dist/contexts/Theme/ThemeProvider.d.ts +0 -4
  44. package/dist/contexts/Theme/ThemeProvider.d.ts.map +1 -1
  45. package/dist/contexts/Theme/ThemeProvider.js +2 -5
  46. package/dist/contexts/Theme/ThemeProvider.js.map +1 -1
  47. package/dist/contexts/ThunderID/ThunderIDContext.d.ts +2 -3
  48. package/dist/contexts/ThunderID/ThunderIDContext.d.ts.map +1 -1
  49. package/dist/contexts/ThunderID/ThunderIDContext.js +0 -2
  50. package/dist/contexts/ThunderID/ThunderIDContext.js.map +1 -1
  51. package/dist/contexts/ThunderID/ThunderIDProvider.d.ts.map +1 -1
  52. package/dist/contexts/ThunderID/ThunderIDProvider.js +15 -91
  53. package/dist/contexts/ThunderID/ThunderIDProvider.js.map +1 -1
  54. package/dist/index.d.ts +4 -40
  55. package/dist/index.d.ts.map +1 -1
  56. package/dist/index.js +5 -27
  57. package/package.json +2 -2
  58. package/dist/api/createOrganization.d.ts +0 -86
  59. package/dist/api/createOrganization.d.ts.map +0 -1
  60. package/dist/api/createOrganization.js +0 -80
  61. package/dist/api/createOrganization.js.map +0 -1
  62. package/dist/api/getAllOrganizations.d.ts +0 -78
  63. package/dist/api/getAllOrganizations.d.ts.map +0 -1
  64. package/dist/api/getAllOrganizations.js +0 -71
  65. package/dist/api/getAllOrganizations.js.map +0 -1
  66. package/dist/api/getMeOrganizations.d.ts +0 -82
  67. package/dist/api/getMeOrganizations.d.ts.map +0 -1
  68. package/dist/api/getMeOrganizations.js +0 -75
  69. package/dist/api/getMeOrganizations.js.map +0 -1
  70. package/dist/api/getOrganization.d.ts +0 -74
  71. package/dist/api/getOrganization.d.ts.map +0 -1
  72. package/dist/api/getOrganization.js +0 -67
  73. package/dist/api/getOrganization.js.map +0 -1
  74. package/dist/api/getSchemas.d.ts +0 -72
  75. package/dist/api/getSchemas.d.ts.map +0 -1
  76. package/dist/api/getSchemas.js +0 -65
  77. package/dist/api/getSchemas.js.map +0 -1
  78. package/dist/api/updateOrganization.d.ts +0 -81
  79. package/dist/api/updateOrganization.d.ts.map +0 -1
  80. package/dist/api/updateOrganization.js +0 -74
  81. package/dist/api/updateOrganization.js.map +0 -1
  82. package/dist/cjs/api/createOrganization.cjs +0 -82
  83. package/dist/cjs/api/createOrganization.cjs.map +0 -1
  84. package/dist/cjs/api/getAllOrganizations.cjs +0 -73
  85. package/dist/cjs/api/getAllOrganizations.cjs.map +0 -1
  86. package/dist/cjs/api/getMeOrganizations.cjs +0 -77
  87. package/dist/cjs/api/getMeOrganizations.cjs.map +0 -1
  88. package/dist/cjs/api/getOrganization.cjs +0 -69
  89. package/dist/cjs/api/getOrganization.cjs.map +0 -1
  90. package/dist/cjs/api/getSchemas.cjs +0 -67
  91. package/dist/cjs/api/getSchemas.cjs.map +0 -1
  92. package/dist/cjs/api/updateOrganization.cjs +0 -76
  93. package/dist/cjs/api/updateOrganization.cjs.map +0 -1
  94. package/dist/cjs/components/control/OrganizationContext/OrganizationContext.cjs +0 -34
  95. package/dist/cjs/components/control/OrganizationContext/OrganizationContext.cjs.map +0 -1
  96. package/dist/cjs/components/control/OrganizationContext/OrganizationContextController.cjs +0 -58
  97. package/dist/cjs/components/control/OrganizationContext/OrganizationContextController.cjs.map +0 -1
  98. package/dist/cjs/components/presentation/CreateOrganization/BaseCreateOrganization.cjs +0 -183
  99. package/dist/cjs/components/presentation/CreateOrganization/BaseCreateOrganization.cjs.map +0 -1
  100. package/dist/cjs/components/presentation/CreateOrganization/BaseCreateOrganization.styles.cjs +0 -150
  101. package/dist/cjs/components/presentation/CreateOrganization/BaseCreateOrganization.styles.cjs.map +0 -1
  102. package/dist/cjs/components/presentation/CreateOrganization/CreateOrganization.cjs +0 -90
  103. package/dist/cjs/components/presentation/CreateOrganization/CreateOrganization.cjs.map +0 -1
  104. package/dist/cjs/components/presentation/Organization/BaseOrganization.cjs +0 -41
  105. package/dist/cjs/components/presentation/Organization/BaseOrganization.cjs.map +0 -1
  106. package/dist/cjs/components/presentation/Organization/Organization.cjs +0 -49
  107. package/dist/cjs/components/presentation/Organization/Organization.cjs.map +0 -1
  108. package/dist/cjs/components/presentation/OrganizationList/BaseOrganizationList.cjs +0 -257
  109. package/dist/cjs/components/presentation/OrganizationList/BaseOrganizationList.cjs.map +0 -1
  110. package/dist/cjs/components/presentation/OrganizationList/BaseOrganizationList.styles.cjs +0 -236
  111. package/dist/cjs/components/presentation/OrganizationList/BaseOrganizationList.styles.cjs.map +0 -1
  112. package/dist/cjs/components/presentation/OrganizationList/OrganizationList.cjs +0 -86
  113. package/dist/cjs/components/presentation/OrganizationList/OrganizationList.cjs.map +0 -1
  114. package/dist/cjs/components/presentation/OrganizationList/OrganizationList.styles.cjs +0 -75
  115. package/dist/cjs/components/presentation/OrganizationList/OrganizationList.styles.cjs.map +0 -1
  116. package/dist/cjs/components/presentation/OrganizationProfile/BaseOrganizationProfile.cjs +0 -328
  117. package/dist/cjs/components/presentation/OrganizationProfile/BaseOrganizationProfile.cjs.map +0 -1
  118. package/dist/cjs/components/presentation/OrganizationProfile/BaseOrganizationProfile.styles.cjs +0 -166
  119. package/dist/cjs/components/presentation/OrganizationProfile/BaseOrganizationProfile.styles.cjs.map +0 -1
  120. package/dist/cjs/components/presentation/OrganizationProfile/OrganizationProfile.cjs +0 -126
  121. package/dist/cjs/components/presentation/OrganizationProfile/OrganizationProfile.cjs.map +0 -1
  122. package/dist/cjs/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.cjs +0 -288
  123. package/dist/cjs/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.cjs.map +0 -1
  124. package/dist/cjs/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.styles.cjs +0 -237
  125. package/dist/cjs/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.styles.cjs.map +0 -1
  126. package/dist/cjs/components/presentation/OrganizationSwitcher/OrganizationSwitcher.cjs +0 -127
  127. package/dist/cjs/components/presentation/OrganizationSwitcher/OrganizationSwitcher.cjs.map +0 -1
  128. package/dist/cjs/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.cjs +0 -183
  129. package/dist/cjs/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.cjs.map +0 -1
  130. package/dist/cjs/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.styles.cjs +0 -128
  131. package/dist/cjs/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.styles.cjs.map +0 -1
  132. package/dist/cjs/components/primitives/Icons/Building.cjs +0 -75
  133. package/dist/cjs/components/primitives/Icons/Building.cjs.map +0 -1
  134. package/dist/cjs/contexts/Branding/BrandingContext.cjs +0 -12
  135. package/dist/cjs/contexts/Branding/BrandingContext.cjs.map +0 -1
  136. package/dist/cjs/contexts/Branding/BrandingProvider.cjs +0 -96
  137. package/dist/cjs/contexts/Branding/BrandingProvider.cjs.map +0 -1
  138. package/dist/cjs/contexts/Branding/useBrandingContext.cjs +0 -40
  139. package/dist/cjs/contexts/Branding/useBrandingContext.cjs.map +0 -1
  140. package/dist/cjs/contexts/Organization/OrganizationContext.cjs +0 -27
  141. package/dist/cjs/contexts/Organization/OrganizationContext.cjs.map +0 -1
  142. package/dist/cjs/contexts/Organization/OrganizationProvider.cjs +0 -97
  143. package/dist/cjs/contexts/Organization/OrganizationProvider.cjs.map +0 -1
  144. package/dist/cjs/contexts/Organization/useOrganization.cjs +0 -100
  145. package/dist/cjs/contexts/Organization/useOrganization.cjs.map +0 -1
  146. package/dist/cjs/hooks/useBranding.cjs +0 -71
  147. package/dist/cjs/hooks/useBranding.cjs.map +0 -1
  148. package/dist/components/control/OrganizationContext/OrganizationContext.d.ts +0 -40
  149. package/dist/components/control/OrganizationContext/OrganizationContext.d.ts.map +0 -1
  150. package/dist/components/control/OrganizationContext/OrganizationContext.js +0 -32
  151. package/dist/components/control/OrganizationContext/OrganizationContext.js.map +0 -1
  152. package/dist/components/control/OrganizationContext/OrganizationContextController.d.ts +0 -35
  153. package/dist/components/control/OrganizationContext/OrganizationContextController.d.ts.map +0 -1
  154. package/dist/components/control/OrganizationContext/OrganizationContextController.js +0 -55
  155. package/dist/components/control/OrganizationContext/OrganizationContextController.js.map +0 -1
  156. package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.d.ts +0 -60
  157. package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.d.ts.map +0 -1
  158. package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.js +0 -178
  159. package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.js.map +0 -1
  160. package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.styles.d.ts +0 -27
  161. package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.styles.d.ts.map +0 -1
  162. package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.styles.js +0 -147
  163. package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.styles.js.map +0 -1
  164. package/dist/components/presentation/CreateOrganization/CreateOrganization.d.ts +0 -68
  165. package/dist/components/presentation/CreateOrganization/CreateOrganization.d.ts.map +0 -1
  166. package/dist/components/presentation/CreateOrganization/CreateOrganization.js +0 -87
  167. package/dist/components/presentation/CreateOrganization/CreateOrganization.js.map +0 -1
  168. package/dist/components/presentation/Organization/BaseOrganization.d.ts +0 -67
  169. package/dist/components/presentation/Organization/BaseOrganization.d.ts.map +0 -1
  170. package/dist/components/presentation/Organization/BaseOrganization.js +0 -39
  171. package/dist/components/presentation/Organization/BaseOrganization.js.map +0 -1
  172. package/dist/components/presentation/Organization/Organization.d.ts +0 -67
  173. package/dist/components/presentation/Organization/Organization.d.ts.map +0 -1
  174. package/dist/components/presentation/Organization/Organization.js +0 -47
  175. package/dist/components/presentation/Organization/Organization.js.map +0 -1
  176. package/dist/components/presentation/OrganizationList/BaseOrganizationList.d.ts +0 -135
  177. package/dist/components/presentation/OrganizationList/BaseOrganizationList.d.ts.map +0 -1
  178. package/dist/components/presentation/OrganizationList/BaseOrganizationList.js +0 -252
  179. package/dist/components/presentation/OrganizationList/BaseOrganizationList.js.map +0 -1
  180. package/dist/components/presentation/OrganizationList/BaseOrganizationList.styles.d.ts +0 -27
  181. package/dist/components/presentation/OrganizationList/BaseOrganizationList.styles.d.ts.map +0 -1
  182. package/dist/components/presentation/OrganizationList/BaseOrganizationList.styles.js +0 -233
  183. package/dist/components/presentation/OrganizationList/BaseOrganizationList.styles.js.map +0 -1
  184. package/dist/components/presentation/OrganizationList/OrganizationList.d.ts +0 -93
  185. package/dist/components/presentation/OrganizationList/OrganizationList.d.ts.map +0 -1
  186. package/dist/components/presentation/OrganizationList/OrganizationList.js +0 -82
  187. package/dist/components/presentation/OrganizationList/OrganizationList.js.map +0 -1
  188. package/dist/components/presentation/OrganizationList/OrganizationList.styles.d.ts +0 -27
  189. package/dist/components/presentation/OrganizationList/OrganizationList.styles.d.ts.map +0 -1
  190. package/dist/components/presentation/OrganizationList/OrganizationList.styles.js +0 -72
  191. package/dist/components/presentation/OrganizationList/OrganizationList.styles.js.map +0 -1
  192. package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.d.ts +0 -160
  193. package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.d.ts.map +0 -1
  194. package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.js +0 -323
  195. package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.js.map +0 -1
  196. package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.styles.d.ts +0 -27
  197. package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.styles.d.ts.map +0 -1
  198. package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.styles.js +0 -163
  199. package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.styles.js.map +0 -1
  200. package/dist/components/presentation/OrganizationProfile/OrganizationProfile.d.ts +0 -120
  201. package/dist/components/presentation/OrganizationProfile/OrganizationProfile.d.ts.map +0 -1
  202. package/dist/components/presentation/OrganizationProfile/OrganizationProfile.js +0 -122
  203. package/dist/components/presentation/OrganizationProfile/OrganizationProfile.js.map +0 -1
  204. package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.d.ts +0 -149
  205. package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.d.ts.map +0 -1
  206. package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.js +0 -282
  207. package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.js.map +0 -1
  208. package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.styles.d.ts +0 -27
  209. package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.styles.d.ts.map +0 -1
  210. package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.styles.js +0 -234
  211. package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.styles.js.map +0 -1
  212. package/dist/components/presentation/OrganizationSwitcher/OrganizationSwitcher.d.ts +0 -71
  213. package/dist/components/presentation/OrganizationSwitcher/OrganizationSwitcher.d.ts.map +0 -1
  214. package/dist/components/presentation/OrganizationSwitcher/OrganizationSwitcher.js +0 -124
  215. package/dist/components/presentation/OrganizationSwitcher/OrganizationSwitcher.js.map +0 -1
  216. package/dist/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.d.ts +0 -30
  217. package/dist/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.d.ts.map +0 -1
  218. package/dist/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.js +0 -179
  219. package/dist/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.js.map +0 -1
  220. package/dist/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.styles.d.ts +0 -21
  221. package/dist/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.styles.d.ts.map +0 -1
  222. package/dist/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.styles.js +0 -125
  223. package/dist/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.styles.js.map +0 -1
  224. package/dist/components/presentation/auth/OrganizationUnitPicker/index.d.ts +0 -20
  225. package/dist/components/presentation/auth/OrganizationUnitPicker/index.d.ts.map +0 -1
  226. package/dist/components/primitives/Icons/Building.js +0 -73
  227. package/dist/components/primitives/Icons/Building.js.map +0 -1
  228. package/dist/contexts/Branding/BrandingContext.d.ts +0 -53
  229. package/dist/contexts/Branding/BrandingContext.d.ts.map +0 -1
  230. package/dist/contexts/Branding/BrandingContext.js +0 -10
  231. package/dist/contexts/Branding/BrandingContext.js.map +0 -1
  232. package/dist/contexts/Branding/BrandingProvider.d.ts +0 -89
  233. package/dist/contexts/Branding/BrandingProvider.d.ts.map +0 -1
  234. package/dist/contexts/Branding/BrandingProvider.js +0 -92
  235. package/dist/contexts/Branding/BrandingProvider.js.map +0 -1
  236. package/dist/contexts/Branding/useBrandingContext.d.ts +0 -45
  237. package/dist/contexts/Branding/useBrandingContext.d.ts.map +0 -1
  238. package/dist/contexts/Branding/useBrandingContext.js +0 -38
  239. package/dist/contexts/Branding/useBrandingContext.js.map +0 -1
  240. package/dist/contexts/Organization/OrganizationContext.d.ts +0 -41
  241. package/dist/contexts/Organization/OrganizationContext.d.ts.map +0 -1
  242. package/dist/contexts/Organization/OrganizationContext.js +0 -25
  243. package/dist/contexts/Organization/OrganizationContext.js.map +0 -1
  244. package/dist/contexts/Organization/OrganizationProvider.d.ts +0 -94
  245. package/dist/contexts/Organization/OrganizationProvider.d.ts.map +0 -1
  246. package/dist/contexts/Organization/OrganizationProvider.js +0 -93
  247. package/dist/contexts/Organization/OrganizationProvider.js.map +0 -1
  248. package/dist/contexts/Organization/useOrganization.d.ts +0 -105
  249. package/dist/contexts/Organization/useOrganization.d.ts.map +0 -1
  250. package/dist/contexts/Organization/useOrganization.js +0 -98
  251. package/dist/contexts/Organization/useOrganization.js.map +0 -1
  252. package/dist/hooks/useBranding.d.ts +0 -128
  253. package/dist/hooks/useBranding.d.ts.map +0 -1
  254. package/dist/hooks/useBranding.js +0 -69
  255. package/dist/hooks/useBranding.js.map +0 -1
@@ -1,73 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
-
3
- //#region src/components/primitives/Icons/Building.tsx
4
- /**
5
- * Building Icon component.
6
- *
7
- * @param props - Props injected to the component.
8
- * @returns Building Icon component.
9
- */
10
- const Building = ({ color = "currentColor", height = 24, width = 24 }) => /* @__PURE__ */ jsxs("svg", {
11
- width,
12
- height,
13
- viewBox: "0 0 24 24",
14
- fill: "none",
15
- xmlns: "http://www.w3.org/2000/svg",
16
- children: [
17
- /* @__PURE__ */ jsx("path", {
18
- d: "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",
19
- stroke: color,
20
- strokeWidth: "2",
21
- strokeLinecap: "round",
22
- strokeLinejoin: "round"
23
- }),
24
- /* @__PURE__ */ jsx("path", {
25
- d: "M6 12h4",
26
- stroke: color,
27
- strokeWidth: "2",
28
- strokeLinecap: "round",
29
- strokeLinejoin: "round"
30
- }),
31
- /* @__PURE__ */ jsx("path", {
32
- d: "M6 8h4",
33
- stroke: color,
34
- strokeWidth: "2",
35
- strokeLinecap: "round",
36
- strokeLinejoin: "round"
37
- }),
38
- /* @__PURE__ */ jsx("path", {
39
- d: "M14 8h4",
40
- stroke: color,
41
- strokeWidth: "2",
42
- strokeLinecap: "round",
43
- strokeLinejoin: "round"
44
- }),
45
- /* @__PURE__ */ jsx("path", {
46
- d: "M14 12h4",
47
- stroke: color,
48
- strokeWidth: "2",
49
- strokeLinecap: "round",
50
- strokeLinejoin: "round"
51
- }),
52
- /* @__PURE__ */ jsx("path", {
53
- d: "M6 18h4",
54
- stroke: color,
55
- strokeWidth: "2",
56
- strokeLinecap: "round",
57
- strokeLinejoin: "round"
58
- }),
59
- /* @__PURE__ */ jsx("path", {
60
- d: "M14 18h4",
61
- stroke: color,
62
- strokeWidth: "2",
63
- strokeLinecap: "round",
64
- strokeLinejoin: "round"
65
- })
66
- ]
67
- });
68
- Building.displayName = "Building";
69
- var Building_default = Building;
70
-
71
- //#endregion
72
- export { Building_default as default };
73
- //# sourceMappingURL=Building.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Building.js","names":["Building: FC<BuildingProps>"],"sources":["../../../../src/components/primitives/Icons/Building.tsx"],"sourcesContent":["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FC} from 'react';\n\nexport interface BuildingProps {\n /**\n * Color of the icon.\n */\n color?: string;\n /**\n * Height of the icon.\n */\n height?: number | string;\n /**\n * Width of the icon.\n */\n width?: number | string;\n}\n\n/**\n * Building Icon component.\n *\n * @param props - Props injected to the component.\n * @returns Building Icon component.\n */\nconst Building: FC<BuildingProps> = ({color = 'currentColor', height = 24, width = 24}: BuildingProps) => (\n <svg width={width} height={height} viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z\"\n stroke={color}\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <path d=\"M6 12h4\" stroke={color} strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n <path d=\"M6 8h4\" stroke={color} strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n <path d=\"M14 8h4\" stroke={color} strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n <path d=\"M14 12h4\" stroke={color} strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n <path d=\"M6 18h4\" stroke={color} strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n <path d=\"M14 18h4\" stroke={color} strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n);\n\nBuilding.displayName = 'Building';\n\nexport default Building;\n"],"mappings":";;;;;;;;;AAyCA,MAAMA,YAA+B,EAAC,QAAQ,gBAAgB,SAAS,IAAI,QAAQ,SACjF,qBAAC;CAAW;CAAe;CAAQ,SAAQ;CAAY,MAAK;CAAO,OAAM;;EACvE,oBAAC;GACC,GAAE;GACF,QAAQ;GACR,aAAY;GACZ,eAAc;GACd,gBAAe;IACf;EACF,oBAAC;GAAK,GAAE;GAAU,QAAQ;GAAO,aAAY;GAAI,eAAc;GAAQ,gBAAe;IAAU;EAChG,oBAAC;GAAK,GAAE;GAAS,QAAQ;GAAO,aAAY;GAAI,eAAc;GAAQ,gBAAe;IAAU;EAC/F,oBAAC;GAAK,GAAE;GAAU,QAAQ;GAAO,aAAY;GAAI,eAAc;GAAQ,gBAAe;IAAU;EAChG,oBAAC;GAAK,GAAE;GAAW,QAAQ;GAAO,aAAY;GAAI,eAAc;GAAQ,gBAAe;IAAU;EACjG,oBAAC;GAAK,GAAE;GAAU,QAAQ;GAAO,aAAY;GAAI,eAAc;GAAQ,gBAAe;IAAU;EAChG,oBAAC;GAAK,GAAE;GAAW,QAAQ;GAAO,aAAY;GAAI,eAAc;GAAQ,gBAAe;IAAU;;EAC7F;AAGR,SAAS,cAAc;AAEvB,uBAAe"}
@@ -1,53 +0,0 @@
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
- import { BrandingPreference, Theme } from '@thunderid/browser';
19
- import { Context } from 'react';
20
- export interface BrandingContextValue {
21
- /**
22
- * The active theme mode from branding preference ('light' | 'dark')
23
- */
24
- activeTheme: 'light' | 'dark' | null;
25
- /**
26
- * The raw branding preference data
27
- */
28
- brandingPreference: BrandingPreference | null;
29
- /**
30
- * Error state
31
- */
32
- error: Error | null;
33
- /**
34
- * Function to manually fetch branding preference
35
- */
36
- fetchBranding: () => Promise<void>;
37
- /**
38
- * Loading state
39
- */
40
- isLoading: boolean;
41
- /**
42
- * Function to refetch branding preference
43
- * This bypasses the single-call restriction and forces a new API call
44
- */
45
- refetch: () => Promise<void>;
46
- /**
47
- * The transformed theme object
48
- */
49
- theme: Theme | null;
50
- }
51
- declare const BrandingContext: Context<BrandingContextValue | null>;
52
- export default BrandingContext;
53
- //# sourceMappingURL=BrandingContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BrandingContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/Branding/BrandingContext.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,kBAAkB,EAAE,KAAK,EAAC,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAC,OAAO,EAAgB,MAAM,OAAO,CAAC;AAE7C,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,WAAW,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAAC;IACrC;;OAEG;IACH,kBAAkB,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAC9C;;OAEG;IACH,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,aAAa,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B;;OAEG;IACH,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB;AAED,QAAA,MAAM,eAAe,EAAE,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAoD,CAAC;AAI/G,eAAe,eAAe,CAAC"}
@@ -1,10 +0,0 @@
1
- import { createContext } from "react";
2
-
3
- //#region src/contexts/Branding/BrandingContext.ts
4
- const BrandingContext = createContext(null);
5
- BrandingContext.displayName = "BrandingContext";
6
- var BrandingContext_default = BrandingContext;
7
-
8
- //#endregion
9
- export { BrandingContext_default as default };
10
- //# sourceMappingURL=BrandingContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BrandingContext.js","names":["BrandingContext: Context<BrandingContextValue | null>"],"sources":["../../../src/contexts/Branding/BrandingContext.ts"],"sourcesContent":["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {BrandingPreference, Theme} from '@thunderid/browser';\nimport {Context, createContext} from 'react';\n\nexport interface BrandingContextValue {\n /**\n * The active theme mode from branding preference ('light' | 'dark')\n */\n activeTheme: 'light' | 'dark' | null;\n /**\n * The raw branding preference data\n */\n brandingPreference: BrandingPreference | null;\n /**\n * Error state\n */\n error: Error | null;\n /**\n * Function to manually fetch branding preference\n */\n fetchBranding: () => Promise<void>;\n /**\n * Loading state\n */\n isLoading: boolean;\n /**\n * Function to refetch branding preference\n * This bypasses the single-call restriction and forces a new API call\n */\n refetch: () => Promise<void>;\n /**\n * The transformed theme object\n */\n theme: Theme | null;\n}\n\nconst BrandingContext: Context<BrandingContextValue | null> = createContext<BrandingContextValue | null>(null);\n\nBrandingContext.displayName = 'BrandingContext';\n\nexport default BrandingContext;\n"],"mappings":";;;AAqDA,MAAMA,kBAAwD,cAA2C,KAAK;AAE9G,gBAAgB,cAAc;AAE9B,8BAAe"}
@@ -1,89 +0,0 @@
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
- import { BrandingPreference } from '@thunderid/browser';
19
- import { FC, PropsWithChildren } from 'react';
20
- /**
21
- * Configuration options for the BrandingProvider
22
- */
23
- export interface BrandingProviderProps {
24
- /**
25
- * The branding preference data passed from parent (typically ThunderIDProvider)
26
- */
27
- brandingPreference?: BrandingPreference | null;
28
- /**
29
- * Whether the branding provider is enabled
30
- * @default true
31
- */
32
- enabled?: boolean;
33
- /**
34
- * Error state passed from parent
35
- */
36
- error?: Error | null;
37
- /**
38
- * Force a specific theme ('light' or 'dark')
39
- * If not provided, will use the activeTheme from branding preference
40
- */
41
- forceTheme?: 'light' | 'dark';
42
- /**
43
- * Loading state passed from parent
44
- */
45
- isLoading?: boolean;
46
- /**
47
- * Function to refetch branding preference passed from parent
48
- */
49
- refetch?: () => Promise<void>;
50
- }
51
- /**
52
- * BrandingProvider component that manages branding state and provides branding context to child components.
53
- *
54
- * This provider receives branding preferences from a parent component (typically ThunderIDProvider)
55
- * and transforms them into theme objects, making them available to all child components.
56
- *
57
- * Features:
58
- * - Receives branding preferences as props
59
- * - Theme transformation from branding preferences
60
- * - Loading and error states
61
- * - Support for custom theme forcing
62
- *
63
- * @example
64
- * Basic usage (typically used within ThunderIDProvider):
65
- * ```tsx
66
- * <BrandingProvider
67
- * brandingPreference={brandingData}
68
- * isLoading={isFetching}
69
- * error={fetchError}
70
- * >
71
- * <App />
72
- * </BrandingProvider>
73
- * ```
74
- *
75
- * @example
76
- * With custom theme forcing:
77
- * ```tsx
78
- * <BrandingProvider
79
- * brandingPreference={brandingData}
80
- * forceTheme="dark"
81
- * enabled={true}
82
- * >
83
- * <App />
84
- * </BrandingProvider>
85
- * ```
86
- */
87
- declare const BrandingProvider: FC<PropsWithChildren<BrandingProviderProps>>;
88
- export default BrandingProvider;
89
- //# sourceMappingURL=BrandingProvider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BrandingProvider.d.ts","sourceRoot":"","sources":["../../../src/contexts/Branding/BrandingProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,kBAAkB,EAA4C,MAAM,oBAAoB,CAAC;AACjG,OAAO,EAAC,EAAE,EAAE,iBAAiB,EAAiD,MAAM,OAAO,CAAC;AAG5F;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAC/C;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC9B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,QAAA,MAAM,gBAAgB,EAAE,EAAE,CAAC,iBAAiB,CAAC,qBAAqB,CAAC,CAiElE,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -1,92 +0,0 @@
1
- import BrandingContext_default from "./BrandingContext.js";
2
- import { transformBrandingPreferenceToTheme } from "@thunderid/browser";
3
- import { useCallback, useEffect, useState } from "react";
4
- import { jsx } from "react/jsx-runtime";
5
-
6
- //#region src/contexts/Branding/BrandingProvider.tsx
7
- /**
8
- * BrandingProvider component that manages branding state and provides branding context to child components.
9
- *
10
- * This provider receives branding preferences from a parent component (typically ThunderIDProvider)
11
- * and transforms them into theme objects, making them available to all child components.
12
- *
13
- * Features:
14
- * - Receives branding preferences as props
15
- * - Theme transformation from branding preferences
16
- * - Loading and error states
17
- * - Support for custom theme forcing
18
- *
19
- * @example
20
- * Basic usage (typically used within ThunderIDProvider):
21
- * ```tsx
22
- * <BrandingProvider
23
- * brandingPreference={brandingData}
24
- * isLoading={isFetching}
25
- * error={fetchError}
26
- * >
27
- * <App />
28
- * </BrandingProvider>
29
- * ```
30
- *
31
- * @example
32
- * With custom theme forcing:
33
- * ```tsx
34
- * <BrandingProvider
35
- * brandingPreference={brandingData}
36
- * forceTheme="dark"
37
- * enabled={true}
38
- * >
39
- * <App />
40
- * </BrandingProvider>
41
- * ```
42
- */
43
- const BrandingProvider = ({ children, brandingPreference: externalBrandingPreference, forceTheme, enabled = true, isLoading: externalIsLoading = false, error: externalError = null, refetch: externalRefetch }) => {
44
- const [theme, setTheme] = useState(null);
45
- const [activeTheme, setActiveTheme] = useState(null);
46
- useEffect(() => {
47
- if (!enabled || !externalBrandingPreference) {
48
- setTheme(null);
49
- setActiveTheme(null);
50
- return;
51
- }
52
- const activeThemeFromBranding = externalBrandingPreference?.preference?.theme?.activeTheme;
53
- let extractedActiveTheme = null;
54
- if (activeThemeFromBranding) {
55
- const themeMode = activeThemeFromBranding.toLowerCase();
56
- if (themeMode === "light" || themeMode === "dark") extractedActiveTheme = themeMode;
57
- }
58
- setActiveTheme(extractedActiveTheme);
59
- setTheme(transformBrandingPreferenceToTheme(externalBrandingPreference, forceTheme));
60
- }, [
61
- externalBrandingPreference,
62
- forceTheme,
63
- enabled
64
- ]);
65
- useEffect(() => {
66
- if (!enabled) {
67
- setTheme(null);
68
- setActiveTheme(null);
69
- }
70
- }, [enabled]);
71
- const fetchBranding = useCallback(async () => {
72
- if (externalRefetch) await externalRefetch();
73
- }, [externalRefetch]);
74
- const value = {
75
- activeTheme,
76
- brandingPreference: externalBrandingPreference || null,
77
- error: externalError,
78
- fetchBranding,
79
- isLoading: externalIsLoading,
80
- refetch: externalRefetch || fetchBranding,
81
- theme
82
- };
83
- return /* @__PURE__ */ jsx(BrandingContext_default.Provider, {
84
- value,
85
- children
86
- });
87
- };
88
- var BrandingProvider_default = BrandingProvider;
89
-
90
- //#endregion
91
- export { BrandingProvider_default as default };
92
- //# sourceMappingURL=BrandingProvider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BrandingProvider.js","names":["BrandingProvider: FC<PropsWithChildren<BrandingProviderProps>>","activeThemeFromBranding: string | undefined","extractedActiveTheme: 'light' | 'dark' | null","themeMode: string","fetchBranding: () => Promise<void>","value: any","BrandingContext"],"sources":["../../../src/contexts/Branding/BrandingProvider.tsx"],"sourcesContent":["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {BrandingPreference, Theme, transformBrandingPreferenceToTheme} from '@thunderid/browser';\nimport {FC, PropsWithChildren, ReactElement, useCallback, useEffect, useState} from 'react';\nimport BrandingContext from './BrandingContext';\n\n/**\n * Configuration options for the BrandingProvider\n */\nexport interface BrandingProviderProps {\n /**\n * The branding preference data passed from parent (typically ThunderIDProvider)\n */\n brandingPreference?: BrandingPreference | null;\n /**\n * Whether the branding provider is enabled\n * @default true\n */\n enabled?: boolean;\n /**\n * Error state passed from parent\n */\n error?: Error | null;\n /**\n * Force a specific theme ('light' or 'dark')\n * If not provided, will use the activeTheme from branding preference\n */\n forceTheme?: 'light' | 'dark';\n /**\n * Loading state passed from parent\n */\n isLoading?: boolean;\n /**\n * Function to refetch branding preference passed from parent\n */\n refetch?: () => Promise<void>;\n}\n\n/**\n * BrandingProvider component that manages branding state and provides branding context to child components.\n *\n * This provider receives branding preferences from a parent component (typically ThunderIDProvider)\n * and transforms them into theme objects, making them available to all child components.\n *\n * Features:\n * - Receives branding preferences as props\n * - Theme transformation from branding preferences\n * - Loading and error states\n * - Support for custom theme forcing\n *\n * @example\n * Basic usage (typically used within ThunderIDProvider):\n * ```tsx\n * <BrandingProvider\n * brandingPreference={brandingData}\n * isLoading={isFetching}\n * error={fetchError}\n * >\n * <App />\n * </BrandingProvider>\n * ```\n *\n * @example\n * With custom theme forcing:\n * ```tsx\n * <BrandingProvider\n * brandingPreference={brandingData}\n * forceTheme=\"dark\"\n * enabled={true}\n * >\n * <App />\n * </BrandingProvider>\n * ```\n */\nconst BrandingProvider: FC<PropsWithChildren<BrandingProviderProps>> = ({\n children,\n brandingPreference: externalBrandingPreference,\n forceTheme,\n enabled = true,\n isLoading: externalIsLoading = false,\n error: externalError = null,\n refetch: externalRefetch,\n}: PropsWithChildren<BrandingProviderProps>): ReactElement => {\n const [theme, setTheme] = useState<Theme | null>(null);\n const [activeTheme, setActiveTheme] = useState<'light' | 'dark' | null>(null);\n\n // Process branding preference when it changes\n useEffect(() => {\n if (!enabled || !externalBrandingPreference) {\n setTheme(null);\n setActiveTheme(null);\n return;\n }\n\n // Extract active theme from branding preference\n const activeThemeFromBranding: string | undefined = externalBrandingPreference?.preference?.theme?.activeTheme;\n let extractedActiveTheme: 'light' | 'dark' | null = null;\n\n if (activeThemeFromBranding) {\n // Convert to lowercase and map to our expected values\n const themeMode: string = activeThemeFromBranding.toLowerCase();\n if (themeMode === 'light' || themeMode === 'dark') {\n extractedActiveTheme = themeMode;\n }\n }\n\n setActiveTheme(extractedActiveTheme);\n\n // Transform branding preference to theme\n const transformedTheme: Theme | null = transformBrandingPreferenceToTheme(externalBrandingPreference, forceTheme);\n setTheme(transformedTheme);\n }, [externalBrandingPreference, forceTheme, enabled]);\n\n // Reset state when disabled\n useEffect(() => {\n if (!enabled) {\n setTheme(null);\n setActiveTheme(null);\n }\n }, [enabled]);\n\n // Dummy fetchBranding for backward compatibility\n const fetchBranding: () => Promise<void> = useCallback(async (): Promise<void> => {\n if (externalRefetch) {\n await externalRefetch();\n }\n }, [externalRefetch]);\n\n const value: any = {\n activeTheme,\n brandingPreference: externalBrandingPreference || null,\n error: externalError,\n fetchBranding,\n isLoading: externalIsLoading,\n refetch: externalRefetch || fetchBranding,\n theme,\n };\n\n return <BrandingContext.Provider value={value}>{children}</BrandingContext.Provider>;\n};\n\nexport default BrandingProvider;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0FA,MAAMA,oBAAkE,EACtE,UACA,oBAAoB,4BACpB,YACA,UAAU,MACV,WAAW,oBAAoB,OAC/B,OAAO,gBAAgB,MACvB,SAAS,sBACmD;CAC5D,MAAM,CAAC,OAAO,YAAY,SAAuB,KAAK;CACtD,MAAM,CAAC,aAAa,kBAAkB,SAAkC,KAAK;AAG7E,iBAAgB;AACd,MAAI,CAAC,WAAW,CAAC,4BAA4B;AAC3C,YAAS,KAAK;AACd,kBAAe,KAAK;AACpB;;EAIF,MAAMC,0BAA8C,4BAA4B,YAAY,OAAO;EACnG,IAAIC,uBAAgD;AAEpD,MAAI,yBAAyB;GAE3B,MAAMC,YAAoB,wBAAwB,aAAa;AAC/D,OAAI,cAAc,WAAW,cAAc,OACzC,wBAAuB;;AAI3B,iBAAe,qBAAqB;AAIpC,WADuC,mCAAmC,4BAA4B,WAAW,CACvF;IACzB;EAAC;EAA4B;EAAY;EAAQ,CAAC;AAGrD,iBAAgB;AACd,MAAI,CAAC,SAAS;AACZ,YAAS,KAAK;AACd,kBAAe,KAAK;;IAErB,CAAC,QAAQ,CAAC;CAGb,MAAMC,gBAAqC,YAAY,YAA2B;AAChF,MAAI,gBACF,OAAM,iBAAiB;IAExB,CAAC,gBAAgB,CAAC;CAErB,MAAMC,QAAa;EACjB;EACA,oBAAoB,8BAA8B;EAClD,OAAO;EACP;EACA,WAAW;EACX,SAAS,mBAAmB;EAC5B;EACD;AAED,QAAO,oBAACC,wBAAgB;EAAgB;EAAQ;GAAoC;;AAGtF,+BAAe"}
@@ -1,45 +0,0 @@
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
- import { BrandingContextValue } from './BrandingContext';
19
- /**
20
- * Hook to access the branding context.
21
- * This hook provides access to branding preferences, theme data, and loading states.
22
- *
23
- * @returns The branding context value containing branding preference data, theme, and control functions
24
- * @throws Error if used outside of a BrandingProvider
25
- *
26
- * @example
27
- * ```tsx
28
- * function MyComponent() {
29
- * const { theme, activeTheme, isLoading, error } = useBrandingContext();
30
- *
31
- * if (isLoading) return <div>Loading branding...</div>;
32
- * if (error) return <div>Error: {error.message}</div>;
33
- *
34
- * return (
35
- * <div style={{ color: theme?.colors?.primary?.main }}>
36
- * <p>Active theme mode: {activeTheme}</p>
37
- * <p>Styled with ThunderID branding</p>
38
- * </div>
39
- * );
40
- * }
41
- * ```
42
- */
43
- declare const useBrandingContext: () => BrandingContextValue;
44
- export default useBrandingContext;
45
- //# sourceMappingURL=useBrandingContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useBrandingContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/Branding/useBrandingContext.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAwB,EAAC,oBAAoB,EAAC,MAAM,mBAAmB,CAAC;AAExE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,QAAA,MAAM,kBAAkB,QAAO,oBAM9B,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -1,38 +0,0 @@
1
- import BrandingContext_default from "./BrandingContext.js";
2
- import { useContext } from "react";
3
-
4
- //#region src/contexts/Branding/useBrandingContext.ts
5
- /**
6
- * Hook to access the branding context.
7
- * This hook provides access to branding preferences, theme data, and loading states.
8
- *
9
- * @returns The branding context value containing branding preference data, theme, and control functions
10
- * @throws Error if used outside of a BrandingProvider
11
- *
12
- * @example
13
- * ```tsx
14
- * function MyComponent() {
15
- * const { theme, activeTheme, isLoading, error } = useBrandingContext();
16
- *
17
- * if (isLoading) return <div>Loading branding...</div>;
18
- * if (error) return <div>Error: {error.message}</div>;
19
- *
20
- * return (
21
- * <div style={{ color: theme?.colors?.primary?.main }}>
22
- * <p>Active theme mode: {activeTheme}</p>
23
- * <p>Styled with ThunderID branding</p>
24
- * </div>
25
- * );
26
- * }
27
- * ```
28
- */
29
- const useBrandingContext = () => {
30
- const context = useContext(BrandingContext_default);
31
- if (!context) throw new Error("useBrandingContext must be used within a BrandingProvider");
32
- return context;
33
- };
34
- var useBrandingContext_default = useBrandingContext;
35
-
36
- //#endregion
37
- export { useBrandingContext_default as default };
38
- //# sourceMappingURL=useBrandingContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useBrandingContext.js","names":["context: BrandingContextValue | null","BrandingContext"],"sources":["../../../src/contexts/Branding/useBrandingContext.ts"],"sourcesContent":["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {useContext} from 'react';\nimport BrandingContext, {BrandingContextValue} from './BrandingContext';\n\n/**\n * Hook to access the branding context.\n * This hook provides access to branding preferences, theme data, and loading states.\n *\n * @returns The branding context value containing branding preference data, theme, and control functions\n * @throws Error if used outside of a BrandingProvider\n *\n * @example\n * ```tsx\n * function MyComponent() {\n * const { theme, activeTheme, isLoading, error } = useBrandingContext();\n *\n * if (isLoading) return <div>Loading branding...</div>;\n * if (error) return <div>Error: {error.message}</div>;\n *\n * return (\n * <div style={{ color: theme?.colors?.primary?.main }}>\n * <p>Active theme mode: {activeTheme}</p>\n * <p>Styled with ThunderID branding</p>\n * </div>\n * );\n * }\n * ```\n */\nconst useBrandingContext = (): BrandingContextValue => {\n const context: BrandingContextValue | null = useContext(BrandingContext);\n if (!context) {\n throw new Error('useBrandingContext must be used within a BrandingProvider');\n }\n return context;\n};\n\nexport default useBrandingContext;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,MAAM,2BAAiD;CACrD,MAAMA,UAAuC,WAAWC,wBAAgB;AACxE,KAAI,CAAC,QACH,OAAM,IAAI,MAAM,4DAA4D;AAE9E,QAAO;;AAGT,iCAAe"}
@@ -1,41 +0,0 @@
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
- import { AllOrganizationsApiResponse, Organization, CreateOrganizationPayload } from '@thunderid/browser';
19
- import { Context } from 'react';
20
- /**
21
- * Props interface of {@link OrganizationContext}
22
- */
23
- export interface OrganizationContextProps {
24
- /**
25
- * Function to create a new organization.
26
- */
27
- createOrganization?: (payload: CreateOrganizationPayload, sessionId: string) => Promise<Organization>;
28
- currentOrganization: Organization | null;
29
- error: string | null;
30
- getAllOrganizations: () => Promise<AllOrganizationsApiResponse>;
31
- isLoading: boolean;
32
- myOrganizations: Organization[];
33
- revalidateMyOrganizations: () => Promise<Organization[]>;
34
- switchOrganization: (organization: Organization) => Promise<void>;
35
- }
36
- /**
37
- * Context object for managing organization data and related operations.
38
- */
39
- declare const OrganizationContext: Context<OrganizationContextProps | null>;
40
- export default OrganizationContext;
41
- //# sourceMappingURL=OrganizationContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OrganizationContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/Organization/OrganizationContext.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,2BAA2B,EAAE,YAAY,EAAE,yBAAyB,EAAC,MAAM,oBAAoB,CAAC;AACxG,OAAO,EAAC,OAAO,EAAgB,MAAM,OAAO,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,yBAAyB,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;IACtG,mBAAmB,EAAE,YAAY,GAAG,IAAI,CAAC;IACzC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,mBAAmB,EAAE,MAAM,OAAO,CAAC,2BAA2B,CAAC,CAAC;IAChE,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,YAAY,EAAE,CAAC;IAChC,yBAAyB,EAAE,MAAM,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IACzD,kBAAkB,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACnE;AAED;;GAEG;AACH,QAAA,MAAM,mBAAmB,EAAE,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAahE,CAAC;AAIH,eAAe,mBAAmB,CAAC"}
@@ -1,25 +0,0 @@
1
- import { createContext } from "react";
2
-
3
- //#region src/contexts/Organization/OrganizationContext.ts
4
- /**
5
- * Context object for managing organization data and related operations.
6
- */
7
- const OrganizationContext = createContext({
8
- createOrganization: () => null,
9
- currentOrganization: null,
10
- error: null,
11
- getAllOrganizations: () => Promise.resolve({
12
- count: 0,
13
- organizations: []
14
- }),
15
- isLoading: false,
16
- myOrganizations: [],
17
- revalidateMyOrganizations: () => Promise.resolve([]),
18
- switchOrganization: () => Promise.resolve()
19
- });
20
- OrganizationContext.displayName = "OrganizationContext";
21
- var OrganizationContext_default = OrganizationContext;
22
-
23
- //#endregion
24
- export { OrganizationContext_default as default };
25
- //# sourceMappingURL=OrganizationContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OrganizationContext.js","names":["OrganizationContext: Context<OrganizationContextProps | null>"],"sources":["../../../src/contexts/Organization/OrganizationContext.ts"],"sourcesContent":["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {AllOrganizationsApiResponse, Organization, CreateOrganizationPayload} from '@thunderid/browser';\nimport {Context, createContext} from 'react';\n\n/**\n * Props interface of {@link OrganizationContext}\n */\nexport interface OrganizationContextProps {\n /**\n * Function to create a new organization.\n */\n createOrganization?: (payload: CreateOrganizationPayload, sessionId: string) => Promise<Organization>;\n currentOrganization: Organization | null;\n error: string | null;\n getAllOrganizations: () => Promise<AllOrganizationsApiResponse>;\n isLoading: boolean;\n myOrganizations: Organization[];\n revalidateMyOrganizations: () => Promise<Organization[]>;\n switchOrganization: (organization: Organization) => Promise<void>;\n}\n\n/**\n * Context object for managing organization data and related operations.\n */\nconst OrganizationContext: Context<OrganizationContextProps | null> = createContext<null | OrganizationContextProps>({\n createOrganization: () => null as unknown as Promise<Organization>,\n currentOrganization: null,\n error: null,\n getAllOrganizations: () =>\n Promise.resolve({\n count: 0,\n organizations: [],\n }),\n isLoading: false,\n myOrganizations: [] as Organization[],\n revalidateMyOrganizations: () => Promise.resolve([]),\n switchOrganization: () => Promise.resolve(),\n});\n\nOrganizationContext.displayName = 'OrganizationContext';\n\nexport default OrganizationContext;\n"],"mappings":";;;;;;AAyCA,MAAMA,sBAAgE,cAA+C;CACnH,0BAA0B;CAC1B,qBAAqB;CACrB,OAAO;CACP,2BACE,QAAQ,QAAQ;EACd,OAAO;EACP,eAAe,EAAE;EAClB,CAAC;CACJ,WAAW;CACX,iBAAiB,EAAE;CACnB,iCAAiC,QAAQ,QAAQ,EAAE,CAAC;CACpD,0BAA0B,QAAQ,SAAS;CAC5C,CAAC;AAEF,oBAAoB,cAAc;AAElC,kCAAe"}
@@ -1,94 +0,0 @@
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
- import { Organization, AllOrganizationsApiResponse, CreateOrganizationPayload, TokenResponse } from '@thunderid/browser';
19
- import { FC, PropsWithChildren } from 'react';
20
- /**
21
- * Props interface of {@link OrganizationProvider}
22
- */
23
- export interface OrganizationProviderProps {
24
- /**
25
- * Whether to automatically fetch organizations on mount
26
- */
27
- autoFetch?: boolean;
28
- /**
29
- * Function to create a new organization.
30
- */
31
- createOrganization?: (payload: CreateOrganizationPayload, sessionId: string) => Promise<Organization>;
32
- /**
33
- * Initial current organization
34
- */
35
- currentOrganization?: Organization | null;
36
- /**
37
- * Initial list of organizations
38
- */
39
- getAllOrganizations?: () => Promise<AllOrganizationsApiResponse>;
40
- /**
41
- * List of organizations the signed-in user belongs to.
42
- */
43
- myOrganizations?: Organization[];
44
- /**
45
- * Callback function called when an error occurs
46
- */
47
- onError?: (error: string) => void;
48
- /**
49
- * Callback function called when switching organizations
50
- */
51
- onOrganizationSwitch?: (organization: Organization) => Promise<TokenResponse | Response>;
52
- /**
53
- * Refetch the my organizations list.
54
- * @returns
55
- */
56
- revalidateMyOrganizations: () => Promise<Organization[]>;
57
- }
58
- /**
59
- * OrganizationProvider component that manages organization data and provides it through OrganizationContext.
60
- *
61
- * This provider:
62
- * - Fetches organization data from the organizations endpoint
63
- * - Manages current organization state
64
- * - Provides functions for switching organizations and refreshing data
65
- * - Handles loading states and errors
66
- *
67
- * @example
68
- * ```tsx
69
- * // Basic usage with auto-fetch (uses internal API)
70
- * <OrganizationProvider>
71
- * <App />
72
- * </OrganizationProvider>
73
- *
74
- * // With custom error handling
75
- * <OrganizationProvider onError={(error) => console.error('Organization error:', error)}>
76
- * <App />
77
- * </OrganizationProvider>
78
- *
79
- * // With custom organization switch handler
80
- * <OrganizationProvider
81
- * onOrganizationSwitch={(org) => console.log('Switched to:', org.name)}
82
- * >
83
- * <App />
84
- * </OrganizationProvider>
85
- *
86
- * // Disable auto-fetch (fetch manually using revalidateMyOrganizations)
87
- * <OrganizationProvider autoFetch={false}>
88
- * <App />
89
- * </OrganizationProvider>
90
- * ```
91
- */
92
- declare const OrganizationProvider: FC<PropsWithChildren<OrganizationProviderProps>>;
93
- export default OrganizationProvider;
94
- //# sourceMappingURL=OrganizationProvider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OrganizationProvider.d.ts","sourceRoot":"","sources":["../../../src/contexts/Organization/OrganizationProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAEL,YAAY,EACZ,2BAA2B,EAC3B,yBAAyB,EACzB,aAAa,EACd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAC,EAAE,EAAE,iBAAiB,EAA+C,MAAM,OAAO,CAAC;AAG1F;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,yBAAyB,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;IACtG;;OAEG;IACH,mBAAmB,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IAC1C;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,OAAO,CAAC,2BAA2B,CAAC,CAAC;IACjE;;OAEG;IACH,eAAe,CAAC,EAAE,YAAY,EAAE,CAAC;IACjC;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC;;OAEG;IACH,oBAAoB,CAAC,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,OAAO,CAAC,aAAa,GAAG,QAAQ,CAAC,CAAC;IACzF;;;OAGG;IACH,yBAAyB,EAAE,MAAM,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;CAC1D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,QAAA,MAAM,oBAAoB,EAAE,EAAE,CAAC,iBAAiB,CAAC,yBAAyB,CAAC,CA0E1E,CAAC;AAEF,eAAe,oBAAoB,CAAC"}