@thunderid/react 0.12.0 → 0.13.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.
Files changed (395) hide show
  1. package/dist/api/getUsersMeMeta.d.ts +22 -0
  2. package/dist/api/getUsersMeMeta.d.ts.map +1 -0
  3. package/dist/api/getUsersMeMeta.js +32 -0
  4. package/dist/api/getUsersMeMeta.js.map +1 -0
  5. package/dist/cjs/api/getUsersMeMeta.cjs +34 -0
  6. package/dist/cjs/api/getUsersMeMeta.cjs.map +1 -0
  7. package/dist/cjs/components/actions/SignInButton/BaseSignInButton.cjs +2 -3
  8. package/dist/cjs/components/actions/SignInButton/BaseSignInButton.cjs.map +1 -1
  9. package/dist/cjs/components/actions/SignOutButton/BaseSignOutButton.cjs +2 -3
  10. package/dist/cjs/components/actions/SignOutButton/BaseSignOutButton.cjs.map +1 -1
  11. package/dist/cjs/components/actions/SignUpButton/BaseSignUpButton.cjs +2 -3
  12. package/dist/cjs/components/actions/SignUpButton/BaseSignUpButton.cjs.map +1 -1
  13. package/dist/cjs/components/adapters/Consent.cjs +34 -27
  14. package/dist/cjs/components/adapters/Consent.cjs.map +1 -1
  15. package/dist/cjs/components/adapters/ConsentCheckboxList.cjs +7 -8
  16. package/dist/cjs/components/adapters/ConsentCheckboxList.cjs.map +1 -1
  17. package/dist/cjs/components/adapters/ConsentCheckboxList.styles.cjs +8 -9
  18. package/dist/cjs/components/adapters/ConsentCheckboxList.styles.cjs.map +1 -1
  19. package/dist/cjs/components/adapters/GoogleButton.cjs +425 -31
  20. package/dist/cjs/components/adapters/GoogleButton.cjs.map +1 -1
  21. package/dist/cjs/components/adapters/ImageComponent.cjs +13 -9
  22. package/dist/cjs/components/adapters/ImageComponent.cjs.map +1 -1
  23. package/dist/cjs/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.cjs +3 -4
  24. package/dist/cjs/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.cjs.map +1 -1
  25. package/dist/cjs/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.styles.cjs +11 -12
  26. package/dist/cjs/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.styles.cjs.map +1 -1
  27. package/dist/cjs/components/presentation/UserDropdown/BaseUserDropdown.cjs +12 -16
  28. package/dist/cjs/components/presentation/UserDropdown/BaseUserDropdown.cjs.map +1 -1
  29. package/dist/cjs/components/presentation/UserDropdown/BaseUserDropdown.styles.cjs +18 -15
  30. package/dist/cjs/components/presentation/UserDropdown/BaseUserDropdown.styles.cjs.map +1 -1
  31. package/dist/cjs/components/presentation/UserProfile/BaseUserProfile.cjs +96 -41
  32. package/dist/cjs/components/presentation/UserProfile/BaseUserProfile.cjs.map +1 -1
  33. package/dist/cjs/components/presentation/UserProfile/BaseUserProfile.styles.cjs +25 -26
  34. package/dist/cjs/components/presentation/UserProfile/BaseUserProfile.styles.cjs.map +1 -1
  35. package/dist/cjs/components/presentation/UserProfile/UserProfile.cjs +4 -2
  36. package/dist/cjs/components/presentation/UserProfile/UserProfile.cjs.map +1 -1
  37. package/dist/cjs/components/presentation/auth/AcceptInvite/BaseAcceptInvite.cjs +10 -31
  38. package/dist/cjs/components/presentation/auth/AcceptInvite/BaseAcceptInvite.cjs.map +1 -1
  39. package/dist/cjs/components/presentation/auth/AcceptInvite/BaseAcceptInvite.styles.cjs +41 -9
  40. package/dist/cjs/components/presentation/auth/AcceptInvite/BaseAcceptInvite.styles.cjs.map +1 -1
  41. package/dist/cjs/components/presentation/auth/AuthOptionFactory.cjs +75 -71
  42. package/dist/cjs/components/presentation/auth/AuthOptionFactory.cjs.map +1 -1
  43. package/dist/cjs/components/presentation/auth/InviteUser/BaseInviteUser.cjs +9 -22
  44. package/dist/cjs/components/presentation/auth/InviteUser/BaseInviteUser.cjs.map +1 -1
  45. package/dist/cjs/components/presentation/auth/InviteUser/BaseInviteUser.styles.cjs +22 -9
  46. package/dist/cjs/components/presentation/auth/InviteUser/BaseInviteUser.styles.cjs.map +1 -1
  47. package/dist/cjs/components/presentation/auth/Recovery/BaseRecovery.cjs +11 -12
  48. package/dist/cjs/components/presentation/auth/Recovery/BaseRecovery.cjs.map +1 -1
  49. package/dist/cjs/components/presentation/auth/SignIn/BaseSignIn.cjs +11 -16
  50. package/dist/cjs/components/presentation/auth/SignIn/BaseSignIn.cjs.map +1 -1
  51. package/dist/cjs/components/presentation/auth/SignIn/BaseSignIn.styles.cjs +32 -27
  52. package/dist/cjs/components/presentation/auth/SignIn/BaseSignIn.styles.cjs.map +1 -1
  53. package/dist/cjs/components/presentation/auth/SignUp/BaseSignUp.cjs +11 -12
  54. package/dist/cjs/components/presentation/auth/SignUp/BaseSignUp.cjs.map +1 -1
  55. package/dist/cjs/components/presentation/auth/SignUp/BaseSignUp.styles.cjs +25 -26
  56. package/dist/cjs/components/presentation/auth/SignUp/BaseSignUp.styles.cjs.map +1 -1
  57. package/dist/cjs/components/primitives/AffixedField/AffixedField.cjs +6 -7
  58. package/dist/cjs/components/primitives/AffixedField/AffixedField.cjs.map +1 -1
  59. package/dist/cjs/components/primitives/AffixedField/AffixedField.styles.cjs +9 -10
  60. package/dist/cjs/components/primitives/AffixedField/AffixedField.styles.cjs.map +1 -1
  61. package/dist/cjs/components/primitives/Alert/Alert.cjs +6 -7
  62. package/dist/cjs/components/primitives/Alert/Alert.cjs.map +1 -1
  63. package/dist/cjs/components/primitives/Alert/Alert.styles.cjs +10 -11
  64. package/dist/cjs/components/primitives/Alert/Alert.styles.cjs.map +1 -1
  65. package/dist/cjs/components/primitives/Avatar/Avatar.cjs +5 -6
  66. package/dist/cjs/components/primitives/Avatar/Avatar.cjs.map +1 -1
  67. package/dist/cjs/components/primitives/Avatar/Avatar.styles.cjs +7 -8
  68. package/dist/cjs/components/primitives/Avatar/Avatar.styles.cjs.map +1 -1
  69. package/dist/cjs/components/primitives/Button/Button.cjs +8 -12
  70. package/dist/cjs/components/primitives/Button/Button.cjs.map +1 -1
  71. package/dist/cjs/components/primitives/Button/Button.styles.cjs +23 -24
  72. package/dist/cjs/components/primitives/Button/Button.styles.cjs.map +1 -1
  73. package/dist/cjs/components/primitives/Card/Card.cjs +8 -9
  74. package/dist/cjs/components/primitives/Card/Card.cjs.map +1 -1
  75. package/dist/cjs/components/primitives/Card/Card.styles.cjs +12 -13
  76. package/dist/cjs/components/primitives/Card/Card.styles.cjs.map +1 -1
  77. package/dist/cjs/components/primitives/Checkbox/Checkbox.cjs +5 -6
  78. package/dist/cjs/components/primitives/Checkbox/Checkbox.cjs.map +1 -1
  79. package/dist/cjs/components/primitives/Checkbox/Checkbox.styles.cjs +7 -8
  80. package/dist/cjs/components/primitives/Checkbox/Checkbox.styles.cjs.map +1 -1
  81. package/dist/cjs/components/primitives/CopyableText/CopyableText.styles.cjs +6 -7
  82. package/dist/cjs/components/primitives/CopyableText/CopyableText.styles.cjs.map +1 -1
  83. package/dist/cjs/components/primitives/DatePicker/DatePicker.cjs +4 -5
  84. package/dist/cjs/components/primitives/DatePicker/DatePicker.cjs.map +1 -1
  85. package/dist/cjs/components/primitives/DatePicker/DatePicker.styles.cjs +5 -6
  86. package/dist/cjs/components/primitives/DatePicker/DatePicker.styles.cjs.map +1 -1
  87. package/dist/cjs/components/primitives/Dialog/Dialog.cjs +7 -8
  88. package/dist/cjs/components/primitives/Dialog/Dialog.cjs.map +1 -1
  89. package/dist/cjs/components/primitives/Dialog/Dialog.styles.cjs +8 -9
  90. package/dist/cjs/components/primitives/Dialog/Dialog.styles.cjs.map +1 -1
  91. package/dist/cjs/components/primitives/Divider/Divider.cjs +7 -8
  92. package/dist/cjs/components/primitives/Divider/Divider.cjs.map +1 -1
  93. package/dist/cjs/components/primitives/Divider/Divider.styles.cjs +7 -8
  94. package/dist/cjs/components/primitives/Divider/Divider.styles.cjs.map +1 -1
  95. package/dist/cjs/components/primitives/FormControl/FormControl.cjs +3 -4
  96. package/dist/cjs/components/primitives/FormControl/FormControl.cjs.map +1 -1
  97. package/dist/cjs/components/primitives/FormControl/FormControl.styles.cjs +4 -5
  98. package/dist/cjs/components/primitives/FormControl/FormControl.styles.cjs.map +1 -1
  99. package/dist/cjs/components/primitives/InputLabel/InputLabel.cjs +3 -4
  100. package/dist/cjs/components/primitives/InputLabel/InputLabel.cjs.map +1 -1
  101. package/dist/cjs/components/primitives/InputLabel/InputLabel.styles.cjs +6 -7
  102. package/dist/cjs/components/primitives/InputLabel/InputLabel.styles.cjs.map +1 -1
  103. package/dist/cjs/components/primitives/KeyValueInput/KeyValueInput.cjs +19 -20
  104. package/dist/cjs/components/primitives/KeyValueInput/KeyValueInput.cjs.map +1 -1
  105. package/dist/cjs/components/primitives/KeyValueInput/KeyValueInput.styles.cjs +16 -17
  106. package/dist/cjs/components/primitives/KeyValueInput/KeyValueInput.styles.cjs.map +1 -1
  107. package/dist/cjs/components/primitives/Logo/Logo.cjs +3 -4
  108. package/dist/cjs/components/primitives/Logo/Logo.cjs.map +1 -1
  109. package/dist/cjs/components/primitives/Logo/Logo.styles.cjs +9 -10
  110. package/dist/cjs/components/primitives/Logo/Logo.styles.cjs.map +1 -1
  111. package/dist/cjs/components/primitives/MultiInput/MultiInput.cjs +11 -12
  112. package/dist/cjs/components/primitives/MultiInput/MultiInput.cjs.map +1 -1
  113. package/dist/cjs/components/primitives/MultiInput/MultiInput.styles.cjs +10 -11
  114. package/dist/cjs/components/primitives/MultiInput/MultiInput.styles.cjs.map +1 -1
  115. package/dist/cjs/components/primitives/OtpField/OtpField.cjs +4 -5
  116. package/dist/cjs/components/primitives/OtpField/OtpField.cjs.map +1 -1
  117. package/dist/cjs/components/primitives/OtpField/OtpField.styles.cjs +5 -6
  118. package/dist/cjs/components/primitives/OtpField/OtpField.styles.cjs.map +1 -1
  119. package/dist/cjs/components/primitives/PasswordField/PasswordField.cjs +3 -4
  120. package/dist/cjs/components/primitives/PasswordField/PasswordField.cjs.map +1 -1
  121. package/dist/cjs/components/primitives/PasswordField/PasswordField.styles.cjs +4 -5
  122. package/dist/cjs/components/primitives/PasswordField/PasswordField.styles.cjs.map +1 -1
  123. package/dist/cjs/components/primitives/Select/Select.cjs +3 -4
  124. package/dist/cjs/components/primitives/Select/Select.cjs.map +1 -1
  125. package/dist/cjs/components/primitives/Select/Select.styles.cjs +5 -6
  126. package/dist/cjs/components/primitives/Select/Select.styles.cjs.map +1 -1
  127. package/dist/cjs/components/primitives/Spinner/Spinner.cjs +4 -6
  128. package/dist/cjs/components/primitives/Spinner/Spinner.cjs.map +1 -1
  129. package/dist/cjs/components/primitives/Spinner/Spinner.styles.cjs +20 -12
  130. package/dist/cjs/components/primitives/Spinner/Spinner.styles.cjs.map +1 -1
  131. package/dist/cjs/components/primitives/TextField/TextField.cjs +6 -7
  132. package/dist/cjs/components/primitives/TextField/TextField.cjs.map +1 -1
  133. package/dist/cjs/components/primitives/TextField/TextField.styles.cjs +8 -9
  134. package/dist/cjs/components/primitives/TextField/TextField.styles.cjs.map +1 -1
  135. package/dist/cjs/components/primitives/Toggle/Toggle.cjs +7 -8
  136. package/dist/cjs/components/primitives/Toggle/Toggle.cjs.map +1 -1
  137. package/dist/cjs/components/primitives/Toggle/Toggle.styles.cjs +7 -8
  138. package/dist/cjs/components/primitives/Toggle/Toggle.styles.cjs.map +1 -1
  139. package/dist/cjs/components/primitives/Tooltip/Tooltip.cjs +4 -5
  140. package/dist/cjs/components/primitives/Tooltip/Tooltip.cjs.map +1 -1
  141. package/dist/cjs/components/primitives/Tooltip/Tooltip.styles.cjs +13 -14
  142. package/dist/cjs/components/primitives/Tooltip/Tooltip.styles.cjs.map +1 -1
  143. package/dist/cjs/components/primitives/Typography/Typography.cjs +2 -3
  144. package/dist/cjs/components/primitives/Typography/Typography.cjs.map +1 -1
  145. package/dist/cjs/components/primitives/Typography/Typography.styles.cjs +18 -19
  146. package/dist/cjs/components/primitives/Typography/Typography.styles.cjs.map +1 -1
  147. package/dist/cjs/contexts/ThunderID/ThunderIDContext.cjs +1 -0
  148. package/dist/cjs/contexts/ThunderID/ThunderIDContext.cjs.map +1 -1
  149. package/dist/cjs/contexts/ThunderID/ThunderIDProvider.cjs +36 -14
  150. package/dist/cjs/contexts/ThunderID/ThunderIDProvider.cjs.map +1 -1
  151. package/dist/cjs/contexts/User/UserContext.cjs +2 -1
  152. package/dist/cjs/contexts/User/UserContext.cjs.map +1 -1
  153. package/dist/cjs/contexts/User/UserProvider.cjs +5 -3
  154. package/dist/cjs/contexts/User/UserProvider.cjs.map +1 -1
  155. package/dist/cjs/index.cjs +2 -0
  156. package/dist/cjs/styles/emotion.cjs +64 -0
  157. package/dist/cjs/styles/emotion.cjs.map +1 -0
  158. package/dist/components/actions/SignInButton/BaseSignInButton.d.ts.map +1 -1
  159. package/dist/components/actions/SignInButton/BaseSignInButton.js +1 -1
  160. package/dist/components/actions/SignInButton/BaseSignInButton.js.map +1 -1
  161. package/dist/components/actions/SignOutButton/BaseSignOutButton.d.ts.map +1 -1
  162. package/dist/components/actions/SignOutButton/BaseSignOutButton.js +1 -1
  163. package/dist/components/actions/SignOutButton/BaseSignOutButton.js.map +1 -1
  164. package/dist/components/actions/SignUpButton/BaseSignUpButton.d.ts.map +1 -1
  165. package/dist/components/actions/SignUpButton/BaseSignUpButton.js +1 -1
  166. package/dist/components/actions/SignUpButton/BaseSignUpButton.js.map +1 -1
  167. package/dist/components/adapters/Consent.d.ts.map +1 -1
  168. package/dist/components/adapters/Consent.js +34 -27
  169. package/dist/components/adapters/Consent.js.map +1 -1
  170. package/dist/components/adapters/ConsentCheckboxList.d.ts.map +1 -1
  171. package/dist/components/adapters/ConsentCheckboxList.js +1 -1
  172. package/dist/components/adapters/ConsentCheckboxList.js.map +1 -1
  173. package/dist/components/adapters/ConsentCheckboxList.styles.d.ts.map +1 -1
  174. package/dist/components/adapters/ConsentCheckboxList.styles.js +1 -1
  175. package/dist/components/adapters/ConsentCheckboxList.styles.js.map +1 -1
  176. package/dist/components/adapters/GoogleButton.d.ts.map +1 -1
  177. package/dist/components/adapters/GoogleButton.js +425 -31
  178. package/dist/components/adapters/GoogleButton.js.map +1 -1
  179. package/dist/components/adapters/ImageComponent.d.ts.map +1 -1
  180. package/dist/components/adapters/ImageComponent.js +13 -9
  181. package/dist/components/adapters/ImageComponent.js.map +1 -1
  182. package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.d.ts.map +1 -1
  183. package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.js +1 -1
  184. package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.js.map +1 -1
  185. package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.styles.d.ts.map +1 -1
  186. package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.styles.js +1 -1
  187. package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.styles.js.map +1 -1
  188. package/dist/components/presentation/UserDropdown/BaseUserDropdown.d.ts.map +1 -1
  189. package/dist/components/presentation/UserDropdown/BaseUserDropdown.js +5 -8
  190. package/dist/components/presentation/UserDropdown/BaseUserDropdown.js.map +1 -1
  191. package/dist/components/presentation/UserDropdown/BaseUserDropdown.styles.d.ts.map +1 -1
  192. package/dist/components/presentation/UserDropdown/BaseUserDropdown.styles.js +5 -1
  193. package/dist/components/presentation/UserDropdown/BaseUserDropdown.styles.js.map +1 -1
  194. package/dist/components/presentation/UserProfile/BaseUserProfile.d.ts +2 -1
  195. package/dist/components/presentation/UserProfile/BaseUserProfile.d.ts.map +1 -1
  196. package/dist/components/presentation/UserProfile/BaseUserProfile.js +92 -36
  197. package/dist/components/presentation/UserProfile/BaseUserProfile.js.map +1 -1
  198. package/dist/components/presentation/UserProfile/BaseUserProfile.styles.d.ts.map +1 -1
  199. package/dist/components/presentation/UserProfile/BaseUserProfile.styles.js +1 -1
  200. package/dist/components/presentation/UserProfile/BaseUserProfile.styles.js.map +1 -1
  201. package/dist/components/presentation/UserProfile/UserProfile.d.ts.map +1 -1
  202. package/dist/components/presentation/UserProfile/UserProfile.js +5 -3
  203. package/dist/components/presentation/UserProfile/UserProfile.js.map +1 -1
  204. package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.d.ts.map +1 -1
  205. package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.js +7 -27
  206. package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.js.map +1 -1
  207. package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.styles.d.ts.map +1 -1
  208. package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.styles.js +38 -5
  209. package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.styles.js.map +1 -1
  210. package/dist/components/presentation/auth/AuthOptionFactory.d.ts.map +1 -1
  211. package/dist/components/presentation/auth/AuthOptionFactory.js +68 -63
  212. package/dist/components/presentation/auth/AuthOptionFactory.js.map +1 -1
  213. package/dist/components/presentation/auth/InviteUser/BaseInviteUser.d.ts.map +1 -1
  214. package/dist/components/presentation/auth/InviteUser/BaseInviteUser.js +5 -17
  215. package/dist/components/presentation/auth/InviteUser/BaseInviteUser.js.map +1 -1
  216. package/dist/components/presentation/auth/InviteUser/BaseInviteUser.styles.d.ts.map +1 -1
  217. package/dist/components/presentation/auth/InviteUser/BaseInviteUser.styles.js +19 -5
  218. package/dist/components/presentation/auth/InviteUser/BaseInviteUser.styles.js.map +1 -1
  219. package/dist/components/presentation/auth/Recovery/BaseRecovery.d.ts.map +1 -1
  220. package/dist/components/presentation/auth/Recovery/BaseRecovery.js +1 -1
  221. package/dist/components/presentation/auth/Recovery/BaseRecovery.js.map +1 -1
  222. package/dist/components/presentation/auth/SignIn/BaseSignIn.d.ts.map +1 -1
  223. package/dist/components/presentation/auth/SignIn/BaseSignIn.js +2 -6
  224. package/dist/components/presentation/auth/SignIn/BaseSignIn.js.map +1 -1
  225. package/dist/components/presentation/auth/SignIn/BaseSignIn.styles.d.ts.map +1 -1
  226. package/dist/components/presentation/auth/SignIn/BaseSignIn.styles.js +7 -1
  227. package/dist/components/presentation/auth/SignIn/BaseSignIn.styles.js.map +1 -1
  228. package/dist/components/presentation/auth/SignUp/BaseSignUp.d.ts.map +1 -1
  229. package/dist/components/presentation/auth/SignUp/BaseSignUp.js +1 -1
  230. package/dist/components/presentation/auth/SignUp/BaseSignUp.js.map +1 -1
  231. package/dist/components/presentation/auth/SignUp/BaseSignUp.styles.d.ts.map +1 -1
  232. package/dist/components/presentation/auth/SignUp/BaseSignUp.styles.js +1 -1
  233. package/dist/components/presentation/auth/SignUp/BaseSignUp.styles.js.map +1 -1
  234. package/dist/components/primitives/AffixedField/AffixedField.d.ts.map +1 -1
  235. package/dist/components/primitives/AffixedField/AffixedField.js +1 -1
  236. package/dist/components/primitives/AffixedField/AffixedField.js.map +1 -1
  237. package/dist/components/primitives/AffixedField/AffixedField.styles.d.ts.map +1 -1
  238. package/dist/components/primitives/AffixedField/AffixedField.styles.js +1 -1
  239. package/dist/components/primitives/AffixedField/AffixedField.styles.js.map +1 -1
  240. package/dist/components/primitives/Alert/Alert.d.ts.map +1 -1
  241. package/dist/components/primitives/Alert/Alert.js +1 -1
  242. package/dist/components/primitives/Alert/Alert.js.map +1 -1
  243. package/dist/components/primitives/Alert/Alert.styles.d.ts.map +1 -1
  244. package/dist/components/primitives/Alert/Alert.styles.js +1 -1
  245. package/dist/components/primitives/Alert/Alert.styles.js.map +1 -1
  246. package/dist/components/primitives/Avatar/Avatar.d.ts.map +1 -1
  247. package/dist/components/primitives/Avatar/Avatar.js +1 -1
  248. package/dist/components/primitives/Avatar/Avatar.js.map +1 -1
  249. package/dist/components/primitives/Avatar/Avatar.styles.d.ts.map +1 -1
  250. package/dist/components/primitives/Avatar/Avatar.styles.js +1 -1
  251. package/dist/components/primitives/Avatar/Avatar.styles.js.map +1 -1
  252. package/dist/components/primitives/Button/Button.d.ts.map +1 -1
  253. package/dist/components/primitives/Button/Button.js +2 -5
  254. package/dist/components/primitives/Button/Button.js.map +1 -1
  255. package/dist/components/primitives/Button/Button.styles.d.ts.map +1 -1
  256. package/dist/components/primitives/Button/Button.styles.js +1 -1
  257. package/dist/components/primitives/Button/Button.styles.js.map +1 -1
  258. package/dist/components/primitives/Card/Card.d.ts.map +1 -1
  259. package/dist/components/primitives/Card/Card.js +1 -1
  260. package/dist/components/primitives/Card/Card.js.map +1 -1
  261. package/dist/components/primitives/Card/Card.styles.d.ts.map +1 -1
  262. package/dist/components/primitives/Card/Card.styles.js +1 -1
  263. package/dist/components/primitives/Card/Card.styles.js.map +1 -1
  264. package/dist/components/primitives/Checkbox/Checkbox.d.ts.map +1 -1
  265. package/dist/components/primitives/Checkbox/Checkbox.js +1 -1
  266. package/dist/components/primitives/Checkbox/Checkbox.js.map +1 -1
  267. package/dist/components/primitives/Checkbox/Checkbox.styles.d.ts.map +1 -1
  268. package/dist/components/primitives/Checkbox/Checkbox.styles.js +1 -1
  269. package/dist/components/primitives/Checkbox/Checkbox.styles.js.map +1 -1
  270. package/dist/components/primitives/CopyableText/CopyableText.styles.d.ts.map +1 -1
  271. package/dist/components/primitives/CopyableText/CopyableText.styles.js +1 -1
  272. package/dist/components/primitives/CopyableText/CopyableText.styles.js.map +1 -1
  273. package/dist/components/primitives/DatePicker/DatePicker.d.ts.map +1 -1
  274. package/dist/components/primitives/DatePicker/DatePicker.js +1 -1
  275. package/dist/components/primitives/DatePicker/DatePicker.js.map +1 -1
  276. package/dist/components/primitives/DatePicker/DatePicker.styles.d.ts.map +1 -1
  277. package/dist/components/primitives/DatePicker/DatePicker.styles.js +1 -1
  278. package/dist/components/primitives/DatePicker/DatePicker.styles.js.map +1 -1
  279. package/dist/components/primitives/Dialog/Dialog.d.ts.map +1 -1
  280. package/dist/components/primitives/Dialog/Dialog.js +1 -1
  281. package/dist/components/primitives/Dialog/Dialog.js.map +1 -1
  282. package/dist/components/primitives/Dialog/Dialog.styles.d.ts.map +1 -1
  283. package/dist/components/primitives/Dialog/Dialog.styles.js +1 -1
  284. package/dist/components/primitives/Dialog/Dialog.styles.js.map +1 -1
  285. package/dist/components/primitives/Divider/Divider.d.ts.map +1 -1
  286. package/dist/components/primitives/Divider/Divider.js +1 -1
  287. package/dist/components/primitives/Divider/Divider.js.map +1 -1
  288. package/dist/components/primitives/Divider/Divider.styles.d.ts.map +1 -1
  289. package/dist/components/primitives/Divider/Divider.styles.js +1 -1
  290. package/dist/components/primitives/Divider/Divider.styles.js.map +1 -1
  291. package/dist/components/primitives/FormControl/FormControl.d.ts.map +1 -1
  292. package/dist/components/primitives/FormControl/FormControl.js +1 -1
  293. package/dist/components/primitives/FormControl/FormControl.js.map +1 -1
  294. package/dist/components/primitives/FormControl/FormControl.styles.d.ts.map +1 -1
  295. package/dist/components/primitives/FormControl/FormControl.styles.js +1 -1
  296. package/dist/components/primitives/FormControl/FormControl.styles.js.map +1 -1
  297. package/dist/components/primitives/InputLabel/InputLabel.d.ts.map +1 -1
  298. package/dist/components/primitives/InputLabel/InputLabel.js +1 -1
  299. package/dist/components/primitives/InputLabel/InputLabel.js.map +1 -1
  300. package/dist/components/primitives/InputLabel/InputLabel.styles.d.ts.map +1 -1
  301. package/dist/components/primitives/InputLabel/InputLabel.styles.js +1 -1
  302. package/dist/components/primitives/InputLabel/InputLabel.styles.js.map +1 -1
  303. package/dist/components/primitives/KeyValueInput/KeyValueInput.d.ts.map +1 -1
  304. package/dist/components/primitives/KeyValueInput/KeyValueInput.js +1 -1
  305. package/dist/components/primitives/KeyValueInput/KeyValueInput.js.map +1 -1
  306. package/dist/components/primitives/KeyValueInput/KeyValueInput.styles.d.ts.map +1 -1
  307. package/dist/components/primitives/KeyValueInput/KeyValueInput.styles.js +1 -1
  308. package/dist/components/primitives/KeyValueInput/KeyValueInput.styles.js.map +1 -1
  309. package/dist/components/primitives/Logo/Logo.d.ts.map +1 -1
  310. package/dist/components/primitives/Logo/Logo.js +1 -1
  311. package/dist/components/primitives/Logo/Logo.js.map +1 -1
  312. package/dist/components/primitives/Logo/Logo.styles.d.ts.map +1 -1
  313. package/dist/components/primitives/Logo/Logo.styles.js +1 -1
  314. package/dist/components/primitives/Logo/Logo.styles.js.map +1 -1
  315. package/dist/components/primitives/MultiInput/MultiInput.d.ts.map +1 -1
  316. package/dist/components/primitives/MultiInput/MultiInput.js +1 -1
  317. package/dist/components/primitives/MultiInput/MultiInput.js.map +1 -1
  318. package/dist/components/primitives/MultiInput/MultiInput.styles.d.ts.map +1 -1
  319. package/dist/components/primitives/MultiInput/MultiInput.styles.js +1 -1
  320. package/dist/components/primitives/MultiInput/MultiInput.styles.js.map +1 -1
  321. package/dist/components/primitives/OtpField/OtpField.d.ts.map +1 -1
  322. package/dist/components/primitives/OtpField/OtpField.js +1 -1
  323. package/dist/components/primitives/OtpField/OtpField.js.map +1 -1
  324. package/dist/components/primitives/OtpField/OtpField.styles.d.ts.map +1 -1
  325. package/dist/components/primitives/OtpField/OtpField.styles.js +1 -1
  326. package/dist/components/primitives/OtpField/OtpField.styles.js.map +1 -1
  327. package/dist/components/primitives/PasswordField/PasswordField.d.ts.map +1 -1
  328. package/dist/components/primitives/PasswordField/PasswordField.js +1 -1
  329. package/dist/components/primitives/PasswordField/PasswordField.js.map +1 -1
  330. package/dist/components/primitives/PasswordField/PasswordField.styles.d.ts.map +1 -1
  331. package/dist/components/primitives/PasswordField/PasswordField.styles.js +1 -1
  332. package/dist/components/primitives/PasswordField/PasswordField.styles.js.map +1 -1
  333. package/dist/components/primitives/Select/Select.d.ts.map +1 -1
  334. package/dist/components/primitives/Select/Select.js +1 -1
  335. package/dist/components/primitives/Select/Select.js.map +1 -1
  336. package/dist/components/primitives/Select/Select.styles.d.ts.map +1 -1
  337. package/dist/components/primitives/Select/Select.styles.js +1 -1
  338. package/dist/components/primitives/Select/Select.styles.js.map +1 -1
  339. package/dist/components/primitives/Spinner/Spinner.d.ts +5 -3
  340. package/dist/components/primitives/Spinner/Spinner.d.ts.map +1 -1
  341. package/dist/components/primitives/Spinner/Spinner.js +4 -5
  342. package/dist/components/primitives/Spinner/Spinner.js.map +1 -1
  343. package/dist/components/primitives/Spinner/Spinner.styles.d.ts +4 -1
  344. package/dist/components/primitives/Spinner/Spinner.styles.d.ts.map +1 -1
  345. package/dist/components/primitives/Spinner/Spinner.styles.js +16 -7
  346. package/dist/components/primitives/Spinner/Spinner.styles.js.map +1 -1
  347. package/dist/components/primitives/TextField/TextField.d.ts.map +1 -1
  348. package/dist/components/primitives/TextField/TextField.js +1 -1
  349. package/dist/components/primitives/TextField/TextField.js.map +1 -1
  350. package/dist/components/primitives/TextField/TextField.styles.d.ts.map +1 -1
  351. package/dist/components/primitives/TextField/TextField.styles.js +1 -1
  352. package/dist/components/primitives/TextField/TextField.styles.js.map +1 -1
  353. package/dist/components/primitives/Toggle/Toggle.d.ts.map +1 -1
  354. package/dist/components/primitives/Toggle/Toggle.js +1 -1
  355. package/dist/components/primitives/Toggle/Toggle.js.map +1 -1
  356. package/dist/components/primitives/Toggle/Toggle.styles.d.ts.map +1 -1
  357. package/dist/components/primitives/Toggle/Toggle.styles.js +1 -1
  358. package/dist/components/primitives/Toggle/Toggle.styles.js.map +1 -1
  359. package/dist/components/primitives/Tooltip/Tooltip.d.ts.map +1 -1
  360. package/dist/components/primitives/Tooltip/Tooltip.js +1 -1
  361. package/dist/components/primitives/Tooltip/Tooltip.js.map +1 -1
  362. package/dist/components/primitives/Tooltip/Tooltip.styles.d.ts.map +1 -1
  363. package/dist/components/primitives/Tooltip/Tooltip.styles.js +1 -1
  364. package/dist/components/primitives/Tooltip/Tooltip.styles.js.map +1 -1
  365. package/dist/components/primitives/Typography/Typography.d.ts.map +1 -1
  366. package/dist/components/primitives/Typography/Typography.js +1 -1
  367. package/dist/components/primitives/Typography/Typography.js.map +1 -1
  368. package/dist/components/primitives/Typography/Typography.styles.d.ts.map +1 -1
  369. package/dist/components/primitives/Typography/Typography.styles.js +1 -1
  370. package/dist/components/primitives/Typography/Typography.styles.js.map +1 -1
  371. package/dist/contexts/ThunderID/ThunderIDContext.d.ts +5 -1
  372. package/dist/contexts/ThunderID/ThunderIDContext.d.ts.map +1 -1
  373. package/dist/contexts/ThunderID/ThunderIDContext.js +1 -0
  374. package/dist/contexts/ThunderID/ThunderIDContext.js.map +1 -1
  375. package/dist/contexts/ThunderID/ThunderIDProvider.d.ts.map +1 -1
  376. package/dist/contexts/ThunderID/ThunderIDProvider.js +36 -14
  377. package/dist/contexts/ThunderID/ThunderIDProvider.js.map +1 -1
  378. package/dist/contexts/User/UserContext.d.ts +2 -1
  379. package/dist/contexts/User/UserContext.d.ts.map +1 -1
  380. package/dist/contexts/User/UserContext.js +2 -1
  381. package/dist/contexts/User/UserContext.js.map +1 -1
  382. package/dist/contexts/User/UserProvider.d.ts +5 -2
  383. package/dist/contexts/User/UserProvider.d.ts.map +1 -1
  384. package/dist/contexts/User/UserProvider.js +5 -3
  385. package/dist/contexts/User/UserProvider.js.map +1 -1
  386. package/dist/index.d.ts +2 -0
  387. package/dist/index.d.ts.map +1 -1
  388. package/dist/index.js +2 -1
  389. package/dist/models/config.d.ts +10 -1
  390. package/dist/models/config.d.ts.map +1 -1
  391. package/dist/styles/emotion.d.ts +36 -0
  392. package/dist/styles/emotion.d.ts.map +1 -0
  393. package/dist/styles/emotion.js +58 -0
  394. package/dist/styles/emotion.js.map +1 -0
  395. package/package.json +2 -2
