@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/Divider/Divider.styles.ts
8
7
  /**
@@ -21,10 +20,10 @@ const useStyles = (theme, colorScheme, orientation, variant, color, hasChildren)
21
20
  if (variant === "solid") borderStyle = "solid";
22
21
  else if (variant === "dashed") borderStyle = "dashed";
23
22
  else borderStyle = "dotted";
24
- const baseDivider = __emotion_css.css`
23
+ const baseDivider = require_emotion.css`
25
24
  margin: calc(${theme.vars.spacing.unit} * 2) 0;
26
25
  `;
27
- const verticalDivider = __emotion_css.css`
26
+ const verticalDivider = require_emotion.css`
28
27
  display: inline-block;
29
28
  height: 100%;
30
29
  min-height: calc(${theme.vars.spacing.unit} * 2);
@@ -35,21 +34,21 @@ const useStyles = (theme, colorScheme, orientation, variant, color, hasChildren)
35
34
  `;
36
35
  return {
37
36
  divider: baseDivider,
38
- horizontal: __emotion_css.css`
37
+ horizontal: require_emotion.css`
39
38
  display: flex;
40
39
  align-items: center;
41
40
  width: 100%;
42
- ${!hasChildren && __emotion_css.css`
41
+ ${!hasChildren && require_emotion.css`
43
42
  height: 1px;
44
43
  border-top: 1px ${borderStyle} ${baseColor};
45
44
  `}
46
45
  `,
47
- line: __emotion_css.css`
46
+ line: require_emotion.css`
48
47
  flex: 1;
49
48
  height: 1px;
50
49
  border-top: 1px ${borderStyle} ${baseColor};
51
50
  `,
52
- text: __emotion_css.css`
51
+ text: require_emotion.css`
53
52
  background-color: ${theme.vars.colors.background.surface};
54
53
  font-family: ${theme.vars.typography.fontFamily};
55
54
  padding: 0 calc(${theme.vars.spacing.unit} * 1);
@@ -1 +1 @@
1
- {"version":3,"file":"Divider.styles.cjs","names":["baseColor: string","borderStyle: string","baseDivider: string","verticalDivider: string"],"sources":["../../../../../src/components/primitives/Divider/Divider.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 DividerOrientation = 'horizontal' | 'vertical';\nexport type DividerVariant = 'solid' | 'dashed' | 'dotted';\n\n/**\n * Creates styles for the Divider 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 orientation - The divider orientation\n * @param variant - The divider variant\n * @param color - Custom color for the divider\n * @param hasChildren - Whether the divider has children (text)\n * @returns Object containing CSS class names for component styling\n */\nconst useStyles = (\n theme: Theme,\n colorScheme: string,\n orientation: DividerOrientation,\n variant: DividerVariant,\n color?: string,\n hasChildren?: boolean,\n): Record<string, string> =>\n useMemo(() => {\n const baseColor: string = color || theme.colors.border;\n let borderStyle: string;\n if (variant === 'solid') {\n borderStyle = 'solid';\n } else if (variant === 'dashed') {\n borderStyle = 'dashed';\n } else {\n borderStyle = 'dotted';\n }\n\n const baseDivider: string = css`\n margin: calc(${theme.vars.spacing.unit} * 2) 0;\n `;\n\n const verticalDivider: string = css`\n display: inline-block;\n height: 100%;\n min-height: calc(${theme.vars.spacing.unit} * 2);\n width: 1px;\n border-inline-start: 1px ${borderStyle} ${baseColor};\n margin-block: 0;\n margin-inline: calc(${theme.vars.spacing.unit} * 1);\n `;\n\n const horizontalDivider: string = css`\n display: flex;\n align-items: center;\n width: 100%;\n ${!hasChildren &&\n css`\n height: 1px;\n border-top: 1px ${borderStyle} ${baseColor};\n `}\n `;\n\n const dividerLine: string = css`\n flex: 1;\n height: 1px;\n border-top: 1px ${borderStyle} ${baseColor};\n `;\n\n const dividerText: string = css`\n background-color: ${theme.vars.colors.background.surface};\n font-family: ${theme.vars.typography.fontFamily};\n padding: 0 calc(${theme.vars.spacing.unit} * 1);\n white-space: nowrap;\n `;\n\n return {\n divider: baseDivider,\n horizontal: horizontalDivider,\n line: dividerLine,\n text: dividerText,\n vertical: verticalDivider,\n };\n }, [theme, colorScheme, orientation, variant, color, hasChildren]);\n\nexport default useStyles;\n"],"mappings":";;;;;;;;;;;;;;;;;AAoBA,MAAM,aACJ,OACA,aACA,aACA,SACA,OACA,yCAEc;CACZ,MAAMA,YAAoB,SAAS,MAAM,OAAO;CAChD,IAAIC;AACJ,KAAI,YAAY,QACd,eAAc;UACL,YAAY,SACrB,eAAc;KAEd,eAAc;CAGhB,MAAMC,cAAsB,iBAAG;qBACd,MAAM,KAAK,QAAQ,KAAK;;CAGzC,MAAMC,kBAA0B,iBAAG;;;yBAGd,MAAM,KAAK,QAAQ,KAAK;;iCAEhB,YAAY,GAAG,UAAU;;4BAE9B,MAAM,KAAK,QAAQ,KAAK;;AA2BhD,QAAO;EACL,SAAS;EACT,YA1BgC,iBAAG;;;;QAIjC,CAAC,eACH,iBAAG;;0BAEiB,YAAY,GAAG,UAAU;QAC3C;;EAmBF,MAhB0B,iBAAG;;;wBAGX,YAAY,GAAG,UAAU;;EAc3C,MAX0B,iBAAG;0BACT,MAAM,KAAK,OAAO,WAAW,QAAQ;qBAC1C,MAAM,KAAK,WAAW,WAAW;wBAC9B,MAAM,KAAK,QAAQ,KAAK;;;EAS1C,UAAU;EACX;GACA;CAAC;CAAO;CAAa;CAAa;CAAS;CAAO;CAAY,CAAC;AAEpE,6BAAe"}
1
+ {"version":3,"file":"Divider.styles.cjs","names":["baseColor: string","borderStyle: string","baseDivider: string","verticalDivider: string"],"sources":["../../../../../src/components/primitives/Divider/Divider.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 DividerOrientation = 'horizontal' | 'vertical';\nexport type DividerVariant = 'solid' | 'dashed' | 'dotted';\n\n/**\n * Creates styles for the Divider 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 orientation - The divider orientation\n * @param variant - The divider variant\n * @param color - Custom color for the divider\n * @param hasChildren - Whether the divider has children (text)\n * @returns Object containing CSS class names for component styling\n */\nconst useStyles = (\n theme: Theme,\n colorScheme: string,\n orientation: DividerOrientation,\n variant: DividerVariant,\n color?: string,\n hasChildren?: boolean,\n): Record<string, string> =>\n useMemo(() => {\n const baseColor: string = color || theme.colors.border;\n let borderStyle: string;\n if (variant === 'solid') {\n borderStyle = 'solid';\n } else if (variant === 'dashed') {\n borderStyle = 'dashed';\n } else {\n borderStyle = 'dotted';\n }\n\n const baseDivider: string = css`\n margin: calc(${theme.vars.spacing.unit} * 2) 0;\n `;\n\n const verticalDivider: string = css`\n display: inline-block;\n height: 100%;\n min-height: calc(${theme.vars.spacing.unit} * 2);\n width: 1px;\n border-inline-start: 1px ${borderStyle} ${baseColor};\n margin-block: 0;\n margin-inline: calc(${theme.vars.spacing.unit} * 1);\n `;\n\n const horizontalDivider: string = css`\n display: flex;\n align-items: center;\n width: 100%;\n ${!hasChildren &&\n css`\n height: 1px;\n border-top: 1px ${borderStyle} ${baseColor};\n `}\n `;\n\n const dividerLine: string = css`\n flex: 1;\n height: 1px;\n border-top: 1px ${borderStyle} ${baseColor};\n `;\n\n const dividerText: string = css`\n background-color: ${theme.vars.colors.background.surface};\n font-family: ${theme.vars.typography.fontFamily};\n padding: 0 calc(${theme.vars.spacing.unit} * 1);\n white-space: nowrap;\n `;\n\n return {\n divider: baseDivider,\n horizontal: horizontalDivider,\n line: dividerLine,\n text: dividerText,\n vertical: verticalDivider,\n };\n }, [theme, colorScheme, orientation, variant, color, hasChildren]);\n\nexport default useStyles;\n"],"mappings":";;;;;;;;;;;;;;;;AAoBA,MAAM,aACJ,OACA,aACA,aACA,SACA,OACA,yCAEc;CACZ,MAAMA,YAAoB,SAAS,MAAM,OAAO;CAChD,IAAIC;AACJ,KAAI,YAAY,QACd,eAAc;UACL,YAAY,SACrB,eAAc;KAEd,eAAc;CAGhB,MAAMC,cAAsB,mBAAG;qBACd,MAAM,KAAK,QAAQ,KAAK;;CAGzC,MAAMC,kBAA0B,mBAAG;;;yBAGd,MAAM,KAAK,QAAQ,KAAK;;iCAEhB,YAAY,GAAG,UAAU;;4BAE9B,MAAM,KAAK,QAAQ,KAAK;;AA2BhD,QAAO;EACL,SAAS;EACT,YA1BgC,mBAAG;;;;QAIjC,CAAC,eACH,mBAAG;;0BAEiB,YAAY,GAAG,UAAU;QAC3C;;EAmBF,MAhB0B,mBAAG;;;wBAGX,YAAY,GAAG,UAAU;;EAc3C,MAX0B,mBAAG;0BACT,MAAM,KAAK,OAAO,WAAW,QAAQ;qBAC1C,MAAM,KAAK,WAAW,WAAW;wBAC9B,MAAM,KAAK,QAAQ,KAAK;;;EAS1C,UAAU;EACX;GACA;CAAC;CAAO;CAAa;CAAa;CAAS;CAAO;CAAY,CAAC;AAEpE,6BAAe"}
@@ -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_FormControl_styles = require('./FormControl.styles.cjs');
@@ -6,8 +7,6 @@ let __thunderid_browser = require("@thunderid/browser");
6
7
  __thunderid_browser = require_rolldown_runtime.__toESM(__thunderid_browser);
