@thunderid/react 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/actions/SignInButton/BaseSignInButton.cjs +2 -3
- package/dist/cjs/components/actions/SignInButton/BaseSignInButton.cjs.map +1 -1
- package/dist/cjs/components/actions/SignOutButton/BaseSignOutButton.cjs +2 -3
- package/dist/cjs/components/actions/SignOutButton/BaseSignOutButton.cjs.map +1 -1
- package/dist/cjs/components/actions/SignUpButton/BaseSignUpButton.cjs +2 -3
- package/dist/cjs/components/actions/SignUpButton/BaseSignUpButton.cjs.map +1 -1
- package/dist/cjs/components/adapters/Consent.cjs +34 -27
- package/dist/cjs/components/adapters/Consent.cjs.map +1 -1
- package/dist/cjs/components/adapters/ConsentCheckboxList.cjs +7 -8
- package/dist/cjs/components/adapters/ConsentCheckboxList.cjs.map +1 -1
- package/dist/cjs/components/adapters/ConsentCheckboxList.styles.cjs +8 -9
- package/dist/cjs/components/adapters/ConsentCheckboxList.styles.cjs.map +1 -1
- package/dist/cjs/components/adapters/ImageComponent.cjs +13 -9
- package/dist/cjs/components/adapters/ImageComponent.cjs.map +1 -1
- package/dist/cjs/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.cjs +3 -4
- package/dist/cjs/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.cjs.map +1 -1
- package/dist/cjs/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.styles.cjs +11 -12
- package/dist/cjs/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.styles.cjs.map +1 -1
- package/dist/cjs/components/presentation/UserDropdown/BaseUserDropdown.cjs +12 -16
- package/dist/cjs/components/presentation/UserDropdown/BaseUserDropdown.cjs.map +1 -1
- package/dist/cjs/components/presentation/UserDropdown/BaseUserDropdown.styles.cjs +18 -15
- package/dist/cjs/components/presentation/UserDropdown/BaseUserDropdown.styles.cjs.map +1 -1
- package/dist/cjs/components/presentation/UserProfile/BaseUserProfile.cjs +5 -6
- package/dist/cjs/components/presentation/UserProfile/BaseUserProfile.cjs.map +1 -1
- package/dist/cjs/components/presentation/UserProfile/BaseUserProfile.styles.cjs +25 -26
- package/dist/cjs/components/presentation/UserProfile/BaseUserProfile.styles.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/AcceptInvite/BaseAcceptInvite.cjs +10 -31
- package/dist/cjs/components/presentation/auth/AcceptInvite/BaseAcceptInvite.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/AcceptInvite/BaseAcceptInvite.styles.cjs +41 -9
- package/dist/cjs/components/presentation/auth/AcceptInvite/BaseAcceptInvite.styles.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/AuthOptionFactory.cjs +75 -71
- package/dist/cjs/components/presentation/auth/AuthOptionFactory.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/InviteUser/BaseInviteUser.cjs +9 -22
- package/dist/cjs/components/presentation/auth/InviteUser/BaseInviteUser.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/InviteUser/BaseInviteUser.styles.cjs +22 -9
- package/dist/cjs/components/presentation/auth/InviteUser/BaseInviteUser.styles.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/Recovery/BaseRecovery.cjs +11 -12
- package/dist/cjs/components/presentation/auth/Recovery/BaseRecovery.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/SignIn/BaseSignIn.cjs +11 -16
- package/dist/cjs/components/presentation/auth/SignIn/BaseSignIn.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/SignIn/BaseSignIn.styles.cjs +32 -27
- package/dist/cjs/components/presentation/auth/SignIn/BaseSignIn.styles.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/SignUp/BaseSignUp.cjs +11 -12
- package/dist/cjs/components/presentation/auth/SignUp/BaseSignUp.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/SignUp/BaseSignUp.styles.cjs +25 -26
- package/dist/cjs/components/presentation/auth/SignUp/BaseSignUp.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/AffixedField/AffixedField.cjs +6 -7
- package/dist/cjs/components/primitives/AffixedField/AffixedField.cjs.map +1 -1
- package/dist/cjs/components/primitives/AffixedField/AffixedField.styles.cjs +9 -10
- package/dist/cjs/components/primitives/AffixedField/AffixedField.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Alert/Alert.cjs +6 -7
- package/dist/cjs/components/primitives/Alert/Alert.cjs.map +1 -1
- package/dist/cjs/components/primitives/Alert/Alert.styles.cjs +10 -11
- package/dist/cjs/components/primitives/Alert/Alert.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Avatar/Avatar.cjs +5 -6
- package/dist/cjs/components/primitives/Avatar/Avatar.cjs.map +1 -1
- package/dist/cjs/components/primitives/Avatar/Avatar.styles.cjs +7 -8
- package/dist/cjs/components/primitives/Avatar/Avatar.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Button/Button.cjs +8 -12
- package/dist/cjs/components/primitives/Button/Button.cjs.map +1 -1
- package/dist/cjs/components/primitives/Button/Button.styles.cjs +23 -24
- package/dist/cjs/components/primitives/Button/Button.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Card/Card.cjs +8 -9
- package/dist/cjs/components/primitives/Card/Card.cjs.map +1 -1
- package/dist/cjs/components/primitives/Card/Card.styles.cjs +12 -13
- package/dist/cjs/components/primitives/Card/Card.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Checkbox/Checkbox.cjs +5 -6
- package/dist/cjs/components/primitives/Checkbox/Checkbox.cjs.map +1 -1
- package/dist/cjs/components/primitives/Checkbox/Checkbox.styles.cjs +7 -8
- package/dist/cjs/components/primitives/Checkbox/Checkbox.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/CopyableText/CopyableText.styles.cjs +6 -7
- package/dist/cjs/components/primitives/CopyableText/CopyableText.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/DatePicker/DatePicker.cjs +4 -5
- package/dist/cjs/components/primitives/DatePicker/DatePicker.cjs.map +1 -1
- package/dist/cjs/components/primitives/DatePicker/DatePicker.styles.cjs +5 -6
- package/dist/cjs/components/primitives/DatePicker/DatePicker.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Dialog/Dialog.cjs +7 -8
- package/dist/cjs/components/primitives/Dialog/Dialog.cjs.map +1 -1
- package/dist/cjs/components/primitives/Dialog/Dialog.styles.cjs +8 -9
- package/dist/cjs/components/primitives/Dialog/Dialog.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Divider/Divider.cjs +7 -8
- package/dist/cjs/components/primitives/Divider/Divider.cjs.map +1 -1
- package/dist/cjs/components/primitives/Divider/Divider.styles.cjs +7 -8
- package/dist/cjs/components/primitives/Divider/Divider.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/FormControl/FormControl.cjs +3 -4
- package/dist/cjs/components/primitives/FormControl/FormControl.cjs.map +1 -1
- package/dist/cjs/components/primitives/FormControl/FormControl.styles.cjs +4 -5
- package/dist/cjs/components/primitives/FormControl/FormControl.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/InputLabel/InputLabel.cjs +3 -4
- package/dist/cjs/components/primitives/InputLabel/InputLabel.cjs.map +1 -1
- package/dist/cjs/components/primitives/InputLabel/InputLabel.styles.cjs +6 -7
- package/dist/cjs/components/primitives/InputLabel/InputLabel.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/KeyValueInput/KeyValueInput.cjs +19 -20
- package/dist/cjs/components/primitives/KeyValueInput/KeyValueInput.cjs.map +1 -1
- package/dist/cjs/components/primitives/KeyValueInput/KeyValueInput.styles.cjs +16 -17
- package/dist/cjs/components/primitives/KeyValueInput/KeyValueInput.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Logo/Logo.cjs +3 -4
- package/dist/cjs/components/primitives/Logo/Logo.cjs.map +1 -1
- package/dist/cjs/components/primitives/Logo/Logo.styles.cjs +9 -10
- package/dist/cjs/components/primitives/Logo/Logo.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/MultiInput/MultiInput.cjs +11 -12
- package/dist/cjs/components/primitives/MultiInput/MultiInput.cjs.map +1 -1
- package/dist/cjs/components/primitives/MultiInput/MultiInput.styles.cjs +10 -11
- package/dist/cjs/components/primitives/MultiInput/MultiInput.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/OtpField/OtpField.cjs +4 -5
- package/dist/cjs/components/primitives/OtpField/OtpField.cjs.map +1 -1
- package/dist/cjs/components/primitives/OtpField/OtpField.styles.cjs +5 -6
- package/dist/cjs/components/primitives/OtpField/OtpField.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/PasswordField/PasswordField.cjs +3 -4
- package/dist/cjs/components/primitives/PasswordField/PasswordField.cjs.map +1 -1
- package/dist/cjs/components/primitives/PasswordField/PasswordField.styles.cjs +4 -5
- package/dist/cjs/components/primitives/PasswordField/PasswordField.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Select/Select.cjs +3 -4
- package/dist/cjs/components/primitives/Select/Select.cjs.map +1 -1
- package/dist/cjs/components/primitives/Select/Select.styles.cjs +5 -6
- package/dist/cjs/components/primitives/Select/Select.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Spinner/Spinner.cjs +4 -6
- package/dist/cjs/components/primitives/Spinner/Spinner.cjs.map +1 -1
- package/dist/cjs/components/primitives/Spinner/Spinner.styles.cjs +20 -12
- package/dist/cjs/components/primitives/Spinner/Spinner.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/TextField/TextField.cjs +6 -7
- package/dist/cjs/components/primitives/TextField/TextField.cjs.map +1 -1
- package/dist/cjs/components/primitives/TextField/TextField.styles.cjs +8 -9
- package/dist/cjs/components/primitives/TextField/TextField.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Toggle/Toggle.cjs +7 -8
- package/dist/cjs/components/primitives/Toggle/Toggle.cjs.map +1 -1
- package/dist/cjs/components/primitives/Toggle/Toggle.styles.cjs +7 -8
- package/dist/cjs/components/primitives/Toggle/Toggle.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Tooltip/Tooltip.cjs +4 -5
- package/dist/cjs/components/primitives/Tooltip/Tooltip.cjs.map +1 -1
- package/dist/cjs/components/primitives/Tooltip/Tooltip.styles.cjs +13 -14
- package/dist/cjs/components/primitives/Tooltip/Tooltip.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Typography/Typography.cjs +2 -3
- package/dist/cjs/components/primitives/Typography/Typography.cjs.map +1 -1
- package/dist/cjs/components/primitives/Typography/Typography.styles.cjs +18 -19
- package/dist/cjs/components/primitives/Typography/Typography.styles.cjs.map +1 -1
- package/dist/cjs/contexts/ThunderID/ThunderIDProvider.cjs +4 -1
- package/dist/cjs/contexts/ThunderID/ThunderIDProvider.cjs.map +1 -1
- package/dist/cjs/styles/emotion.cjs +64 -0
- package/dist/cjs/styles/emotion.cjs.map +1 -0
- package/dist/components/actions/SignInButton/BaseSignInButton.d.ts.map +1 -1
- package/dist/components/actions/SignInButton/BaseSignInButton.js +1 -1
- package/dist/components/actions/SignInButton/BaseSignInButton.js.map +1 -1
- package/dist/components/actions/SignOutButton/BaseSignOutButton.d.ts.map +1 -1
- package/dist/components/actions/SignOutButton/BaseSignOutButton.js +1 -1
- package/dist/components/actions/SignOutButton/BaseSignOutButton.js.map +1 -1
- package/dist/components/actions/SignUpButton/BaseSignUpButton.d.ts.map +1 -1
- package/dist/components/actions/SignUpButton/BaseSignUpButton.js +1 -1
- package/dist/components/actions/SignUpButton/BaseSignUpButton.js.map +1 -1
- package/dist/components/adapters/Consent.d.ts.map +1 -1
- package/dist/components/adapters/Consent.js +34 -27
- package/dist/components/adapters/Consent.js.map +1 -1
- package/dist/components/adapters/ConsentCheckboxList.d.ts.map +1 -1
- package/dist/components/adapters/ConsentCheckboxList.js +1 -1
- package/dist/components/adapters/ConsentCheckboxList.js.map +1 -1
- package/dist/components/adapters/ConsentCheckboxList.styles.d.ts.map +1 -1
- package/dist/components/adapters/ConsentCheckboxList.styles.js +1 -1
- package/dist/components/adapters/ConsentCheckboxList.styles.js.map +1 -1
- package/dist/components/adapters/ImageComponent.d.ts.map +1 -1
- package/dist/components/adapters/ImageComponent.js +13 -9
- package/dist/components/adapters/ImageComponent.js.map +1 -1
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.d.ts.map +1 -1
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.js +1 -1
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.js.map +1 -1
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.styles.d.ts.map +1 -1
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.styles.js +1 -1
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.styles.js.map +1 -1
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.d.ts.map +1 -1
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.js +5 -8
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.js.map +1 -1
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.styles.d.ts.map +1 -1
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.styles.js +5 -1
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.styles.js.map +1 -1
- package/dist/components/presentation/UserProfile/BaseUserProfile.d.ts.map +1 -1
- package/dist/components/presentation/UserProfile/BaseUserProfile.js +1 -1
- package/dist/components/presentation/UserProfile/BaseUserProfile.js.map +1 -1
- package/dist/components/presentation/UserProfile/BaseUserProfile.styles.d.ts.map +1 -1
- package/dist/components/presentation/UserProfile/BaseUserProfile.styles.js +1 -1
- package/dist/components/presentation/UserProfile/BaseUserProfile.styles.js.map +1 -1
- package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.d.ts.map +1 -1
- package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.js +7 -27
- package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.js.map +1 -1
- package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.styles.d.ts.map +1 -1
- package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.styles.js +38 -5
- package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.styles.js.map +1 -1
- package/dist/components/presentation/auth/AuthOptionFactory.d.ts.map +1 -1
- package/dist/components/presentation/auth/AuthOptionFactory.js +68 -63
- package/dist/components/presentation/auth/AuthOptionFactory.js.map +1 -1
- package/dist/components/presentation/auth/InviteUser/BaseInviteUser.d.ts.map +1 -1
- package/dist/components/presentation/auth/InviteUser/BaseInviteUser.js +5 -17
- package/dist/components/presentation/auth/InviteUser/BaseInviteUser.js.map +1 -1
- package/dist/components/presentation/auth/InviteUser/BaseInviteUser.styles.d.ts.map +1 -1
- package/dist/components/presentation/auth/InviteUser/BaseInviteUser.styles.js +19 -5
- package/dist/components/presentation/auth/InviteUser/BaseInviteUser.styles.js.map +1 -1
- package/dist/components/presentation/auth/Recovery/BaseRecovery.d.ts.map +1 -1
- package/dist/components/presentation/auth/Recovery/BaseRecovery.js +1 -1
- package/dist/components/presentation/auth/Recovery/BaseRecovery.js.map +1 -1
- package/dist/components/presentation/auth/SignIn/BaseSignIn.d.ts.map +1 -1
- package/dist/components/presentation/auth/SignIn/BaseSignIn.js +2 -6
- package/dist/components/presentation/auth/SignIn/BaseSignIn.js.map +1 -1
- package/dist/components/presentation/auth/SignIn/BaseSignIn.styles.d.ts.map +1 -1
- package/dist/components/presentation/auth/SignIn/BaseSignIn.styles.js +7 -1
- package/dist/components/presentation/auth/SignIn/BaseSignIn.styles.js.map +1 -1
- package/dist/components/presentation/auth/SignUp/BaseSignUp.d.ts.map +1 -1
- package/dist/components/presentation/auth/SignUp/BaseSignUp.js +1 -1
- package/dist/components/presentation/auth/SignUp/BaseSignUp.js.map +1 -1
- package/dist/components/presentation/auth/SignUp/BaseSignUp.styles.d.ts.map +1 -1
- package/dist/components/presentation/auth/SignUp/BaseSignUp.styles.js +1 -1
- package/dist/components/presentation/auth/SignUp/BaseSignUp.styles.js.map +1 -1
- package/dist/components/primitives/AffixedField/AffixedField.d.ts.map +1 -1
- package/dist/components/primitives/AffixedField/AffixedField.js +1 -1
- package/dist/components/primitives/AffixedField/AffixedField.js.map +1 -1
- package/dist/components/primitives/AffixedField/AffixedField.styles.d.ts.map +1 -1
- package/dist/components/primitives/AffixedField/AffixedField.styles.js +1 -1
- package/dist/components/primitives/AffixedField/AffixedField.styles.js.map +1 -1
- package/dist/components/primitives/Alert/Alert.d.ts.map +1 -1
- package/dist/components/primitives/Alert/Alert.js +1 -1
- package/dist/components/primitives/Alert/Alert.js.map +1 -1
- package/dist/components/primitives/Alert/Alert.styles.d.ts.map +1 -1
- package/dist/components/primitives/Alert/Alert.styles.js +1 -1
- package/dist/components/primitives/Alert/Alert.styles.js.map +1 -1
- package/dist/components/primitives/Avatar/Avatar.d.ts.map +1 -1
- package/dist/components/primitives/Avatar/Avatar.js +1 -1
- package/dist/components/primitives/Avatar/Avatar.js.map +1 -1
- package/dist/components/primitives/Avatar/Avatar.styles.d.ts.map +1 -1
- package/dist/components/primitives/Avatar/Avatar.styles.js +1 -1
- package/dist/components/primitives/Avatar/Avatar.styles.js.map +1 -1
- package/dist/components/primitives/Button/Button.d.ts.map +1 -1
- package/dist/components/primitives/Button/Button.js +2 -5
- package/dist/components/primitives/Button/Button.js.map +1 -1
- package/dist/components/primitives/Button/Button.styles.d.ts.map +1 -1
- package/dist/components/primitives/Button/Button.styles.js +1 -1
- package/dist/components/primitives/Button/Button.styles.js.map +1 -1
- package/dist/components/primitives/Card/Card.d.ts.map +1 -1
- package/dist/components/primitives/Card/Card.js +1 -1
- package/dist/components/primitives/Card/Card.js.map +1 -1
- package/dist/components/primitives/Card/Card.styles.d.ts.map +1 -1
- package/dist/components/primitives/Card/Card.styles.js +1 -1
- package/dist/components/primitives/Card/Card.styles.js.map +1 -1
- package/dist/components/primitives/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/primitives/Checkbox/Checkbox.js +1 -1
- package/dist/components/primitives/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/primitives/Checkbox/Checkbox.styles.d.ts.map +1 -1
- package/dist/components/primitives/Checkbox/Checkbox.styles.js +1 -1
- package/dist/components/primitives/Checkbox/Checkbox.styles.js.map +1 -1
- package/dist/components/primitives/CopyableText/CopyableText.styles.d.ts.map +1 -1
- package/dist/components/primitives/CopyableText/CopyableText.styles.js +1 -1
- package/dist/components/primitives/CopyableText/CopyableText.styles.js.map +1 -1
- package/dist/components/primitives/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/primitives/DatePicker/DatePicker.js +1 -1
- package/dist/components/primitives/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/primitives/DatePicker/DatePicker.styles.d.ts.map +1 -1
- package/dist/components/primitives/DatePicker/DatePicker.styles.js +1 -1
- package/dist/components/primitives/DatePicker/DatePicker.styles.js.map +1 -1
- package/dist/components/primitives/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/primitives/Dialog/Dialog.js +1 -1
- package/dist/components/primitives/Dialog/Dialog.js.map +1 -1
- package/dist/components/primitives/Dialog/Dialog.styles.d.ts.map +1 -1
- package/dist/components/primitives/Dialog/Dialog.styles.js +1 -1
- package/dist/components/primitives/Dialog/Dialog.styles.js.map +1 -1
- package/dist/components/primitives/Divider/Divider.d.ts.map +1 -1
- package/dist/components/primitives/Divider/Divider.js +1 -1
- package/dist/components/primitives/Divider/Divider.js.map +1 -1
- package/dist/components/primitives/Divider/Divider.styles.d.ts.map +1 -1
- package/dist/components/primitives/Divider/Divider.styles.js +1 -1
- package/dist/components/primitives/Divider/Divider.styles.js.map +1 -1
- package/dist/components/primitives/FormControl/FormControl.d.ts.map +1 -1
- package/dist/components/primitives/FormControl/FormControl.js +1 -1
- package/dist/components/primitives/FormControl/FormControl.js.map +1 -1
- package/dist/components/primitives/FormControl/FormControl.styles.d.ts.map +1 -1
- package/dist/components/primitives/FormControl/FormControl.styles.js +1 -1
- package/dist/components/primitives/FormControl/FormControl.styles.js.map +1 -1
- package/dist/components/primitives/InputLabel/InputLabel.d.ts.map +1 -1
- package/dist/components/primitives/InputLabel/InputLabel.js +1 -1
- package/dist/components/primitives/InputLabel/InputLabel.js.map +1 -1
- package/dist/components/primitives/InputLabel/InputLabel.styles.d.ts.map +1 -1
- package/dist/components/primitives/InputLabel/InputLabel.styles.js +1 -1
- package/dist/components/primitives/InputLabel/InputLabel.styles.js.map +1 -1
- package/dist/components/primitives/KeyValueInput/KeyValueInput.d.ts.map +1 -1
- package/dist/components/primitives/KeyValueInput/KeyValueInput.js +1 -1
- package/dist/components/primitives/KeyValueInput/KeyValueInput.js.map +1 -1
- package/dist/components/primitives/KeyValueInput/KeyValueInput.styles.d.ts.map +1 -1
- package/dist/components/primitives/KeyValueInput/KeyValueInput.styles.js +1 -1
- package/dist/components/primitives/KeyValueInput/KeyValueInput.styles.js.map +1 -1
- package/dist/components/primitives/Logo/Logo.d.ts.map +1 -1
- package/dist/components/primitives/Logo/Logo.js +1 -1
- package/dist/components/primitives/Logo/Logo.js.map +1 -1
- package/dist/components/primitives/Logo/Logo.styles.d.ts.map +1 -1
- package/dist/components/primitives/Logo/Logo.styles.js +1 -1
- package/dist/components/primitives/Logo/Logo.styles.js.map +1 -1
- package/dist/components/primitives/MultiInput/MultiInput.d.ts.map +1 -1
- package/dist/components/primitives/MultiInput/MultiInput.js +1 -1
- package/dist/components/primitives/MultiInput/MultiInput.js.map +1 -1
- package/dist/components/primitives/MultiInput/MultiInput.styles.d.ts.map +1 -1
- package/dist/components/primitives/MultiInput/MultiInput.styles.js +1 -1
- package/dist/components/primitives/MultiInput/MultiInput.styles.js.map +1 -1
- package/dist/components/primitives/OtpField/OtpField.d.ts.map +1 -1
- package/dist/components/primitives/OtpField/OtpField.js +1 -1
- package/dist/components/primitives/OtpField/OtpField.js.map +1 -1
- package/dist/components/primitives/OtpField/OtpField.styles.d.ts.map +1 -1
- package/dist/components/primitives/OtpField/OtpField.styles.js +1 -1
- package/dist/components/primitives/OtpField/OtpField.styles.js.map +1 -1
- package/dist/components/primitives/PasswordField/PasswordField.d.ts.map +1 -1
- package/dist/components/primitives/PasswordField/PasswordField.js +1 -1
- package/dist/components/primitives/PasswordField/PasswordField.js.map +1 -1
- package/dist/components/primitives/PasswordField/PasswordField.styles.d.ts.map +1 -1
- package/dist/components/primitives/PasswordField/PasswordField.styles.js +1 -1
- package/dist/components/primitives/PasswordField/PasswordField.styles.js.map +1 -1
- package/dist/components/primitives/Select/Select.d.ts.map +1 -1
- package/dist/components/primitives/Select/Select.js +1 -1
- package/dist/components/primitives/Select/Select.js.map +1 -1
- package/dist/components/primitives/Select/Select.styles.d.ts.map +1 -1
- package/dist/components/primitives/Select/Select.styles.js +1 -1
- package/dist/components/primitives/Select/Select.styles.js.map +1 -1
- package/dist/components/primitives/Spinner/Spinner.d.ts +5 -3
- package/dist/components/primitives/Spinner/Spinner.d.ts.map +1 -1
- package/dist/components/primitives/Spinner/Spinner.js +4 -5
- package/dist/components/primitives/Spinner/Spinner.js.map +1 -1
- package/dist/components/primitives/Spinner/Spinner.styles.d.ts +4 -1
- package/dist/components/primitives/Spinner/Spinner.styles.d.ts.map +1 -1
- package/dist/components/primitives/Spinner/Spinner.styles.js +16 -7
- package/dist/components/primitives/Spinner/Spinner.styles.js.map +1 -1
- package/dist/components/primitives/TextField/TextField.d.ts.map +1 -1
- package/dist/components/primitives/TextField/TextField.js +1 -1
- package/dist/components/primitives/TextField/TextField.js.map +1 -1
- package/dist/components/primitives/TextField/TextField.styles.d.ts.map +1 -1
- package/dist/components/primitives/TextField/TextField.styles.js +1 -1
- package/dist/components/primitives/TextField/TextField.styles.js.map +1 -1
- package/dist/components/primitives/Toggle/Toggle.d.ts.map +1 -1
- package/dist/components/primitives/Toggle/Toggle.js +1 -1
- package/dist/components/primitives/Toggle/Toggle.js.map +1 -1
- package/dist/components/primitives/Toggle/Toggle.styles.d.ts.map +1 -1
- package/dist/components/primitives/Toggle/Toggle.styles.js +1 -1
- package/dist/components/primitives/Toggle/Toggle.styles.js.map +1 -1
- package/dist/components/primitives/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/primitives/Tooltip/Tooltip.js +1 -1
- package/dist/components/primitives/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/primitives/Tooltip/Tooltip.styles.d.ts.map +1 -1
- package/dist/components/primitives/Tooltip/Tooltip.styles.js +1 -1
- package/dist/components/primitives/Tooltip/Tooltip.styles.js.map +1 -1
- package/dist/components/primitives/Typography/Typography.d.ts.map +1 -1
- package/dist/components/primitives/Typography/Typography.js +1 -1
- package/dist/components/primitives/Typography/Typography.js.map +1 -1
- package/dist/components/primitives/Typography/Typography.styles.d.ts.map +1 -1
- package/dist/components/primitives/Typography/Typography.styles.js +1 -1
- package/dist/components/primitives/Typography/Typography.styles.js.map +1 -1
- package/dist/contexts/ThunderID/ThunderIDProvider.d.ts.map +1 -1
- package/dist/contexts/ThunderID/ThunderIDProvider.js +4 -1
- package/dist/contexts/ThunderID/ThunderIDProvider.js.map +1 -1
- package/dist/models/config.d.ts +10 -1
- package/dist/models/config.d.ts.map +1 -1
- package/dist/styles/emotion.d.ts +36 -0
- package/dist/styles/emotion.d.ts.map +1 -0
- package/dist/styles/emotion.js +58 -0
- package/dist/styles/emotion.js.map +1 -0
- 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/presentation/auth/SignUp/BaseSignUp.styles.ts
|
|
8
7
|
/**
|
|
@@ -12,98 +11,98 @@ __emotion_css = require_rolldown_runtime.__toESM(__emotion_css);
|
|
|
12
11
|
* @returns Object containing CSS class names for component styling
|
|
13
12
|
*/
|
|
14
13
|
const useStyles = (theme, colorScheme) => (0, react.useMemo)(() => {
|
|
15
|
-
const signUp =
|
|
14
|
+
const signUp = require_emotion.css`
|
|
16
15
|
min-width: 420px;
|
|
17
16
|
margin: 0 auto;
|
|
18
17
|
font-family: ${theme.vars.typography.fontFamily};
|
|
19
18
|
`;
|
|
20
|
-
const card =
|
|
19
|
+
const card = require_emotion.css`
|
|
21
20
|
background: ${theme.vars.colors.background.surface};
|
|
22
21
|
border-radius: ${theme.vars.borderRadius.large};
|
|
23
22
|
gap: calc(${theme.vars.spacing.unit} * 2);
|
|
24
23
|
min-width: 420px;
|
|
25
24
|
`;
|
|
26
|
-
const logoContainer =
|
|
25
|
+
const logoContainer = require_emotion.css`
|
|
27
26
|
display: flex;
|
|
28
27
|
flex-direction: column;
|
|
29
28
|
align-items: center;
|
|
30
29
|
margin-bottom: calc(${theme.vars.spacing.unit} * 2);
|
|
31
30
|
`;
|
|
32
|
-
const header =
|
|
31
|
+
const header = require_emotion.css`
|
|
33
32
|
gap: 0;
|
|
34
33
|
align-items: center;
|
|
35
34
|
`;
|
|
36
|
-
const title =
|
|
35
|
+
const title = require_emotion.css`
|
|
37
36
|
margin: 0 0 calc(${theme.vars.spacing.unit} * 1) 0;
|
|
38
37
|
color: ${theme.vars.colors.text.primary};
|
|
39
38
|
`;
|
|
40
|
-
const subtitle =
|
|
39
|
+
const subtitle = require_emotion.css`
|
|
41
40
|
margin-bottom: calc(${theme.vars.spacing.unit} * 1);
|
|
42
41
|
color: ${theme.vars.colors.text.secondary};
|
|
43
42
|
`;
|
|
44
|
-
const messageItem =
|
|
43
|
+
const messageItem = require_emotion.css`
|
|
45
44
|
margin-bottom: calc(${theme.vars.spacing.unit} * 1);
|
|
46
45
|
`;
|
|
47
|
-
const errorContainer =
|
|
46
|
+
const errorContainer = require_emotion.css`
|
|
48
47
|
margin-bottom: calc(${theme.vars.spacing.unit} * 2);
|
|
49
48
|
`;
|
|
50
|
-
const contentContainer =
|
|
49
|
+
const contentContainer = require_emotion.css`
|
|
51
50
|
display: flex;
|
|
52
51
|
flex-direction: column;
|
|
53
52
|
gap: calc(${theme.vars.spacing.unit} * 2);
|
|
54
53
|
`;
|
|
55
|
-
const loadingContainer =
|
|
54
|
+
const loadingContainer = require_emotion.css`
|
|
56
55
|
display: flex;
|
|
57
56
|
flex-direction: column;
|
|
58
57
|
align-items: center;
|
|
59
58
|
padding: calc(${theme.vars.spacing.unit} * 4);
|
|
60
59
|
`;
|
|
61
|
-
const loadingText =
|
|
60
|
+
const loadingText = require_emotion.css`
|
|
62
61
|
margin-top: calc(${theme.vars.spacing.unit} * 2);
|
|
63
62
|
color: ${theme.vars.colors.text.secondary};
|
|
64
63
|
`;
|
|
65
|
-
const divider =
|
|
64
|
+
const divider = require_emotion.css`
|
|
66
65
|
margin: calc(${theme.vars.spacing.unit} * 1) 0;
|
|
67
66
|
`;
|
|
68
|
-
const centeredContainer =
|
|
67
|
+
const centeredContainer = require_emotion.css`
|
|
69
68
|
text-align: center;
|
|
70
69
|
padding: calc(${theme.vars.spacing.unit} * 4);
|
|
71
70
|
`;
|
|
72
|
-
const passkeyContainer =
|
|
71
|
+
const passkeyContainer = require_emotion.css`
|
|
73
72
|
margin-bottom: calc(${theme.vars.spacing.unit} * 2);
|
|
74
73
|
`;
|
|
75
|
-
const passkeyText =
|
|
74
|
+
const passkeyText = require_emotion.css`
|
|
76
75
|
margin-top: calc(${theme.vars.spacing.unit} * 1);
|
|
77
76
|
color: ${theme.vars.colors.text.secondary};
|
|
78
77
|
`;
|
|
79
|
-
const form =
|
|
78
|
+
const form = require_emotion.css`
|
|
80
79
|
display: flex;
|
|
81
80
|
flex-direction: column;
|
|
82
81
|
gap: calc(${theme.vars.spacing.unit} * 2);
|
|
83
82
|
`;
|
|
84
|
-
const formDivider =
|
|
83
|
+
const formDivider = require_emotion.css`
|
|
85
84
|
margin: calc(${theme.vars.spacing.unit} * 1) 0;
|
|
86
85
|
`;
|
|
87
|
-
const authenticatorSection =
|
|
86
|
+
const authenticatorSection = require_emotion.css`
|
|
88
87
|
display: flex;
|
|
89
88
|
flex-direction: column;
|
|
90
89
|
gap: calc(${theme.vars.spacing.unit} * 1);
|
|
91
90
|
`;
|
|
92
|
-
const authenticatorItem =
|
|
91
|
+
const authenticatorItem = require_emotion.css`
|
|
93
92
|
width: 100%;
|
|
94
93
|
`;
|
|
95
|
-
const noAuthenticatorCard =
|
|
94
|
+
const noAuthenticatorCard = require_emotion.css`
|
|
96
95
|
background: ${theme.vars.colors.background.surface};
|
|
97
96
|
border-radius: ${theme.vars.borderRadius.large};
|
|
98
97
|
padding: calc(${theme.vars.spacing.unit} * 2);
|
|
99
98
|
`;
|
|
100
|
-
const errorAlert =
|
|
99
|
+
const errorAlert = require_emotion.css`
|
|
101
100
|
margin-bottom: calc(${theme.vars.spacing.unit} * 2);
|
|
102
101
|
`;
|
|
103
|
-
const messagesAlert =
|
|
102
|
+
const messagesAlert = require_emotion.css`
|
|
104
103
|
margin-bottom: calc(${theme.vars.spacing.unit} * 1);
|
|
105
104
|
`;
|
|
106
|
-
const flowMessagesContainer =
|
|
105
|
+
const flowMessagesContainer = require_emotion.css`
|
|
107
106
|
margin-bottom: calc(${theme.vars.spacing.unit} * 2);
|
|
108
107
|
`;
|
|
109
108
|
return {
|
|
@@ -115,7 +114,7 @@ const useStyles = (theme, colorScheme) => (0, react.useMemo)(() => {
|
|
|
115
114
|
divider,
|
|
116
115
|
errorAlert,
|
|
117
116
|
errorContainer,
|
|
118
|
-
flowMessageItem:
|
|
117
|
+
flowMessageItem: require_emotion.css`
|
|
119
118
|
margin-bottom: calc(${theme.vars.spacing.unit} * 1);
|
|
120
119
|
`,
|
|
121
120
|
flowMessagesContainer,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseSignUp.styles.cjs","names":["signUp: string","card: string","logoContainer: string","header: string","title: string","subtitle: string","messageItem: string","errorContainer: string","contentContainer: string","loadingContainer: string","loadingText: string","divider: string","centeredContainer: string","passkeyContainer: string","passkeyText: string","form: string","formDivider: string","authenticatorSection: string","authenticatorItem: string","noAuthenticatorCard: string","errorAlert: string","messagesAlert: string","flowMessagesContainer: string"],"sources":["../../../../../../src/components/presentation/auth/SignUp/BaseSignUp.styles.ts"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {
|
|
1
|
+
{"version":3,"file":"BaseSignUp.styles.cjs","names":["signUp: string","card: string","logoContainer: string","header: string","title: string","subtitle: string","messageItem: string","errorContainer: string","contentContainer: string","loadingContainer: string","loadingText: string","divider: string","centeredContainer: string","passkeyContainer: string","passkeyText: string","form: string","formDivider: string","authenticatorSection: string","authenticatorItem: string","noAuthenticatorCard: string","errorAlert: string","messagesAlert: string","flowMessagesContainer: string"],"sources":["../../../../../../src/components/presentation/auth/SignUp/BaseSignUp.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\n/**\n * Creates styles for the BaseSignUp component\n * @param theme - The theme object containing design tokens\n * @param colorScheme - The current color scheme (used for memoization)\n * @returns Object containing CSS class names for component styling\n */\nconst useStyles = (theme: Theme, colorScheme: string): Record<string, string> =>\n useMemo(() => {\n const signUp: string = css`\n min-width: 420px;\n margin: 0 auto;\n font-family: ${theme.vars.typography.fontFamily};\n `;\n\n const card: string = css`\n background: ${theme.vars.colors.background.surface};\n border-radius: ${theme.vars.borderRadius.large};\n gap: calc(${theme.vars.spacing.unit} * 2);\n min-width: 420px;\n `;\n\n const logoContainer: string = css`\n display: flex;\n flex-direction: column;\n align-items: center;\n margin-bottom: calc(${theme.vars.spacing.unit} * 2);\n `;\n\n const header: string = css`\n gap: 0;\n align-items: center;\n `;\n\n const title: string = css`\n margin: 0 0 calc(${theme.vars.spacing.unit} * 1) 0;\n color: ${theme.vars.colors.text.primary};\n `;\n\n const subtitle: string = css`\n margin-bottom: calc(${theme.vars.spacing.unit} * 1);\n color: ${theme.vars.colors.text.secondary};\n `;\n\n const messageItem: string = css`\n margin-bottom: calc(${theme.vars.spacing.unit} * 1);\n `;\n\n const errorContainer: string = css`\n margin-bottom: calc(${theme.vars.spacing.unit} * 2);\n `;\n\n const contentContainer: string = css`\n display: flex;\n flex-direction: column;\n gap: calc(${theme.vars.spacing.unit} * 2);\n `;\n\n const loadingContainer: string = css`\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: calc(${theme.vars.spacing.unit} * 4);\n `;\n\n const loadingText: string = css`\n margin-top: calc(${theme.vars.spacing.unit} * 2);\n color: ${theme.vars.colors.text.secondary};\n `;\n\n const divider: string = css`\n margin: calc(${theme.vars.spacing.unit} * 1) 0;\n `;\n\n const centeredContainer: string = css`\n text-align: center;\n padding: calc(${theme.vars.spacing.unit} * 4);\n `;\n\n const passkeyContainer: string = css`\n margin-bottom: calc(${theme.vars.spacing.unit} * 2);\n `;\n\n const passkeyText: string = css`\n margin-top: calc(${theme.vars.spacing.unit} * 1);\n color: ${theme.vars.colors.text.secondary};\n `;\n\n const form: string = css`\n display: flex;\n flex-direction: column;\n gap: calc(${theme.vars.spacing.unit} * 2);\n `;\n\n const formDivider: string = css`\n margin: calc(${theme.vars.spacing.unit} * 1) 0;\n `;\n\n const authenticatorSection: string = css`\n display: flex;\n flex-direction: column;\n gap: calc(${theme.vars.spacing.unit} * 1);\n `;\n\n const authenticatorItem: string = css`\n width: 100%;\n `;\n\n const noAuthenticatorCard: string = css`\n background: ${theme.vars.colors.background.surface};\n border-radius: ${theme.vars.borderRadius.large};\n padding: calc(${theme.vars.spacing.unit} * 2);\n `;\n\n const errorAlert: string = css`\n margin-bottom: calc(${theme.vars.spacing.unit} * 2);\n `;\n\n const messagesAlert: string = css`\n margin-bottom: calc(${theme.vars.spacing.unit} * 1);\n `;\n\n const flowMessagesContainer: string = css`\n margin-bottom: calc(${theme.vars.spacing.unit} * 2);\n `;\n\n const flowMessageItem: string = css`\n margin-bottom: calc(${theme.vars.spacing.unit} * 1);\n `;\n\n return {\n authenticatorItem,\n authenticatorSection,\n card,\n centeredContainer,\n contentContainer,\n divider,\n errorAlert,\n errorContainer,\n flowMessageItem,\n flowMessagesContainer,\n form,\n formDivider,\n header,\n loadingContainer,\n loadingText,\n logoContainer,\n messageItem,\n messagesAlert,\n noAuthenticatorCard,\n passkeyContainer,\n passkeyText,\n signUp,\n subtitle,\n title,\n };\n }, [\n theme.vars.colors.background.surface,\n theme.vars.colors.text.primary,\n theme.vars.colors.text.secondary,\n theme.vars.borderRadius.large,\n theme.vars.spacing.unit,\n theme.vars.typography.fontFamily,\n colorScheme,\n ]);\n\nexport default useStyles;\n"],"mappings":";;;;;;;;;;;;AAaA,MAAM,aAAa,OAAc,yCACjB;CACZ,MAAMA,SAAiB,mBAAG;;;qBAGT,MAAM,KAAK,WAAW,WAAW;;CAGlD,MAAMC,OAAe,mBAAG;oBACR,MAAM,KAAK,OAAO,WAAW,QAAQ;uBAClC,MAAM,KAAK,aAAa,MAAM;kBACnC,MAAM,KAAK,QAAQ,KAAK;;;CAItC,MAAMC,gBAAwB,mBAAG;;;;4BAIT,MAAM,KAAK,QAAQ,KAAK;;CAGhD,MAAMC,SAAiB,mBAAG;;;;CAK1B,MAAMC,QAAgB,mBAAG;yBACJ,MAAM,KAAK,QAAQ,KAAK;eAClC,MAAM,KAAK,OAAO,KAAK,QAAQ;;CAG1C,MAAMC,WAAmB,mBAAG;4BACJ,MAAM,KAAK,QAAQ,KAAK;eACrC,MAAM,KAAK,OAAO,KAAK,UAAU;;CAG5C,MAAMC,cAAsB,mBAAG;4BACP,MAAM,KAAK,QAAQ,KAAK;;CAGhD,MAAMC,iBAAyB,mBAAG;4BACV,MAAM,KAAK,QAAQ,KAAK;;CAGhD,MAAMC,mBAA2B,mBAAG;;;kBAGtB,MAAM,KAAK,QAAQ,KAAK;;CAGtC,MAAMC,mBAA2B,mBAAG;;;;sBAIlB,MAAM,KAAK,QAAQ,KAAK;;CAG1C,MAAMC,cAAsB,mBAAG;yBACV,MAAM,KAAK,QAAQ,KAAK;eAClC,MAAM,KAAK,OAAO,KAAK,UAAU;;CAG5C,MAAMC,UAAkB,mBAAG;qBACV,MAAM,KAAK,QAAQ,KAAK;;CAGzC,MAAMC,oBAA4B,mBAAG;;sBAEnB,MAAM,KAAK,QAAQ,KAAK;;CAG1C,MAAMC,mBAA2B,mBAAG;4BACZ,MAAM,KAAK,QAAQ,KAAK;;CAGhD,MAAMC,cAAsB,mBAAG;yBACV,MAAM,KAAK,QAAQ,KAAK;eAClC,MAAM,KAAK,OAAO,KAAK,UAAU;;CAG5C,MAAMC,OAAe,mBAAG;;;kBAGV,MAAM,KAAK,QAAQ,KAAK;;CAGtC,MAAMC,cAAsB,mBAAG;qBACd,MAAM,KAAK,QAAQ,KAAK;;CAGzC,MAAMC,uBAA+B,mBAAG;;;kBAG1B,MAAM,KAAK,QAAQ,KAAK;;CAGtC,MAAMC,oBAA4B,mBAAG;;;CAIrC,MAAMC,sBAA8B,mBAAG;oBACvB,MAAM,KAAK,OAAO,WAAW,QAAQ;uBAClC,MAAM,KAAK,aAAa,MAAM;sBAC/B,MAAM,KAAK,QAAQ,KAAK;;CAG1C,MAAMC,aAAqB,mBAAG;4BACN,MAAM,KAAK,QAAQ,KAAK;;CAGhD,MAAMC,gBAAwB,mBAAG;4BACT,MAAM,KAAK,QAAQ,KAAK;;CAGhD,MAAMC,wBAAgC,mBAAG;4BACjB,MAAM,KAAK,QAAQ,KAAK;;AAOhD,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,iBAb8B,mBAAG;4BACX,MAAM,KAAK,QAAQ,KAAK;;EAa9C;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;GACA;CACD,MAAM,KAAK,OAAO,WAAW;CAC7B,MAAM,KAAK,OAAO,KAAK;CACvB,MAAM,KAAK,OAAO,KAAK;CACvB,MAAM,KAAK,aAAa;CACxB,MAAM,KAAK,QAAQ;CACnB,MAAM,KAAK,WAAW;CACtB;CACD,CAAC;AAEJ,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_FormControl = require('../FormControl/FormControl.cjs');
|
|
4
5
|
const require_InputLabel = require('../InputLabel/InputLabel.cjs');
|
|
@@ -9,8 +10,6 @@ let react = require("react");
|
|
|
9
10
|
react = require_rolldown_runtime.__toESM(react);
|
|
10
11
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
11
12
|
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
12
|
-
let __emotion_css = require("@emotion/css");
|
|
13
|
-
__emotion_css = require_rolldown_runtime.__toESM(__emotion_css);
|
|
14
13
|
|
|
15
14
|
//#region src/components/primitives/AffixedField/AffixedField.tsx
|
|
16
15
|
/**
|
|
@@ -32,12 +31,12 @@ const AffixedField = ({ label, error, required, className, disabled, helperText,
|
|
|
32
31
|
const hasFixedPrefix = prefixList.length === 1;
|
|
33
32
|
const styles = require_AffixedField_styles.default(theme, colorScheme, disabled ?? false, hasError, hasPrefix);
|
|
34
33
|
const prefixDescriptionId = `${(0, react.useId)()}-prefix`;
|
|
35
|
-
const containerClassName =
|
|
36
|
-
const inputClassName =
|
|
34
|
+
const containerClassName = require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("affixed-field", "container")), styles["inputContainer"]);
|
|
35
|
+
const inputClassName = require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("affixed-field", "input")), styles["input"]);
|
|
37
36
|
const renderPrefix = () => {
|
|
38
37
|
if (prefixList.length === 0) return null;
|
|
39
38
|
if (prefixList.length === 1) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
40
|
-
className:
|
|
39
|
+
className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("affixed-field", "prefix-span")), styles["prefixSpan"]),
|
|
41
40
|
"aria-hidden": "true",
|
|
42
41
|
children: prefixList[0].label
|
|
43
42
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -47,7 +46,7 @@ const AffixedField = ({ label, error, required, className, disabled, helperText,
|
|
|
47
46
|
})] });
|
|
48
47
|
const selectedValue = prefixValue ?? prefixList[0].value;
|
|
49
48
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("select", {
|
|
50
|
-
className:
|
|
49
|
+
className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("affixed-field", "prefix-select")), styles["prefixSelect"]),
|
|
51
50
|
value: selectedValue,
|
|
52
51
|
disabled,
|
|
53
52
|
onChange: (e) => onPrefixChange?.(e.target.value),
|
|
@@ -61,7 +60,7 @@ const AffixedField = ({ label, error, required, className, disabled, helperText,
|
|
|
61
60
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_FormControl.default, {
|
|
62
61
|
error,
|
|
63
62
|
helperText,
|
|
64
|
-
className:
|
|
63
|
+
className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("affixed-field")), className),
|
|
65
64
|
style,
|
|
66
65
|
children: [label && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_InputLabel.default, {
|
|
67
66
|
required,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AffixedField.cjs","names":["AffixedField: FC<AffixedFieldProps>","useTheme","hasError: boolean","prefixList: PrefixOption[]","hasPrefix: boolean","hasFixedPrefix: boolean","styles: Record<string, string>","useStyles","prefixDescriptionId: string","containerClassName: string","inputClassName: string","selectedValue: string","FormControl","InputLabel"],"sources":["../../../../../src/components/primitives/AffixedField/AffixedField.tsx"],"sourcesContent":["// Copyright 2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {
|
|
1
|
+
{"version":3,"file":"AffixedField.cjs","names":["AffixedField: FC<AffixedFieldProps>","useTheme","hasError: boolean","prefixList: PrefixOption[]","hasPrefix: boolean","hasFixedPrefix: boolean","styles: Record<string, string>","useStyles","prefixDescriptionId: string","containerClassName: string","cx","inputClassName: string","selectedValue: string","FormControl","InputLabel"],"sources":["../../../../../src/components/primitives/AffixedField/AffixedField.tsx"],"sourcesContent":["// Copyright 2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {PrefixOption, bem, withVendorCSSClassPrefix} from '@thunderid/browser';\nimport {ChangeEvent, FC, InputHTMLAttributes, ReactElement, useId} from 'react';\nimport useStyles from './AffixedField.styles';\nimport useTheme from '../../../contexts/Theme/useTheme';\nimport {cx} from '../../../styles/emotion';\nimport FormControl from '../FormControl/FormControl';\nimport InputLabel from '../InputLabel/InputLabel';\n\nexport interface AffixedFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'prefix'> {\n /** Additional CSS class names applied to the outer form control. */\n className?: string;\n /** Whether the field is disabled. */\n disabled?: boolean;\n /** Error message to render below the field. */\n error?: string;\n /** Helper text to render below the field. */\n helperText?: string;\n /** Label rendered above the field. */\n label?: string;\n /**\n * Called when the user changes the selected prefix. Only fires when `prefixes` is an\n * array with two or more entries and the user picks a different one.\n */\n onPrefixChange?: (prefixValue: string) => void;\n /**\n * Currently selected prefix `value` (must match one of the resolved prefix entries'\n * `value`). Required when `prefixes` resolves to a non-empty list. Ignored otherwise.\n */\n prefixValue?: string;\n /**\n * Leading affix. `string` renders as a fixed span; `PrefixOption[]` renders as a fixed\n * span (single entry) or dropdown (multiple entries). Empty or undefined renders a\n * plain input with no leading element.\n */\n prefixes?: string | PrefixOption[];\n /** Whether the field is required. */\n required?: boolean;\n}\n\n/**\n * Converts the polymorphic `prefixes` prop into a uniform list. A string is treated\n * as a single fixed entry so the rest of the component can iterate a single shape.\n */\nconst normalizePrefixes = (prefixes: string | PrefixOption[] | undefined): PrefixOption[] => {\n if (typeof prefixes === 'string') {\n return prefixes.length > 0 ? [{label: prefixes, value: prefixes}] : [];\n }\n return prefixes ?? [];\n};\n\nconst AffixedField: FC<AffixedFieldProps> = ({\n label,\n error,\n required,\n className,\n disabled,\n helperText,\n prefixes,\n prefixValue,\n onPrefixChange,\n type = 'text',\n style = {},\n ...rest\n}: AffixedFieldProps) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const hasError: boolean = !!error;\n const prefixList: PrefixOption[] = normalizePrefixes(prefixes);\n const hasPrefix: boolean = prefixList.length > 0;\n const hasFixedPrefix: boolean = prefixList.length === 1;\n const styles: Record<string, string> = useStyles(theme, colorScheme, disabled ?? false, hasError, hasPrefix);\n // Stable id for the visually-hidden prefix announcement; only referenced when a\n // fixed prefix is present, but generated unconditionally so the hook order is stable.\n const prefixDescriptionId: string = `${useId()}-prefix`;\n\n const containerClassName: string = cx(\n withVendorCSSClassPrefix(bem('affixed-field', 'container')),\n styles['inputContainer'],\n );\n\n const inputClassName: string = cx(withVendorCSSClassPrefix(bem('affixed-field', 'input')), styles['input']);\n\n const renderPrefix = (): ReactElement | null => {\n if (prefixList.length === 0) return null;\n\n if (prefixList.length === 1) {\n return (\n <>\n <span\n className={cx(withVendorCSSClassPrefix(bem('affixed-field', 'prefix-span')), styles['prefixSpan'])}\n aria-hidden=\"true\"\n >\n {prefixList[0].label}\n </span>\n {/* Assistive-tech-only mirror of the fixed prefix; wired to the input via aria-describedby. */}\n <span id={prefixDescriptionId} className={styles['visuallyHidden']}>\n {prefixList[0].label}\n </span>\n </>\n );\n }\n\n const selectedValue: string = prefixValue ?? prefixList[0].value;\n return (\n <select\n className={cx(withVendorCSSClassPrefix(bem('affixed-field', 'prefix-select')), styles['prefixSelect'])}\n value={selectedValue}\n disabled={disabled}\n onChange={(e: ChangeEvent<HTMLSelectElement>): void => onPrefixChange?.(e.target.value)}\n aria-label=\"Prefix\"\n >\n {prefixList.map((p: PrefixOption) => (\n <option key={p.value} value={p.value}>\n {p.label}\n </option>\n ))}\n </select>\n );\n };\n\n return (\n <FormControl\n error={error}\n helperText={helperText}\n className={cx(withVendorCSSClassPrefix(bem('affixed-field')), className)}\n style={style}\n >\n {label && (\n <InputLabel required={required} error={hasError}>\n {label}\n </InputLabel>\n )}\n <div className={containerClassName}>\n {renderPrefix()}\n <input\n className={inputClassName}\n type={type}\n disabled={disabled}\n aria-invalid={hasError}\n aria-required={required}\n {...rest}\n aria-describedby={\n [rest['aria-describedby'], hasFixedPrefix ? prefixDescriptionId : undefined].filter(Boolean).join(' ') ||\n undefined\n }\n />\n </div>\n </FormControl>\n );\n};\n\nexport default AffixedField;\n"],"mappings":";;;;;;;;;;;;;;;;;;AA8CA,MAAM,qBAAqB,aAAkE;AAC3F,KAAI,OAAO,aAAa,SACtB,QAAO,SAAS,SAAS,IAAI,CAAC;EAAC,OAAO;EAAU,OAAO;EAAS,CAAC,GAAG,EAAE;AAExE,QAAO,YAAY,EAAE;;AAGvB,MAAMA,gBAAuC,EAC3C,OACA,OACA,UACA,WACA,UACA,YACA,UACA,aACA,gBACA,OAAO,QACP,QAAQ,EAAE,CACV,GAAG,WACoB;CACvB,MAAM,EAAC,OAAO,gBAA4CC,0BAAU;CACpE,MAAMC,WAAoB,CAAC,CAAC;CAC5B,MAAMC,aAA6B,kBAAkB,SAAS;CAC9D,MAAMC,YAAqB,WAAW,SAAS;CAC/C,MAAMC,iBAA0B,WAAW,WAAW;CACtD,MAAMC,SAAiCC,oCAAU,OAAO,aAAa,YAAY,OAAO,UAAU,UAAU;CAG5G,MAAMC,sBAA8B,qBAAU,CAAC;CAE/C,MAAMC,qBAA6BC,kGACJ,iBAAiB,YAAY,CAAC,EAC3D,OAAO,kBACR;CAED,MAAMC,iBAAyBD,kGAAgC,iBAAiB,QAAQ,CAAC,EAAE,OAAO,SAAS;CAE3G,MAAM,qBAA0C;AAC9C,MAAI,WAAW,WAAW,EAAG,QAAO;AAEpC,MAAI,WAAW,WAAW,EACxB,QACE,qFACE,2CAAC;GACC,WAAWA,kGAAgC,iBAAiB,cAAc,CAAC,EAAE,OAAO,cAAc;GAClG,eAAY;aAEX,WAAW,GAAG;IACV,EAEP,2CAAC;GAAK,IAAI;GAAqB,WAAW,OAAO;aAC9C,WAAW,GAAG;IACV,IACN;EAIP,MAAME,gBAAwB,eAAe,WAAW,GAAG;AAC3D,SACE,2CAAC;GACC,WAAWF,kGAAgC,iBAAiB,gBAAgB,CAAC,EAAE,OAAO,gBAAgB;GACtG,OAAO;GACG;GACV,WAAW,MAA4C,iBAAiB,EAAE,OAAO,MAAM;GACvF,cAAW;aAEV,WAAW,KAAK,MACf,2CAAC;IAAqB,OAAO,EAAE;cAC5B,EAAE;MADQ,EAAE,MAEN,CACT;IACK;;AAIb,QACE,4CAACG;EACQ;EACK;EACZ,WAAWH,kGAAgC,gBAAgB,CAAC,EAAE,UAAU;EACjE;aAEN,SACC,2CAACI;GAAqB;GAAU,OAAO;aACpC;IACU,EAEf,4CAAC;GAAI,WAAW;cACb,cAAc,EACf,2CAAC;IACC,WAAW;IACL;IACI;IACV,gBAAc;IACd,iBAAe;IACf,GAAI;IACJ,oBACE,CAAC,KAAK,qBAAqB,iBAAiB,sBAAsB,OAAU,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI,IACtG;KAEF;IACE;GACM;;AAIlB,2BAAe"}
|
|
@@ -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/AffixedField/AffixedField.styles.ts
|
|
8
7
|
/**
|
|
@@ -13,13 +12,13 @@ const useStyles = (theme, colorScheme, disabled, hasError, hasPrefix) => (0, rea
|
|
|
13
12
|
const borderColor = hasError ? theme.vars.colors.error.main : theme.vars.colors.border;
|
|
14
13
|
const focusColor = hasError ? theme.vars.colors.error.main : theme.vars.colors.primary.main;
|
|
15
14
|
const borderRadius = theme.vars.components?.Field?.root?.borderRadius ?? theme.vars.borderRadius.medium;
|
|
16
|
-
const inputContainer =
|
|
15
|
+
const inputContainer = require_emotion.css`
|
|
17
16
|
position: relative;
|
|
18
17
|
display: flex;
|
|
19
18
|
align-items: stretch;
|
|
20
19
|
width: 100%;
|
|
21
20
|
`;
|
|
22
|
-
const inputBase =
|
|
21
|
+
const inputBase = require_emotion.css`
|
|
23
22
|
flex: 1;
|
|
24
23
|
min-width: 0;
|
|
25
24
|
padding-block: ${theme.vars.spacing.unit};
|
|
@@ -53,18 +52,18 @@ const useStyles = (theme, colorScheme, disabled, hasError, hasPrefix) => (0, rea
|
|
|
53
52
|
border-color: ${focusColor};
|
|
54
53
|
}
|
|
55
54
|
`;
|
|
56
|
-
const input = hasPrefix ?
|
|
55
|
+
const input = hasPrefix ? require_emotion.css`
|
|
57
56
|
${inputBase};
|
|
58
57
|
border-start-start-radius: 0;
|
|
59
58
|
border-end-start-radius: 0;
|
|
60
59
|
border-start-end-radius: ${borderRadius};
|
|
61
60
|
border-end-end-radius: ${borderRadius};
|
|
62
61
|
border-inline-start: none;
|
|
63
|
-
` :
|
|
62
|
+
` : require_emotion.css`
|
|
64
63
|
${inputBase};
|
|
65
64
|
border-radius: ${borderRadius};
|
|
66
65
|
`;
|
|
67
|
-
const prefixBase =
|
|
66
|
+
const prefixBase = require_emotion.css`
|
|
68
67
|
display: flex;
|
|
69
68
|
align-items: center;
|
|
70
69
|
padding-inline: calc(${theme.vars.spacing.unit} * 1.5);
|
|
@@ -77,7 +76,7 @@ const useStyles = (theme, colorScheme, disabled, hasError, hasPrefix) => (0, rea
|
|
|
77
76
|
font-family: ${theme.vars.typography.fontFamily};
|
|
78
77
|
white-space: nowrap;
|
|
79
78
|
`;
|
|
80
|
-
const prefixSpan =
|
|
79
|
+
const prefixSpan = require_emotion.css`
|
|
81
80
|
${prefixBase};
|
|
82
81
|
user-select: none;
|
|
83
82
|
color: ${theme.vars.colors.text.secondary};
|
|
@@ -85,7 +84,7 @@ const useStyles = (theme, colorScheme, disabled, hasError, hasPrefix) => (0, rea
|
|
|
85
84
|
return {
|
|
86
85
|
input,
|
|
87
86
|
inputContainer,
|
|
88
|
-
prefixSelect:
|
|
87
|
+
prefixSelect: require_emotion.css`
|
|
89
88
|
${prefixBase};
|
|
90
89
|
cursor: pointer;
|
|
91
90
|
appearance: auto;
|
|
@@ -104,7 +103,7 @@ const useStyles = (theme, colorScheme, disabled, hasError, hasPrefix) => (0, rea
|
|
|
104
103
|
}
|
|
105
104
|
`,
|
|
106
105
|
prefixSpan,
|
|
107
|
-
visuallyHidden:
|
|
106
|
+
visuallyHidden: require_emotion.css`
|
|
108
107
|
position: absolute;
|
|
109
108
|
width: 1px;
|
|
110
109
|
height: 1px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AffixedField.styles.cjs","names":["borderColor: string","focusColor: string","borderRadius: string","inputContainer: string","inputBase: string","input: string","prefixBase: string","prefixSpan: string"],"sources":["../../../../../src/components/primitives/AffixedField/AffixedField.styles.ts"],"sourcesContent":["// Copyright 2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {
|
|
1
|
+
{"version":3,"file":"AffixedField.styles.cjs","names":["borderColor: string","focusColor: string","borderRadius: string","inputContainer: string","inputBase: string","input: string","prefixBase: string","prefixSpan: string"],"sources":["../../../../../src/components/primitives/AffixedField/AffixedField.styles.ts"],"sourcesContent":["// Copyright 2026 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\n/**\n * Creates styles for the AffixedField component. The container is a horizontal flex\n * row with a prefix element (span or select) joined to a shared-border input.\n */\nconst useStyles = (\n theme: Theme,\n colorScheme: string,\n disabled: boolean,\n hasError: boolean,\n hasPrefix: boolean,\n): Record<string, string> =>\n useMemo(() => {\n const borderColor: string = hasError ? theme.vars.colors.error.main : theme.vars.colors.border;\n const focusColor: string = hasError ? theme.vars.colors.error.main : theme.vars.colors.primary.main;\n const borderRadius: string = theme.vars.components?.Field?.root?.borderRadius ?? theme.vars.borderRadius.medium;\n\n const inputContainer: string = css`\n position: relative;\n display: flex;\n align-items: stretch;\n width: 100%;\n `;\n\n const inputBase: string = css`\n flex: 1;\n min-width: 0;\n padding-block: ${theme.vars.spacing.unit};\n padding-inline: calc(${theme.vars.spacing.unit} * 1.5);\n border: 1px solid ${borderColor};\n font-size: ${theme.vars.typography.fontSizes.md};\n font-family: ${theme.vars.typography.fontFamily};\n color: ${theme.vars.colors.text.primary};\n background-color: ${disabled ? theme.vars.colors.background.disabled : theme.vars.colors.background.surface};\n outline: none;\n transition:\n border-color 0.2s ease,\n box-shadow 0.2s ease;\n\n &::placeholder {\n color: ${theme.vars.colors.text.secondary};\n opacity: 0.7;\n }\n\n &:focus {\n border-color: ${focusColor};\n box-shadow: 0 0 0 2px ${focusColor}20;\n }\n\n &:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n\n &:hover:not(:disabled) {\n border-color: ${focusColor};\n }\n `;\n\n const input: string = hasPrefix\n ? css`\n ${inputBase};\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n border-start-end-radius: ${borderRadius};\n border-end-end-radius: ${borderRadius};\n border-inline-start: none;\n `\n : css`\n ${inputBase};\n border-radius: ${borderRadius};\n `;\n\n const prefixBase: string = css`\n display: flex;\n align-items: center;\n padding-inline: calc(${theme.vars.spacing.unit} * 1.5);\n border: 1px solid ${borderColor};\n border-start-start-radius: ${borderRadius};\n border-end-start-radius: ${borderRadius};\n background-color: ${theme.vars.colors.background.surface};\n color: ${theme.vars.colors.text.primary};\n font-size: ${theme.vars.typography.fontSizes.md};\n font-family: ${theme.vars.typography.fontFamily};\n white-space: nowrap;\n `;\n\n const prefixSpan: string = css`\n ${prefixBase};\n user-select: none;\n color: ${theme.vars.colors.text.secondary};\n `;\n\n const prefixSelect: string = css`\n ${prefixBase};\n cursor: pointer;\n appearance: auto;\n padding-inline-end: calc(${theme.vars.spacing.unit} * 1.5);\n\n &:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n\n &:focus {\n outline: none;\n border-color: ${focusColor};\n box-shadow: 0 0 0 2px ${focusColor}20;\n z-index: 1;\n }\n `;\n\n /**\n * Visually hides content while keeping it discoverable by assistive tech. Used\n * to expose the fixed prefix value to screen readers via `aria-describedby` while\n * the sighted-user span stays `aria-hidden` (decorative).\n */\n const visuallyHidden: string = css`\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n `;\n\n return {\n input,\n inputContainer,\n prefixSelect,\n prefixSpan,\n visuallyHidden,\n };\n }, [theme, colorScheme, disabled, hasError, hasPrefix]);\n\nexport default useStyles;\n"],"mappings":";;;;;;;;;;AAWA,MAAM,aACJ,OACA,aACA,UACA,UACA,uCAEc;CACZ,MAAMA,cAAsB,WAAW,MAAM,KAAK,OAAO,MAAM,OAAO,MAAM,KAAK,OAAO;CACxF,MAAMC,aAAqB,WAAW,MAAM,KAAK,OAAO,MAAM,OAAO,MAAM,KAAK,OAAO,QAAQ;CAC/F,MAAMC,eAAuB,MAAM,KAAK,YAAY,OAAO,MAAM,gBAAgB,MAAM,KAAK,aAAa;CAEzG,MAAMC,iBAAyB,mBAAG;;;;;;CAOlC,MAAMC,YAAoB,mBAAG;;;uBAGV,MAAM,KAAK,QAAQ,KAAK;6BAClB,MAAM,KAAK,QAAQ,KAAK;0BAC3B,YAAY;mBACnB,MAAM,KAAK,WAAW,UAAU,GAAG;qBACjC,MAAM,KAAK,WAAW,WAAW;eACvC,MAAM,KAAK,OAAO,KAAK,QAAQ;0BACpB,WAAW,MAAM,KAAK,OAAO,WAAW,WAAW,MAAM,KAAK,OAAO,WAAW,QAAQ;;;;;;;iBAOjG,MAAM,KAAK,OAAO,KAAK,UAAU;;;;;wBAK1B,WAAW;gCACH,WAAW;;;;;;;;;wBASnB,WAAW;;;CAI/B,MAAMC,QAAgB,YAClB,mBAAG;YACC,UAAU;;;qCAGe,aAAa;mCACf,aAAa;;YAGxC,mBAAG;YACC,UAAU;2BACK,aAAa;;CAGpC,MAAMC,aAAqB,mBAAG;;;6BAGL,MAAM,KAAK,QAAQ,KAAK;0BAC3B,YAAY;mCACH,aAAa;iCACf,aAAa;0BACpB,MAAM,KAAK,OAAO,WAAW,QAAQ;eAChD,MAAM,KAAK,OAAO,KAAK,QAAQ;mBAC3B,MAAM,KAAK,WAAW,UAAU,GAAG;qBACjC,MAAM,KAAK,WAAW,WAAW;;;CAIlD,MAAMC,aAAqB,mBAAG;QAC1B,WAAW;;eAEJ,MAAM,KAAK,OAAO,KAAK,UAAU;;AAuC5C,QAAO;EACL;EACA;EACA,cAvC2B,mBAAG;QAC5B,WAAW;;;iCAGc,MAAM,KAAK,QAAQ,KAAK;;;;;;;;;wBASjC,WAAW;gCACH,WAAW;;;;EA0BrC;EACA,gBAjB6B,mBAAG;;;;;;;;;;;EAkBjC;GACA;CAAC;CAAO;CAAa;CAAU;CAAU;CAAU,CAAC;AAEzD,kCAAe"}
|
|
@@ -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_Alert_styles = require('./Alert.styles.cjs');
|
|
4
5
|
const require_CircleAlert = require('../Icons/CircleAlert.cjs');
|
|
@@ -12,8 +13,6 @@ let react = require("react");
|
|
|
12
13
|
react = require_rolldown_runtime.__toESM(react);
|
|
13
14
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
14
15
|
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
15
|
-
let __emotion_css = require("@emotion/css");
|
|
16
|
-
__emotion_css = require_rolldown_runtime.__toESM(__emotion_css);
|
|
17
16
|
|
|
18
17
|
//#region src/components/primitives/Alert/Alert.tsx
|
|
19
18
|
const getDefaultIcon = (variant) => {
|
|
@@ -50,13 +49,13 @@ const Alert = (0, react.forwardRef)(({ variant = "info", showIcon = true, childr
|
|
|
50
49
|
ref,
|
|
51
50
|
role: "alert",
|
|
52
51
|
style,
|
|
53
|
-
className:
|
|
52
|
+
className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("alert")), styles["alert"], styles["variant"], (0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("alert", null, variant)), className),
|
|
54
53
|
...rest,
|
|
55
54
|
children: [showIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
56
|
-
className:
|
|
55
|
+
className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("alert", "icon")), styles["icon"]),
|
|
57
56
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconComponent, {})
|
|
58
57
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
59
|
-
className:
|
|
58
|
+
className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("alert", "content")), styles["content"]),
|
|
60
59
|
children
|
|
61
60
|
})]
|
|
62
61
|
})
|
|
@@ -74,7 +73,7 @@ const AlertTitle = ({ children, className, style,...rest }) => {
|
|
|
74
73
|
variant: "h6",
|
|
75
74
|
fontWeight: 600,
|
|
76
75
|
style,
|
|
77
|
-
className:
|
|
76
|
+
className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("alert", "title")), styles["title"], className),
|
|
78
77
|
...filteredRest,
|
|
79
78
|
children
|
|
80
79
|
});
|
|
@@ -90,7 +89,7 @@ const AlertDescription = ({ children, className, style,...rest }) => {
|
|
|
90
89
|
component: "p",
|
|
91
90
|
variant: "body2",
|
|
92
91
|
style,
|
|
93
|
-
className:
|
|
92
|
+
className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("alert", "description")), styles["description"], className),
|
|
94
93
|
...filteredRest,
|
|
95
94
|
children
|
|
96
95
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.cjs","names":["CircleCheck","CircleAlert","TriangleAlert","Info","AlertVariantContext: Context<AlertVariant>","Alert: ForwardRefExoticComponent<AlertProps & RefAttributes<HTMLDivElement>>","useTheme","styles: ReturnType<typeof useStyles>","useStyles","IconComponent: FC<SVGProps<SVGSVGElement>>","AlertTitle: FC<AlertTitleProps>","Typography","AlertDescription: FC<AlertDescriptionProps>"],"sources":["../../../../../src/components/primitives/Alert/Alert.tsx"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {
|
|
1
|
+
{"version":3,"file":"Alert.cjs","names":["CircleCheck","CircleAlert","TriangleAlert","Info","AlertVariantContext: Context<AlertVariant>","Alert: ForwardRefExoticComponent<AlertProps & RefAttributes<HTMLDivElement>>","useTheme","styles: ReturnType<typeof useStyles>","useStyles","IconComponent: FC<SVGProps<SVGSVGElement>>","cx","AlertTitle: FC<AlertTitleProps>","Typography","AlertDescription: FC<AlertDescriptionProps>"],"sources":["../../../../../src/components/primitives/Alert/Alert.tsx"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {withVendorCSSClassPrefix, bem} from '@thunderid/browser';\nimport {\n Context,\n forwardRef,\n HTMLAttributes,\n ReactNode,\n Ref,\n RefAttributes,\n ForwardRefExoticComponent,\n createContext,\n useContext,\n FC,\n SVGProps,\n} from 'react';\nimport useStyles from './Alert.styles';\nimport useTheme from '../../../contexts/Theme/useTheme';\nimport {cx} from '../../../styles/emotion';\nimport CircleAlert from '../Icons/CircleAlert';\nimport CircleCheck from '../Icons/CircleCheck';\nimport Info from '../Icons/Info';\nimport TriangleAlert from '../Icons/TriangleAlert';\nimport Typography from '../Typography/Typography';\n\nexport type AlertVariant = 'success' | 'error' | 'warning' | 'info';\n\nexport interface AlertProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Alert content\n */\n children?: ReactNode;\n /**\n * Whether to show the default icon for the variant\n */\n showIcon?: boolean;\n /**\n * The visual variant of the alert that determines color scheme and icon\n */\n variant?: AlertVariant;\n}\n\nexport interface AlertTitleProps extends HTMLAttributes<HTMLHeadingElement> {\n /**\n * Title content\n */\n children?: ReactNode;\n}\n\nexport interface AlertDescriptionProps extends HTMLAttributes<HTMLParagraphElement> {\n /**\n * Description content\n */\n children?: ReactNode;\n}\n\nconst getDefaultIcon = (variant: AlertVariant): FC<SVGProps<SVGSVGElement>> => {\n switch (variant) {\n case 'success':\n return CircleCheck;\n case 'error':\n return CircleAlert;\n case 'warning':\n return TriangleAlert;\n case 'info':\n return Info;\n default:\n return Info;\n }\n};\n\nconst AlertVariantContext: Context<AlertVariant> = createContext<AlertVariant>('info');\n\nexport const useAlertVariant = (): AlertVariant => useContext(AlertVariantContext);\n\n/**\n * Alert component that displays important information with different severity levels.\n *\n * @example\n * ```tsx\n * <Alert variant=\"success\" showIcon>\n * <Alert.Title>Success! Your changes have been saved</Alert.Title>\n * <Alert.Description>\n * This is an alert with icon, title and description.\n * </Alert.Description>\n * </Alert>\n * ```\n */\nconst Alert: ForwardRefExoticComponent<AlertProps & RefAttributes<HTMLDivElement>> = forwardRef<\n HTMLDivElement,\n AlertProps\n>(({variant = 'info', showIcon = true, children, className, style, ...rest}: AlertProps, ref: Ref<HTMLDivElement>) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const styles: ReturnType<typeof useStyles> = useStyles(theme, colorScheme, variant);\n const IconComponent: FC<SVGProps<SVGSVGElement>> = getDefaultIcon(variant);\n\n return (\n <AlertVariantContext.Provider value={variant}>\n <div\n ref={ref}\n role=\"alert\"\n style={style}\n className={cx(\n withVendorCSSClassPrefix(bem('alert')),\n styles['alert'],\n styles['variant'],\n withVendorCSSClassPrefix(bem('alert', null, variant)),\n className,\n )}\n {...rest}\n >\n {showIcon && (\n <div className={cx(withVendorCSSClassPrefix(bem('alert', 'icon')), styles['icon'])}>\n <IconComponent />\n </div>\n )}\n <div className={cx(withVendorCSSClassPrefix(bem('alert', 'content')), styles['content'])}>{children}</div>\n </div>\n </AlertVariantContext.Provider>\n );\n});\n\n/**\n * Alert title component.\n */\nconst AlertTitle: FC<AlertTitleProps> = ({children, className, style, ...rest}: AlertTitleProps) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const variant: AlertVariant = useAlertVariant();\n const styles: ReturnType<typeof useStyles> = useStyles(theme, colorScheme, variant);\n\n const {color, ...filteredRest} = rest;\n\n return (\n <Typography\n component=\"h3\"\n variant=\"h6\"\n fontWeight={600}\n style={style}\n className={cx(withVendorCSSClassPrefix(bem('alert', 'title')), styles['title'], className)}\n {...filteredRest}\n >\n {children}\n </Typography>\n );\n};\n\n/**\n * Alert description component.\n */\nconst AlertDescription: FC<AlertDescriptionProps> = ({children, className, style, ...rest}: AlertDescriptionProps) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const variant: AlertVariant = useAlertVariant();\n const styles: ReturnType<typeof useStyles> = useStyles(theme, colorScheme, variant);\n\n const {color, ...filteredRest} = rest;\n\n return (\n <Typography\n component=\"p\"\n variant=\"body2\"\n style={style}\n className={cx(withVendorCSSClassPrefix(bem('alert', 'description')), styles['description'], className)}\n {...filteredRest}\n >\n {children}\n </Typography>\n );\n};\n\nAlert.displayName = 'Alert';\nAlertTitle.displayName = 'Alert.Title';\nAlertDescription.displayName = 'Alert.Description';\n\n(Alert as any).Title = AlertTitle;\n(Alert as any).Description = AlertDescription;\n\nexport interface AlertComponent extends ForwardRefExoticComponent<AlertProps & RefAttributes<HTMLDivElement>> {\n Description: typeof AlertDescription;\n Title: typeof AlertTitle;\n}\n\nexport default Alert as AlertComponent;\nexport {Alert, AlertTitle, AlertDescription};\n"],"mappings":";;;;;;;;;;;;;;;;;AAyDA,MAAM,kBAAkB,YAAuD;AAC7E,SAAQ,SAAR;EACE,KAAK,UACH,QAAOA;EACT,KAAK,QACH,QAAOC;EACT,KAAK,UACH,QAAOC;EACT,KAAK,OACH,QAAOC;EACT,QACE,QAAOA;;;AAIb,MAAMC,+CAAyE,OAAO;AAEtF,MAAa,8CAAiD,oBAAoB;;;;;;;;;;;;;;AAelF,MAAMC,+BAGH,EAAC,UAAU,QAAQ,WAAW,MAAM,UAAU,WAAW,MAAO,GAAG,QAAmB,QAA6B;CACpH,MAAM,EAAC,OAAO,gBAA4CC,0BAAU;CACpE,MAAMC,SAAuCC,6BAAU,OAAO,aAAa,QAAQ;CACnF,MAAMC,gBAA6C,eAAe,QAAQ;AAE1E,QACE,2CAAC,oBAAoB;EAAS,OAAO;YACnC,4CAAC;GACM;GACL,MAAK;GACE;GACP,WAAWC,kGACoB,QAAQ,CAAC,EACtC,OAAO,UACP,OAAO,2FACsB,SAAS,MAAM,QAAQ,CAAC,EACrD,UACD;GACD,GAAI;cAEH,YACC,2CAAC;IAAI,WAAWA,kGAAgC,SAAS,OAAO,CAAC,EAAE,OAAO,QAAQ;cAChF,2CAAC,kBAAgB;KACb,EAER,2CAAC;IAAI,WAAWA,kGAAgC,SAAS,UAAU,CAAC,EAAE,OAAO,WAAW;IAAG;KAAe;IACtG;GACuB;EAEjC;;;;AAKF,MAAMC,cAAmC,EAAC,UAAU,WAAW,MAAO,GAAG,WAA2B;CAClG,MAAM,EAAC,OAAO,gBAA4CL,0BAAU;CAEpE,MAAMC,SAAuCC,6BAAU,OAAO,aADhC,iBAAiB,CACoC;CAEnF,MAAM,EAAC,MAAO,GAAG,iBAAgB;AAEjC,QACE,2CAACI;EACC,WAAU;EACV,SAAQ;EACR,YAAY;EACL;EACP,WAAWF,kGAAgC,SAAS,QAAQ,CAAC,EAAE,OAAO,UAAU,UAAU;EAC1F,GAAI;EAEH;GACU;;;;;AAOjB,MAAMG,oBAA+C,EAAC,UAAU,WAAW,MAAO,GAAG,WAAiC;CACpH,MAAM,EAAC,OAAO,gBAA4CP,0BAAU;CAEpE,MAAMC,SAAuCC,6BAAU,OAAO,aADhC,iBAAiB,CACoC;CAEnF,MAAM,EAAC,MAAO,GAAG,iBAAgB;AAEjC,QACE,2CAACI;EACC,WAAU;EACV,SAAQ;EACD;EACP,WAAWF,kGAAgC,SAAS,cAAc,CAAC,EAAE,OAAO,gBAAgB,UAAU;EACtG,GAAI;EAEH;GACU;;AAIjB,MAAM,cAAc;AACpB,WAAW,cAAc;AACzB,iBAAiB,cAAc;AAE/B,AAAC,MAAc,QAAQ;AACvB,AAAC,MAAc,cAAc;AAO7B,oBAAe"}
|
|
@@ -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/Alert/Alert.styles.ts
|
|
8
7
|
/**
|
|
@@ -13,7 +12,7 @@ __emotion_css = require_rolldown_runtime.__toESM(__emotion_css);
|
|
|
13
12
|
* @returns Object containing CSS class names for component styling
|
|
14
13
|
*/
|
|
15
14
|
const useStyles = (theme, colorScheme, variant) => (0, react.useMemo)(() => {
|
|
16
|
-
const baseAlert =
|
|
15
|
+
const baseAlert = require_emotion.css`
|
|
17
16
|
padding: calc(${theme.vars.spacing.unit} * 2);
|
|
18
17
|
border-radius: ${theme.vars.borderRadius.medium};
|
|
19
18
|
border: 1px solid;
|
|
@@ -23,41 +22,41 @@ const useStyles = (theme, colorScheme, variant) => (0, react.useMemo)(() => {
|
|
|
23
22
|
align-items: flex-start;
|
|
24
23
|
`;
|
|
25
24
|
const variantStyles = {
|
|
26
|
-
error:
|
|
25
|
+
error: require_emotion.css`
|
|
27
26
|
background-color: color-mix(in srgb, ${theme.vars.colors.error.main} 20%, white);
|
|
28
27
|
border-color: ${theme.vars.colors.error.main};
|
|
29
28
|
color: ${theme.vars.colors.error.main};
|
|
30
29
|
`,
|
|
31
|
-
info:
|
|
30
|
+
info: require_emotion.css`
|
|
32
31
|
background-color: color-mix(in srgb, ${theme.vars.colors.info.main} 20%, white);
|
|
33
32
|
border-color: ${theme.vars.colors.info.main};
|
|
34
33
|
color: ${theme.vars.colors.info.main};
|
|
35
34
|
`,
|
|
36
|
-
success:
|
|
35
|
+
success: require_emotion.css`
|
|
37
36
|
background-color: color-mix(in srgb, ${theme.vars.colors.success.main} 20%, white);
|
|
38
37
|
border-color: ${theme.vars.colors.success.main};
|
|
39
38
|
color: ${theme.vars.colors.success.main};
|
|
40
39
|
`,
|
|
41
|
-
warning:
|
|
40
|
+
warning: require_emotion.css`
|
|
42
41
|
background-color: color-mix(in srgb, ${theme.vars.colors.warning.main} 20%, white);
|
|
43
42
|
border-color: ${theme.vars.colors.warning.main};
|
|
44
43
|
color: ${theme.vars.colors.warning.main};
|
|
45
44
|
`
|
|
46
45
|
};
|
|
47
|
-
const iconStyles =
|
|
46
|
+
const iconStyles = require_emotion.css`
|
|
48
47
|
flex-shrink: 0;
|
|
49
48
|
margin-top: calc(${theme.vars.spacing.unit} * 0.25);
|
|
50
49
|
width: calc(${theme.vars.spacing.unit} * 2.5);
|
|
51
50
|
height: calc(${theme.vars.spacing.unit} * 2.5);
|
|
52
51
|
color: ${theme.vars.colors[variant]?.contrastText};
|
|
53
52
|
`;
|
|
54
|
-
const contentStyles =
|
|
53
|
+
const contentStyles = require_emotion.css`
|
|
55
54
|
flex: 1;
|
|
56
55
|
display: flex;
|
|
57
56
|
flex-direction: column;
|
|
58
57
|
gap: ${theme.vars.spacing.unit};
|
|
59
58
|
`;
|
|
60
|
-
const titleStyles =
|
|
59
|
+
const titleStyles = require_emotion.css`
|
|
61
60
|
margin: 0;
|
|
62
61
|
font-size: ${theme.vars.typography.fontSizes.sm};
|
|
63
62
|
font-weight: 600;
|
|
@@ -67,7 +66,7 @@ const useStyles = (theme, colorScheme, variant) => (0, react.useMemo)(() => {
|
|
|
67
66
|
return {
|
|
68
67
|
alert: baseAlert,
|
|
69
68
|
content: contentStyles,
|
|
70
|
-
description:
|
|
69
|
+
description: require_emotion.css`
|
|
71
70
|
margin: 0;
|
|
72
71
|
font-size: ${theme.vars.typography.fontSizes.sm};
|
|
73
72
|
line-height: 1.4;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.styles.cjs","names":["baseAlert: string","variantStyles: Record<string, string>","iconStyles: string","contentStyles: string","titleStyles: string"],"sources":["../../../../../src/components/primitives/Alert/Alert.styles.ts"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {
|
|
1
|
+
{"version":3,"file":"Alert.styles.cjs","names":["baseAlert: string","variantStyles: Record<string, string>","iconStyles: string","contentStyles: string","titleStyles: string"],"sources":["../../../../../src/components/primitives/Alert/Alert.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 AlertVariant = 'success' | 'error' | 'warning' | 'info';\n\n/**\n * Creates styles for the Alert 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 alert variant\n * @returns Object containing CSS class names for component styling\n */\nconst useStyles = (theme: Theme, colorScheme: string, variant: AlertVariant): Record<string, string> =>\n useMemo(() => {\n const baseAlert: string = css`\n padding: calc(${theme.vars.spacing.unit} * 2);\n border-radius: ${theme.vars.borderRadius.medium};\n border: 1px solid;\n font-family: ${theme.vars.typography.fontFamily};\n display: flex;\n gap: calc(${theme.vars.spacing.unit} * 1.5);\n align-items: flex-start;\n `;\n\n const variantStyles: Record<string, string> = {\n error: css`\n background-color: color-mix(in srgb, ${theme.vars.colors.error.main} 20%, white);\n border-color: ${theme.vars.colors.error.main};\n color: ${theme.vars.colors.error.main};\n `,\n info: css`\n background-color: color-mix(in srgb, ${theme.vars.colors.info.main} 20%, white);\n border-color: ${theme.vars.colors.info.main};\n color: ${theme.vars.colors.info.main};\n `,\n success: css`\n background-color: color-mix(in srgb, ${theme.vars.colors.success.main} 20%, white);\n border-color: ${theme.vars.colors.success.main};\n color: ${theme.vars.colors.success.main};\n `,\n warning: css`\n background-color: color-mix(in srgb, ${theme.vars.colors.warning.main} 20%, white);\n border-color: ${theme.vars.colors.warning.main};\n color: ${theme.vars.colors.warning.main};\n `,\n };\n\n const iconStyles: string = css`\n flex-shrink: 0;\n margin-top: calc(${theme.vars.spacing.unit} * 0.25);\n width: calc(${theme.vars.spacing.unit} * 2.5);\n height: calc(${theme.vars.spacing.unit} * 2.5);\n color: ${theme.vars.colors[variant]?.contrastText};\n `;\n\n const contentStyles: string = css`\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: ${theme.vars.spacing.unit};\n `;\n\n const titleStyles: string = css`\n margin: 0;\n font-size: ${theme.vars.typography.fontSizes.sm};\n font-weight: 600;\n line-height: 1.4;\n color: ${theme.vars.colors[variant]?.contrastText};\n `;\n\n const descriptionStyles: string = css`\n margin: 0;\n font-size: ${theme.vars.typography.fontSizes.sm};\n line-height: 1.4;\n color: ${theme.vars.colors.text.secondary};\n `;\n\n return {\n alert: baseAlert,\n content: contentStyles,\n description: descriptionStyles,\n icon: iconStyles,\n title: titleStyles,\n variant: variantStyles[variant],\n };\n }, [theme, colorScheme, variant]);\n\nexport default useStyles;\n"],"mappings":";;;;;;;;;;;;;AAgBA,MAAM,aAAa,OAAc,aAAqB,qCACtC;CACZ,MAAMA,YAAoB,mBAAG;sBACX,MAAM,KAAK,QAAQ,KAAK;uBACvB,MAAM,KAAK,aAAa,OAAO;;qBAEjC,MAAM,KAAK,WAAW,WAAW;;kBAEpC,MAAM,KAAK,QAAQ,KAAK;;;CAItC,MAAMC,gBAAwC;EAC5C,OAAO,mBAAG;+CAC+B,MAAM,KAAK,OAAO,MAAM,KAAK;wBACpD,MAAM,KAAK,OAAO,MAAM,KAAK;iBACpC,MAAM,KAAK,OAAO,MAAM,KAAK;;EAExC,MAAM,mBAAG;+CACgC,MAAM,KAAK,OAAO,KAAK,KAAK;wBACnD,MAAM,KAAK,OAAO,KAAK,KAAK;iBACnC,MAAM,KAAK,OAAO,KAAK,KAAK;;EAEvC,SAAS,mBAAG;+CAC6B,MAAM,KAAK,OAAO,QAAQ,KAAK;wBACtD,MAAM,KAAK,OAAO,QAAQ,KAAK;iBACtC,MAAM,KAAK,OAAO,QAAQ,KAAK;;EAE1C,SAAS,mBAAG;+CAC6B,MAAM,KAAK,OAAO,QAAQ,KAAK;wBACtD,MAAM,KAAK,OAAO,QAAQ,KAAK;iBACtC,MAAM,KAAK,OAAO,QAAQ,KAAK;;EAE3C;CAED,MAAMC,aAAqB,mBAAG;;yBAET,MAAM,KAAK,QAAQ,KAAK;oBAC7B,MAAM,KAAK,QAAQ,KAAK;qBACvB,MAAM,KAAK,QAAQ,KAAK;eAC9B,MAAM,KAAK,OAAO,UAAU,aAAa;;CAGpD,MAAMC,gBAAwB,mBAAG;;;;aAIxB,MAAM,KAAK,QAAQ,KAAK;;CAGjC,MAAMC,cAAsB,mBAAG;;mBAEhB,MAAM,KAAK,WAAW,UAAU,GAAG;;;eAGvC,MAAM,KAAK,OAAO,UAAU,aAAa;;AAUpD,QAAO;EACL,OAAO;EACP,SAAS;EACT,aAVgC,mBAAG;;mBAEtB,MAAM,KAAK,WAAW,UAAU,GAAG;;eAEvC,MAAM,KAAK,OAAO,KAAK,UAAU;;EAO1C,MAAM;EACN,OAAO;EACP,SAAS,cAAc;EACxB;GACA;CAAC;CAAO;CAAa;CAAQ,CAAC;AAEnC,2BAAe"}
|
|
@@ -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_Avatar_styles = require('./Avatar.styles.cjs');
|
|
4
5
|
let __thunderid_browser = require("@thunderid/browser");
|
|
@@ -7,8 +8,6 @@ let react = require("react");
|
|
|
7
8
|
react = require_rolldown_runtime.__toESM(react);
|
|
8
9
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
10
|
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
10
|
-
let __emotion_css = require("@emotion/css");
|
|
11
|
-
__emotion_css = require_rolldown_runtime.__toESM(__emotion_css);
|
|
12
11
|
|
|
13
12
|
//#region src/components/primitives/Avatar/Avatar.tsx
|
|
14
13
|
const Avatar = ({ alt = "User avatar", background = "random", className = "", imageUrl, name, size = 64, variant = "circular", isLoading = false }) => {
|
|
@@ -54,19 +53,19 @@ const Avatar = ({ alt = "User avatar", background = "random", className = "", im
|
|
|
54
53
|
if (hasImage) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
|
|
55
54
|
src: resolvedIcon?.imgSrc,
|
|
56
55
|
alt,
|
|
57
|
-
className:
|
|
56
|
+
className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("avatar", "image")), styles["image"])
|
|
58
57
|
});
|
|
59
58
|
if (name) return getInitials(name);
|
|
60
|
-
if (isLoading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className:
|
|
59
|
+
if (isLoading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("avatar", "skeleton")), styles["skeleton"]) });
|
|
61
60
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
62
61
|
xmlns: "http://www.w3.org/2000/svg",
|
|
63
62
|
viewBox: "0 0 640 640",
|
|
64
|
-
className:
|
|
63
|
+
className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("avatar", "icon")), styles["icon"]),
|
|
65
64
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M240 192C240 147.8 275.8 112 320 112C364.2 112 400 147.8 400 192C400 236.2 364.2 272 320 272C275.8 272 240 236.2 240 192zM448 192C448 121.3 390.7 64 320 64C249.3 64 192 121.3 192 192C192 262.7 249.3 320 320 320C390.7 320 448 262.7 448 192zM144 544C144 473.3 201.3 416 272 416L368 416C438.7 416 496 473.3 496 544L496 552C496 565.3 506.7 576 520 576C533.3 576 544 565.3 544 552L544 544C544 446.8 465.2 368 368 368L272 368C174.8 368 96 446.8 96 544L96 552C96 565.3 106.7 576 120 576C133.3 576 144 565.3 144 552L144 544z" })
|
|
66
65
|
});
|
|
67
66
|
};
|
|
68
67
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
69
|
-
className:
|
|
68
|
+
className: require_emotion.cx((0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("avatar")), styles["avatar"], styles["variant"], (0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("avatar", null, variant)), isDefaultState && (0, __thunderid_browser.withVendorCSSClassPrefix)((0, __thunderid_browser.bem)("avatar", "default")), className),
|
|
70
69
|
children: renderContent()
|
|
71
70
|
});
|
|
72
71
|
};
|