@revikornmann/muka-ui 0.22.0 → 0.23.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/Icon/iconRegistry.js +2 -2
- package/dist/cjs/components/Icon/iconRegistry.js.map +1 -1
- package/dist/cjs/components/Input/Input.css +11 -4
- package/dist/cjs/components/Input/Input.js +13 -5
- package/dist/cjs/components/Input/Input.js.map +1 -1
- package/dist/cjs/components/SocialSignInButton/SocialSignInButton.css +147 -0
- package/dist/cjs/components/SocialSignInButton/SocialSignInButton.js +43 -0
- package/dist/cjs/components/SocialSignInButton/SocialSignInButton.js.map +1 -0
- package/dist/cjs/components/SocialSignInButton/icons/AppleLogo.js +11 -0
- package/dist/cjs/components/SocialSignInButton/icons/AppleLogo.js.map +1 -0
- package/dist/cjs/components/SocialSignInButton/icons/GoogleLogo.js +12 -0
- package/dist/cjs/components/SocialSignInButton/icons/GoogleLogo.js.map +1 -0
- package/dist/cjs/components/SocialSignInButton/index.js +11 -0
- package/dist/cjs/components/SocialSignInButton/index.js.map +1 -0
- package/dist/cjs/components/index.js +3 -1
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/esm/components/Icon/iconRegistry.js +2 -2
- package/dist/esm/components/Icon/iconRegistry.js.map +1 -1
- package/dist/esm/components/Input/Input.css +11 -4
- package/dist/esm/components/Input/Input.js +13 -5
- package/dist/esm/components/Input/Input.js.map +1 -1
- package/dist/esm/components/SocialSignInButton/SocialSignInButton.css +147 -0
- package/dist/esm/components/SocialSignInButton/SocialSignInButton.js +40 -0
- package/dist/esm/components/SocialSignInButton/SocialSignInButton.js.map +1 -0
- package/dist/esm/components/SocialSignInButton/icons/AppleLogo.js +7 -0
- package/dist/esm/components/SocialSignInButton/icons/AppleLogo.js.map +1 -0
- package/dist/esm/components/SocialSignInButton/icons/GoogleLogo.js +8 -0
- package/dist/esm/components/SocialSignInButton/icons/GoogleLogo.js.map +1 -0
- package/dist/esm/components/SocialSignInButton/index.js +3 -0
- package/dist/esm/components/SocialSignInButton/index.js.map +1 -0
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/styles/components/Input.css +11 -4
- package/dist/styles/components/SocialSignInButton.css +147 -0
- package/dist/styles/index.css +949 -792
- package/dist/styles/muka-dark.css +949 -792
- package/dist/styles/muka-light.css +949 -792
- package/dist/styles/wireframe-dark.css +949 -792
- package/dist/styles/wireframe-light.css +949 -792
- package/dist/types/components/Icon/iconRegistry.d.ts +2 -2
- package/dist/types/components/Input/Input.d.ts +5 -0
- package/dist/types/components/Input/Input.d.ts.map +1 -1
- package/dist/types/components/SocialSignInButton/SocialSignInButton.d.ts +41 -0
- package/dist/types/components/SocialSignInButton/SocialSignInButton.d.ts.map +1 -0
- package/dist/types/components/SocialSignInButton/icons/AppleLogo.d.ts +9 -0
- package/dist/types/components/SocialSignInButton/icons/AppleLogo.d.ts.map +1 -0
- package/dist/types/components/SocialSignInButton/icons/GoogleLogo.d.ts +10 -0
- package/dist/types/components/SocialSignInButton/icons/GoogleLogo.d.ts.map +1 -0
- package/dist/types/components/SocialSignInButton/index.d.ts +3 -0
- package/dist/types/components/SocialSignInButton/index.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -22,17 +22,22 @@ import './Input.css';
|
|
|
22
22
|
* - text.input.{size}
|
|
23
23
|
* - text.label.{size}.semibold
|
|
24
24
|
*/
|
|
25
|
-
export const Input = React.forwardRef(function Input({ value, onChange, placeholder, label, helperText, error = false, errorMessage, disabled = false, size = 'md', type = 'text', iconLeft, iconRight, clearable = false, fullWidth = false, className = '', name, required = false, readOnly = false, onBlur, onFocus, id, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, onKeyDownCapture, ...rest }, forwardedRef) {
|
|
25
|
+
export const Input = React.forwardRef(function Input({ value, onChange, placeholder, label, helperText, error = false, errorMessage, disabled = false, size = 'md', type = 'text', iconLeft, iconRight, clearable = false, revealable, fullWidth = false, className = '', name, required = false, readOnly = false, onBlur, onFocus, id, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, onKeyDownCapture, ...rest }, forwardedRef) {
|
|
26
26
|
const [isFocused, setIsFocused] = useState(false);
|
|
27
|
+
const [passwordRevealed, setPasswordRevealed] = useState(false);
|
|
27
28
|
const inputRef = useRef(null);
|
|
28
29
|
const generatedId = useId();
|
|
29
30
|
const inputId = id || name || generatedId;
|
|
30
31
|
const helperTextId = `${inputId}-helper`;
|
|
31
32
|
const errorMessageId = `${inputId}-error`;
|
|
33
|
+
const isPassword = type === 'password';
|
|
34
|
+
const showReveal = (revealable ?? isPassword) && isPassword && !disabled;
|
|
35
|
+
const effectiveType = isPassword && passwordRevealed ? 'text' : type;
|
|
36
|
+
const iconSize = size === 'sm' ? 'xs' : size === 'lg' ? 'md' : 'sm';
|
|
32
37
|
const hasLeftIcon = Boolean(iconLeft);
|
|
33
38
|
const textValue = value != null ? String(value) : '';
|
|
34
39
|
const showClear = clearable && !disabled && !readOnly && textValue.length > 0;
|
|
35
|
-
const hasRightIcon = Boolean(iconRight) || showClear;
|
|
40
|
+
const hasRightIcon = Boolean(iconRight) || showClear || showReveal;
|
|
36
41
|
const showError = error && errorMessage;
|
|
37
42
|
const describedBy = mergeIds(ariaDescribedBy, showError ? errorMessageId : helperText ? helperTextId : undefined);
|
|
38
43
|
const wrapperClasses = [
|
|
@@ -52,7 +57,7 @@ export const Input = React.forwardRef(function Input({ value, onChange, placehol
|
|
|
52
57
|
return (_jsxs("div", { className: wrapperClasses, children: [label && (_jsxs("label", { className: `muka-input__label muka-input__label--${size}`, htmlFor: inputId, children: [label, required && _jsx("span", { className: "muka-input__required", "aria-hidden": "true", children: " *" })] })), _jsxs("div", { className: fieldClasses, onMouseDown: (e) => {
|
|
53
58
|
if (disabled)
|
|
54
59
|
return;
|
|
55
|
-
if (e.target.closest('.muka-input__clear'))
|
|
60
|
+
if (e.target.closest('.muka-input__clear, .muka-input__reveal'))
|
|
56
61
|
return;
|
|
57
62
|
if (e.target !== inputRef.current) {
|
|
58
63
|
e.preventDefault();
|
|
@@ -67,7 +72,7 @@ export const Input = React.forwardRef(function Input({ value, onChange, placehol
|
|
|
67
72
|
else if (forwardedRef)
|
|
68
73
|
forwardedRef.current =
|
|
69
74
|
node;
|
|
70
|
-
}, id: inputId, className: "muka-input__native", type:
|
|
75
|
+
}, id: inputId, className: "muka-input__native", type: effectiveType, value: value, onChange: onChange, placeholder: placeholder, disabled: disabled, readOnly: readOnly, name: name, required: required, "aria-invalid": ariaInvalid ?? (error || undefined), "aria-describedby": describedBy, onFocus: (e) => {
|
|
71
76
|
setIsFocused(true);
|
|
72
77
|
onFocus?.(e);
|
|
73
78
|
}, onBlur: (e) => {
|
|
@@ -84,7 +89,10 @@ export const Input = React.forwardRef(function Input({ value, onChange, placehol
|
|
|
84
89
|
currentTarget: { value: '', name: name ?? '' },
|
|
85
90
|
});
|
|
86
91
|
inputRef.current?.focus();
|
|
87
|
-
}, children: _jsx(Icon, { name: "close", variant: "line", size:
|
|
92
|
+
}, children: _jsx(Icon, { name: "close", variant: "line", size: iconSize }) })), showReveal && (_jsx("button", { type: "button", className: "muka-input__reveal", "aria-label": passwordRevealed ? 'Hide password' : 'Show password', "aria-pressed": passwordRevealed, onClick: () => {
|
|
93
|
+
setPasswordRevealed((prev) => !prev);
|
|
94
|
+
inputRef.current?.focus();
|
|
95
|
+
}, children: _jsx(Icon, { name: passwordRevealed ? 'eye-off' : 'eye', variant: "line", size: iconSize }) })), iconRight && (_jsx("span", { className: "muka-input__icon muka-input__icon--right", "aria-hidden": "true", children: iconRight }))] }), showError && (_jsx("p", { className: "muka-input__error", id: errorMessageId, role: "alert", children: errorMessage })), !showError && helperText && (_jsx("p", { className: "muka-input__helper", id: helperTextId, children: helperText }))] }));
|
|
88
96
|
});
|
|
89
97
|
export default Input;
|
|
90
98
|
//# sourceMappingURL=Input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../../components/Input/Input.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../../components/Input/Input.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,aAAa,CAAC;AAgFrB;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAA+B,SAAS,KAAK,CAChF,EACE,KAAK,EACL,QAAQ,EACR,WAAW,EACX,KAAK,EACL,UAAU,EACV,KAAK,GAAG,KAAK,EACb,YAAY,EACZ,QAAQ,GAAG,KAAK,EAChB,IAAI,GAAG,IAAI,EACX,IAAI,GAAG,MAAM,EACb,QAAQ,EACR,SAAS,EACT,SAAS,GAAG,KAAK,EACjB,UAAU,EACV,SAAS,GAAG,KAAK,EACjB,SAAS,GAAG,EAAE,EACd,IAAI,EACJ,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,KAAK,EAChB,MAAM,EACN,OAAO,EACP,EAAE,EACF,kBAAkB,EAAE,eAAe,EACnC,cAAc,EAAE,WAAW,EAC3B,gBAAgB,EAChB,GAAG,IAAI,EACR,EACD,YAAY;IAEZ,MAAM,C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Y,YAC/C,UAAU,GACT,CACL,IACG,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* SocialSignInButton lockup colors are provider-mandated (Apple HIG /
|
|
3
|
+
* Google Identity branding) and intentionally fixed across Muka brands —
|
|
4
|
+
* same exception pattern as LicensePlateInput regulatory colors.
|
|
5
|
+
*
|
|
6
|
+
* Apple: https://developer.apple.com/design/human-interface-guidelines/sign-in-with-apple
|
|
7
|
+
* Google: https://developers.google.com/identity/branding-guidelines
|
|
8
|
+
*/
|
|
9
|
+
.muka-social-sign-in-button {
|
|
10
|
+
--ssi-white: #ffffff;
|
|
11
|
+
--ssi-black: #000000;
|
|
12
|
+
--ssi-google-text-light: #1f1f1f;
|
|
13
|
+
|
|
14
|
+
display: inline-flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
|
|
18
|
+
/* Provider lockup type — matches Figma / HIG, not brand font tokens.
|
|
19
|
+
* SF Pro Text is OS-provided on Apple platforms (not redistributable).
|
|
20
|
+
* Google Sans is not freely shippable; Roboto is the closest system fallback. */
|
|
21
|
+
font-family: inherit;
|
|
22
|
+
font-weight: 600;
|
|
23
|
+
text-decoration: none;
|
|
24
|
+
white-space: nowrap;
|
|
25
|
+
|
|
26
|
+
border: 1px solid transparent;
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
user-select: none;
|
|
29
|
+
transition: opacity 0.15s ease, filter 0.15s ease;
|
|
30
|
+
|
|
31
|
+
outline: none;
|
|
32
|
+
position: relative;
|
|
33
|
+
box-sizing: border-box;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.muka-social-sign-in-button--apple {
|
|
37
|
+
font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
|
38
|
+
Helvetica, Arial, sans-serif;
|
|
39
|
+
font-weight: 600;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.muka-social-sign-in-button--google {
|
|
43
|
+
font-family: 'Google Sans', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
44
|
+
font-weight: 500;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.muka-social-sign-in-button:focus-visible {
|
|
48
|
+
outline: 2px solid var(--color-border-focus);
|
|
49
|
+
outline-offset: 2px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* Sizes — heights align with Button md/lg */
|
|
53
|
+
.muka-social-sign-in-button--md {
|
|
54
|
+
padding: 0 var(--button-padding-md-x);
|
|
55
|
+
border-radius: var(--button-radius-md);
|
|
56
|
+
font-size: var(--text-label-sm-semibold-fontSize);
|
|
57
|
+
line-height: var(--text-label-sm-semibold-lineHeight);
|
|
58
|
+
min-height: 40px;
|
|
59
|
+
min-width: 240px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.muka-social-sign-in-button--md .muka-social-sign-in-button__label {
|
|
63
|
+
padding: 0 var(--button-gap-md);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.muka-social-sign-in-button--md .muka-social-sign-in-button__icon {
|
|
67
|
+
width: var(--button-icon-md);
|
|
68
|
+
height: var(--button-icon-md);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.muka-social-sign-in-button--lg {
|
|
72
|
+
padding: 0 var(--button-padding-lg-x);
|
|
73
|
+
border-radius: var(--button-radius-lg);
|
|
74
|
+
font-size: var(--text-label-lg-semibold-fontSize);
|
|
75
|
+
line-height: var(--text-label-lg-semibold-lineHeight);
|
|
76
|
+
min-height: 48px;
|
|
77
|
+
min-width: 280px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.muka-social-sign-in-button--lg .muka-social-sign-in-button__label {
|
|
81
|
+
padding: 0 var(--button-gap-lg);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.muka-social-sign-in-button--lg .muka-social-sign-in-button__icon {
|
|
85
|
+
width: var(--button-icon-lg);
|
|
86
|
+
height: var(--button-icon-lg);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* White lockup — for dark surfaces (Apple White with Outline) */
|
|
90
|
+
.muka-social-sign-in-button--white {
|
|
91
|
+
background-color: var(--ssi-white);
|
|
92
|
+
color: var(--ssi-black);
|
|
93
|
+
border-color: var(--ssi-black);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.muka-social-sign-in-button--white.muka-social-sign-in-button--google {
|
|
97
|
+
color: var(--ssi-google-text-light);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/* Black lockup — for light surfaces */
|
|
101
|
+
.muka-social-sign-in-button--black {
|
|
102
|
+
background-color: var(--ssi-black);
|
|
103
|
+
color: var(--ssi-white);
|
|
104
|
+
border-color: transparent;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* Interaction — luminance/opacity only; no brand tint */
|
|
108
|
+
.muka-social-sign-in-button:hover:not(:disabled) {
|
|
109
|
+
filter: brightness(0.92);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.muka-social-sign-in-button:active:not(:disabled) {
|
|
113
|
+
filter: brightness(0.85);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.muka-social-sign-in-button:disabled,
|
|
117
|
+
.muka-social-sign-in-button--disabled {
|
|
118
|
+
cursor: not-allowed;
|
|
119
|
+
opacity: 0.4;
|
|
120
|
+
pointer-events: none;
|
|
121
|
+
filter: none;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.muka-social-sign-in-button--full-width {
|
|
125
|
+
width: 100%;
|
|
126
|
+
min-width: 0;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.muka-social-sign-in-button__icon {
|
|
130
|
+
display: inline-flex;
|
|
131
|
+
align-items: center;
|
|
132
|
+
justify-content: center;
|
|
133
|
+
flex-shrink: 0;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.muka-social-sign-in-button__icon > *,
|
|
137
|
+
.muka-social-sign-in-button__icon svg {
|
|
138
|
+
width: auto;
|
|
139
|
+
height: 100%;
|
|
140
|
+
max-width: 100%;
|
|
141
|
+
display: block;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.muka-social-sign-in-button__label {
|
|
145
|
+
display: inline-flex;
|
|
146
|
+
align-items: center;
|
|
147
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { AppleLogo } from './icons/AppleLogo';
|
|
4
|
+
import { GoogleLogo } from './icons/GoogleLogo';
|
|
5
|
+
import './SocialSignInButton.css';
|
|
6
|
+
const DEFAULT_LABELS = {
|
|
7
|
+
apple: 'Sign in with Apple',
|
|
8
|
+
google: 'Sign in with Google',
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* SocialSignInButton
|
|
12
|
+
*
|
|
13
|
+
* Brand-agnostic Sign in with Apple / Google lockup button.
|
|
14
|
+
* Colors are intentionally fixed per provider guidelines (Apple HIG /
|
|
15
|
+
* Google Identity branding) and do not follow Muka brand/action tokens —
|
|
16
|
+
* same pattern as LicensePlateInput regulatory colors.
|
|
17
|
+
*
|
|
18
|
+
* Pairing: `color="black"` on light surfaces, `color="white"` on dark.
|
|
19
|
+
* Figma: Button Apple Google (Provider × Color × Size).
|
|
20
|
+
*
|
|
21
|
+
* @accessibility WCAG 2.1 AA — native button, visible focus, label is visible text.
|
|
22
|
+
*/
|
|
23
|
+
export const SocialSignInButton = forwardRef(({ provider, color = 'black', size = 'md', label, fullWidth = false, disabled = false, type = 'button', className = '', ...props }, ref) => {
|
|
24
|
+
const resolvedLabel = label ?? DEFAULT_LABELS[provider];
|
|
25
|
+
const classes = [
|
|
26
|
+
'muka-social-sign-in-button',
|
|
27
|
+
`muka-social-sign-in-button--${provider}`,
|
|
28
|
+
`muka-social-sign-in-button--${color}`,
|
|
29
|
+
`muka-social-sign-in-button--${size}`,
|
|
30
|
+
fullWidth && 'muka-social-sign-in-button--full-width',
|
|
31
|
+
disabled && 'muka-social-sign-in-button--disabled',
|
|
32
|
+
className,
|
|
33
|
+
]
|
|
34
|
+
.filter(Boolean)
|
|
35
|
+
.join(' ');
|
|
36
|
+
return (_jsxs("button", { ref: ref, type: type, className: classes, disabled: disabled, ...props, children: [_jsx("span", { className: "muka-social-sign-in-button__icon", "aria-hidden": "true", children: provider === 'apple' ? _jsx(AppleLogo, {}) : _jsx(GoogleLogo, {}) }), _jsx("span", { className: "muka-social-sign-in-button__label", children: resolvedLabel })] }));
|
|
37
|
+
});
|
|
38
|
+
SocialSignInButton.displayName = 'SocialSignInButton';
|
|
39
|
+
export default SocialSignInButton;
|
|
40
|
+
//# sourceMappingURL=SocialSignInButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SocialSignInButton.js","sourceRoot":"","sources":["../../../../components/SocialSignInButton/SocialSignInButton.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,0BAA0B,CAAC;AAuBlC,MAAM,cAAc,GAAoD;IACtE,KAAK,EAAE,oBAAoB;IAC3B,MAAM,EAAE,qBAAqB;CAC9B,CAAC;AA0BF;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,UAAU,CAC1C,CACE,EACE,QAAQ,EACR,KAAK,GAAG,OAAO,EACf,IAAI,GAAG,IAAI,EACX,KAAK,EACL,SAAS,GAAG,KAAK,EACjB,QAAQ,GAAG,KAAK,EAChB,IAAI,GAAG,QAAQ,EACf,SAAS,GAAG,EAAE,EACd,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,aAAa,GAAG,KAAK,IAAI,cAAc,CAAC,QAAQ,CAAC,CAAC;IAExD,MAAM,OAAO,GAAG;QACd,4BAA4B;QAC5B,+BAA+B,QAAQ,EAAE;QACzC,+BAA+B,KAAK,EAAE;QACtC,+BAA+B,IAAI,EAAE;QACrC,SAAS,IAAI,wCAAwC;QACrD,QAAQ,IAAI,sCAAsC;QAClD,SAAS;KACV;SACE,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAC;IAEb,OAAO,CACL,kBACE,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,OAAO,EAClB,QAAQ,EAAE,QAAQ,KACd,KAAK,aAET,eAAM,SAAS,EAAC,kCAAkC,iBAAa,MAAM,YAClE,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,KAAC,SAAS,KAAG,CAAC,CAAC,CAAC,KAAC,UAAU,KAAG,GACjD,EACP,eAAM,SAAS,EAAC,mCAAmC,YAAE,aAAa,GAAQ,IACnE,CACV,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,kBAAkB,CAAC,WAAW,GAAG,oBAAoB,CAAC;AAEtD,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Official Apple logo mark from the Muka UI Figma library.
|
|
4
|
+
* Fill follows `currentColor` so black/white lockups inherit from the button.
|
|
5
|
+
*/
|
|
6
|
+
export const AppleLogo = ({ className }) => (_jsx("svg", { className: className, width: "19", height: "23", viewBox: "0 0 19 23", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", focusable: "false", children: _jsx("path", { d: "M9.17338 6.37188C8.29738 6.37188 6.94138 5.37588 5.51338 5.41188C3.62938 5.43588 1.90138 6.50388 0.929378 8.19588C-1.02662 11.5919 0.425378 16.6079 2.33338 19.3679C3.26938 20.7119 4.37338 22.2239 5.83738 22.1759C7.24138 22.1159 7.76938 21.2639 9.47338 21.2639C11.1654 21.2639 11.6454 22.1759 13.1334 22.1399C14.6454 22.1159 15.6054 20.7719 16.5294 19.4159C17.5974 17.8559 18.0414 16.3439 18.0654 16.2599C18.0294 16.2479 15.1254 15.1319 15.0894 11.7719C15.0654 8.96388 17.3814 7.61988 17.4894 7.55988C16.1694 5.62788 14.1414 5.41188 13.4334 5.36388C11.5854 5.21988 10.0374 6.37188 9.17338 6.37188ZM12.2934 3.53988C13.0734 2.60388 13.5894 1.29588 13.4454 -0.00012207C12.3294 0.0478779 10.9854 0.743878 10.1814 1.67988C9.46138 2.50788 8.83738 3.83988 9.00538 5.11188C10.2414 5.20788 11.5134 4.47588 12.2934 3.53988Z", fill: "currentColor" }) }));
|
|
7
|
+
//# sourceMappingURL=AppleLogo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppleLogo.js","sourceRoot":"","sources":["../../../../../components/SocialSignInButton/icons/AppleLogo.tsx"],"names":[],"mappings":";AAEA;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAqC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAC5E,cACE,SAAS,EAAE,SAAS,EACpB,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,iBACtB,MAAM,EAClB,SAAS,EAAC,OAAO,YAEjB,eACE,CAAC,EAAC,8yBAA8yB,EAChzB,IAAI,EAAC,cAAc,GACnB,GACE,CACP,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Official multicolor Google "G" mark.
|
|
4
|
+
* Solid brand fills (not monochrome) — required by Google Identity branding guidelines.
|
|
5
|
+
* Paths sourced from the Muka UI Figma library Button Apple Google component.
|
|
6
|
+
*/
|
|
7
|
+
export const GoogleLogo = ({ className }) => (_jsxs("svg", { className: className, width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", focusable: "false", children: [_jsx("path", { d: "M19.5833 10.2273C19.5833 9.51818 19.5198 8.83636 19.4017 8.18182H12.5V12.0545H15.3687C15.1326 13.3 14.4241 14.3545 13.3614 15.0636V17.5818H16.6041C18.4934 15.8364 19.5833 13.2727 19.5833 10.2273Z", fill: "#4285F4" }), _jsx("path", { d: "M9.9915 20C12.6892 20 14.9509 19.1091 16.6041 17.5818L13.3614 15.0636C12.4712 15.6636 11.3358 16.0273 9.9915 16.0273C7.39371 16.0273 5.1865 14.2727 4.39626 11.9091H1.07182V14.4909C2.71587 17.7545 6.08573 20 9.9915 20Z", fill: "#34A853" }), _jsx("path", { d: "M4.39626 11.9C4.19643 11.3 4.07835 10.6636 4.07835 10C4.07835 9.33636 4.19643 8.7 4.39626 8.1V5.51818H1.07182C0.390577 6.86364 0 8.38182 0 10C0 11.6182 0.390577 13.1364 1.07182 14.4818L4.39626 11.9Z", fill: "#FBBC05" }), _jsx("path", { d: "M9.9915 3.98182C11.463 3.98182 12.7709 4.49091 13.8155 5.47273L16.6767 2.60909C14.9418 0.990909 12.6892 0 9.9915 0C6.08573 0 2.71587 2.24546 1.07182 5.51818L4.39626 8.1C5.1865 5.73636 7.39371 3.98182 9.9915 3.98182Z", fill: "#EA4335" })] }));
|
|
8
|
+
//# sourceMappingURL=GoogleLogo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GoogleLogo.js","sourceRoot":"","sources":["../../../../../components/SocialSignInButton/icons/GoogleLogo.tsx"],"names":[],"mappings":";AAEA;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAqC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAC7E,eACE,SAAS,EAAE,SAAS,EACpB,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,iBACtB,MAAM,EAClB,SAAS,EAAC,OAAO,aAGjB,eACE,CAAC,EAAC,qMAAqM,EACvM,IAAI,EAAC,SAAS,GACd,EAEF,eACE,CAAC,EAAC,2NAA2N,EAC7N,IAAI,EAAC,SAAS,GACd,EAEF,eACE,CAAC,EAAC,wMAAwM,EAC1M,IAAI,EAAC,SAAS,GACd,EAEF,eACE,CAAC,EAAC,yNAAyN,EAC3N,IAAI,EAAC,SAAS,GACd,IACE,CACP,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../components/SocialSignInButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,GAMnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -83,6 +83,7 @@ export { Combobox, } from './Combobox';
|
|
|
83
83
|
export { SwipeActions, } from './SwipeActions';
|
|
84
84
|
export { PullToRefresh } from './PullToRefresh';
|
|
85
85
|
export { LicensePlateInput, } from './LicensePlateInput';
|
|
86
|
+
export { SocialSignInButton, } from './SocialSignInButton';
|
|
86
87
|
export { Thumbnail } from './Thumbnail';
|
|
87
88
|
export { PhotoUploader, } from './PhotoUploader';
|
|
88
89
|
export { TextLink } from './TextLink';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../components/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,EAAE,MAAM,EAAoB,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAsB,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAmB,MAAM,SAAS,CAAC;AACjD,OAAO,EACL,IAAI,EAEJ,OAAO,GAMR,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,WAAW,E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AAC1D,OAAO,EAAE,YAAY,EAA0B,MAAM,gBAAgB,CAAC;AACtE,OAAO,EACL,YAAY,GAGb,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,gBAAgB,EAIhB,eAAe,EACf,WAAW,EACX,yBAAyB,EACzB,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,eAAe,GAGhB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,WAAW,EAEX,aAAa,GACd,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,aAAa,GAGd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,eAAe,EAA6B,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EACL,kBAAkB,GAEnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,QAAQ,GAGT,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,YAAY,GAGb,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,aAAa,EAA2B,MAAM,iBAAiB,CAAC;AACzE,OAAO,EACL,iBAAiB,GAElB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,kBAAkB,GAMnB,MAAM,sBAAsB,CAAC;AAO9B,OAAO,EAAE,SAAS,EAAuB,MAAM,aAAa,CAAC;AAC7D,OAAO,EACL,aAAa,GAEd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAsB,MAAM,YAAY,CAAC"}
|
|
@@ -184,7 +184,8 @@
|
|
|
184
184
|
height: var(--icon-size-default);
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
.muka-input__clear
|
|
187
|
+
.muka-input__clear,
|
|
188
|
+
.muka-input__reveal {
|
|
188
189
|
display: inline-flex;
|
|
189
190
|
align-items: center;
|
|
190
191
|
justify-content: center;
|
|
@@ -198,7 +199,8 @@
|
|
|
198
199
|
cursor: pointer;
|
|
199
200
|
}
|
|
200
201
|
|
|
201
|
-
.muka-input__field--sm .muka-input__clear
|
|
202
|
+
.muka-input__field--sm .muka-input__clear,
|
|
203
|
+
.muka-input__field--sm .muka-input__reveal {
|
|
202
204
|
width: var(--size-xl, 1.5rem);
|
|
203
205
|
height: var(--size-xl, 1.5rem);
|
|
204
206
|
}
|
|
@@ -207,14 +209,19 @@
|
|
|
207
209
|
.muka-input__icon .muka-icon,
|
|
208
210
|
.muka-input__clear .muka-icon,
|
|
209
211
|
.muka-input__clear:hover,
|
|
210
|
-
.muka-input__clear:hover .muka-icon
|
|
212
|
+
.muka-input__clear:hover .muka-icon,
|
|
213
|
+
.muka-input__reveal .muka-icon,
|
|
214
|
+
.muka-input__reveal:hover,
|
|
215
|
+
.muka-input__reveal:hover .muka-icon {
|
|
211
216
|
color: var(--color-text-subtle-default);
|
|
212
217
|
}
|
|
213
218
|
|
|
214
219
|
.muka-input__field--disabled .muka-input__icon,
|
|
215
220
|
.muka-input__field--disabled .muka-input__icon .muka-icon,
|
|
216
221
|
.muka-input__field--disabled .muka-input__clear,
|
|
217
|
-
.muka-input__field--disabled .muka-input__clear .muka-icon
|
|
222
|
+
.muka-input__field--disabled .muka-input__clear .muka-icon,
|
|
223
|
+
.muka-input__field--disabled .muka-input__reveal,
|
|
224
|
+
.muka-input__field--disabled .muka-input__reveal .muka-icon {
|
|
218
225
|
color: var(--input-field-color-disabled-foreground);
|
|
219
226
|
}
|
|
220
227
|
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* SocialSignInButton lockup colors are provider-mandated (Apple HIG /
|
|
3
|
+
* Google Identity branding) and intentionally fixed across Muka brands —
|
|
4
|
+
* same exception pattern as LicensePlateInput regulatory colors.
|
|
5
|
+
*
|
|
6
|
+
* Apple: https://developer.apple.com/design/human-interface-guidelines/sign-in-with-apple
|
|
7
|
+
* Google: https://developers.google.com/identity/branding-guidelines
|
|
8
|
+
*/
|
|
9
|
+
.muka-social-sign-in-button {
|
|
10
|
+
--ssi-white: #ffffff;
|
|
11
|
+
--ssi-black: #000000;
|
|
12
|
+
--ssi-google-text-light: #1f1f1f;
|
|
13
|
+
|
|
14
|
+
display: inline-flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
|
|
18
|
+
/* Provider lockup type — matches Figma / HIG, not brand font tokens.
|
|
19
|
+
* SF Pro Text is OS-provided on Apple platforms (not redistributable).
|
|
20
|
+
* Google Sans is not freely shippable; Roboto is the closest system fallback. */
|
|
21
|
+
font-family: inherit;
|
|
22
|
+
font-weight: 600;
|
|
23
|
+
text-decoration: none;
|
|
24
|
+
white-space: nowrap;
|
|
25
|
+
|
|
26
|
+
border: 1px solid transparent;
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
user-select: none;
|
|
29
|
+
transition: opacity 0.15s ease, filter 0.15s ease;
|
|
30
|
+
|
|
31
|
+
outline: none;
|
|
32
|
+
position: relative;
|
|
33
|
+
box-sizing: border-box;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.muka-social-sign-in-button--apple {
|
|
37
|
+
font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
|
38
|
+
Helvetica, Arial, sans-serif;
|
|
39
|
+
font-weight: 600;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.muka-social-sign-in-button--google {
|
|
43
|
+
font-family: 'Google Sans', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
44
|
+
font-weight: 500;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.muka-social-sign-in-button:focus-visible {
|
|
48
|
+
outline: 2px solid var(--color-border-focus);
|
|
49
|
+
outline-offset: 2px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* Sizes — heights align with Button md/lg */
|
|
53
|
+
.muka-social-sign-in-button--md {
|
|
54
|
+
padding: 0 var(--button-padding-md-x);
|
|
55
|
+
border-radius: var(--button-radius-md);
|
|
56
|
+
font-size: var(--text-label-sm-semibold-fontSize);
|
|
57
|
+
line-height: var(--text-label-sm-semibold-lineHeight);
|
|
58
|
+
min-height: 40px;
|
|
59
|
+
min-width: 240px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.muka-social-sign-in-button--md .muka-social-sign-in-button__label {
|
|
63
|
+
padding: 0 var(--button-gap-md);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.muka-social-sign-in-button--md .muka-social-sign-in-button__icon {
|
|
67
|
+
width: var(--button-icon-md);
|
|
68
|
+
height: var(--button-icon-md);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.muka-social-sign-in-button--lg {
|
|
72
|
+
padding: 0 var(--button-padding-lg-x);
|
|
73
|
+
border-radius: var(--button-radius-lg);
|
|
74
|
+
font-size: var(--text-label-lg-semibold-fontSize);
|
|
75
|
+
line-height: var(--text-label-lg-semibold-lineHeight);
|
|
76
|
+
min-height: 48px;
|
|
77
|
+
min-width: 280px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.muka-social-sign-in-button--lg .muka-social-sign-in-button__label {
|
|
81
|
+
padding: 0 var(--button-gap-lg);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.muka-social-sign-in-button--lg .muka-social-sign-in-button__icon {
|
|
85
|
+
width: var(--button-icon-lg);
|
|
86
|
+
height: var(--button-icon-lg);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* White lockup — for dark surfaces (Apple White with Outline) */
|
|
90
|
+
.muka-social-sign-in-button--white {
|
|
91
|
+
background-color: var(--ssi-white);
|
|
92
|
+
color: var(--ssi-black);
|
|
93
|
+
border-color: var(--ssi-black);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.muka-social-sign-in-button--white.muka-social-sign-in-button--google {
|
|
97
|
+
color: var(--ssi-google-text-light);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/* Black lockup — for light surfaces */
|
|
101
|
+
.muka-social-sign-in-button--black {
|
|
102
|
+
background-color: var(--ssi-black);
|
|
103
|
+
color: var(--ssi-white);
|
|
104
|
+
border-color: transparent;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* Interaction — luminance/opacity only; no brand tint */
|
|
108
|
+
.muka-social-sign-in-button:hover:not(:disabled) {
|
|
109
|
+
filter: brightness(0.92);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.muka-social-sign-in-button:active:not(:disabled) {
|
|
113
|
+
filter: brightness(0.85);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.muka-social-sign-in-button:disabled,
|
|
117
|
+
.muka-social-sign-in-button--disabled {
|
|
118
|
+
cursor: not-allowed;
|
|
119
|
+
opacity: 0.4;
|
|
120
|
+
pointer-events: none;
|
|
121
|
+
filter: none;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.muka-social-sign-in-button--full-width {
|
|
125
|
+
width: 100%;
|
|
126
|
+
min-width: 0;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.muka-social-sign-in-button__icon {
|
|
130
|
+
display: inline-flex;
|
|
131
|
+
align-items: center;
|
|
132
|
+
justify-content: center;
|
|
133
|
+
flex-shrink: 0;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.muka-social-sign-in-button__icon > *,
|
|
137
|
+
.muka-social-sign-in-button__icon svg {
|
|
138
|
+
width: auto;
|
|
139
|
+
height: 100%;
|
|
140
|
+
max-width: 100%;
|
|
141
|
+
display: block;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.muka-social-sign-in-button__label {
|
|
145
|
+
display: inline-flex;
|
|
146
|
+
align-items: center;
|
|
147
|
+
}
|