7
8
  let react_jsx_runtime = require("react/jsx-runtime");
8
9
  react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
9
- let __emotion_css = require("@emotion/css");
10
- __emotion_css = require_rolldown_runtime.__toESM(__emotion_css);
11
10
 
12
11
  //#region src/components/primitives/FormControl/FormControl.tsx
13
12
  const FormControl = ({ children, error, helperText, className, id, helperTextAlign = "left", helperTextMarginLeft }) => {
@@ -15,11 +14,11 @@ const FormControl = ({ children, error, helperText, className, id, helperTextAli
15
14
  const styles = require_FormControl_styles.default(theme, colorScheme, helperTextAlign, helperTextMarginLeft, !!error);
16
15
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
17
16
  id,
18
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("form-control")), styles["formControl"], className),
17
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("form-control")), styles["formControl"], className),
19
18
  children: [children, (error || helperText) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Typography.default, {
20
19
  variant: "caption",
21
20
  color: error ? "error" : "textSecondary",
22
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("form-control", "helper-text")), styles["helperText"], {
21
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("form-control", "helper-text")), styles["helperText"], {
23
22
  [(0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("form-control", "helper-text", "error"))]: !!error,
24
23
  [styles["helperTextError"]]: !!error
25
24
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"FormControl.cjs","names":["FormControl: FC<FormControlProps>","useTheme","styles: Record<string, string>","useStyles","Typography"],"sources":["../../../../../src/components/primitives/FormControl/FormControl.tsx"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {cx} from '@emotion/css';\nimport {bem, withVendorCSSClassPrefix} from '@thunderid/browser';\nimport {CSSProperties, FC, ReactNode} from 'react';\nimport useStyles from './FormControl.styles';\nimport useTheme from '../../../contexts/Theme/useTheme';\nimport Typography from '../Typography/Typography';\n\nexport type FormControlHelperTextAlign = 'left' | 'center';\n\nexport interface FormControlProps {\n /**\n * The content to be wrapped by the form control\n */\n children: ReactNode;\n /**\n * Additional CSS class names\n */\n className?: string;\n /**\n * Error message to display below the content\n */\n error?: string;\n /**\n * Helper text to display below the content\n */\n helperText?: string;\n /**\n * Custom alignment for helper text (default: left, center for OTP)\n */\n helperTextAlign?: FormControlHelperTextAlign;\n /**\n * Custom margin left for helper text (for components like Checkbox)\n */\n helperTextMarginLeft?: string;\n /**\n * HTML id attribute\n */\n id?: string;\n /**\n * Custom container style\n */\n style?: CSSProperties;\n}\n\nconst FormControl: FC<FormControlProps> = ({\n children,\n error,\n helperText,\n className,\n id,\n helperTextAlign = 'left',\n helperTextMarginLeft,\n}: FormControlProps) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const styles: Record<string, string> = useStyles(theme, colorScheme, helperTextAlign, helperTextMarginLeft, !!error);\n\n return (\n <div id={id} className={cx(withVendorCSSClassPrefix(bem('form-control')), styles['formControl'], className)}>\n {children}\n {(error || helperText) && (\n <Typography\n variant=\"caption\"\n color={error ? 'error' : 'textSecondary'}\n className={cx(withVendorCSSClassPrefix(bem('form-control', 'helper-text')), styles['helperText'], {\n [withVendorCSSClassPrefix(bem('form-control', 'helper-text', 'error'))]: !!error,\n [styles['helperTextError']]: !!error,\n })}\n >\n {error || helperText}\n </Typography>\n )}\n </div>\n );\n};\n\nexport default FormControl;\n"],"mappings":";;;;;;;;;;;;AA+CA,MAAMA,eAAqC,EACzC,UACA,OACA,YACA,WACA,IACA,kBAAkB,QAClB,2BACsB;CACtB,MAAM,EAAC,OAAO,gBAA4CC,0BAAU;CACpE,MAAMC,SAAiCC,mCAAU,OAAO,aAAa,iBAAiB,sBAAsB,CAAC,CAAC,MAAM;AAEpH,QACE,4CAAC;EAAQ;EAAI,gHAA2C,eAAe,CAAC,EAAE,OAAO,gBAAgB,UAAU;aACxG,WACC,SAAS,eACT,2CAACC;GACC,SAAQ;GACR,OAAO,QAAQ,UAAU;GACzB,gHAA2C,gBAAgB,cAAc,CAAC,EAAE,OAAO,eAAe;oFAClE,gBAAgB,eAAe,QAAQ,CAAC,GAAG,CAAC,CAAC;KAC1E,OAAO,qBAAqB,CAAC,CAAC;IAChC,CAAC;aAED,SAAS;IACC;GAEX;;AAIV,0BAAe"}
1
+ {"version":3,"file":"FormControl.cjs","names":["FormControl: FC<FormControlProps>","useTheme","styles: Record<string, string>","useStyles","cx","Typography"],"sources":["../../../../../src/components/primitives/FormControl/FormControl.tsx"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {bem, withVendorCSSClassPrefix} from '@thunderid/browser';\nimport {CSSProperties, FC, ReactNode} from 'react';\nimport useStyles from './FormControl.styles';\nimport useTheme from '../../../contexts/Theme/useTheme';\nimport {cx} from '../../../styles/emotion';\nimport Typography from '../Typography/Typography';\n\nexport type FormControlHelperTextAlign = 'left' | 'center';\n\nexport interface FormControlProps {\n /**\n * The content to be wrapped by the form control\n */\n children: ReactNode;\n /**\n * Additional CSS class names\n */\n className?: string;\n /**\n * Error message to display below the content\n */\n error?: string;\n /**\n * Helper text to display below the content\n */\n helperText?: string;\n /**\n * Custom alignment for helper text (default: left, center for OTP)\n */\n helperTextAlign?: FormControlHelperTextAlign;\n /**\n * Custom margin left for helper text (for components like Checkbox)\n */\n helperTextMarginLeft?: string;\n /**\n * HTML id attribute\n */\n id?: string;\n /**\n * Custom container style\n */\n style?: CSSProperties;\n}\n\nconst FormControl: FC<FormControlProps> = ({\n children,\n error,\n helperText,\n className,\n id,\n helperTextAlign = 'left',\n helperTextMarginLeft,\n}: FormControlProps) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const styles: Record<string, string> = useStyles(theme, colorScheme, helperTextAlign, helperTextMarginLeft, !!error);\n\n return (\n <div id={id} className={cx(withVendorCSSClassPrefix(bem('form-control')), styles['formControl'], className)}>\n {children}\n {(error || helperText) && (\n <Typography\n variant=\"caption\"\n color={error ? 'error' : 'textSecondary'}\n className={cx(withVendorCSSClassPrefix(bem('form-control', 'helper-text')), styles['helperText'], {\n [withVendorCSSClassPrefix(bem('form-control', 'helper-text', 'error'))]: !!error,\n [styles['helperTextError']]: !!error,\n })}\n >\n {error || helperText}\n </Typography>\n )}\n </div>\n );\n};\n\nexport default FormControl;\n"],"mappings":";;;;;;;;;;;AA+CA,MAAMA,eAAqC,EACzC,UACA,OACA,YACA,WACA,IACA,kBAAkB,QAClB,2BACsB;CACtB,MAAM,EAAC,OAAO,gBAA4CC,0BAAU;CACpE,MAAMC,SAAiCC,mCAAU,OAAO,aAAa,iBAAiB,sBAAsB,CAAC,CAAC,MAAM;AAEpH,QACE,4CAAC;EAAQ;EAAI,WAAWC,kGAAgC,eAAe,CAAC,EAAE,OAAO,gBAAgB,UAAU;aACxG,WACC,SAAS,eACT,2CAACC;GACC,SAAQ;GACR,OAAO,QAAQ,UAAU;GACzB,WAAWD,kGAAgC,gBAAgB,cAAc,CAAC,EAAE,OAAO,eAAe;oFAClE,gBAAgB,eAAe,QAAQ,CAAC,GAAG,CAAC,CAAC;KAC1E,OAAO,qBAAqB,CAAC,CAAC;IAChC,CAAC;aAED,SAAS;IACC;GAEX;;AAIV,0BAAe"}
@@ -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/FormControl/FormControl.styles.ts
8
7
  /**
@@ -16,16 +15,16 @@ __emotion_css = require_rolldown_runtime.__toESM(__emotion_css);
16
15
  */
17
16
  const useStyles = (theme, colorScheme, helperTextAlign, helperTextMarginLeft, hasError) => (0, react.useMemo)(() => {
18
17
  return {
19
- formControl: __emotion_css.css`
18
+ formControl: require_emotion.css`
20
19
  text-align: start;
21
20
  font-family: ${theme.vars.typography.fontFamily};
22
21
  `,
23
- helperText: __emotion_css.css`
22
+ helperText: require_emotion.css`
24
23
  margin-top: calc(${theme.vars.spacing.unit} / 2);
25
24
  text-align: ${helperTextAlign === "left" ? "start" : helperTextAlign};
26
25
  ${helperTextMarginLeft && `margin-inline-start: ${helperTextMarginLeft};`}
27
26
  `,
28
- helperTextError: __emotion_css.css`
27
+ helperTextError: require_emotion.css`
29
28
  color: ${theme.vars.colors.error.main};
30
29
  `
31
30
  };
@@ -1 +1 @@
1
- {"version":3,"file":"FormControl.styles.cjs","names":[],"sources":["../../../../../src/components/primitives/FormControl/FormControl.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 FormControlHelperTextAlign = 'left' | 'center';\n\n/**\n * Creates styles for the FormControl 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 helperTextAlign - The alignment for helper text\n * @param helperTextMarginLeft - Custom margin left for helper text\n * @param hasError - Whether the form control has an error\n * @returns Object containing CSS class names for component styling\n */\nconst useStyles = (\n theme: Theme,\n colorScheme: string,\n helperTextAlign: FormControlHelperTextAlign,\n helperTextMarginLeft?: string,\n hasError?: boolean,\n): Record<string, string> =>\n useMemo(() => {\n const formControl: string = css`\n text-align: start;\n font-family: ${theme.vars.typography.fontFamily};\n `;\n\n const helperText: string = css`\n margin-top: calc(${theme.vars.spacing.unit} / 2);\n text-align: ${helperTextAlign === 'left' ? 'start' : helperTextAlign};\n ${helperTextMarginLeft && `margin-inline-start: ${helperTextMarginLeft};`}\n `;\n\n const helperTextError: string = css`\n color: ${theme.vars.colors.error.main};\n `;\n\n return {\n formControl,\n helperText,\n helperTextError,\n };\n }, [theme, colorScheme, helperTextAlign, helperTextMarginLeft, hasError]);\n\nexport default useStyles;\n"],"mappings":";;;;;;;;;;;;;;;;AAkBA,MAAM,aACJ,OACA,aACA,iBACA,sBACA,sCAEc;AAgBZ,QAAO;EACL,aAhB0B,iBAAG;;qBAEd,MAAM,KAAK,WAAW,WAAW;;EAehD,YAZyB,iBAAG;yBACT,MAAM,KAAK,QAAQ,KAAK;oBAC7B,oBAAoB,SAAS,UAAU,gBAAgB;QACnE,wBAAwB,wBAAwB,qBAAqB,GAAG;;EAU1E,iBAP8B,iBAAG;eACxB,MAAM,KAAK,OAAO,MAAM,KAAK;;EAOvC;GACA;CAAC;CAAO;CAAa;CAAiB;CAAsB;CAAS,CAAC;AAE3E,iCAAe"}
1
+ {"version":3,"file":"FormControl.styles.cjs","names":[],"sources":["../../../../../src/components/primitives/FormControl/FormControl.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 FormControlHelperTextAlign = 'left' | 'center';\n\n/**\n * Creates styles for the FormControl 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 helperTextAlign - The alignment for helper text\n * @param helperTextMarginLeft - Custom margin left for helper text\n * @param hasError - Whether the form control has an error\n * @returns Object containing CSS class names for component styling\n */\nconst useStyles = (\n theme: Theme,\n colorScheme: string,\n helperTextAlign: FormControlHelperTextAlign,\n helperTextMarginLeft?: string,\n hasError?: boolean,\n): Record<string, string> =>\n useMemo(() => {\n const formControl: string = css`\n text-align: start;\n font-family: ${theme.vars.typography.fontFamily};\n `;\n\n const helperText: string = css`\n margin-top: calc(${theme.vars.spacing.unit} / 2);\n text-align: ${helperTextAlign === 'left' ? 'start' : helperTextAlign};\n ${helperTextMarginLeft && `margin-inline-start: ${helperTextMarginLeft};`}\n `;\n\n const helperTextError: string = css`\n color: ${theme.vars.colors.error.main};\n `;\n\n return {\n formControl,\n helperText,\n helperTextError,\n };\n }, [theme, colorScheme, helperTextAlign, helperTextMarginLeft, hasError]);\n\nexport default useStyles;\n"],"mappings":";;;;;;;;;;;;;;;AAkBA,MAAM,aACJ,OACA,aACA,iBACA,sBACA,sCAEc;AAgBZ,QAAO;EACL,aAhB0B,mBAAG;;qBAEd,MAAM,KAAK,WAAW,WAAW;;EAehD,YAZyB,mBAAG;yBACT,MAAM,KAAK,QAAQ,KAAK;oBAC7B,oBAAoB,SAAS,UAAU,gBAAgB;QACnE,wBAAwB,wBAAwB,qBAAqB,GAAG;;EAU1E,iBAP8B,mBAAG;eACxB,MAAM,KAAK,OAAO,MAAM,KAAK;;EAOvC;GACA;CAAC;CAAO;CAAa;CAAiB;CAAsB;CAAS,CAAC;AAE3E,iCAAe"}
@@ -1,26 +1,25 @@
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_InputLabel_styles = require('./InputLabel.styles.cjs');
4
5
  let __thunderid_browser = require("@thunderid/browser");
5
6
  __thunderid_browser = require_rolldown_runtime.__toESM(__thunderid_browser);
6
7
  let react_jsx_runtime = require("react/jsx-runtime");
7
8
  react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
8
- let __emotion_css = require("@emotion/css");
9
- __emotion_css = require_rolldown_runtime.__toESM(__emotion_css);
10
9
 
11
10
  //#region src/components/primitives/InputLabel/InputLabel.tsx
12
11
  const InputLabel = ({ children, required = false, error = false, variant = "block", marginBottom, className, style = {},...rest }) => {
13
12
  const { theme, colorScheme } = require_useTheme.default();
14
13
  const styles = require_InputLabel_styles.default(theme, colorScheme, variant, error, marginBottom);
15
14
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
16
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("input-label")), (0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("input-label", variant)), styles["label"], variant === "block" ? styles["block"] : styles["inline"], {
15
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("input-label")), (0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("input-label", variant)), styles["label"], variant === "block" ? styles["block"] : styles["inline"], {
17
16
  [(0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("input-label", "error"))]: error,
18
17
  [styles["error"]]: error
19
18
  }, className),
20
19
  style,
21
20
  ...rest,
22
21
  children: [children, required && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
23
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("input-label", "required")), styles["requiredIndicator"]),
22
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("input-label", "required")), styles["requiredIndicator"]),
24
23
  children: " *"
25
24
  })]
26
25
  });
@@ -1 +1 @@
1
- {"version":3,"file":"InputLabel.cjs","names":["InputLabel: FC<InputLabelProps>","useTheme","styles: Record<string, string>","useStyles"],"sources":["../../../../../src/components/primitives/InputLabel/InputLabel.tsx"],"sourcesContent":["// Copyright 2024 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {cx} from '@emotion/css';\nimport {bem, withVendorCSSClassPrefix} from '@thunderid/browser';\nimport {CSSProperties, FC, LabelHTMLAttributes, ReactNode} from 'react';\nimport useStyles from './InputLabel.styles';\nimport useTheme from '../../../contexts/Theme/useTheme';\n\nexport type InputLabelVariant = 'block' | 'inline';\n\nexport interface InputLabelProps extends Omit<LabelHTMLAttributes<HTMLLabelElement>, 'style'> {\n /**\n * Label text or content\n */\n children: ReactNode;\n /**\n * Additional CSS class names\n */\n className?: string;\n /**\n * Whether there's an error state\n */\n error?: boolean;\n /**\n * Custom margin bottom (useful for different form layouts)\n */\n marginBottom?: string;\n /**\n * Whether the field is required\n */\n required?: boolean;\n /**\n * Custom style overrides\n */\n style?: CSSProperties;\n /**\n * Display type for label positioning\n */\n variant?: InputLabelVariant;\n}\n\nconst InputLabel: FC<InputLabelProps> = ({\n children,\n required = false,\n error = false,\n variant = 'block',\n marginBottom,\n className,\n style = {},\n ...rest\n}: InputLabelProps) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const styles: Record<string, string> = useStyles(theme, colorScheme, variant, error, marginBottom);\n\n return (\n <label\n className={cx(\n withVendorCSSClassPrefix(bem('input-label')),\n withVendorCSSClassPrefix(bem('input-label', variant)),\n styles['label'],\n variant === 'block' ? styles['block'] : styles['inline'],\n {\n [withVendorCSSClassPrefix(bem('input-label', 'error'))]: error,\n [styles['error']]: error,\n },\n className,\n )}\n style={style}\n {...rest}\n >\n {children}\n {required && (\n <span className={cx(withVendorCSSClassPrefix(bem('input-label', 'required')), styles['requiredIndicator'])}>\n {' *'}\n </span>\n )}\n </label>\n );\n};\n\nexport default InputLabel;\n"],"mappings":";;;;;;;;;;;AA0CA,MAAMA,cAAmC,EACvC,UACA,WAAW,OACX,QAAQ,OACR,UAAU,SACV,cACA,WACA,QAAQ,EAAE,CACV,GAAG,WACkB;CACrB,MAAM,EAAC,OAAO,gBAA4CC,0BAAU;CACpE,MAAMC,SAAiCC,kCAAU,OAAO,aAAa,SAAS,OAAO,aAAa;AAElG,QACE,4CAAC;EACC,gHAC+B,cAAc,CAAC,iFACf,eAAe,QAAQ,CAAC,EACrD,OAAO,UACP,YAAY,UAAU,OAAO,WAAW,OAAO,WAC/C;mFACgC,eAAe,QAAQ,CAAC,GAAG;IACxD,OAAO,WAAW;GACpB,EACD,UACD;EACM;EACP,GAAI;aAEH,UACA,YACC,2CAAC;GAAK,gHAA2C,eAAe,WAAW,CAAC,EAAE,OAAO,qBAAqB;aACvG;IACI;GAEH;;AAIZ,yBAAe"}
1
+ {"version":3,"file":"InputLabel.cjs","names":["InputLabel: FC<InputLabelProps>","useTheme","styles: Record<string, string>","useStyles","cx"],"sources":["../../../../../src/components/primitives/InputLabel/InputLabel.tsx"],"sourcesContent":["// Copyright 2024 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {bem, withVendorCSSClassPrefix} from '@thunderid/browser';\nimport {CSSProperties, FC, LabelHTMLAttributes, ReactNode} from 'react';\nimport useStyles from './InputLabel.styles';\nimport useTheme from '../../../contexts/Theme/useTheme';\nimport {cx} from '../../../styles/emotion';\n\nexport type InputLabelVariant = 'block' | 'inline';\n\nexport interface InputLabelProps extends Omit<LabelHTMLAttributes<HTMLLabelElement>, 'style'> {\n /**\n * Label text or content\n */\n children: ReactNode;\n /**\n * Additional CSS class names\n */\n className?: string;\n /**\n * Whether there's an error state\n */\n error?: boolean;\n /**\n * Custom margin bottom (useful for different form layouts)\n */\n marginBottom?: string;\n /**\n * Whether the field is required\n */\n required?: boolean;\n /**\n * Custom style overrides\n */\n style?: CSSProperties;\n /**\n * Display type for label positioning\n */\n variant?: InputLabelVariant;\n}\n\nconst InputLabel: FC<InputLabelProps> = ({\n children,\n required = false,\n error = false,\n variant = 'block',\n marginBottom,\n className,\n style = {},\n ...rest\n}: InputLabelProps) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const styles: Record<string, string> = useStyles(theme, colorScheme, variant, error, marginBottom);\n\n return (\n <label\n className={cx(\n withVendorCSSClassPrefix(bem('input-label')),\n withVendorCSSClassPrefix(bem('input-label', variant)),\n styles['label'],\n variant === 'block' ? styles['block'] : styles['inline'],\n {\n [withVendorCSSClassPrefix(bem('input-label', 'error'))]: error,\n [styles['error']]: error,\n },\n className,\n )}\n style={style}\n {...rest}\n >\n {children}\n {required && (\n <span className={cx(withVendorCSSClassPrefix(bem('input-label', 'required')), styles['requiredIndicator'])}>\n {' *'}\n </span>\n )}\n </label>\n );\n};\n\nexport default InputLabel;\n"],"mappings":";;;;;;;;;;AA0CA,MAAMA,cAAmC,EACvC,UACA,WAAW,OACX,QAAQ,OACR,UAAU,SACV,cACA,WACA,QAAQ,EAAE,CACV,GAAG,WACkB;CACrB,MAAM,EAAC,OAAO,gBAA4CC,0BAAU;CACpE,MAAMC,SAAiCC,kCAAU,OAAO,aAAa,SAAS,OAAO,aAAa;AAElG,QACE,4CAAC;EACC,WAAWC,kGACoB,cAAc,CAAC,iFACf,eAAe,QAAQ,CAAC,EACrD,OAAO,UACP,YAAY,UAAU,OAAO,WAAW,OAAO,WAC/C;mFACgC,eAAe,QAAQ,CAAC,GAAG;IACxD,OAAO,WAAW;GACpB,EACD,UACD;EACM;EACP,GAAI;aAEH,UACA,YACC,2CAAC;GAAK,WAAWA,kGAAgC,eAAe,WAAW,CAAC,EAAE,OAAO,qBAAqB;aACvG;IACI;GAEH;;AAIZ,yBAAe"}
@@ -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/InputLabel/InputLabel.styles.ts
8
7
  /**
@@ -15,7 +14,7 @@ __emotion_css = require_rolldown_runtime.__toESM(__emotion_css);
15
14
  * @returns Object containing CSS class names for component styling
16
15
  */
17
16
  const useStyles = (theme, colorScheme, variant, error, marginBottom) => (0, react.useMemo)(() => {
18
- const baseLabel = __emotion_css.css`
17
+ const baseLabel = require_emotion.css`
19
18
  display: ${variant};
20
19
  margin-bottom: ${marginBottom || (variant === "block" ? `calc(${theme.vars.spacing.unit} + 1px)` : "0")};
21
20
  color: ${error ? theme.vars.colors.error.main : theme.vars.colors.text.secondary};
@@ -23,20 +22,20 @@ const useStyles = (theme, colorScheme, variant, error, marginBottom) => (0, reac
23
22
  font-family: ${theme.vars.typography.fontFamily};
24
23
  font-weight: ${variant === "block" ? 500 : "normal"};
25
24
  `;
26
- const errorLabel = __emotion_css.css`
25
+ const errorLabel = require_emotion.css`
27
26
  color: ${theme.vars.colors.error.main};
28
27
  `;
29
- const requiredIndicator = __emotion_css.css`
28
+ const requiredIndicator = require_emotion.css`
30
29
  color: ${theme.vars.colors.error.main};
31
30
  `;
32
31
  return {
33
- block: __emotion_css.css`
32
+ block: require_emotion.css`
34
33
  display: block;
35
34
  font-weight: 500;
36
35
  margin-bottom: ${marginBottom || `calc(${theme.vars.spacing.unit} + 1px)`};
37
36
  `,
38
37
  error: errorLabel,
39
- inline: __emotion_css.css`
38
+ inline: require_emotion.css`
40
39
  display: inline;
41
40
  font-weight: normal;
42
41
  margin-bottom: 0;
@@ -1 +1 @@
1
- {"version":3,"file":"InputLabel.styles.cjs","names":["baseLabel: string","errorLabel: string","requiredIndicator: string"],"sources":["../../../../../src/components/primitives/InputLabel/InputLabel.styles.ts"],"sourcesContent":["// Copyright 2024 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 InputLabelVariant = 'block' | 'inline';\n\n/**\n * Creates styles for the InputLabel 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 display variant of the label\n * @param error - Whether the label has an error state\n * @param marginBottom - Custom margin bottom value\n * @returns Object containing CSS class names for component styling\n */\nconst useStyles = (\n theme: Theme,\n colorScheme: string,\n variant: InputLabelVariant,\n error: boolean,\n marginBottom?: string,\n): Record<string, string> =>\n useMemo(() => {\n const baseLabel: string = css`\n display: ${variant};\n margin-bottom: ${marginBottom || (variant === 'block' ? `calc(${theme.vars.spacing.unit} + 1px)` : '0')};\n color: ${error ? theme.vars.colors.error.main : theme.vars.colors.text.secondary};\n font-size: ${theme.vars.typography.fontSizes.sm};\n font-family: ${theme.vars.typography.fontFamily};\n font-weight: ${variant === 'block' ? 500 : 'normal'};\n `;\n\n const errorLabel: string = css`\n color: ${theme.vars.colors.error.main};\n `;\n\n const requiredIndicator: string = css`\n color: ${theme.vars.colors.error.main};\n `;\n\n const blockVariant: string = css`\n display: block;\n font-weight: 500;\n margin-bottom: ${marginBottom || `calc(${theme.vars.spacing.unit} + 1px)`};\n `;\n\n const inlineVariant: string = css`\n display: inline;\n font-weight: normal;\n margin-bottom: 0;\n `;\n\n return {\n block: blockVariant,\n error: errorLabel,\n inline: inlineVariant,\n label: baseLabel,\n requiredIndicator,\n };\n }, [theme, colorScheme, variant, error, marginBottom]);\n\nexport default useStyles;\n"],"mappings":";;;;;;;;;;;;;;;;AAkBA,MAAM,aACJ,OACA,aACA,SACA,OACA,0CAEc;CACZ,MAAMA,YAAoB,iBAAG;iBAChB,QAAQ;uBACF,iBAAiB,YAAY,UAAU,QAAQ,MAAM,KAAK,QAAQ,KAAK,WAAW,KAAK;eAC/F,QAAQ,MAAM,KAAK,OAAO,MAAM,OAAO,MAAM,KAAK,OAAO,KAAK,UAAU;mBACpE,MAAM,KAAK,WAAW,UAAU,GAAG;qBACjC,MAAM,KAAK,WAAW,WAAW;qBACjC,YAAY,UAAU,MAAM,SAAS;;CAGtD,MAAMC,aAAqB,iBAAG;eACnB,MAAM,KAAK,OAAO,MAAM,KAAK;;CAGxC,MAAMC,oBAA4B,iBAAG;eAC1B,MAAM,KAAK,OAAO,MAAM,KAAK;;AAexC,QAAO;EACL,OAb2B,iBAAG;;;uBAGb,gBAAgB,QAAQ,MAAM,KAAK,QAAQ,KAAK,SAAS;;EAW1E,OAAO;EACP,QAT4B,iBAAG;;;;;EAU/B,OAAO;EACP;EACD;GACA;CAAC;CAAO;CAAa;CAAS;CAAO;CAAa,CAAC;AAExD,gCAAe"}
1
+ {"version":3,"file":"InputLabel.styles.cjs","names":["baseLabel: string","errorLabel: string","requiredIndicator: string"],"sources":["../../../../../src/components/primitives/InputLabel/InputLabel.styles.ts"],"sourcesContent":["// Copyright 2024 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 InputLabelVariant = 'block' | 'inline';\n\n/**\n * Creates styles for the InputLabel 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 display variant of the label\n * @param error - Whether the label has an error state\n * @param marginBottom - Custom margin bottom value\n * @returns Object containing CSS class names for component styling\n */\nconst useStyles = (\n theme: Theme,\n colorScheme: string,\n variant: InputLabelVariant,\n error: boolean,\n marginBottom?: string,\n): Record<string, string> =>\n useMemo(() => {\n const baseLabel: string = css`\n display: ${variant};\n margin-bottom: ${marginBottom || (variant === 'block' ? `calc(${theme.vars.spacing.unit} + 1px)` : '0')};\n color: ${error ? theme.vars.colors.error.main : theme.vars.colors.text.secondary};\n font-size: ${theme.vars.typography.fontSizes.sm};\n font-family: ${theme.vars.typography.fontFamily};\n font-weight: ${variant === 'block' ? 500 : 'normal'};\n `;\n\n const errorLabel: string = css`\n color: ${theme.vars.colors.error.main};\n `;\n\n const requiredIndicator: string = css`\n color: ${theme.vars.colors.error.main};\n `;\n\n const blockVariant: string = css`\n display: block;\n font-weight: 500;\n margin-bottom: ${marginBottom || `calc(${theme.vars.spacing.unit} + 1px)`};\n `;\n\n const inlineVariant: string = css`\n display: inline;\n font-weight: normal;\n margin-bottom: 0;\n `;\n\n return {\n block: blockVariant,\n error: errorLabel,\n inline: inlineVariant,\n label: baseLabel,\n requiredIndicator,\n };\n }, [theme, colorScheme, variant, error, marginBottom]);\n\nexport default useStyles;\n"],"mappings":";;;;;;;;;;;;;;;AAkBA,MAAM,aACJ,OACA,aACA,SACA,OACA,0CAEc;CACZ,MAAMA,YAAoB,mBAAG;iBAChB,QAAQ;uBACF,iBAAiB,YAAY,UAAU,QAAQ,MAAM,KAAK,QAAQ,KAAK,WAAW,KAAK;eAC/F,QAAQ,MAAM,KAAK,OAAO,MAAM,OAAO,MAAM,KAAK,OAAO,KAAK,UAAU;mBACpE,MAAM,KAAK,WAAW,UAAU,GAAG;qBACjC,MAAM,KAAK,WAAW,WAAW;qBACjC,YAAY,UAAU,MAAM,SAAS;;CAGtD,MAAMC,aAAqB,mBAAG;eACnB,MAAM,KAAK,OAAO,MAAM,KAAK;;CAGxC,MAAMC,oBAA4B,mBAAG;eAC1B,MAAM,KAAK,OAAO,MAAM,KAAK;;AAexC,QAAO;EACL,OAb2B,mBAAG;;;uBAGb,gBAAgB,QAAQ,MAAM,KAAK,QAAQ,KAAK,SAAS;;EAW1E,OAAO;EACP,QAT4B,mBAAG;;;;;EAU/B,OAAO;EACP;EACD;GACA;CAAC;CAAO;CAAa;CAAS;CAAO;CAAa,CAAC;AAExD,gCAAe"}
@@ -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_Plus = require('../Icons/Plus.cjs');
4
5
  const require_X = require('../Icons/X.cjs');
@@ -10,8 +11,6 @@ let react = require("react");
10
11
  react = require_rolldown_runtime.__toESM(react);
11
12
  let react_jsx_runtime = require("react/jsx-runtime");
12
13
  react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
13
- let __emotion_css = require("@emotion/css");
14
- __emotion_css = require_rolldown_runtime.__toESM(__emotion_css);
15
14
 
16
15
  //#region src/components/primitives/KeyValueInput/KeyValueInput.tsx
17
16
  /**
@@ -99,41 +98,41 @@ const KeyValueInput = ({ className = "", disabled = false, error, helperText, ke
99
98
  const isAddDisabled = disabled || readOnly || !canAddMore || !newKey.trim() || !newValue.trim();
100
99
  const renderReadOnlyContent = () => {
101
100
  if (pairs.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
102
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "empty-state")), styles["emptyState"]),
101
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "empty-state")), styles["emptyState"]),
103
102
  children: "No attributes defined"
104
103
  });
105
104
  return pairs.map((pair, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
106
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "readonly-pair")), styles["readOnlyPair"]),
105
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "readonly-pair")), styles["readOnlyPair"]),
107
106
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
108
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "readonly-key")), styles["readOnlyKey"]),
107
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "readonly-key")), styles["readOnlyKey"]),
109
108
  children: [pair.key, ":"]
110
109
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
111
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "readonly-value")), styles["readOnlyValue"]),
110
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "readonly-value")), styles["readOnlyValue"]),
112
111
  children: pair.value
113
112
  })]
114
113
  }, `${pair.key}-${index}`));
115
114
  };
116
115
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
117
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input")), styles["container"], className),
116
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input")), styles["container"], className),
118
117
  children: [
119
118
  label && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
120
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "label")), styles["label"]),
119
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "label")), styles["label"]),
121
120
  children: [label, required && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
122
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "required")), styles["requiredIndicator"]),
121
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "required")), styles["requiredIndicator"]),
123
122
  children: " *"
124
123
  })]
125
124
  }),
126
125
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
127
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "pairs-list")), styles["pairsList"]),
126
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "pairs-list")), styles["pairsList"]),
128
127
  children: [readOnly ? renderReadOnlyContent() : pairs.map((pair, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
129
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "pair-row")), styles["pairRow"]),
128
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "pair-row")), styles["pairRow"]),
130
129
  children: [
131
130
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_TextField.default, {
132
131
  placeholder: keyPlaceholder,
133
132
  value: pair.key,
134
133
  onChange: (e) => handleUpdatePair(index, "key", e.target.value),
135
134
  disabled: disabled || readOnly,
136
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "pair-input")), styles["pairInput"]),
135
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "pair-input")), styles["pairInput"]),
137
136
  "aria-label": `${keyLabel} ${index + 1}`
138
137
  }),
139
138
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_TextField.default, {
@@ -141,14 +140,14 @@ const KeyValueInput = ({ className = "", disabled = false, error, helperText, ke
141
140
  value: pair.value,
142
141
  onChange: (e) => handleUpdatePair(index, "value", e.target.value),
143
142
  disabled: disabled || readOnly,
144
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "pair-input")), styles["pairInput"]),
143
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "pair-input")), styles["pairInput"]),
145
144
  "aria-label": `${valueLabel} ${index + 1}`
146
145
  }),
147
146
  !readOnly && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
148
147
  type: "button",
149
148
  onClick: () => handleRemovePair(index),
150
149
  disabled,
151
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "remove-button")), styles["removeButton"]),
150
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "remove-button")), styles["removeButton"]),
152
151
  "aria-label": `${removeButtonText} ${pair.key}`,
153
152
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_X.default, {
154
153
  width: 16,
@@ -157,14 +156,14 @@ const KeyValueInput = ({ className = "", disabled = false, error, helperText, ke
157
156
  })
158
157
  ]
159
158
  }, `${pair.key}-${index}`)), !readOnly && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
160
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "add-row")), styles["addRow"]),
159
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "add-row")), styles["addRow"]),
161
160
  children: [
162
161
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_TextField.default, {
163
162
  placeholder: keyPlaceholder,
164
163
  value: newKey,
165
164
  onChange: (e) => setNewKey(e.target.value),
166
165
  disabled,
167
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "pair-input")), styles["pairInput"]),
166
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "pair-input")), styles["pairInput"]),
168
167
  "aria-label": "New key"
169
168
  }),
170
169
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_TextField.default, {
@@ -172,7 +171,7 @@ const KeyValueInput = ({ className = "", disabled = false, error, helperText, ke
172
171
  value: newValue,
173
172
  onChange: (e) => setNewValue(e.target.value),
174
173
  disabled,
175
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "pair-input")), styles["pairInput"]),
174
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "pair-input")), styles["pairInput"]),
176
175
  "aria-label": "New value",
177
176
  onKeyPress: (e) => {
178
177
  if (e.key === "Enter" && !isAddDisabled) handleAddPair();
@@ -182,7 +181,7 @@ const KeyValueInput = ({ className = "", disabled = false, error, helperText, ke
182
181
  type: "button",
183
182
  onClick: handleAddPair,
184
183
  disabled: isAddDisabled,
185
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "add-button")), styles["addButton"]),
184
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "add-button")), styles["addButton"]),
186
185
  "aria-label": "Add new key-value pair",
187
186
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Plus.default, {
188
187
  width: 16,
@@ -193,11 +192,11 @@ const KeyValueInput = ({ className = "", disabled = false, error, helperText, ke
193
192
  })]
194
193
  }),
195
194
  (helperText || error) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
196
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "helper-text")), styles["helperText"]),
195
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "helper-text")), styles["helperText"]),
197
196
  children: error || helperText
198
197
  }),
199
198
  maxPairs && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
200
- className: (0, __emotion_css.cx)((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "counter")), styles["counterText"]),
199
+ className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("key-value-input", "counter")), styles["counterText"]),
201
200
  children: [
202
201
  pairs.length,
203
202
  " of ",
@@ -1 +1 @@
1
- {"version":3,"file":"KeyValueInput.cjs","names":["KeyValueInput: FC<KeyValueInputProps>","useTheme","styles: Record<string, string>","useStyles","handleAddPair: ReturnType<typeof useCallback>","newPair: KeyValuePair","updatedPairs: KeyValuePair[]","handleRemovePair: ReturnType<typeof useCallback>","pairToRemove: KeyValuePair","handleUpdatePair: ReturnType<typeof useCallback>","canAddMore: boolean","isAddDisabled: boolean","TextField","X","Plus"],"sources":["../../../../../src/components/primitives/KeyValueInput/KeyValueInput.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 {ChangeEvent, FC, KeyboardEvent, MouseEventHandler, ReactElement, useState, useCallback} from 'react';\nimport useStyles from './KeyValueInput.styles';\nimport useTheme from '../../../contexts/Theme/useTheme';\nimport {Plus, X} from '../Icons';\nimport TextField from '../TextField/TextField';\n\nexport interface KeyValuePair {\n key: string;\n value: string;\n}\n\nexport interface KeyValueInputProps {\n /**\n * CSS class name for styling the component.\n */\n className?: string;\n\n /**\n * Whether the input is disabled.\n */\n disabled?: boolean;\n\n /**\n * Error message to display.\n */\n error?: string;\n\n /**\n * Help text to display below the input.\n */\n helperText?: string;\n\n /**\n * Label for the key input field.\n */\n keyLabel?: string;\n\n /**\n * Placeholder text for the key input field.\n */\n keyPlaceholder?: string;\n\n /**\n * Label for the component.\n */\n label?: string;\n\n /**\n * Maximum number of key-value pairs allowed.\n */\n maxPairs?: number;\n /**\n * Callback fired when a pair is added.\n */\n onAdd?: (pair: KeyValuePair) => void;\n\n /**\n * Callback fired when the key-value pairs change.\n */\n onChange?: (pairs: KeyValuePair[]) => void;\n\n /**\n * Callback fired when a pair is removed.\n */\n onRemove?: (pair: KeyValuePair, index: number) => void;\n\n /**\n * Whether the component is in read-only mode.\n */\n readOnly?: boolean;\n\n /**\n * Text for the remove button.\n */\n removeButtonText?: string;\n\n /**\n * Whether the component is required.\n */\n required?: boolean;\n\n /**\n * Current key-value pairs.\n */\n value?: Record<string, any> | KeyValuePair[];\n\n /**\n * Label for the value input field.\n */\n valueLabel?: string;\n\n /**\n * Placeholder text for the value input field.\n */\n valuePlaceholder?: string;\n}\n\n/**\n * KeyValueInput component allows users to manage key-value pairs with add/remove functionality.\n * It provides a user-friendly interface for editing organization attributes or similar data structures.\n *\n * @example\n * ```tsx\n * // Basic usage\n * <KeyValueInput\n * label=\"Organization Attributes\"\n * onChange={(pairs) => console.log(pairs)}\n * />\n *\n * // With initial values\n * <KeyValueInput\n * label=\"Organization Attributes\"\n * value={{department: 'IT', location: 'New York'}}\n * onChange={(pairs) => console.log(pairs)}\n * />\n *\n * // With add/remove callbacks\n * <KeyValueInput\n * label=\"Custom Attributes\"\n * value={attributes}\n * onChange={(pairs) => setAttributes(pairs)}\n * onAdd={(pair) => console.log('Added:', pair)}\n * onRemove={(pair, index) => console.log('Removed:', pair, 'at index:', index)}\n * />\n * ```\n */\nconst KeyValueInput: FC<KeyValueInputProps> = ({\n className = '',\n disabled = false,\n error,\n helperText,\n keyLabel = 'Key',\n keyPlaceholder = 'Enter key',\n label,\n maxPairs,\n onChange,\n onAdd,\n onRemove,\n readOnly = false,\n removeButtonText = 'Remove',\n required = false,\n value = {},\n valueLabel = 'Value',\n valuePlaceholder = 'Enter value',\n}: KeyValueInputProps): ReactElement => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const styles: Record<string, string> = useStyles(theme, colorScheme, disabled, readOnly, !!error);\n\n // Convert value to array format\n const initialPairs: KeyValuePair[] = Array.isArray(value)\n ? value\n : Object.entries(value).map(([key, val]: [string, any]) => ({key, value: String(val)}));\n\n const [pairs, setPairs] = useState<KeyValuePair[]>(initialPairs);\n const [newKey, setNewKey] = useState('');\n const [newValue, setNewValue] = useState('');\n\n const handleAddPair: ReturnType<typeof useCallback> = useCallback(() => {\n if (!newKey.trim() || !newValue.trim()) return;\n if (maxPairs && pairs.length >= maxPairs) return;\n\n const newPair: KeyValuePair = {\n key: newKey.trim(),\n value: newValue.trim(),\n };\n\n const updatedPairs: KeyValuePair[] = [...pairs, newPair];\n setPairs(updatedPairs);\n setNewKey('');\n setNewValue('');\n\n if (onChange) {\n onChange(updatedPairs);\n }\n\n if (onAdd) {\n onAdd(newPair);\n }\n }, [newKey, newValue, pairs, maxPairs, onChange, onAdd]);\n\n const handleRemovePair: ReturnType<typeof useCallback> = useCallback(\n (index: number) => {\n const pairToRemove: KeyValuePair = pairs[index];\n const updatedPairs: KeyValuePair[] = pairs.filter((_: KeyValuePair, i: number) => i !== index);\n setPairs(updatedPairs);\n\n if (onChange) {\n onChange(updatedPairs);\n }\n\n if (onRemove) {\n onRemove(pairToRemove, index);\n }\n },\n [pairs, onChange, onRemove],\n );\n\n const handleUpdatePair: ReturnType<typeof useCallback> = useCallback(\n (index: number, field: 'key' | 'value', newVal: string) => {\n const updatedPairs: KeyValuePair[] = pairs.map((pair: KeyValuePair, i: number) => {\n if (i === index) {\n return {...pair, [field]: newVal};\n }\n return pair;\n });\n setPairs(updatedPairs);\n\n if (onChange) {\n onChange(updatedPairs);\n }\n },\n [pairs, onChange],\n );\n\n const canAddMore: boolean = !maxPairs || pairs.length < maxPairs;\n const isAddDisabled: boolean = disabled || readOnly || !canAddMore || !newKey.trim() || !newValue.trim();\n\n const renderReadOnlyContent = (): ReactElement | ReactElement[] => {\n if (pairs.length === 0) {\n return (\n <div className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'empty-state')), styles['emptyState'])}>\n No attributes defined\n </div>\n );\n }\n\n return pairs.map((pair: KeyValuePair, index: number) => (\n <div\n key={`${pair.key}-${index}`}\n className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'readonly-pair')), styles['readOnlyPair'])}\n >\n <span className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'readonly-key')), styles['readOnlyKey'])}>\n {pair.key}:\n </span>\n <span\n className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'readonly-value')), styles['readOnlyValue'])}\n >\n {pair.value}\n </span>\n </div>\n ));\n };\n\n return (\n <div className={cx(withVendorCSSClassPrefix(bem('key-value-input')), styles['container'], className)}>\n {label && (\n <label className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'label')), styles['label'])}>\n {label}\n {required && (\n <span\n className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'required')), styles['requiredIndicator'])}\n >\n {' *'}\n </span>\n )}\n </label>\n )}\n\n <div className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'pairs-list')), styles['pairsList'])}>\n {readOnly\n ? renderReadOnlyContent()\n : pairs.map((pair: KeyValuePair, index: number) => (\n <div\n key={`${pair.key}-${index}`}\n className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'pair-row')), styles['pairRow'])}\n >\n <TextField\n placeholder={keyPlaceholder}\n value={pair.key}\n onChange={(e: ChangeEvent<HTMLInputElement>): void => handleUpdatePair(index, 'key', e.target.value)}\n disabled={disabled || readOnly}\n className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'pair-input')), styles['pairInput'])}\n aria-label={`${keyLabel} ${index + 1}`}\n />\n <TextField\n placeholder={valuePlaceholder}\n value={pair.value}\n onChange={(e: ChangeEvent<HTMLInputElement>): void =>\n handleUpdatePair(index, 'value', e.target.value)\n }\n disabled={disabled || readOnly}\n className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'pair-input')), styles['pairInput'])}\n aria-label={`${valueLabel} ${index + 1}`}\n />\n {!readOnly && (\n <button\n type=\"button\"\n onClick={(): void => handleRemovePair(index)}\n disabled={disabled}\n className={cx(\n withVendorCSSClassPrefix(bem('key-value-input', 'remove-button')),\n styles['removeButton'],\n )}\n aria-label={`${removeButtonText} ${pair.key}`}\n >\n <X width={16} height={16} />\n </button>\n )}\n </div>\n ))}\n\n {!readOnly && (\n <div className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'add-row')), styles['addRow'])}>\n <TextField\n placeholder={keyPlaceholder}\n value={newKey}\n onChange={(e: ChangeEvent<HTMLInputElement>): void => setNewKey(e.target.value)}\n disabled={disabled}\n className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'pair-input')), styles['pairInput'])}\n aria-label=\"New key\"\n />\n <TextField\n placeholder={valuePlaceholder}\n value={newValue}\n onChange={(e: ChangeEvent<HTMLInputElement>): void => setNewValue(e.target.value)}\n disabled={disabled}\n className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'pair-input')), styles['pairInput'])}\n aria-label=\"New value\"\n onKeyPress={(e: KeyboardEvent<HTMLInputElement>): void => {\n if (e.key === 'Enter' && !isAddDisabled) {\n handleAddPair();\n }\n }}\n />\n <button\n type=\"button\"\n onClick={handleAddPair as MouseEventHandler<HTMLButtonElement>}\n disabled={isAddDisabled}\n className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'add-button')), styles['addButton'])}\n aria-label=\"Add new key-value pair\"\n >\n <Plus width={16} height={16} />\n </button>\n </div>\n )}\n </div>\n\n {(helperText || error) && (\n <div className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'helper-text')), styles['helperText'])}>\n {error || helperText}\n </div>\n )}\n\n {maxPairs && (\n <div className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'counter')), styles['counterText'])}>\n {pairs.length} of {maxPairs} pairs used\n </div>\n )}\n </div>\n );\n};\n\nexport default KeyValueInput;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmIA,MAAMA,iBAAyC,EAC7C,YAAY,IACZ,WAAW,OACX,OACA,YACA,WAAW,OACX,iBAAiB,aACjB,OACA,UACA,UACA,OACA,UACA,WAAW,OACX,mBAAmB,UACnB,WAAW,OACX,QAAQ,EAAE,EACV,aAAa,SACb,mBAAmB,oBACmB;CACtC,MAAM,EAA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KACnG,MAAM;KAAO;KAAK;KAAS;;KACxB;;GAEJ;;AAIV,4BAAe"}
1
+ {"version":3,"file":"KeyValueInput.cjs","names":["KeyValueInput: FC<KeyValueInputProps>","useTheme","styles: Record<string, string>","useStyles","handleAddPair: ReturnType<typeof useCallback>","newPair: KeyValuePair","updatedPairs: KeyValuePair[]","handleRemovePair: ReturnType<typeof useCallback>","pairToRemove: KeyValuePair","handleUpdatePair: ReturnType<typeof useCallback>","canAddMore: boolean","isAddDisabled: boolean","cx","TextField","X","Plus"],"sources":["../../../../../src/components/primitives/KeyValueInput/KeyValueInput.tsx"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {withVendorCSSClassPrefix, bem} from '@thunderid/browser';\nimport {ChangeEvent, FC, KeyboardEvent, MouseEventHandler, ReactElement, useState, useCallback} from 'react';\nimport useStyles from './KeyValueInput.styles';\nimport useTheme from '../../../contexts/Theme/useTheme';\nimport {cx} from '../../../styles/emotion';\nimport {Plus, X} from '../Icons';\nimport TextField from '../TextField/TextField';\n\nexport interface KeyValuePair {\n key: string;\n value: string;\n}\n\nexport interface KeyValueInputProps {\n /**\n * CSS class name for styling the component.\n */\n className?: string;\n\n /**\n * Whether the input is disabled.\n */\n disabled?: boolean;\n\n /**\n * Error message to display.\n */\n error?: string;\n\n /**\n * Help text to display below the input.\n */\n helperText?: string;\n\n /**\n * Label for the key input field.\n */\n keyLabel?: string;\n\n /**\n * Placeholder text for the key input field.\n */\n keyPlaceholder?: string;\n\n /**\n * Label for the component.\n */\n label?: string;\n\n /**\n * Maximum number of key-value pairs allowed.\n */\n maxPairs?: number;\n /**\n * Callback fired when a pair is added.\n */\n onAdd?: (pair: KeyValuePair) => void;\n\n /**\n * Callback fired when the key-value pairs change.\n */\n onChange?: (pairs: KeyValuePair[]) => void;\n\n /**\n * Callback fired when a pair is removed.\n */\n onRemove?: (pair: KeyValuePair, index: number) => void;\n\n /**\n * Whether the component is in read-only mode.\n */\n readOnly?: boolean;\n\n /**\n * Text for the remove button.\n */\n removeButtonText?: string;\n\n /**\n * Whether the component is required.\n */\n required?: boolean;\n\n /**\n * Current key-value pairs.\n */\n value?: Record<string, any> | KeyValuePair[];\n\n /**\n * Label for the value input field.\n */\n valueLabel?: string;\n\n /**\n * Placeholder text for the value input field.\n */\n valuePlaceholder?: string;\n}\n\n/**\n * KeyValueInput component allows users to manage key-value pairs with add/remove functionality.\n * It provides a user-friendly interface for editing organization attributes or similar data structures.\n *\n * @example\n * ```tsx\n * // Basic usage\n * <KeyValueInput\n * label=\"Organization Attributes\"\n * onChange={(pairs) => console.log(pairs)}\n * />\n *\n * // With initial values\n * <KeyValueInput\n * label=\"Organization Attributes\"\n * value={{department: 'IT', location: 'New York'}}\n * onChange={(pairs) => console.log(pairs)}\n * />\n *\n * // With add/remove callbacks\n * <KeyValueInput\n * label=\"Custom Attributes\"\n * value={attributes}\n * onChange={(pairs) => setAttributes(pairs)}\n * onAdd={(pair) => console.log('Added:', pair)}\n * onRemove={(pair, index) => console.log('Removed:', pair, 'at index:', index)}\n * />\n * ```\n */\nconst KeyValueInput: FC<KeyValueInputProps> = ({\n className = '',\n disabled = false,\n error,\n helperText,\n keyLabel = 'Key',\n keyPlaceholder = 'Enter key',\n label,\n maxPairs,\n onChange,\n onAdd,\n onRemove,\n readOnly = false,\n removeButtonText = 'Remove',\n required = false,\n value = {},\n valueLabel = 'Value',\n valuePlaceholder = 'Enter value',\n}: KeyValueInputProps): ReactElement => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const styles: Record<string, string> = useStyles(theme, colorScheme, disabled, readOnly, !!error);\n\n // Convert value to array format\n const initialPairs: KeyValuePair[] = Array.isArray(value)\n ? value\n : Object.entries(value).map(([key, val]: [string, any]) => ({key, value: String(val)}));\n\n const [pairs, setPairs] = useState<KeyValuePair[]>(initialPairs);\n const [newKey, setNewKey] = useState('');\n const [newValue, setNewValue] = useState('');\n\n const handleAddPair: ReturnType<typeof useCallback> = useCallback(() => {\n if (!newKey.trim() || !newValue.trim()) return;\n if (maxPairs && pairs.length >= maxPairs) return;\n\n const newPair: KeyValuePair = {\n key: newKey.trim(),\n value: newValue.trim(),\n };\n\n const updatedPairs: KeyValuePair[] = [...pairs, newPair];\n setPairs(updatedPairs);\n setNewKey('');\n setNewValue('');\n\n if (onChange) {\n onChange(updatedPairs);\n }\n\n if (onAdd) {\n onAdd(newPair);\n }\n }, [newKey, newValue, pairs, maxPairs, onChange, onAdd]);\n\n const handleRemovePair: ReturnType<typeof useCallback> = useCallback(\n (index: number) => {\n const pairToRemove: KeyValuePair = pairs[index];\n const updatedPairs: KeyValuePair[] = pairs.filter((_: KeyValuePair, i: number) => i !== index);\n setPairs(updatedPairs);\n\n if (onChange) {\n onChange(updatedPairs);\n }\n\n if (onRemove) {\n onRemove(pairToRemove, index);\n }\n },\n [pairs, onChange, onRemove],\n );\n\n const handleUpdatePair: ReturnType<typeof useCallback> = useCallback(\n (index: number, field: 'key' | 'value', newVal: string) => {\n const updatedPairs: KeyValuePair[] = pairs.map((pair: KeyValuePair, i: number) => {\n if (i === index) {\n return {...pair, [field]: newVal};\n }\n return pair;\n });\n setPairs(updatedPairs);\n\n if (onChange) {\n onChange(updatedPairs);\n }\n },\n [pairs, onChange],\n );\n\n const canAddMore: boolean = !maxPairs || pairs.length < maxPairs;\n const isAddDisabled: boolean = disabled || readOnly || !canAddMore || !newKey.trim() || !newValue.trim();\n\n const renderReadOnlyContent = (): ReactElement | ReactElement[] => {\n if (pairs.length === 0) {\n return (\n <div className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'empty-state')), styles['emptyState'])}>\n No attributes defined\n </div>\n );\n }\n\n return pairs.map((pair: KeyValuePair, index: number) => (\n <div\n key={`${pair.key}-${index}`}\n className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'readonly-pair')), styles['readOnlyPair'])}\n >\n <span className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'readonly-key')), styles['readOnlyKey'])}>\n {pair.key}:\n </span>\n <span\n className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'readonly-value')), styles['readOnlyValue'])}\n >\n {pair.value}\n </span>\n </div>\n ));\n };\n\n return (\n <div className={cx(withVendorCSSClassPrefix(bem('key-value-input')), styles['container'], className)}>\n {label && (\n <label className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'label')), styles['label'])}>\n {label}\n {required && (\n <span\n className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'required')), styles['requiredIndicator'])}\n >\n {' *'}\n </span>\n )}\n </label>\n )}\n\n <div className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'pairs-list')), styles['pairsList'])}>\n {readOnly\n ? renderReadOnlyContent()\n : pairs.map((pair: KeyValuePair, index: number) => (\n <div\n key={`${pair.key}-${index}`}\n className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'pair-row')), styles['pairRow'])}\n >\n <TextField\n placeholder={keyPlaceholder}\n value={pair.key}\n onChange={(e: ChangeEvent<HTMLInputElement>): void => handleUpdatePair(index, 'key', e.target.value)}\n disabled={disabled || readOnly}\n className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'pair-input')), styles['pairInput'])}\n aria-label={`${keyLabel} ${index + 1}`}\n />\n <TextField\n placeholder={valuePlaceholder}\n value={pair.value}\n onChange={(e: ChangeEvent<HTMLInputElement>): void =>\n handleUpdatePair(index, 'value', e.target.value)\n }\n disabled={disabled || readOnly}\n className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'pair-input')), styles['pairInput'])}\n aria-label={`${valueLabel} ${index + 1}`}\n />\n {!readOnly && (\n <button\n type=\"button\"\n onClick={(): void => handleRemovePair(index)}\n disabled={disabled}\n className={cx(\n withVendorCSSClassPrefix(bem('key-value-input', 'remove-button')),\n styles['removeButton'],\n )}\n aria-label={`${removeButtonText} ${pair.key}`}\n >\n <X width={16} height={16} />\n </button>\n )}\n </div>\n ))}\n\n {!readOnly && (\n <div className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'add-row')), styles['addRow'])}>\n <TextField\n placeholder={keyPlaceholder}\n value={newKey}\n onChange={(e: ChangeEvent<HTMLInputElement>): void => setNewKey(e.target.value)}\n disabled={disabled}\n className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'pair-input')), styles['pairInput'])}\n aria-label=\"New key\"\n />\n <TextField\n placeholder={valuePlaceholder}\n value={newValue}\n onChange={(e: ChangeEvent<HTMLInputElement>): void => setNewValue(e.target.value)}\n disabled={disabled}\n className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'pair-input')), styles['pairInput'])}\n aria-label=\"New value\"\n onKeyPress={(e: KeyboardEvent<HTMLInputElement>): void => {\n if (e.key === 'Enter' && !isAddDisabled) {\n handleAddPair();\n }\n }}\n />\n <button\n type=\"button\"\n onClick={handleAddPair as MouseEventHandler<HTMLButtonElement>}\n disabled={isAddDisabled}\n className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'add-button')), styles['addButton'])}\n aria-label=\"Add new key-value pair\"\n >\n <Plus width={16} height={16} />\n </button>\n </div>\n )}\n </div>\n\n {(helperText || error) && (\n <div className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'helper-text')), styles['helperText'])}>\n {error || helperText}\n </div>\n )}\n\n {maxPairs && (\n <div className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'counter')), styles['counterText'])}>\n {pairs.length} of {maxPairs} pairs used\n </div>\n )}\n </div>\n );\n};\n\nexport default KeyValueInput;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmIA,MAAMA,iBAAyC,EAC7C,YAAY,IACZ,WAAW,OACX,OACA,YACA,WAAW,OACX,iBAAiB,aACjB,OACA,UACA,UACA,OACA,UACA,WAAW,OACX,mBAAmB,UACnB,WAAW,OACX,QAAQ,EAAE,EACV,aAAa,SACb,mBAAmB,oBACmB;CACtC,MAAM,EAAC,OAAO,gBAA4CC,0BAAU;CACpE,MAAMC,SAAiCC,qCAAU,OAAO,a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CAAC;IAAI,WAAWA,kGAAgC,mBAAmB,UAAU,CAAC,EAAE,OAAO,eAAe;;KACnG,MAAM;KAAO;KAAK;KAAS;;KACxB;;GAEJ;;AAIV,4BAAe"}
@@ -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/KeyValueInput/KeyValueInput.styles.ts
8
7
  /**
@@ -15,27 +14,27 @@ __emotion_css = require_rolldown_runtime.__toESM(__emotion_css);
15
14
  * @returns Object containing CSS class names for component styling
16
15
  */
17
16
  const useStyles = (theme, colorScheme, disabled, readOnly, hasError) => (0, react.useMemo)(() => {
18
- const container = __emotion_css.css`
17
+ const container = require_emotion.css`
19
18
  display: flex;
20
19
  flex-direction: column;
21
20
  font-family: ${theme.vars.typography.fontFamily};
22
21
  gap: calc(${theme.vars.spacing.unit} / 2);
23
22
  `;
24
- const label = __emotion_css.css`
23
+ const label = require_emotion.css`
25
24
  font-size: 0.875rem;
26
25
  font-weight: 500;
27
26
  color: ${theme.vars.colors.text.primary};
28
27
  margin-bottom: calc(${theme.vars.spacing.unit} / 2);
29
28
  `;
30
- const requiredIndicator = __emotion_css.css`
29
+ const requiredIndicator = require_emotion.css`
31
30
  color: ${theme.vars.colors.error.main};
32
31
  `;
33
- const pairsList = __emotion_css.css`
32
+ const pairsList = require_emotion.css`
34
33
  display: flex;
35
34
  flex-direction: column;
36
35
  gap: calc(${theme.vars.spacing.unit} / 4);
37
36
  `;
38
- const pairRow = __emotion_css.css`
37
+ const pairRow = require_emotion.css`
39
38
  display: flex;
40
39
  align-items: center;
41
40
  gap: calc(${theme.vars.spacing.unit} / 2);
@@ -48,11 +47,11 @@ const useStyles = (theme, colorScheme, disabled, readOnly, hasError) => (0, reac
48
47
  background-color: ${theme.vars.colors.action.hover};
49
48
  }
50
49
  `;
51
- const pairInput = __emotion_css.css`
50
+ const pairInput = require_emotion.css`
52
51
  flex: 1;
53
52
  min-width: 0;
54
53
  `;
55
- const addRow = __emotion_css.css`
54
+ const addRow = require_emotion.css`
56
55
  display: flex;
57
56
  align-items: center;
58
57
  gap: calc(${theme.vars.spacing.unit} / 2);
@@ -62,7 +61,7 @@ const useStyles = (theme, colorScheme, disabled, readOnly, hasError) => (0, reac
62
61
  background-color: transparent;
63
62
  margin-top: calc(${theme.vars.spacing.unit} / 2);
64
63
  `;
65
- const removeButton = __emotion_css.css`
64
+ const removeButton = require_emotion.css`
66
65
  min-width: auto;
67
66
  width: 24px;
68
67
  height: 24px;
@@ -85,7 +84,7 @@ const useStyles = (theme, colorScheme, disabled, readOnly, hasError) => (0, reac
85
84
  opacity: 0.6;
86
85
  }
87
86
  `;
88
- const addButton = __emotion_css.css`
87
+ const addButton = require_emotion.css`
89
88
  min-width: auto;
90
89
  width: 24px;
91
90
  height: 24px;
@@ -108,33 +107,33 @@ const useStyles = (theme, colorScheme, disabled, readOnly, hasError) => (0, reac
108
107
  opacity: 0.6;
109
108
  }
110
109
  `;
111
- const helperText = __emotion_css.css`
110
+ const helperText = require_emotion.css`
112
111
  font-size: 0.75rem;
113
112
  color: ${hasError ? theme.vars.colors.error.main : theme.vars.colors.text.secondary};
114
113
  margin-top: calc(${theme.vars.spacing.unit} / 2);
115
114
  `;
116
- const emptyState = __emotion_css.css`
115
+ const emptyState = require_emotion.css`
117
116
  padding: ${theme.vars.spacing.unit};
118
117
  text-align: center;
119
118
  color: ${theme.vars.colors.text.secondary};
120
119
  font-style: italic;
121
120
  font-size: 0.75rem;
122
121
  `;
123
- const readOnlyPair = __emotion_css.css`
122
+ const readOnlyPair = require_emotion.css`
124
123
  display: flex;
125
124
  align-items: center;
126
125
  gap: calc(${theme.vars.spacing.unit} / 2);
127
126
  padding: calc(${theme.vars.spacing.unit} / 4) 0;
128
127
  min-height: 20px;
129
128
  `;
130
- const readOnlyKey = __emotion_css.css`
129
+ const readOnlyKey = require_emotion.css`
131
130
  font-size: 0.75rem;
132
131
  font-weight: 500;
133
132
  color: ${theme.vars.colors.text.secondary};
134
133
  min-width: 80px;
135
134
  flex-shrink: 0;
136
135
  `;
137
- const readOnlyValue = __emotion_css.css`
136
+ const readOnlyValue = require_emotion.css`
138
137
  font-size: 0.75rem;
139
138
  color: ${theme.vars.colors.text.primary};
140
139
  word-break: break-word;
@@ -144,7 +143,7 @@ const useStyles = (theme, colorScheme, disabled, readOnly, hasError) => (0, reac
144
143
  addButton,
145
144
  addRow,
146
145
  container,
147
- counterText: __emotion_css.css`
146
+ counterText: require_emotion.css`
148
147
  font-size: 0.75rem;
149
148
  color: ${theme.vars.colors.text.secondary};
150
149
  margin-top: calc(${theme.vars.spacing.unit} / 2);