@@ -1,8 +1,7 @@
1
1
  const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
2
+ const require_emotion = require('../../../styles/emotion.cjs');
2
3
  let react = require("react");
3
4
  react = require_rolldown_runtime.__toESM(react);
4
- let __emotion_css = require("@emotion/css");
5
- __emotion_css = require_rolldown_runtime.__toESM(__emotion_css);
6
5
 
7
6
  //#region src/components/primitives/Button/Button.styles.ts
8
7
  /**
@@ -24,7 +23,7 @@ const useStyles = (theme, colorScheme, color, variant, size, fullWidth, disabled
24
23
  small: `calc(${theme.vars.spacing.unit} * 3)`
25
24
  };
26
25
  const iconDimension = iconSizeMap[size] || iconSizeMap["medium"];
27
- const baseButton = __emotion_css.css`
26
+ const baseButton = require_emotion.css`
28
27
  display: inline-flex;
29
28
  align-items: center;
30
29
  justify-content: center;
@@ -51,24 +50,24 @@ const useStyles = (theme, colorScheme, color, variant, size, fullWidth, disabled
51
50
  ` : ""}
52
51
  `;
53
52
  const sizeStyles = {
54
- large: __emotion_css.css`
53
+ large: require_emotion.css`
55
54
  ${variant === "icon" ? `font-size: ${theme.vars.typography.fontSizes.lg};` : `padding: calc(${theme.vars.spacing.unit} * 1.5) calc(${theme.vars.spacing.unit} * 3);
56
55
  font-size: ${theme.vars.typography.fontSizes.lg};
57
56
  min-height: calc(${theme.vars.spacing.unit} * 5);`}
58
57
  `,
59
- medium: __emotion_css.css`
58
+ medium: require_emotion.css`
60
59
  ${variant === "icon" ? `font-size: ${theme.vars.typography.fontSizes.md};` : `padding: calc(${theme.vars.spacing.unit} * 1) calc(${theme.vars.spacing.unit} * 2);
61
60
  font-size: ${theme.vars.typography.fontSizes.md};
62
61
  min-height: calc(${theme.vars.spacing.unit} * 4);`}
63
62
  `,
64
- small: __emotion_css.css`
63
+ small: require_emotion.css`
65
64
  ${variant === "icon" ? `font-size: ${theme.vars.typography.fontSizes.sm};` : `padding: calc(${theme.vars.spacing.unit} * 0.5) calc(${theme.vars.spacing.unit} * 1);
66
65
  font-size: ${theme.vars.typography.fontSizes.sm};
67
66
  min-height: calc(${theme.vars.spacing.unit} * 3);`}
68
67
  `
69
68
  };
70
69
  const variantStyles = {
71
- "primary-icon": __emotion_css.css`
70
+ "primary-icon": require_emotion.css`
72
71
  background-color: transparent;
73
72
  color: ${theme.vars.colors.primary.main};
74
73
  border-color: transparent;
@@ -89,7 +88,7 @@ const useStyles = (theme, colorScheme, color, variant, size, fullWidth, disabled
89
88
  outline: none;
90
89
  }
91
90
  `,
92
- "primary-outline": __emotion_css.css`
91
+ "primary-outline": require_emotion.css`
93
92
  background-color: transparent;
94
93
  color: ${theme.vars.colors.primary.main};
95
94
  border-color: ${theme.vars.colors.primary.main};
@@ -108,7 +107,7 @@ const useStyles = (theme, colorScheme, color, variant, size, fullWidth, disabled
108
107
  opacity: 0.9;
109
108
  }
110
109
  `,
111
- "primary-solid": __emotion_css.css`
110
+ "primary-solid": require_emotion.css`
112
111
  background-color: ${theme.vars.colors.primary.main};
113
112
  color: ${theme.vars.colors.primary.contrastText};
114
113
  border-color: ${theme.vars.colors.primary.main};
@@ -125,7 +124,7 @@ const useStyles = (theme, colorScheme, color, variant, size, fullWidth, disabled
125
124
  opacity: 0.8;
126
125
  }
127
126
  `,
128
- "primary-text": __emotion_css.css`
127
+ "primary-text": require_emotion.css`
129
128
  background-color: transparent;
130
129
  color: ${theme.vars.colors.primary.main};
131
130
  border-color: transparent;
@@ -143,7 +142,7 @@ const useStyles = (theme, colorScheme, color, variant, size, fullWidth, disabled
143
142
  outline: none;
144
143
  }
145
144
  `,
146
- "secondary-icon": __emotion_css.css`
145
+ "secondary-icon": require_emotion.css`
147
146
  background-color: transparent;
148
147
  color: ${theme.vars.colors.secondary.main};
149
148
  border-color: transparent;
@@ -164,7 +163,7 @@ const useStyles = (theme, colorScheme, color, variant, size, fullWidth, disabled
164
163
  outline: none;
165
164
  }
166
165
  `,
167
- "secondary-outline": __emotion_css.css`
166
+ "secondary-outline": require_emotion.css`
168
167
  background-color: transparent;
169
168
  color: ${theme.vars.colors.secondary.main};
170
169
  border-color: ${theme.vars.colors.secondary.main};
@@ -183,7 +182,7 @@ const useStyles = (theme, colorScheme, color, variant, size, fullWidth, disabled
183
182
  opacity: 0.9;
184
183
  }
185
184
  `,
186
- "secondary-solid": __emotion_css.css`
185
+ "secondary-solid": require_emotion.css`
187
186
  background-color: ${theme.vars.colors.secondary.main};
188
187
  color: ${theme.vars.colors.secondary.contrastText};
189
188
  border-color: ${theme.vars.colors.secondary.main};
@@ -200,7 +199,7 @@ const useStyles = (theme, colorScheme, color, variant, size, fullWidth, disabled
200
199
  opacity: 0.8;
201
200
  }
202
201
  `,
203
- "secondary-text": __emotion_css.css`
202
+ "secondary-text": require_emotion.css`
204
203
  background-color: transparent;
205
204
  color: ${theme.vars.colors.secondary.main};
206
205
  border-color: transparent;
@@ -218,7 +217,7 @@ const useStyles = (theme, colorScheme, color, variant, size, fullWidth, disabled
218
217
  outline: none;
219
218
  }
220
219
  `,
221
- "tertiary-icon": __emotion_css.css`
220
+ "tertiary-icon": require_emotion.css`
222
221
  background-color: transparent;
223
222
  color: ${theme.vars.colors.text.secondary};
224
223
  border-color: transparent;
@@ -239,7 +238,7 @@ const useStyles = (theme, colorScheme, color, variant, size, fullWidth, disabled
239
238
  outline: none;
240
239
  }
241
240
  `,
242
- "tertiary-outline": __emotion_css.css`
241
+ "tertiary-outline": require_emotion.css`
243
242
  background-color: transparent;
244
243
  color: ${theme.vars.colors.text.secondary};
245
244
  border-color: ${theme.vars.colors.border};
@@ -256,7 +255,7 @@ const useStyles = (theme, colorScheme, color, variant, size, fullWidth, disabled
256
255
  border-color: ${theme.vars.colors.text.primary};
257
256
  }
258
257
  `,
259
- "tertiary-solid": __emotion_css.css`
258
+ "tertiary-solid": require_emotion.css`
260
259
  background-color: ${theme.vars.colors.text.secondary};
261
260
  color: ${theme.vars.colors.background.surface};
262
261
  border-color: ${theme.vars.colors.text.secondary};
@@ -275,7 +274,7 @@ const useStyles = (theme, colorScheme, color, variant, size, fullWidth, disabled
275
274
  opacity: 0.9;
276
275
  }
277
276
  `,
278
- "tertiary-text": __emotion_css.css`
277
+ "tertiary-text": require_emotion.css`
279
278
  background-color: transparent;
280
279
  color: ${theme.vars.colors.text.secondary};
281
280
  border-color: transparent;
@@ -297,32 +296,32 @@ const useStyles = (theme, colorScheme, color, variant, size, fullWidth, disabled
297
296
  }
298
297
  `
299
298
  };
300
- const spinnerStyles = __emotion_css.css`
299
+ const spinnerStyles = require_emotion.css`
301
300
  display: flex;
302
301
  align-items: center;
303
302
  justify-content: center;
304
303
  `;
305
- const iconStyles = __emotion_css.css`
304
+ const iconStyles = require_emotion.css`
306
305
  display: flex;
307
306
  align-items: center;
308
307
  justify-content: center;
309
308
  `;
310
309
  return {
311
310
  button: baseButton,
312
- content: __emotion_css.css`
311
+ content: require_emotion.css`
313
312
  display: flex;
314
313
  align-items: center;
315
314
  justify-content: center;
316
315
  `,
317
316
  endIcon: iconStyles,
318
- fullWidth: fullWidth ? __emotion_css.css`
317
+ fullWidth: fullWidth ? require_emotion.css`
319
318
  width: 100%;
320
319
  ` : null,
321
320
  icon: iconStyles,
322
- loading: loading ? __emotion_css.css`
321
+ loading: loading ? require_emotion.css`
323
322
  pointer-events: none;
324
323
  ` : null,
325
- shape: shape === "round" ? __emotion_css.css`
324
+ shape: shape === "round" ? require_emotion.css`
326
325
  border-radius: 50%;
327
326
  ` : null,
328
327
  size: sizeStyles[size],
@@ -1 +1 @@
1
- {"version":3,"file":"Button.styles.cjs","names":["iconSizeMap: Record<string, string>","iconDimension: string","baseButton: string","sizeStyles: Record<string, string>","variantStyles: Record<string, string>","spinnerStyles: string","iconStyles: string"],"sources":["../../../../../src/components/primitives/Button/Button.styles.ts"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {css} from '@emotion/css';\nimport {Theme} from '@thunderid/browser';\nimport {useMemo} from 'react';\n\nexport type ButtonColor = 'primary' | 'secondary' | 'tertiary' | string;\nexport type ButtonVariant = 'solid' | 'outline' | 'text' | 'icon';\nexport type ButtonSize = 'small' | 'medium' | 'large';\n\n/**\n * Creates styles for the Button component using BEM methodology\n * @param theme - The theme object containing design tokens\n * @param colorScheme - The current color scheme (used for memoization)\n * @param color - The button color\n * @param variant - The button variant\n * @param size - The button size\n * @param fullWidth - Whether the button should take full width\n * @param disabled - Whether the button is disabled\n * @param loading - Whether the button is in loading state\n * @returns Object containing CSS class names for component styling\n */\nconst useStyles = (\n theme: Theme,\n colorScheme: string,\n color: ButtonColor,\n variant: ButtonVariant,\n size: ButtonSize,\n fullWidth: boolean,\n disabled: boolean,\n loading: boolean,\n shape: 'square' | 'round' = 'square',\n): Record<string, string | null> =>\n useMemo(() => {\n const iconSizeMap: Record<string, string> = {\n large: `calc(${theme.vars.spacing.unit} * 5)`,\n medium: `calc(${theme.vars.spacing.unit} * 4)`,\n small: `calc(${theme.vars.spacing.unit} * 3)`,\n };\n\n const iconDimension: string = iconSizeMap[size] || iconSizeMap['medium'];\n\n const baseButton: string = css`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: calc(${theme.vars.spacing.unit} * 1);\n border-radius: ${shape === 'round'\n ? '50%'\n : theme.vars.components?.Button?.root?.borderRadius || theme.vars.borderRadius.medium};\n font-weight: 500;\n cursor: ${disabled || loading ? 'not-allowed' : 'pointer'};\n outline: none;\n text-decoration: none;\n white-space: nowrap;\n width: ${fullWidth ? '100%' : 'auto'};\n opacity: ${disabled || loading ? 0.6 : 1};\n font-family: ${theme.vars.typography.fontFamily};\n border-width: 1px;\n border-style: solid;\n ${variant === 'icon'\n ? `\n padding: 0;\n min-width: unset;\n min-height: unset;\n width: ${iconDimension};\n height: ${iconDimension};\n justify-content: center;\n align-items: center;\n `\n : ''}\n `;\n\n const sizeStyles: Record<string, string> = {\n large: css`\n ${variant === 'icon'\n ? `font-size: ${theme.vars.typography.fontSizes.lg};`\n : `padding: calc(${theme.vars.spacing.unit} * 1.5) calc(${theme.vars.spacing.unit} * 3);\n font-size: ${theme.vars.typography.fontSizes.lg};\n min-height: calc(${theme.vars.spacing.unit} * 5);`}\n `,\n medium: css`\n ${variant === 'icon'\n ? `font-size: ${theme.vars.typography.fontSizes.md};`\n : `padding: calc(${theme.vars.spacing.unit} * 1) calc(${theme.vars.spacing.unit} * 2);\n font-size: ${theme.vars.typography.fontSizes.md};\n min-height: calc(${theme.vars.spacing.unit} * 4);`}\n `,\n small: css`\n ${variant === 'icon'\n ? `font-size: ${theme.vars.typography.fontSizes.sm};`\n : `padding: calc(${theme.vars.spacing.unit} * 0.5) calc(${theme.vars.spacing.unit} * 1);\n font-size: ${theme.vars.typography.fontSizes.sm};\n min-height: calc(${theme.vars.spacing.unit} * 3);`}\n `,\n };\n\n const variantStyles: Record<string, string> = {\n 'primary-icon': css`\n background-color: transparent;\n color: ${theme.vars.colors.primary.main};\n border-color: transparent;\n &:hover:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.hover};\n color: ${theme.vars.colors.primary.dark};\n }\n &:active:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.selected};\n color: ${theme.vars.colors.primary.dark};\n }\n &:focus:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.focus};\n color: ${theme.vars.colors.primary.dark};\n outline: none;\n }\n `,\n 'primary-outline': css`\n background-color: transparent;\n color: ${theme.vars.colors.primary.main};\n border-color: ${theme.vars.colors.primary.main};\n &:hover:not(:disabled) {\n background-color: ${theme.vars.colors.primary.main};\n color: ${theme.vars.colors.primary.contrastText};\n }\n &:active:not(:disabled) {\n background-color: ${theme.vars.colors.primary.main};\n color: ${theme.vars.colors.primary.contrastText};\n opacity: 0.9;\n }\n &:focus:not(:disabled) {\n background-color: ${theme.vars.colors.primary.main};\n color: ${theme.vars.colors.primary.contrastText};\n opacity: 0.9;\n }\n `,\n 'primary-solid': css`\n background-color: ${theme.vars.colors.primary.main};\n color: ${theme.vars.colors.primary.contrastText};\n border-color: ${theme.vars.colors.primary.main};\n &:hover:not(:disabled) {\n background-color: ${theme.vars.colors.primary.main};\n opacity: 0.9;\n }\n &:active:not(:disabled) {\n background-color: ${theme.vars.colors.primary.main};\n opacity: 0.8;\n }\n &:focus:not(:disabled) {\n background-color: ${theme.vars.colors.primary.main};\n opacity: 0.8;\n }\n `,\n 'primary-text': css`\n background-color: transparent;\n color: ${theme.vars.colors.primary.main};\n border-color: transparent;\n &:hover:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.hover};\n }\n &:active:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.selected};\n }\n &:focus:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.focus};\n outline: none;\n }\n `,\n 'secondary-icon': css`\n background-color: transparent;\n color: ${theme.vars.colors.secondary.main};\n border-color: transparent;\n &:hover:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.hover};\n color: ${theme.vars.colors.secondary.dark};\n }\n &:active:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.selected};\n color: ${theme.vars.colors.secondary.dark};\n }\n &:focus:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.focus};\n color: ${theme.vars.colors.secondary.dark};\n outline: none;\n }\n `,\n 'secondary-outline': css`\n background-color: transparent;\n color: ${theme.vars.colors.secondary.main};\n border-color: ${theme.vars.colors.secondary.main};\n &:hover:not(:disabled) {\n background-color: ${theme.vars.colors.secondary.main};\n color: ${theme.vars.colors.secondary.contrastText};\n }\n &:active:not(:disabled) {\n background-color: ${theme.vars.colors.secondary.main};\n color: ${theme.vars.colors.secondary.contrastText};\n opacity: 0.9;\n }\n &:focus:not(:disabled) {\n background-color: ${theme.vars.colors.secondary.main};\n color: ${theme.vars.colors.secondary.contrastText};\n opacity: 0.9;\n }\n `,\n 'secondary-solid': css`\n background-color: ${theme.vars.colors.secondary.main};\n color: ${theme.vars.colors.secondary.contrastText};\n border-color: ${theme.vars.colors.secondary.main};\n &:hover:not(:disabled) {\n background-color: ${theme.vars.colors.secondary.main};\n opacity: 0.9;\n }\n &:active:not(:disabled) {\n background-color: ${theme.vars.colors.secondary.main};\n opacity: 0.8;\n }\n &:focus:not(:disabled) {\n background-color: ${theme.vars.colors.secondary.main};\n opacity: 0.8;\n }\n `,\n 'secondary-text': css`\n background-color: transparent;\n color: ${theme.vars.colors.secondary.main};\n border-color: transparent;\n &:hover:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.hover};\n }\n &:active:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.selected};\n }\n &:focus:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.focus};\n outline: none;\n }\n `,\n 'tertiary-icon': css`\n background-color: transparent;\n color: ${theme.vars.colors.text.secondary};\n border-color: transparent;\n &:hover:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.hover};\n color: ${theme.vars.colors.text.primary};\n }\n &:active:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.selected};\n color: ${theme.vars.colors.text.primary};\n }\n &:focus:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.focus};\n color: ${theme.vars.colors.text.primary};\n outline: none;\n }\n `,\n 'tertiary-outline': css`\n background-color: transparent;\n color: ${theme.vars.colors.text.secondary};\n border-color: ${theme.vars.colors.border};\n &:hover:not(:disabled) {\n background-color: ${theme.vars.colors.action.hover};\n border-color: ${theme.vars.colors.text.secondary};\n }\n &:active:not(:disabled) {\n background-color: ${theme.vars.colors.action.selected};\n border-color: ${theme.vars.colors.text.primary};\n }\n &:focus:not(:disabled) {\n background-color: ${theme.vars.colors.action.focus};\n border-color: ${theme.vars.colors.text.primary};\n }\n `,\n 'tertiary-solid': css`\n background-color: ${theme.vars.colors.text.secondary};\n color: ${theme.vars.colors.background.surface};\n border-color: ${theme.vars.colors.text.secondary};\n &:hover:not(:disabled) {\n background-color: ${theme.vars.colors.text.primary};\n color: ${theme.vars.colors.background.surface};\n }\n &:active:not(:disabled) {\n background-color: ${theme.vars.colors.text.primary};\n color: ${theme.vars.colors.background.surface};\n opacity: 0.9;\n }\n &:focus:not(:disabled) {\n background-color: ${theme.vars.colors.text.primary};\n color: ${theme.vars.colors.background.surface};\n opacity: 0.9;\n }\n `,\n 'tertiary-text': css`\n background-color: transparent;\n color: ${theme.vars.colors.text.secondary};\n border-color: transparent;\n &:hover:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.hover};\n color: ${theme.vars.colors.text.primary};\n }\n &:active:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.selected};\n color: ${theme.vars.colors.text.primary};\n }\n &:focus:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.focus};\n color: ${theme.vars.colors.text.primary};\n outline: none;\n }\n `,\n };\n\n const spinnerStyles: string = css`\n display: flex;\n align-items: center;\n justify-content: center;\n `;\n\n const iconStyles: string = css`\n display: flex;\n align-items: center;\n justify-content: center;\n `;\n\n const contentStyles: string = css`\n display: flex;\n align-items: center;\n justify-content: center;\n `;\n\n return {\n button: baseButton,\n content: contentStyles,\n endIcon: iconStyles,\n fullWidth: fullWidth\n ? css`\n width: 100%;\n `\n : null,\n icon: iconStyles,\n loading: loading\n ? css`\n pointer-events: none;\n `\n : null,\n shape:\n shape === 'round'\n ? css`\n border-radius: 50%;\n `\n : null,\n size: sizeStyles[size],\n spinner: spinnerStyles,\n startIcon: iconStyles,\n variant: variantStyles[`${color}-${variant}`] || variantStyles['primary-solid'],\n };\n }, [theme, colorScheme, color, variant, size, fullWidth, disabled, loading]);\n\nexport default useStyles;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAuBA,MAAM,aACJ,OACA,aACA,OACA,SACA,MACA,WACA,UACA,SACA,QAA4B,sCAEd;CACZ,MAAMA,cAAsC;EAC1C,OAAO,QAAQ,MAAM,KAAK,QAAQ,KAAK;EACvC,QAAQ,QAAQ,MAAM,KAAK,QAAQ,KAAK;EACxC,OAAO,QAAQ,MAAM,KAAK,QAAQ,KAAK;EACxC;CAED,MAAMC,gBAAwB,YAAY,SAAS,YAAY;CAE/D,MAAMC,aAAqB,iBAAG;;;;kBAIhB,MAAM,KAAK,QAAQ,KAAK;uBACnB,UAAU,UACvB,QACA,MAAM,KAAK,YAAY,QAAQ,MAAM,gBAAgB,MAAM,KAAK,aAAa,OAAO;;gBAE9E,YAAY,UAAU,gBAAgB,UAAU;;;;eAIjD,YAAY,SAAS,OAAO;iBAC1B,YAAY,UAAU,KAAM,EAAE;qBAC1B,MAAM,KAAK,WAAW,WAAW;;;QAG9C,YAAY,SACV;;;;iBAIO,cAAc;kBACb,cAAc;;;UAItB,GAAG;;CAGT,MAAMC,aAAqC;EACzC,OAAO,iBAAG;UACN,YAAY,SACV,cAAc,MAAM,KAAK,WAAW,UAAU,G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WAAW,QAAQ;;;8BAG1B,MAAM,KAAK,OAAO,KAAK,QAAQ;mBAC1C,MAAM,KAAK,OAAO,WAAW,QAAQ;;;;8BAI1B,MAAM,KAAK,OAAO,KAAK,QAAQ;mBAC1C,MAAM,KAAK,OAAO,WAAW,QAAQ;;;;EAIlD,iBAAiB,iBAAG;;iBAET,MAAM,KAAK,OAAO,KAAK,UAAU;;;;8BAIpB,MAAM,KAAK,OAAO,OAAO,MAAM;mBAC1C,MAAM,KAAK,OAAO,KAAK,QAAQ;;;;8BAIpB,MAAM,KAAK,OAAO,OAAO,SAAS;mBAC7C,MAAM,KAAK,OAAO,KAAK,QAAQ;;;;8BAIpB,MAAM,KAAK,OAAO,OAAO,MAAM;mBAC1C,MAAM,KAAK,OAAO,KAAK,QAAQ;;;;EAI7C;CAED,MAAMC,gBAAwB,iBAAG;;;;;CAMjC,MAAMC,aAAqB,iBAAG;;;;;AAY9B,QAAO;EACL,QAAQ;EACR,SAR4B,iBAAG;;;;;EAS/B,SAAS;EACT,WAAW,YACP,iBAAG;;cAGH;EACJ,MAAM;EACN,SAAS,UACL,iBAAG;;cAGH;EACJ,OACE,UAAU,UACN,iBAAG;;gBAGH;EACN,MAAM,WAAW;EACjB,SAAS;EACT,WAAW;EACX,SAAS,cAAc,GAAG,MAAM,GAAG,cAAc,cAAc;EAChE;GACA;CAAC;CAAO;CAAa;CAAO;CAAS;CAAM;CAAW;CAAU;CAAQ,CAAC;AAE9E,4BAAe"}
1
+ {"version":3,"file":"Button.styles.cjs","names":["iconSizeMap: Record<string, string>","iconDimension: string","baseButton: string","sizeStyles: Record<string, string>","variantStyles: Record<string, string>","spinnerStyles: string","iconStyles: string"],"sources":["../../../../../src/components/primitives/Button/Button.styles.ts"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {Theme} from '@thunderid/browser';\nimport {useMemo} from 'react';\nimport {css} from '../../../styles/emotion';\n\nexport type ButtonColor = 'primary' | 'secondary' | 'tertiary' | string;\nexport type ButtonVariant = 'solid' | 'outline' | 'text' | 'icon';\nexport type ButtonSize = 'small' | 'medium' | 'large';\n\n/**\n * Creates styles for the Button component using BEM methodology\n * @param theme - The theme object containing design tokens\n * @param colorScheme - The current color scheme (used for memoization)\n * @param color - The button color\n * @param variant - The button variant\n * @param size - The button size\n * @param fullWidth - Whether the button should take full width\n * @param disabled - Whether the button is disabled\n * @param loading - Whether the button is in loading state\n * @returns Object containing CSS class names for component styling\n */\nconst useStyles = (\n theme: Theme,\n colorScheme: string,\n color: ButtonColor,\n variant: ButtonVariant,\n size: ButtonSize,\n fullWidth: boolean,\n disabled: boolean,\n loading: boolean,\n shape: 'square' | 'round' = 'square',\n): Record<string, string | null> =>\n useMemo(() => {\n const iconSizeMap: Record<string, string> = {\n large: `calc(${theme.vars.spacing.unit} * 5)`,\n medium: `calc(${theme.vars.spacing.unit} * 4)`,\n small: `calc(${theme.vars.spacing.unit} * 3)`,\n };\n\n const iconDimension: string = iconSizeMap[size] || iconSizeMap['medium'];\n\n const baseButton: string = css`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: calc(${theme.vars.spacing.unit} * 1);\n border-radius: ${shape === 'round'\n ? '50%'\n : theme.vars.components?.Button?.root?.borderRadius || theme.vars.borderRadius.medium};\n font-weight: 500;\n cursor: ${disabled || loading ? 'not-allowed' : 'pointer'};\n outline: none;\n text-decoration: none;\n white-space: nowrap;\n width: ${fullWidth ? '100%' : 'auto'};\n opacity: ${disabled || loading ? 0.6 : 1};\n font-family: ${theme.vars.typography.fontFamily};\n border-width: 1px;\n border-style: solid;\n ${variant === 'icon'\n ? `\n padding: 0;\n min-width: unset;\n min-height: unset;\n width: ${iconDimension};\n height: ${iconDimension};\n justify-content: center;\n align-items: center;\n `\n : ''}\n `;\n\n const sizeStyles: Record<string, string> = {\n large: css`\n ${variant === 'icon'\n ? `font-size: ${theme.vars.typography.fontSizes.lg};`\n : `padding: calc(${theme.vars.spacing.unit} * 1.5) calc(${theme.vars.spacing.unit} * 3);\n font-size: ${theme.vars.typography.fontSizes.lg};\n min-height: calc(${theme.vars.spacing.unit} * 5);`}\n `,\n medium: css`\n ${variant === 'icon'\n ? `font-size: ${theme.vars.typography.fontSizes.md};`\n : `padding: calc(${theme.vars.spacing.unit} * 1) calc(${theme.vars.spacing.unit} * 2);\n font-size: ${theme.vars.typography.fontSizes.md};\n min-height: calc(${theme.vars.spacing.unit} * 4);`}\n `,\n small: css`\n ${variant === 'icon'\n ? `font-size: ${theme.vars.typography.fontSizes.sm};`\n : `padding: calc(${theme.vars.spacing.unit} * 0.5) calc(${theme.vars.spacing.unit} * 1);\n font-size: ${theme.vars.typography.fontSizes.sm};\n min-height: calc(${theme.vars.spacing.unit} * 3);`}\n `,\n };\n\n const variantStyles: Record<string, string> = {\n 'primary-icon': css`\n background-color: transparent;\n color: ${theme.vars.colors.primary.main};\n border-color: transparent;\n &:hover:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.hover};\n color: ${theme.vars.colors.primary.dark};\n }\n &:active:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.selected};\n color: ${theme.vars.colors.primary.dark};\n }\n &:focus:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.focus};\n color: ${theme.vars.colors.primary.dark};\n outline: none;\n }\n `,\n 'primary-outline': css`\n background-color: transparent;\n color: ${theme.vars.colors.primary.main};\n border-color: ${theme.vars.colors.primary.main};\n &:hover:not(:disabled) {\n background-color: ${theme.vars.colors.primary.main};\n color: ${theme.vars.colors.primary.contrastText};\n }\n &:active:not(:disabled) {\n background-color: ${theme.vars.colors.primary.main};\n color: ${theme.vars.colors.primary.contrastText};\n opacity: 0.9;\n }\n &:focus:not(:disabled) {\n background-color: ${theme.vars.colors.primary.main};\n color: ${theme.vars.colors.primary.contrastText};\n opacity: 0.9;\n }\n `,\n 'primary-solid': css`\n background-color: ${theme.vars.colors.primary.main};\n color: ${theme.vars.colors.primary.contrastText};\n border-color: ${theme.vars.colors.primary.main};\n &:hover:not(:disabled) {\n background-color: ${theme.vars.colors.primary.main};\n opacity: 0.9;\n }\n &:active:not(:disabled) {\n background-color: ${theme.vars.colors.primary.main};\n opacity: 0.8;\n }\n &:focus:not(:disabled) {\n background-color: ${theme.vars.colors.primary.main};\n opacity: 0.8;\n }\n `,\n 'primary-text': css`\n background-color: transparent;\n color: ${theme.vars.colors.primary.main};\n border-color: transparent;\n &:hover:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.hover};\n }\n &:active:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.selected};\n }\n &:focus:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.focus};\n outline: none;\n }\n `,\n 'secondary-icon': css`\n background-color: transparent;\n color: ${theme.vars.colors.secondary.main};\n border-color: transparent;\n &:hover:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.hover};\n color: ${theme.vars.colors.secondary.dark};\n }\n &:active:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.selected};\n color: ${theme.vars.colors.secondary.dark};\n }\n &:focus:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.focus};\n color: ${theme.vars.colors.secondary.dark};\n outline: none;\n }\n `,\n 'secondary-outline': css`\n background-color: transparent;\n color: ${theme.vars.colors.secondary.main};\n border-color: ${theme.vars.colors.secondary.main};\n &:hover:not(:disabled) {\n background-color: ${theme.vars.colors.secondary.main};\n color: ${theme.vars.colors.secondary.contrastText};\n }\n &:active:not(:disabled) {\n background-color: ${theme.vars.colors.secondary.main};\n color: ${theme.vars.colors.secondary.contrastText};\n opacity: 0.9;\n }\n &:focus:not(:disabled) {\n background-color: ${theme.vars.colors.secondary.main};\n color: ${theme.vars.colors.secondary.contrastText};\n opacity: 0.9;\n }\n `,\n 'secondary-solid': css`\n background-color: ${theme.vars.colors.secondary.main};\n color: ${theme.vars.colors.secondary.contrastText};\n border-color: ${theme.vars.colors.secondary.main};\n &:hover:not(:disabled) {\n background-color: ${theme.vars.colors.secondary.main};\n opacity: 0.9;\n }\n &:active:not(:disabled) {\n background-color: ${theme.vars.colors.secondary.main};\n opacity: 0.8;\n }\n &:focus:not(:disabled) {\n background-color: ${theme.vars.colors.secondary.main};\n opacity: 0.8;\n }\n `,\n 'secondary-text': css`\n background-color: transparent;\n color: ${theme.vars.colors.secondary.main};\n border-color: transparent;\n &:hover:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.hover};\n }\n &:active:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.selected};\n }\n &:focus:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.focus};\n outline: none;\n }\n `,\n 'tertiary-icon': css`\n background-color: transparent;\n color: ${theme.vars.colors.text.secondary};\n border-color: transparent;\n &:hover:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.hover};\n color: ${theme.vars.colors.text.primary};\n }\n &:active:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.selected};\n color: ${theme.vars.colors.text.primary};\n }\n &:focus:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.focus};\n color: ${theme.vars.colors.text.primary};\n outline: none;\n }\n `,\n 'tertiary-outline': css`\n background-color: transparent;\n color: ${theme.vars.colors.text.secondary};\n border-color: ${theme.vars.colors.border};\n &:hover:not(:disabled) {\n background-color: ${theme.vars.colors.action.hover};\n border-color: ${theme.vars.colors.text.secondary};\n }\n &:active:not(:disabled) {\n background-color: ${theme.vars.colors.action.selected};\n border-color: ${theme.vars.colors.text.primary};\n }\n &:focus:not(:disabled) {\n background-color: ${theme.vars.colors.action.focus};\n border-color: ${theme.vars.colors.text.primary};\n }\n `,\n 'tertiary-solid': css`\n background-color: ${theme.vars.colors.text.secondary};\n color: ${theme.vars.colors.background.surface};\n border-color: ${theme.vars.colors.text.secondary};\n &:hover:not(:disabled) {\n background-color: ${theme.vars.colors.text.primary};\n color: ${theme.vars.colors.background.surface};\n }\n &:active:not(:disabled) {\n background-color: ${theme.vars.colors.text.primary};\n color: ${theme.vars.colors.background.surface};\n opacity: 0.9;\n }\n &:focus:not(:disabled) {\n background-color: ${theme.vars.colors.text.primary};\n color: ${theme.vars.colors.background.surface};\n opacity: 0.9;\n }\n `,\n 'tertiary-text': css`\n background-color: transparent;\n color: ${theme.vars.colors.text.secondary};\n border-color: transparent;\n &:hover:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.hover};\n color: ${theme.vars.colors.text.primary};\n }\n &:active:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.selected};\n color: ${theme.vars.colors.text.primary};\n }\n &:focus:not(:disabled) {\n border-color: transparent;\n background-color: ${theme.vars.colors.action.focus};\n color: ${theme.vars.colors.text.primary};\n outline: none;\n }\n `,\n };\n\n const spinnerStyles: string = css`\n display: flex;\n align-items: center;\n justify-content: center;\n `;\n\n const iconStyles: string = css`\n display: flex;\n align-items: center;\n justify-content: center;\n `;\n\n const contentStyles: string = css`\n display: flex;\n align-items: center;\n justify-content: center;\n `;\n\n return {\n button: baseButton,\n content: contentStyles,\n endIcon: iconStyles,\n fullWidth: fullWidth\n ? css`\n width: 100%;\n `\n : null,\n icon: iconStyles,\n loading: loading\n ? css`\n pointer-events: none;\n `\n : null,\n shape:\n shape === 'round'\n ? css`\n border-radius: 50%;\n `\n : null,\n size: sizeStyles[size],\n spinner: spinnerStyles,\n startIcon: iconStyles,\n variant: variantStyles[`${color}-${variant}`] || variantStyles['primary-solid'],\n };\n }, [theme, colorScheme, color, variant, size, fullWidth, disabled, loading]);\n\nexport default useStyles;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAuBA,MAAM,aACJ,OACA,aACA,OACA,SACA,MACA,WACA,UACA,SACA,QAA4B,sCAEd;CACZ,MAAMA,cAAsC;EAC1C,OAAO,QAAQ,MAAM,KAAK,QAAQ,KAAK;EACvC,QAAQ,QAAQ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ACL,mBAAG;;cAGH;EACJ,OACE,UAAU,UACN,mBAAG;;gBAGH;EACN,MAAM,WAAW;EACjB,SAAS;EACT,WAAW;EACX,SAAS,cAAc,GAAG,MAAM,GAAG,cAAc,cAAc;EAChE;GACA;CAAC;CAAO;CAAa;CAAO;CAAS;CAAM;CAAW;CAAU;CAAQ,CAAC;AAE9E,4BAAe"}
@@ -1,4 +1,5 @@
1
1
  const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
2
+ const require_emotion = require('../../../styles/emotion.cjs');
2
3
  const require_useTheme = require('../../../contexts/Theme/useTheme.cjs');
3
4
  const require_Typography = require('../Typography/Typography.cjs');
4
5
  const require_Card_styles = require('./Card.styles.cjs');
@@ -8,8 +9,6 @@ let react = require("react");
8
9
  react = require_rolldown_runtime.__toESM(react);
9
10
  let react_jsx_runtime = require("react/jsx-runtime");
10
11
  react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
11
- let __emotion_css = require("@emotion/css");
12
- __emotion_css = require_rolldown_runtime.__toESM(__emotion_css);
13
12
 
14
13
  //#region src/components/primitives/Card/Card.tsx
15
14
  /**
@@ -41,7 +40,7 @@ const Card = (0, react.forwardRef)(({ variant = "default", clickable = false, ch
41
40
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
42
41
  ref,
43
42
  style,
44
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("card")), styles["card"], styles["variant"], styles["clickable"], (0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("card", null, variant)), { [(0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("card", null, "clickable"))]: clickable }, className),
43
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("card")), styles["card"], styles["variant"], styles["clickable"], (0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("card", null, variant)), { [(0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("card", null, "clickable"))]: clickable }, className),
45
44
  ...rest,
46
45
  children
47
46
  });
@@ -55,7 +54,7 @@ const CardHeader = (0, react.forwardRef)(({ children, className, style,...rest }
55
54
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
56
55
  ref,
57
56
  style,
58
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("card", "header")), styles["header"], className),
57
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("card", "header")), styles["header"], className),
59
58
  ...rest,
60
59
  children
61
60
  });
@@ -93,7 +92,7 @@ const CardTitle = ({ children, level = 3, className, style,...rest }) => {
93
92
  component: getComponentFromLevel(level),
94
93
  variant: getVariantFromLevel(level),
95
94
  style,
96
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("card", "title")), styles["title"], className),
95
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("card", "title")), styles["title"], className),
97
96
  fontWeight: 600,
98
97
  ...filteredRest,
99
98
  children
@@ -111,7 +110,7 @@ const CardDescription = ({ children, className, style,...rest }) => {
111
110
  variant: "body2",
112
111
  color: "textSecondary",
113
112
  style,
114
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("card", "description")), styles["description"], className),
113
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("card", "description")), styles["description"], className),
115
114
  ...filteredRest,
116
115
  children
117
116
  });
@@ -125,7 +124,7 @@ const CardAction = (0, react.forwardRef)(({ children, className, style,...rest }
125
124
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
126
125
  ref,
127
126
  style,
128
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("card", "action")), styles["action"], className),
127
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("card", "action")), styles["action"], className),
129
128
  ...rest,
130
129
  children
131
130
  });
@@ -139,7 +138,7 @@ const CardContent = (0, react.forwardRef)(({ children, className, style,...rest
139
138
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
140
139
  ref,
141
140
  style,
142
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("card", "content")), styles["content"], className),
141
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("card", "content")), styles["content"], className),
143
142
  ...rest,
144
143
  children
145
144
  });
@@ -153,7 +152,7 @@ const CardFooter = (0, react.forwardRef)(({ children, className, style,...rest }
153
152
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
154
153
  ref,
155
154
  style,
156
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("card", "footer")), styles["footer"], className),
155
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("card", "footer")), styles["footer"], className),
157
156
  ...rest,
158
157
  children
159
158
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Card.cjs","names":["Card: ForwardRefExoticComponent<CardProps & RefAttributes<HTMLDivElement>>","useTheme","styles: Record<string, string>","useStyles","CardHeader: ForwardRefExoticComponent<CardHeaderProps & RefAttributes<HTMLDivElement>>","CardTitle: FC<CardTitleProps>","Typography","CardDescription: FC<CardDescriptionProps>","CardAction: ForwardRefExoticComponent<CardActionProps & RefAttributes<HTMLDivElement>>","CardContent: ForwardRefExoticComponent<CardContentProps & RefAttributes<HTMLDivElement>>","CardFooter: ForwardRefExoticComponent<CardFooterProps & RefAttributes<HTMLDivElement>>"],"sources":["../../../../../src/components/primitives/Card/Card.tsx"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {cx} from '@emotion/css';\nimport {withVendorCSSClassPrefix, bem} from '@thunderid/browser';\nimport {\n HTMLAttributes,\n forwardRef,\n ReactNode,\n ForwardRefExoticComponent,\n RefAttributes,\n Ref,\n ElementType,\n FC,\n} from 'react';\nimport useStyles from './Card.styles';\nimport useTheme from '../../../contexts/Theme/useTheme';\nimport Typography from '../Typography/Typography';\nimport {TypographyVariant} from '../Typography/Typography.styles';\n\nexport type CardVariant = 'default' | 'outlined' | 'elevated';\n\nexport interface CardProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Card content\n */\n children?: ReactNode;\n /**\n * Whether the card should be clickable (shows hover effects)\n */\n clickable?: boolean;\n /**\n * The visual variant of the card\n */\n variant?: CardVariant;\n}\n\nexport interface CardHeaderProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Header content\n */\n children?: ReactNode;\n}\n\nexport interface CardTitleProps extends HTMLAttributes<HTMLHeadingElement> {\n /**\n * Title content\n */\n children?: ReactNode;\n /**\n * The heading level to use\n */\n level?: 1 | 2 | 3 | 4 | 5 | 6;\n}\n\nexport interface CardDescriptionProps extends HTMLAttributes<HTMLParagraphElement> {\n /**\n * Description content\n */\n children?: ReactNode;\n}\n\nexport interface CardActionProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Action content\n */\n children?: ReactNode;\n}\n\nexport interface CardContentProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Content\n */\n children?: ReactNode;\n}\n\nexport interface CardFooterProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Footer content\n */\n children?: ReactNode;\n}\n\n/**\n * Card component that provides a flexible container for content.\n *\n * @example\n * ```tsx\n * <Card variant=\"elevated\" clickable>\n * <Card.Header>\n * <Card.Title>Card Title</Card.Title>\n * <Card.Description>Card Description</Card.Description>\n * <Card.Action>\n * <Button variant=\"link\">Action</Button>\n * </Card.Action>\n * </Card.Header>\n * <Card.Content>\n * <p>Card content goes here</p>\n * </Card.Content>\n * <Card.Footer>\n * <Button>Cancel</Button>\n * <Button variant=\"outline\">Submit</Button>\n * </Card.Footer>\n * </Card>\n * ```\n */\nconst Card: ForwardRefExoticComponent<CardProps & RefAttributes<HTMLDivElement>> = forwardRef<\n HTMLDivElement,\n CardProps\n>(\n (\n {variant = 'default', clickable = false, children, className, style, ...rest}: CardProps,\n ref: Ref<HTMLDivElement>,\n ) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const styles: Record<string, string> = useStyles(theme, colorScheme, variant, clickable);\n\n return (\n <div\n ref={ref}\n style={style}\n className={cx(\n withVendorCSSClassPrefix(bem('card')),\n styles['card'],\n styles['variant'],\n styles['clickable'],\n withVendorCSSClassPrefix(bem('card', null, variant)),\n {\n [withVendorCSSClassPrefix(bem('card', null, 'clickable'))]: clickable,\n },\n className,\n )}\n {...rest}\n >\n {children}\n </div>\n );\n },\n);\n\n/**\n * Card header component that contains the title, description, and optional actions.\n */\nconst CardHeader: ForwardRefExoticComponent<CardHeaderProps & RefAttributes<HTMLDivElement>> = forwardRef<\n HTMLDivElement,\n CardHeaderProps\n>(({children, className, style, ...rest}: CardHeaderProps, ref: Ref<HTMLDivElement>) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const styles: Record<string, string> = useStyles(theme, colorScheme, 'default', false);\n\n return (\n <div\n ref={ref}\n style={style}\n className={cx(withVendorCSSClassPrefix(bem('card', 'header')), styles['header'], className)}\n {...rest}\n >\n {children}\n </div>\n );\n});\n\n/**\n * Card title component.\n */\nconst CardTitle: FC<CardTitleProps> = ({children, level = 3, className, style, ...rest}: CardTitleProps) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const styles: Record<string, string> = useStyles(theme, colorScheme, 'default', false);\n\n const getVariantFromLevel = (lvl: number): string => {\n switch (lvl) {\n case 1:\n return 'h1';\n case 2:\n return 'h2';\n case 3:\n return 'h3';\n case 4:\n return 'h4';\n case 5:\n return 'h5';\n case 6:\n return 'h6';\n default:\n return 'h3';\n }\n };\n\n const getComponentFromLevel = (lvl: number): string => {\n switch (lvl) {\n case 1:\n return 'h1';\n case 2:\n return 'h2';\n case 3:\n return 'h3';\n case 4:\n return 'h4';\n case 5:\n return 'h5';\n case 6:\n return 'h6';\n default:\n return 'h3';\n }\n };\n\n const {color, ...filteredRest} = rest;\n\n return (\n <Typography\n component={getComponentFromLevel(level) as ElementType}\n variant={getVariantFromLevel(level) as TypographyVariant}\n style={style}\n className={cx(withVendorCSSClassPrefix(bem('card', 'title')), styles['title'], className)}\n fontWeight={600}\n {...filteredRest}\n >\n {children}\n </Typography>\n );\n};\n\n/**\n * Card description component.\n */\nconst CardDescription: FC<CardDescriptionProps> = ({children, className, style, ...rest}: CardDescriptionProps) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const styles: Record<string, string> = useStyles(theme, colorScheme, 'default', false);\n\n const {color, ...filteredRest} = rest;\n\n return (\n <Typography\n component=\"p\"\n variant=\"body2\"\n color=\"textSecondary\"\n style={style}\n className={cx(withVendorCSSClassPrefix(bem('card', 'description')), styles['description'], className)}\n {...filteredRest}\n >\n {children}\n </Typography>\n );\n};\n\n/**\n * Card action component for action elements in the header.\n */\nconst CardAction: ForwardRefExoticComponent<CardActionProps & RefAttributes<HTMLDivElement>> = forwardRef<\n HTMLDivElement,\n CardActionProps\n>(({children, className, style, ...rest}: CardActionProps, ref: Ref<HTMLDivElement>) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const styles: Record<string, string> = useStyles(theme, colorScheme, 'default', false);\n\n return (\n <div\n ref={ref}\n style={style}\n className={cx(withVendorCSSClassPrefix(bem('card', 'action')), styles['action'], className)}\n {...rest}\n >\n {children}\n </div>\n );\n});\n\n/**\n * Card content component that contains the main content of the card.\n */\nconst CardContent: ForwardRefExoticComponent<CardContentProps & RefAttributes<HTMLDivElement>> = forwardRef<\n HTMLDivElement,\n CardContentProps\n>(({children, className, style, ...rest}: CardContentProps, ref: Ref<HTMLDivElement>) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const styles: Record<string, string> = useStyles(theme, colorScheme, 'default', false);\n\n return (\n <div\n ref={ref}\n style={style}\n className={cx(withVendorCSSClassPrefix(bem('card', 'content')), styles['content'], className)}\n {...rest}\n >\n {children}\n </div>\n );\n});\n\n/**\n * Card footer component that contains footer actions or additional information.\n */\nconst CardFooter: ForwardRefExoticComponent<CardFooterProps & RefAttributes<HTMLDivElement>> = forwardRef<\n HTMLDivElement,\n CardFooterProps\n>(({children, className, style, ...rest}: CardFooterProps, ref: Ref<HTMLDivElement>) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const styles: Record<string, string> = useStyles(theme, colorScheme, 'default', false);\n\n return (\n <div\n ref={ref}\n style={style}\n className={cx(withVendorCSSClassPrefix(bem('card', 'footer')), styles['footer'], className)}\n {...rest}\n >\n {children}\n </div>\n );\n});\n\nCard.displayName = 'Card';\nCardHeader.displayName = 'Card.Header';\nCardTitle.displayName = 'Card.Title';\nCardDescription.displayName = 'Card.Description';\nCardAction.displayName = 'Card.Action';\nCardContent.displayName = 'Card.Content';\nCardFooter.displayName = 'Card.Footer';\n\n(Card as any).Header = CardHeader;\n(Card as any).Title = CardTitle;\n(Card as any).Description = CardDescription;\n(Card as any).Action = CardAction;\n(Card as any).Content = CardContent;\n(Card as any).Footer = CardFooter;\n\nexport interface CardComponent extends ForwardRefExoticComponent<CardProps & RefAttributes<HTMLDivElement>> {\n Action: typeof CardAction;\n Content: typeof CardContent;\n Description: typeof CardDescription;\n Footer: typeof CardFooter;\n Header: typeof CardHeader;\n Title: typeof CardTitle;\n}\n\nexport default Card as CardComponent;\nexport {Card, CardHeader, CardTitle, CardDescription, CardAction, CardContent, CardFooter};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0GA,MAAMA,8BAKF,EAAC,UAAU,W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ACE,2CAAC;EACM;EACE;EACP,gHAA2C,QAAQ,SAAS,CAAC,EAAE,OAAO,WAAW,UAAU;EAC3F,GAAI;EAEH;GACG;EAER;AAEF,KAAK,cAAc;AACnB,WAAW,cAAc;AACzB,UAAU,cAAc;AACxB,gBAAgB,cAAc;AAC9B,WAAW,cAAc;AACzB,YAAY,cAAc;AAC1B,WAAW,cAAc;AAEzB,AAAC,KAAa,SAAS;AACvB,AAAC,KAAa,QAAQ;AACtB,AAAC,KAAa,cAAc;AAC5B,AAAC,KAAa,SAAS;AACvB,AAAC,KAAa,UAAU;AACxB,AAAC,KAAa,SAAS;AAWvB,mBAAe"}
1
+ {"version":3,"file":"Card.cjs","names":["Card: ForwardRefExoticComponent<CardProps & RefAttributes<HTMLDivElement>>","useTheme","styles: Record<string, string>","useStyles","cx","CardHeader: ForwardRefExoticComponent<CardHeaderProps & RefAttributes<HTMLDivElement>>","CardTitle: FC<CardTitleProps>","Typography","CardDescription: FC<CardDescriptionProps>","CardAction: ForwardRefExoticComponent<CardActionProps & RefAttributes<HTMLDivElement>>","CardContent: ForwardRefExoticComponent<CardContentProps & RefAttributes<HTMLDivElement>>","CardFooter: ForwardRefExoticComponent<CardFooterProps & RefAttributes<HTMLDivElement>>"],"sources":["../../../../../src/components/primitives/Card/Card.tsx"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {withVendorCSSClassPrefix, bem} from '@thunderid/browser';\nimport {\n HTMLAttributes,\n forwardRef,\n ReactNode,\n ForwardRefExoticComponent,\n RefAttributes,\n Ref,\n ElementType,\n FC,\n} from 'react';\nimport useStyles from './Card.styles';\nimport useTheme from '../../../contexts/Theme/useTheme';\nimport {cx} from '../../../styles/emotion';\nimport Typography from '../Typography/Typography';\nimport {TypographyVariant} from '../Typography/Typography.styles';\n\nexport type CardVariant = 'default' | 'outlined' | 'elevated';\n\nexport interface CardProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Card content\n */\n children?: ReactNode;\n /**\n * Whether the card should be clickable (shows hover effects)\n */\n clickable?: boolean;\n /**\n * The visual variant of the card\n */\n variant?: CardVariant;\n}\n\nexport interface CardHeaderProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Header content\n */\n children?: ReactNode;\n}\n\nexport interface CardTitleProps extends HTMLAttributes<HTMLHeadingElement> {\n /**\n * Title content\n */\n children?: ReactNode;\n /**\n * The heading level to use\n */\n level?: 1 | 2 | 3 | 4 | 5 | 6;\n}\n\nexport interface CardDescriptionProps extends HTMLAttributes<HTMLParagraphElement> {\n /**\n * Description content\n */\n children?: ReactNode;\n}\n\nexport interface CardActionProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Action content\n */\n children?: ReactNode;\n}\n\nexport interface CardContentProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Content\n */\n children?: ReactNode;\n}\n\nexport interface CardFooterProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Footer content\n */\n children?: ReactNode;\n}\n\n/**\n * Card component that provides a flexible container for content.\n *\n * @example\n * ```tsx\n * <Card variant=\"elevated\" clickable>\n * <Card.Header>\n * <Card.Title>Card Title</Card.Title>\n * <Card.Description>Card Description</Card.Description>\n * <Card.Action>\n * <Button variant=\"link\">Action</Button>\n * </Card.Action>\n * </Card.Header>\n * <Card.Content>\n * <p>Card content goes here</p>\n * </Card.Content>\n * <Card.Footer>\n * <Button>Cancel</Button>\n * <Button variant=\"outline\">Submit</Button>\n * </Card.Footer>\n * </Card>\n * ```\n */\nconst Card: ForwardRefExoticComponent<CardProps & RefAttributes<HTMLDivElement>> = forwardRef<\n HTMLDivElement,\n CardProps\n>(\n (\n {variant = 'default', clickable = false, children, className, style, ...rest}: CardProps,\n ref: Ref<HTMLDivElement>,\n ) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const styles: Record<string, string> = useStyles(theme, colorScheme, variant, clickable);\n\n return (\n <div\n ref={ref}\n style={style}\n className={cx(\n withVendorCSSClassPrefix(bem('card')),\n styles['card'],\n styles['variant'],\n styles['clickable'],\n withVendorCSSClassPrefix(bem('card', null, variant)),\n {\n [withVendorCSSClassPrefix(bem('card', null, 'clickable'))]: clickable,\n },\n className,\n )}\n {...rest}\n >\n {children}\n </div>\n );\n },\n);\n\n/**\n * Card header component that contains the title, description, and optional actions.\n */\nconst CardHeader: ForwardRefExoticComponent<CardHeaderProps & RefAttributes<HTMLDivElement>> = forwardRef<\n HTMLDivElement,\n CardHeaderProps\n>(({children, className, style, ...rest}: CardHeaderProps, ref: Ref<HTMLDivElement>) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const styles: Record<string, string> = useStyles(theme, colorScheme, 'default', false);\n\n return (\n <div\n ref={ref}\n style={style}\n className={cx(withVendorCSSClassPrefix(bem('card', 'header')), styles['header'], className)}\n {...rest}\n >\n {children}\n </div>\n );\n});\n\n/**\n * Card title component.\n */\nconst CardTitle: FC<CardTitleProps> = ({children, level = 3, className, style, ...rest}: CardTitleProps) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const styles: Record<string, string> = useStyles(theme, colorScheme, 'default', false);\n\n const getVariantFromLevel = (lvl: number): string => {\n switch (lvl) {\n case 1:\n return 'h1';\n case 2:\n return 'h2';\n case 3:\n return 'h3';\n case 4:\n return 'h4';\n case 5:\n return 'h5';\n case 6:\n return 'h6';\n default:\n return 'h3';\n }\n };\n\n const getComponentFromLevel = (lvl: number): string => {\n switch (lvl) {\n case 1:\n return 'h1';\n case 2:\n return 'h2';\n case 3:\n return 'h3';\n case 4:\n return 'h4';\n case 5:\n return 'h5';\n case 6:\n return 'h6';\n default:\n return 'h3';\n }\n };\n\n const {color, ...filteredRest} = rest;\n\n return (\n <Typography\n component={getComponentFromLevel(level) as ElementType}\n variant={getVariantFromLevel(level) as TypographyVariant}\n style={style}\n className={cx(withVendorCSSClassPrefix(bem('card', 'title')), styles['title'], className)}\n fontWeight={600}\n {...filteredRest}\n >\n {children}\n </Typography>\n );\n};\n\n/**\n * Card description component.\n */\nconst CardDescription: FC<CardDescriptionProps> = ({children, className, style, ...rest}: CardDescriptionProps) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const styles: Record<string, string> = useStyles(theme, colorScheme, 'default', false);\n\n const {color, ...filteredRest} = rest;\n\n return (\n <Typography\n component=\"p\"\n variant=\"body2\"\n color=\"textSecondary\"\n style={style}\n className={cx(withVendorCSSClassPrefix(bem('card', 'description')), styles['description'], className)}\n {...filteredRest}\n >\n {children}\n </Typography>\n );\n};\n\n/**\n * Card action component for action elements in the header.\n */\nconst CardAction: ForwardRefExoticComponent<CardActionProps & RefAttributes<HTMLDivElement>> = forwardRef<\n HTMLDivElement,\n CardActionProps\n>(({children, className, style, ...rest}: CardActionProps, ref: Ref<HTMLDivElement>) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const styles: Record<string, string> = useStyles(theme, colorScheme, 'default', false);\n\n return (\n <div\n ref={ref}\n style={style}\n className={cx(withVendorCSSClassPrefix(bem('card', 'action')), styles['action'], className)}\n {...rest}\n >\n {children}\n </div>\n );\n});\n\n/**\n * Card content component that contains the main content of the card.\n */\nconst CardContent: ForwardRefExoticComponent<CardContentProps & RefAttributes<HTMLDivElement>> = forwardRef<\n HTMLDivElement,\n CardContentProps\n>(({children, className, style, ...rest}: CardContentProps, ref: Ref<HTMLDivElement>) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const styles: Record<string, string> = useStyles(theme, colorScheme, 'default', false);\n\n return (\n <div\n ref={ref}\n style={style}\n className={cx(withVendorCSSClassPrefix(bem('card', 'content')), styles['content'], className)}\n {...rest}\n >\n {children}\n </div>\n );\n});\n\n/**\n * Card footer component that contains footer actions or additional information.\n */\nconst CardFooter: ForwardRefExoticComponent<CardFooterProps & RefAttributes<HTMLDivElement>> = forwardRef<\n HTMLDivElement,\n CardFooterProps\n>(({children, className, style, ...rest}: CardFooterProps, ref: Ref<HTMLDivElement>) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const styles: Record<string, string> = useStyles(theme, colorScheme, 'default', false);\n\n return (\n <div\n ref={ref}\n style={style}\n className={cx(withVendorCSSClassPrefix(bem('card', 'footer')), styles['footer'], className)}\n {...rest}\n >\n {children}\n </div>\n );\n});\n\nCard.displayName = 'Card';\nCardHeader.displayName = 'Card.Header';\nCardTitle.displayName = 'Card.Title';\nCardDescription.displayName = 'Card.Description';\nCardAction.displayName = 'Card.Action';\nCardContent.displayName = 'Card.Content';\nCardFooter.displayName = 'Card.Footer';\n\n(Card as any).Header = CardHeader;\n(Card as any).Title = CardTitle;\n(Card as any).Description = CardDescription;\n(Card as any).Action = CardAction;\n(Card as any).Content = CardContent;\n(Card as any).Footer = CardFooter;\n\nexport interface CardComponent extends ForwardRefExoticComponent<CardProps & RefAttributes<HTMLDivElement>> {\n Action: typeof CardAction;\n Content: typeof CardContent;\n Description: typeof CardDescription;\n Footer: typeof CardFooter;\n Header: typeof CardHeader;\n Title: typeof CardTitle;\n}\n\nexport default Card as CardComponent;\nexport {Card, CardHeader, CardTitle, CardDescription, CardAction, CardContent, CardFooter};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0GA,MAAMA,8BAKF,EAAC,UAAU,WAAW,YAAY,OAAO,UAAU,WAAW,MAAO,GAAG,QACxE,QACG;CACH,MAAM,EAAC,OAAO,gBAA4CC,0BAAU;CACpE,MAAMC,SAAiCC,4BAAU,OAAO,aAAa,SAAS,UAAU;AAExF,QACE,2CAAC;EACM;EACE;EACP,WAAWC,kGACoB,OAAO,CAAC,EACrC,OAAO,SACP,OAAO,YACP,OAAO,6FACsB,QAAQ,MAAM,QAAQ,CAAC,EACpD,kFACgC,QAAQ,MAAM,YAAY,CAAC,GAAG,WAC7D,EACD,UACD;EACD,GAAI;EAEH;GACG;EAGX;;;;AAKD,MAAMC,oCAGH,EAAC,UAAU,WAAW,MAAO,GAAG,QAAwB,QAA6B;CAC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AAS;AAWvB,mBAAe"}
@@ -1,8 +1,7 @@
1
1
  const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
2
+ const require_emotion = require('../../../styles/emotion.cjs');
2
3
  let react = require("react");
3
4
  react = require_rolldown_runtime.__toESM(react);
4
- let __emotion_css = require("@emotion/css");
5
- __emotion_css = require_rolldown_runtime.__toESM(__emotion_css);
6
5
 
7
6
  //#region src/components/primitives/Card/Card.styles.ts
8
7
  /**
@@ -14,7 +13,7 @@ __emotion_css = require_rolldown_runtime.__toESM(__emotion_css);
14
13
  * @returns Object containing CSS class names for component styling
15
14
  */
16
15
  const useStyles = (theme, colorScheme, variant, clickable) => (0, react.useMemo)(() => {
17
- const baseCard = __emotion_css.css`
16
+ const baseCard = require_emotion.css`
18
17
  border-radius: ${theme.vars.borderRadius.medium};
19
18
  background-color: ${theme.vars.colors.background.surface};
20
19
  font-family: ${theme.vars.typography.fontFamily};
@@ -26,18 +25,18 @@ const useStyles = (theme, colorScheme, variant, clickable) => (0, react.useMemo)
26
25
  padding: calc(${theme.vars.spacing.unit} * 2);
27
26
  `;
28
27
  const variantStyles = {
29
- default: __emotion_css.css`
28
+ default: require_emotion.css`
30
29
  /* Base styles only */
31
30
  `,
32
- elevated: __emotion_css.css`
31
+ elevated: require_emotion.css`
33
32
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
34
33
  border: none;
35
34
  `,
36
- outlined: __emotion_css.css`
35
+ outlined: require_emotion.css`
37
36
  border: 1px solid ${theme.vars.colors.border};
38
37
  `
39
38
  };
40
- const clickableStyles = __emotion_css.css`
39
+ const clickableStyles = require_emotion.css`
41
40
  cursor: pointer;
42
41
 
43
42
  &:hover {
@@ -45,32 +44,32 @@ const useStyles = (theme, colorScheme, variant, clickable) => (0, react.useMemo)
45
44
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
46
45
  }
47
46
  `;
48
- const headerStyles = __emotion_css.css`
47
+ const headerStyles = require_emotion.css`
49
48
  padding: 0 calc(${theme.vars.spacing.unit} * 2);
50
49
  margin-top: calc(${theme.vars.spacing.unit} * 2);
51
50
  display: flex;
52
51
  flex-direction: column;
53
52
  gap: ${theme.vars.spacing.unit};
54
53
  `;
55
- const titleStyles = __emotion_css.css`
54
+ const titleStyles = require_emotion.css`
56
55
  margin: 0;
57
56
  /* Typography component will handle color, fontSize, fontWeight, lineHeight */
58
57
  `;
59
- const descriptionStyles = __emotion_css.css`
58
+ const descriptionStyles = require_emotion.css`
60
59
  margin: 0;
61
60
  color: ${theme.vars.colors.text.secondary};
62
61
  font-size: ${theme.vars.typography.fontSizes.sm};
63
62
  line-height: 1.5;
64
63
  `;
65
- const actionStyles = __emotion_css.css`
64
+ const actionStyles = require_emotion.css`
66
65
  margin-top: ${theme.vars.spacing.unit};
67
66
  `;
68
- const contentStyles = __emotion_css.css`
67
+ const contentStyles = require_emotion.css`
69
68
  padding: 0 calc(${theme.vars.spacing.unit} * 2);
70
69
  margin-bottom: calc(${theme.vars.spacing.unit} * 2);
71
70
  flex: 1;
72
71
  `;
73
- const footerStyles = __emotion_css.css`
72
+ const footerStyles = require_emotion.css`
74
73
  padding: 0 calc(${theme.vars.spacing.unit} * 2) calc(${theme.vars.spacing.unit} * 2);
75
74
  display: flex;
76
75
  align-items: center;
@@ -1 +1 @@
1
- {"version":3,"file":"Card.styles.cjs","names":["baseCard: string","variantStyles: Record<string, string>","clickableStyles: string","headerStyles: string","titleStyles: string","descriptionStyles: string","actionStyles: string","contentStyles: string","footerStyles: string"],"sources":["../../../../../src/components/primitives/Card/Card.styles.ts"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {css} from '@emotion/css';\nimport {Theme} from '@thunderid/browser';\nimport {useMemo} from 'react';\n\nexport type CardVariant = 'default' | 'outlined' | 'elevated';\n\n/**\n * Creates styles for the Card component using BEM methodology\n * @param theme - The theme object containing design tokens\n * @param colorScheme - The current color scheme (used for memoization)\n * @param variant - The card variant\n * @param clickable - Whether the card is clickable\n * @returns Object containing CSS class names for component styling\n */\nconst useStyles = (\n theme: Theme,\n colorScheme: string,\n variant: CardVariant,\n clickable: boolean,\n): Record<string, string> =>\n useMemo(() => {\n const baseCard: string = css`\n border-radius: ${theme.vars.borderRadius.medium};\n background-color: ${theme.vars.colors.background.surface};\n font-family: ${theme.vars.typography.fontFamily};\n transition: all 0.2s ease-in-out;\n position: relative;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n padding: calc(${theme.vars.spacing.unit} * 2);\n `;\n\n const variantStyles: Record<string, string> = {\n default: css`\n /* Base styles only */\n `,\n elevated: css`\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n border: none;\n `,\n outlined: css`\n border: 1px solid ${theme.vars.colors.border};\n `,\n };\n\n const clickableStyles: string = css`\n cursor: pointer;\n\n &:hover {\n transform: translateY(-2px);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n }\n `;\n\n const headerStyles: string = css`\n padding: 0 calc(${theme.vars.spacing.unit} * 2);\n margin-top: calc(${theme.vars.spacing.unit} * 2);\n display: flex;\n flex-direction: column;\n gap: ${theme.vars.spacing.unit};\n `;\n\n const titleStyles: string = css`\n margin: 0;\n /* Typography component will handle color, fontSize, fontWeight, lineHeight */\n `;\n\n const descriptionStyles: string = css`\n margin: 0;\n color: ${theme.vars.colors.text.secondary};\n font-size: ${theme.vars.typography.fontSizes.sm};\n line-height: 1.5;\n `;\n\n const actionStyles: string = css`\n margin-top: ${theme.vars.spacing.unit};\n `;\n\n const contentStyles: string = css`\n padding: 0 calc(${theme.vars.spacing.unit} * 2);\n margin-bottom: calc(${theme.vars.spacing.unit} * 2);\n flex: 1;\n `;\n\n const footerStyles: string = css`\n padding: 0 calc(${theme.vars.spacing.unit} * 2) calc(${theme.vars.spacing.unit} * 2);\n display: flex;\n align-items: center;\n gap: ${theme.vars.spacing.unit};\n `;\n\n return {\n action: actionStyles,\n card: baseCard,\n clickable: clickable ? clickableStyles : '',\n content: contentStyles,\n description: descriptionStyles,\n footer: footerStyles,\n header: headerStyles,\n title: titleStyles,\n variant: variantStyles[variant],\n };\n }, [theme, colorScheme, variant, clickable]);\n\nexport default useStyles;\n"],"mappings":";;;;;;;;;;;;;;;AAiBA,MAAM,aACJ,OACA,aACA,SACA,uCAEc;CACZ,MAAMA,WAAmB,iBAAG;uBACT,MAAM,KAAK,aAAa,OAAO;0BAC5B,MAAM,KAAK,OAAO,WAAW,QAAQ;qBAC1C,MAAM,KAAK,WAAW,WAAW;;;;;;sBAMhC,MAAM,KAAK,QAAQ,KAAK;;CAG1C,MAAMC,gBAAwC;EAC5C,SAAS,iBAAG;;;EAGZ,UAAU,iBAAG;;;;EAIb,UAAU,iBAAG;4BACS,MAAM,KAAK,OAAO,OAAO;;EAEhD;CAED,MAAMC,kBAA0B,iBAAG;;;;;;;;CASnC,MAAMC,eAAuB,iBAAG;wBACZ,MAAM,KAAK,QAAQ,KAAK;yBACvB,MAAM,KAAK,QAAQ,KAAK;;;aAGpC,MAAM,KAAK,QAAQ,KAAK;;CAGjC,MAAMC,cAAsB,iBAAG;;;;CAK/B,MAAMC,oBAA4B,iBAAG;;eAE1B,MAAM,KAAK,OAAO,KAAK,UAAU;mBAC7B,MAAM,KAAK,WAAW,UAAU,GAAG;;;CAIlD,MAAMC,eAAuB,iBAAG;oBAChB,MAAM,KAAK,QAAQ,KAAK;;CAGxC,MAAMC,gBAAwB,iBAAG;wBACb,MAAM,KAAK,QAAQ,KAAK;4BACpB,MAAM,KAAK,QAAQ,KAAK;;;CAIhD,MAAMC,eAAuB,iBAAG;wBACZ,MAAM,KAAK,QAAQ,KAAK,aAAa,MAAM,KAAK,QAAQ,KAAK;;;aAGxE,MAAM,KAAK,QAAQ,KAAK;;AAGjC,QAAO;EACL,QAAQ;EACR,MAAM;EACN,WAAW,YAAY,kBAAkB;EACzC,SAAS;EACT,aAAa;EACb,QAAQ;EACR,QAAQ;EACR,OAAO;EACP,SAAS,cAAc;EACxB;GACA;CAAC;CAAO;CAAa;CAAS;CAAU,CAAC;AAE9C,0BAAe"}
1
+ {"version":3,"file":"Card.styles.cjs","names":["baseCard: string","variantStyles: Record<string, string>","clickableStyles: string","headerStyles: string","titleStyles: string","descriptionStyles: string","actionStyles: string","contentStyles: string","footerStyles: string"],"sources":["../../../../../src/components/primitives/Card/Card.styles.ts"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {Theme} from '@thunderid/browser';\nimport {useMemo} from 'react';\nimport {css} from '../../../styles/emotion';\n\nexport type CardVariant = 'default' | 'outlined' | 'elevated';\n\n/**\n * Creates styles for the Card component using BEM methodology\n * @param theme - The theme object containing design tokens\n * @param colorScheme - The current color scheme (used for memoization)\n * @param variant - The card variant\n * @param clickable - Whether the card is clickable\n * @returns Object containing CSS class names for component styling\n */\nconst useStyles = (\n theme: Theme,\n colorScheme: string,\n variant: CardVariant,\n clickable: boolean,\n): Record<string, string> =>\n useMemo(() => {\n const baseCard: string = css`\n border-radius: ${theme.vars.borderRadius.medium};\n background-color: ${theme.vars.colors.background.surface};\n font-family: ${theme.vars.typography.fontFamily};\n transition: all 0.2s ease-in-out;\n position: relative;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n padding: calc(${theme.vars.spacing.unit} * 2);\n `;\n\n const variantStyles: Record<string, string> = {\n default: css`\n /* Base styles only */\n `,\n elevated: css`\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n border: none;\n `,\n outlined: css`\n border: 1px solid ${theme.vars.colors.border};\n `,\n };\n\n const clickableStyles: string = css`\n cursor: pointer;\n\n &:hover {\n transform: translateY(-2px);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n }\n `;\n\n const headerStyles: string = css`\n padding: 0 calc(${theme.vars.spacing.unit} * 2);\n margin-top: calc(${theme.vars.spacing.unit} * 2);\n display: flex;\n flex-direction: column;\n gap: ${theme.vars.spacing.unit};\n `;\n\n const titleStyles: string = css`\n margin: 0;\n /* Typography component will handle color, fontSize, fontWeight, lineHeight */\n `;\n\n const descriptionStyles: string = css`\n margin: 0;\n color: ${theme.vars.colors.text.secondary};\n font-size: ${theme.vars.typography.fontSizes.sm};\n line-height: 1.5;\n `;\n\n const actionStyles: string = css`\n margin-top: ${theme.vars.spacing.unit};\n `;\n\n const contentStyles: string = css`\n padding: 0 calc(${theme.vars.spacing.unit} * 2);\n margin-bottom: calc(${theme.vars.spacing.unit} * 2);\n flex: 1;\n `;\n\n const footerStyles: string = css`\n padding: 0 calc(${theme.vars.spacing.unit} * 2) calc(${theme.vars.spacing.unit} * 2);\n display: flex;\n align-items: center;\n gap: ${theme.vars.spacing.unit};\n `;\n\n return {\n action: actionStyles,\n card: baseCard,\n clickable: clickable ? clickableStyles : '',\n content: contentStyles,\n description: descriptionStyles,\n footer: footerStyles,\n header: headerStyles,\n title: titleStyles,\n variant: variantStyles[variant],\n };\n }, [theme, colorScheme, variant, clickable]);\n\nexport default useStyles;\n"],"mappings":";;;;;;;;;;;;;;AAiBA,MAAM,aACJ,OACA,aACA,SACA,uCAEc;CACZ,MAAMA,WAAmB,mBAAG;uBACT,MAAM,KAAK,aAAa,OAAO;0BAC5B,MAAM,KAAK,OAAO,WAAW,QAAQ;qBAC1C,MAAM,KAAK,WAAW,WAAW;;;;;;sBAMhC,MAAM,KAAK,QAAQ,KAAK;;CAG1C,MAAMC,gBAAwC;EAC5C,SAAS,mBAAG;;;EAGZ,UAAU,mBAAG;;;;EAIb,UAAU,mBAAG;4BACS,MAAM,KAAK,OAAO,OAAO;;EAEhD;CAED,MAAMC,kBAA0B,mBAAG;;;;;;;;CASnC,MAAMC,eAAuB,mBAAG;wBACZ,MAAM,KAAK,QAAQ,KAAK;yBACvB,MAAM,KAAK,QAAQ,KAAK;;;aAGpC,MAAM,KAAK,QAAQ,KAAK;;CAGjC,MAAMC,cAAsB,mBAAG;;;;CAK/B,MAAMC,oBAA4B,mBAAG;;eAE1B,MAAM,KAAK,OAAO,KAAK,UAAU;mBAC7B,MAAM,KAAK,WAAW,UAAU,GAAG;;;CAIlD,MAAMC,eAAuB,mBAAG;oBAChB,MAAM,KAAK,QAAQ,KAAK;;CAGxC,MAAMC,gBAAwB,mBAAG;wBACb,MAAM,KAAK,QAAQ,KAAK;4BACpB,MAAM,KAAK,QAAQ,KAAK;;;CAIhD,MAAMC,eAAuB,mBAAG;wBACZ,MAAM,KAAK,QAAQ,KAAK,aAAa,MAAM,KAAK,QAAQ,KAAK;;;aAGxE,MAAM,KAAK,QAAQ,KAAK;;AAGjC,QAAO;EACL,QAAQ;EACR,MAAM;EACN,WAAW,YAAY,kBAAkB;EACzC,SAAS;EACT,aAAa;EACb,QAAQ;EACR,QAAQ;EACR,OAAO;EACP,SAAS,cAAc;EACxB;GACA;CAAC;CAAO;CAAa;CAAS;CAAU,CAAC;AAE9C,0BAAe"}
@@ -1,4 +1,5 @@
1
1
  const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
2
+ const require_emotion = require('../../../styles/emotion.cjs');
2
3
  const require_useTheme = require('../../../contexts/Theme/useTheme.cjs');
3
4
  const require_FormControl = require('../FormControl/FormControl.cjs');
4
5
  const require_InputLabel = require('../InputLabel/InputLabel.cjs');
@@ -7,8 +8,6 @@ let __thunderid_browser = require("@thunderid/browser");
7
8
  __thunderid_browser = require_rolldown_runtime.__toESM(__thunderid_browser);
8
9
  let react_jsx_runtime = require("react/jsx-runtime");
9
10
  react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
10
- let __emotion_css = require("@emotion/css");
11
- __emotion_css = require_rolldown_runtime.__toESM(__emotion_css);
12
11
 
13
12
  //#region src/components/primitives/Checkbox/Checkbox.tsx
14
13
  const Checkbox = ({ label, error, className, required, helperText, style = {},...rest }) => {
@@ -18,14 +17,14 @@ const Checkbox = ({ label, error, className, required, helperText, style = {},..
18
17
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_FormControl.default, {
19
18
  error,
20
19
  helperText,
21
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("checkbox")), className),
20
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("checkbox")), className),
22
21
  helperTextMarginLeft: `calc(${theme.vars.spacing.unit} * 3.5)`,
23
22
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
24
23
  style,
25
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("checkbox", "container")), styles["container"]),
24
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("checkbox", "container")), styles["container"]),
26
25
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
27
26
  type: "checkbox",
28
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("checkbox", "input")), styles["input"], styles["errorInput"], { [(0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("checkbox", "input", "error"))]: hasError }),
27
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("checkbox", "input")), styles["input"], styles["errorInput"], { [(0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("checkbox", "input", "error"))]: hasError }),
29
28
  "aria-invalid": hasError,
30
29
  "aria-required": required,
31
30
  ...rest
@@ -33,7 +32,7 @@ const Checkbox = ({ label, error, className, required, helperText, style = {},..
33
32
  required,
34
33
  error: hasError,
35
34
  variant: "inline",
36
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("checkbox", "label")), styles["label"], styles["errorLabel"], { [(0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("checkbox", "label", "error"))]: hasError }),
35
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("checkbox", "label")), styles["label"], styles["errorLabel"], { [(0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("checkbox", "label", "error"))]: hasError }),
37
36
  children: label
38
37
  })]
39
38
  })
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.cjs","names":["Checkbox: FC<CheckboxProps>","useTheme","styles: Record<string, string>","useStyles","FormControl","InputLabel"],"sources":["../../../../../src/components/primitives/Checkbox/Checkbox.tsx"],"sourcesContent":["// Copyright 2024 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {cx} from '@emotion/css';\nimport {withVendorCSSClassPrefix, bem} from '@thunderid/browser';\nimport {FC, InputHTMLAttributes} from 'react';\nimport useStyles from './Checkbox.styles';\nimport useTheme from '../../../contexts/Theme/useTheme';\nimport FormControl from '../FormControl/FormControl';\nimport InputLabel from '../InputLabel/InputLabel';\n\nexport interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'type'> {\n /**\n * Additional CSS class names\n */\n className?: string;\n /**\n * Error message to display below the checkbox\n */\n error?: string;\n /**\n * Helper text to display below the checkbox\n */\n helperText?: string;\n /**\n * Label text to display next to the checkbox\n */\n label?: string;\n /**\n * Whether the field is required\n */\n required?: boolean;\n}\n\nconst Checkbox: FC<CheckboxProps> = ({\n label,\n error,\n className,\n required,\n helperText,\n style = {},\n ...rest\n}: CheckboxProps) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const hasError = !!error;\n const styles: Record<string, string> = useStyles(theme, colorScheme, hasError, !!required);\n\n return (\n <FormControl\n error={error}\n helperText={helperText}\n className={cx(withVendorCSSClassPrefix(bem('checkbox')), className)}\n helperTextMarginLeft={`calc(${theme.vars.spacing.unit} * 3.5)`}\n >\n <div style={style} className={cx(withVendorCSSClassPrefix(bem('checkbox', 'container')), styles['container'])}>\n <input\n type=\"checkbox\"\n className={cx(withVendorCSSClassPrefix(bem('checkbox', 'input')), styles['input'], styles['errorInput'], {\n [withVendorCSSClassPrefix(bem('checkbox', 'input', 'error'))]: hasError,\n })}\n aria-invalid={hasError}\n aria-required={required}\n {...rest}\n />\n {label && (\n <InputLabel\n required={required}\n error={hasError}\n variant=\"inline\"\n className={cx(withVendorCSSClassPrefix(bem('checkbox', 'label')), styles['label'], styles['errorLabel'], {\n [withVendorCSSClassPrefix(bem('checkbox', 'label', 'error'))]: hasError,\n })}\n >\n {label}\n </InputLabel>\n )}\n </div>\n </FormControl>\n );\n};\n\nexport default Checkbox;\n"],"mappings":";;;;;;;;;;;;;AAkCA,MAAMA,YAA+B,EACnC,OACA,OACA,WACA,UACA,YACA,QAAQ,EAAE,CACV,GAAG,WACgB;CACnB,MAAM,EAAC,OAAO,gBAA4CC,0BAAU;CACpE,MAAM,WAAW,CAAC,CAAC;CACnB,MAAMC,SAAiCC,gCAAU,OAAO,aAAa,UAAU,CAAC,CAAC,SAAS;AAE1F,QACE,2CAACC;EACQ;EACK;EACZ,gHAA2C,WAAW,CAAC,EAAE,UAAU;EACnE,sBAAsB,QAAQ,MAAM,KAAK,QAAQ,KAAK;YAEtD,4CAAC;GAAW;GAAO,gHAA2C,YAAY,YAAY,CAAC,EAAE,OAAO,aAAa;cAC3G,2CAAC;IACC,MAAK;IACL,gHAA2C,YAAY,QAAQ,CAAC,EAAE,OAAO,UAAU,OAAO,eAAe,kFACzE,YAAY,SAAS,QAAQ,CAAC,GAAG,UAChE,CAAC;IACF,gBAAc;IACd,iBAAe;IACf,GAAI;KACJ,EACD,SACC,2CAACC;IACW;IACV,OAAO;IACP,SAAQ;IACR,gHAA2C,YAAY,QAAQ,CAAC,EAAE,OAAO,UAAU,OAAO,eAAe,kFACzE,YAAY,SAAS,QAAQ,CAAC,GAAG,UAChE,CAAC;cAED;KACU;IAEX;GACM;;AAIlB,uBAAe"}
1
+ {"version":3,"file":"Checkbox.cjs","names":["Checkbox: FC<CheckboxProps>","useTheme","styles: Record<string, string>","useStyles","FormControl","cx","InputLabel"],"sources":["../../../../../src/components/primitives/Checkbox/Checkbox.tsx"],"sourcesContent":["// Copyright 2024 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {withVendorCSSClassPrefix, bem} from '@thunderid/browser';\nimport {FC, InputHTMLAttributes} from 'react';\nimport useStyles from './Checkbox.styles';\nimport useTheme from '../../../contexts/Theme/useTheme';\nimport {cx} from '../../../styles/emotion';\nimport FormControl from '../FormControl/FormControl';\nimport InputLabel from '../InputLabel/InputLabel';\n\nexport interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'type'> {\n /**\n * Additional CSS class names\n */\n className?: string;\n /**\n * Error message to display below the checkbox\n */\n error?: string;\n /**\n * Helper text to display below the checkbox\n */\n helperText?: string;\n /**\n * Label text to display next to the checkbox\n */\n label?: string;\n /**\n * Whether the field is required\n */\n required?: boolean;\n}\n\nconst Checkbox: FC<CheckboxProps> = ({\n label,\n error,\n className,\n required,\n helperText,\n style = {},\n ...rest\n}: CheckboxProps) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const hasError = !!error;\n const styles: Record<string, string> = useStyles(theme, colorScheme, hasError, !!required);\n\n return (\n <FormControl\n error={error}\n helperText={helperText}\n className={cx(withVendorCSSClassPrefix(bem('checkbox')), className)}\n helperTextMarginLeft={`calc(${theme.vars.spacing.unit} * 3.5)`}\n >\n <div style={style} className={cx(withVendorCSSClassPrefix(bem('checkbox', 'container')), styles['container'])}>\n <input\n type=\"checkbox\"\n className={cx(withVendorCSSClassPrefix(bem('checkbox', 'input')), styles['input'], styles['errorInput'], {\n [withVendorCSSClassPrefix(bem('checkbox', 'input', 'error'))]: hasError,\n })}\n aria-invalid={hasError}\n aria-required={required}\n {...rest}\n />\n {label && (\n <InputLabel\n required={required}\n error={hasError}\n variant=\"inline\"\n className={cx(withVendorCSSClassPrefix(bem('checkbox', 'label')), styles['label'], styles['errorLabel'], {\n [withVendorCSSClassPrefix(bem('checkbox', 'label', 'error'))]: hasError,\n })}\n >\n {label}\n </InputLabel>\n )}\n </div>\n </FormControl>\n );\n};\n\nexport default Checkbox;\n"],"mappings":";;;;;;;;;;;;AAkCA,MAAMA,YAA+B,EACnC,OACA,OACA,WACA,UACA,YACA,QAAQ,EAAE,CACV,GAAG,WACgB;CACnB,MAAM,EAAC,OAAO,gBAA4CC,0BAAU;CACpE,MAAM,WAAW,CAAC,CAAC;CACnB,MAAMC,SAAiCC,gCAAU,OAAO,aAAa,UAAU,CAAC,CAAC,SAAS;AAE1F,QACE,2CAACC;EACQ;EACK;EACZ,WAAWC,kGAAgC,WAAW,CAAC,EAAE,UAAU;EACnE,sBAAsB,QAAQ,MAAM,KAAK,QAAQ,KAAK;YAEtD,4CAAC;GAAW;GAAO,WAAWA,kGAAgC,YAAY,YAAY,CAAC,EAAE,OAAO,aAAa;cAC3G,2CAAC;IACC,MAAK;IACL,WAAWA,kGAAgC,YAAY,QAAQ,CAAC,EAAE,OAAO,UAAU,OAAO,eAAe,kFACzE,YAAY,SAAS,QAAQ,CAAC,GAAG,UAChE,CAAC;IACF,gBAAc;IACd,iBAAe;IACf,GAAI;KACJ,EACD,SACC,2CAACC;IACW;IACV,OAAO;IACP,SAAQ;IACR,WAAWD,kGAAgC,YAAY,QAAQ,CAAC,EAAE,OAAO,UAAU,OAAO,eAAe,kFACzE,YAAY,SAAS,QAAQ,CAAC,GAAG,UAChE,CAAC;cAED;KACU;IAEX;GACM;;AAIlB,uBAAe"}