@popmenu/common-ui 0.126.2 → 0.126.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/components/Avatar/Avatar.d.ts +1 -1
- package/build/cjs/components/Checkbox/Checkbox.d.ts +1 -1
- package/build/cjs/components/Icon/Icon.d.ts +2 -2
- package/build/cjs/components/Icon/IconStyles.d.ts +3 -1
- package/build/cjs/components/IconButton/IconButton.d.ts +1 -1
- package/build/cjs/components/Paper/Paper.d.ts +1 -1
- package/build/cjs/components/Radio/Radio.d.ts +1 -1
- package/build/cjs/components/SplitInput/SplitInputStyles.d.ts +3 -1
- package/build/cjs/components/Switch/Switch.d.ts +1 -1
- package/build/cjs/components/ToggleButton/ToggleButton.d.ts +1 -1
- package/build/cjs/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +1 -1
- package/build/cjs/components/Tooltip/Tooltip.d.ts +1 -1
- package/build/cjs/components/Typography/Typography.d.ts +1 -4
- package/build/cjs/components/Typography/TypographyProps.d.ts +3 -5
- package/build/cjs/components/Typography/TypographyStyles.d.ts +6 -10
- package/build/cjs/index.js +44 -42
- package/build/cjs/index.js.map +1 -1
- package/build/esm/components/Avatar/Avatar.d.ts +1 -1
- package/build/esm/components/Checkbox/Checkbox.d.ts +1 -1
- package/build/esm/components/Divider/Divider.js +11 -14
- package/build/esm/components/Divider/Divider.js.map +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.js +19 -3
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.js.map +1 -1
- package/build/esm/components/Icon/Icon.d.ts +2 -2
- package/build/esm/components/Icon/Icon.js +5 -9
- package/build/esm/components/Icon/Icon.js.map +1 -1
- package/build/esm/components/Icon/IconStyles.d.ts +3 -1
- package/build/esm/components/Icon/IconStyles.js +3 -1
- package/build/esm/components/Icon/IconStyles.js.map +1 -1
- package/build/esm/components/IconButton/IconButton.d.ts +1 -1
- package/build/esm/components/Paper/Paper.d.ts +1 -1
- package/build/esm/components/Radio/Radio.d.ts +1 -1
- package/build/esm/components/SplitInput/SplitInput.js +3 -7
- package/build/esm/components/SplitInput/SplitInput.js.map +1 -1
- package/build/esm/components/SplitInput/SplitInputStyles.d.ts +3 -1
- package/build/esm/components/SplitInput/SplitInputStyles.js.map +1 -1
- package/build/esm/components/Switch/Switch.d.ts +1 -1
- package/build/esm/components/ToggleButton/ToggleButton.d.ts +1 -1
- package/build/esm/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +1 -1
- package/build/esm/components/Tooltip/Tooltip.d.ts +1 -1
- package/build/esm/components/Typography/Typography.d.ts +1 -4
- package/build/esm/components/Typography/Typography.js +4 -6
- package/build/esm/components/Typography/Typography.js.map +1 -1
- package/build/esm/components/Typography/TypographyProps.d.ts +3 -5
- package/build/esm/components/Typography/TypographyStyles.d.ts +6 -10
- package/build/esm/components/Typography/TypographyStyles.js.map +1 -1
- package/package.json +2 -2
- package/build/esm/components/Typography/TypographyProps.js +0 -6
- package/build/esm/components/Typography/TypographyProps.js.map +0 -1
|
@@ -52,14 +52,30 @@ var FollowerAuthenticationForm = function () {
|
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
useEffect(function () {
|
|
55
|
-
|
|
55
|
+
setSignUpPhoneValue(state.context.phone || '');
|
|
56
|
+
setSignUpEmailValue(state.context.email || '');
|
|
57
|
+
}, [state.context.phone, state.context.email]);
|
|
58
|
+
useEffect(function () {
|
|
59
|
+
var _a, _b, _c;
|
|
60
|
+
// Validate pre-filled values (only in signUp state)
|
|
61
|
+
if (state.value === 'signUp') {
|
|
62
|
+
if (signUpPhoneValue) {
|
|
63
|
+
var isPhoneValid = validatePhoneNumber(signUpPhoneValue);
|
|
64
|
+
setShowPhoneErrorText(!isPhoneValid);
|
|
65
|
+
}
|
|
66
|
+
if (signUpEmailValue) {
|
|
67
|
+
var emailField = (_a = formRef.current) === null || _a === void 0 ? void 0 : _a.elements.namedItem('email');
|
|
68
|
+
var isEmailValid = (_b = emailField === null || emailField === void 0 ? void 0 : emailField.validity.valid) !== null && _b !== void 0 ? _b : false;
|
|
69
|
+
setShowEmailErrorText(!isEmailValid);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
56
72
|
var hasValidPhone = Boolean(signUpPhoneValue) && !showPhoneErrorText;
|
|
57
73
|
var hasValidEmail = Boolean(signUpEmailValue) && !showEmailErrorText;
|
|
58
|
-
var locationField = (
|
|
74
|
+
var locationField = (_c = formRef.current) === null || _c === void 0 ? void 0 : _c.elements.namedItem('location');
|
|
59
75
|
var hasValidLocation = locationField ? Boolean(locationField.value) : true;
|
|
60
76
|
var hasValidContact = hasValidPhone || hasValidEmail;
|
|
61
77
|
setFormValidity(hasValidContact && hasValidLocation);
|
|
62
|
-
}, [signUpPhoneValue, signUpEmailValue, showPhoneErrorText, showEmailErrorText, showLocationErrorText]);
|
|
78
|
+
}, [state.value, signUpPhoneValue, signUpEmailValue, showPhoneErrorText, showEmailErrorText, showLocationErrorText]);
|
|
63
79
|
var handleSubmit = function (e) {
|
|
64
80
|
e.preventDefault();
|
|
65
81
|
var form = e.target;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FollowerAuthenticationForm.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.tsx"],"sourcesContent":["import React, { ChangeEventHandler, useEffect, useRef, useState } from 'react'\nimport { useFollowerAuthenticationDialogContext } from './context'\nimport { Button, makeStyles, MenuItem, TextField, Typography } from '@material-ui/core'\n\nconst useStyles = makeStyles(() => ({\n form: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n width: '100%',\n gridGap: 16,\n },\n}))\n\nconst northAmericanPhoneRegex = /^(\\()?[2-9]{1}\\d{2}(\\))?[-\\s.]?[2-9]{1}\\d{2}[-\\s.]?\\d{4}$/\nconst ukPhoneRegex = /^((\\+?44\\s?|0044\\s?)(\\s?\\d{3,5}|\\(\\d{3,5}\\))(\\s?\\d{3,4})(\\s?\\d{3,4})$|^07\\d{9}$)/\n\nconst validatePhoneNumber = (phone: string): boolean => {\n if (!phone) return false\n return northAmericanPhoneRegex.test(phone) || ukPhoneRegex.test(phone)\n}\n\nexport const FollowerAuthenticationForm = () => {\n const { state, messages, locationOptions, onActionButtonClick, loading } = useFollowerAuthenticationDialogContext()\n const classes = useStyles()\n\n // sign-up form state\n const formRef = useRef<HTMLFormElement>(null)\n const [formValidity, setFormValidity] = useState(false)\n const [showPhoneErrorText, setShowPhoneErrorText] = useState<boolean | undefined>()\n const [showEmailErrorText, setShowEmailErrorText] = useState<boolean | undefined>()\n const [showLocationErrorText, setShowLocationErrorText] = useState<boolean | undefined>()\n const [signUpPhoneValue, setSignUpPhoneValue] = useState(state.context.phone || '')\n const [signUpEmailValue, setSignUpEmailValue] = useState(state.context.email || '')\n\n const checkFieldValidity: ChangeEventHandler<HTMLInputElement> = (e) => {\n const fieldName = e.target.name\n const fieldValue = e.target.value\n\n switch (fieldName) {\n case 'phone':\n const isPhoneValid = validatePhoneNumber(fieldValue)\n setSignUpPhoneValue(fieldValue)\n setShowPhoneErrorText(!isPhoneValid && fieldValue.length > 0)\n break\n case 'email':\n const emailField = formRef.current?.elements.namedItem(fieldName) as HTMLInputElement\n const isEmailValid = emailField?.validity.valid ?? false\n setSignUpEmailValue(fieldValue)\n setShowEmailErrorText(!isEmailValid && fieldValue.length > 0)\n break\n case 'location':\n setShowLocationErrorText(!fieldValue)\n break\n default:\n break\n }\n }\n\n useEffect(() => {\n const hasValidPhone = Boolean(signUpPhoneValue) && !showPhoneErrorText\n const hasValidEmail = Boolean(signUpEmailValue) && !showEmailErrorText\n\n const locationField = formRef.current?.elements.namedItem('location') as HTMLInputElement\n const hasValidLocation = locationField ? Boolean(locationField.value) : true\n\n const hasValidContact = hasValidPhone || hasValidEmail\n setFormValidity(hasValidContact && hasValidLocation)\n }, [signUpPhoneValue, signUpEmailValue, showPhoneErrorText, showEmailErrorText, showLocationErrorText])\n\n const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault()\n const form = e.target as HTMLFormElement\n const formData = new FormData(form)\n const values = Object.fromEntries(formData.entries()) as Record<string, string>\n onActionButtonClick('submit-form', values)\n }\n const formProps = {\n id: 'follower-authentication-form',\n className: classes.form,\n onSubmit: handleSubmit,\n }\n switch (state.value) {\n case 'initial':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.initialInputLabel}\n key=\"identifier-input\"\n id=\"identifier-input\"\n name=\"identifier\"\n />\n <Button disabled={loading} type=\"submit\">\n {messages.initialCtaButtonLabel}\n </Button>\n </form>\n )\n case 'signUp':\n return (\n <form\n ref={formRef}\n {...formProps}\n onInvalid={(e) => {\n e.preventDefault()\n }}\n >\n <TextField\n disabled={loading}\n label={messages.signUpPhoneInputLabel}\n key=\"phone-input\"\n id=\"phone-input\"\n name=\"phone\"\n onChange={checkFieldValidity}\n error={showPhoneErrorText}\n helperText={showPhoneErrorText && messages.signUpPhoneErrorText}\n inputProps={{\n required: signUpEmailValue ? false : true,\n }}\n defaultValue={state.context.phone}\n />\n <TextField\n disabled={loading}\n label={messages.signUpNameInputLabel}\n key=\"name-input\"\n id=\"name-input\"\n name=\"name\"\n inputProps={{ required: true }}\n />\n <TextField\n disabled={loading}\n label={messages.signUpEmailInputLabel}\n key=\"email-input\"\n id=\"email-input\"\n name=\"email\"\n error={showEmailErrorText}\n helperText={showEmailErrorText && messages.signUpEmailErrorText}\n onChange={checkFieldValidity}\n inputProps={{\n required: signUpPhoneValue ? false : true,\n type: 'email',\n }}\n defaultValue={state.context.email}\n />\n <TextField\n disabled={loading}\n select\n onChange={checkFieldValidity}\n label={messages.signUpLocationInputLabel}\n error={showLocationErrorText}\n helperText={showLocationErrorText && messages.signUpLocationErrorText}\n key=\"location-input\"\n id=\"location-input\"\n inputProps={{ required: true }}\n name=\"location\"\n >\n {locationOptions.map((locationOption) => (\n <MenuItem data-cy={'option'} key={locationOption.value} value={locationOption.value}>\n {locationOption.label}\n </MenuItem>\n ))}\n </TextField>\n <Typography style={{ alignSelf: 'start' }}>{messages.signUpBirthdaySectionLabel}</Typography>\n <TextField\n disabled={loading}\n label={messages.signUpMonthInputLabel}\n key=\"birthday-month-input\"\n id=\"birthday-month-input\"\n name=\"birthdayMonth\"\n />\n <TextField\n disabled={loading}\n label={messages.signUpDayInputLabel}\n key=\"birthday-date-input\"\n id=\"birthday-date-input\"\n name=\"birthdayDate\"\n />\n <Button disabled={loading || !formValidity} type=\"submit\">\n {messages.signUp}\n </Button>\n </form>\n )\n case 'emailFound':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.emailFoundInputLabel}\n key=\"email-input\"\n id=\"email-input\"\n name=\"email\"\n value={state.context.email}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.emailFoundCtaButtonLabel}\n </Button>\n </form>\n )\n case 'emailAuthCode':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.emailAuthCodeInputLabel}\n key=\"code-input\"\n id=\"code-input\"\n name=\"code\"\n />\n <Button disabled={loading} type=\"submit\">\n {messages.signIn}\n </Button>\n </form>\n )\n case 'indirectUserFound': {\n if (state.context.email) {\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.emailFoundInputLabel}\n key=\"email-input\"\n id=\"email-input\"\n name=\"email\"\n value={state.context.email}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.indirectUserFoundCtaButtonLabel}\n </Button>\n </form>\n )\n } else if (state.context.phone) {\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.phoneFoundInputLabel}\n key=\"phone-input\"\n id=\"phone-input\"\n name=\"phone\"\n value={state.context.phone}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.indirectUserFoundCtaButtonLabel}\n </Button>\n </form>\n )\n } else return null\n }\n case 'emailPasswordSignIn':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.emailFoundInputLabel}\n key=\"email-input\"\n id=\"email-input\"\n name=\"email\"\n value={state.context.email}\n InputLabelProps={{ shrink: true }}\n />\n <TextField\n disabled={loading}\n label={messages.passwordInputLabel}\n key=\"password-input\"\n id=\"password-input\"\n name=\"password\"\n inputProps={{ type: 'password' }}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.signIn}\n </Button>\n </form>\n )\n case 'phoneFound':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.phoneFoundInputLabel}\n key=\"phone-input\"\n id=\"phone-input\"\n name=\"phone\"\n value={state.context.phone}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.phoneFoundCtaButtonLabel}\n </Button>\n </form>\n )\n case 'phoneAuthCode':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.phoneAuthCodeInputLabel}\n key=\"code-input\"\n id=\"code-input\"\n name=\"code\"\n autoComplete=\"one-time-code\"\n />\n <Button disabled={loading} type=\"submit\">\n {messages.signIn}\n </Button>\n </form>\n )\n case 'phonePasswordSignIn':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.phoneFoundInputLabel}\n key=\"phone-input\"\n id=\"phone-input\"\n name=\"phone\"\n value={state.context.phone}\n InputLabelProps={{ shrink: true }}\n />\n <TextField\n disabled={loading}\n label={messages.passwordInputLabel}\n key=\"password-input\"\n id=\"password-input\"\n name=\"password\"\n inputProps={{ type: 'password' }}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.signIn}\n </Button>\n </form>\n )\n case 'requirePhone':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.requirePhoneInputLabel}\n key=\"phone-input\"\n id=\"phone-input\"\n name=\"phone\"\n value={state.context.phone}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.requirePhoneCtaButtonLabel}\n </Button>\n </form>\n )\n case 'welcome':\n return null\n default:\n return null\n }\n}\n"],"names":[],"mappings":";;;;;AAIA,IAAM,SAAS,GAAG,UAAU,CAAC,YAAA,EAAM,QAAC;AAClC,IAAA,IAAI,EAAE;AACJ,Q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aAAa,EACjB,EAAE,EAAC,aAAa,EAChB,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,EAC1B,CAAA;AACF,gBAAA,KAAA,CAAA,aAAA,CAAC,MAAM,EAAC,EAAA,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAC,QAAQ,EAAA,EACrC,QAAQ,CAAC,0BAA0B,CAC7B,CACJ;AAEX,QAAA,KAAK,SAAS;AACZ,YAAA,OAAO,IAAI;AACb,QAAA;AACE,YAAA,OAAO,IAAI;AACd;AACH;;;;"}
|
|
1
|
+
{"version":3,"file":"FollowerAuthenticationForm.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.tsx"],"sourcesContent":["import React, { ChangeEventHandler, useEffect, useRef, useState } from 'react'\nimport { useFollowerAuthenticationDialogContext } from './context'\nimport { Button, makeStyles, MenuItem, TextField, Typography } from '@material-ui/core'\n\nconst useStyles = makeStyles(() => ({\n form: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n width: '100%',\n gridGap: 16,\n },\n}))\n\nconst northAmericanPhoneRegex = /^(\\()?[2-9]{1}\\d{2}(\\))?[-\\s.]?[2-9]{1}\\d{2}[-\\s.]?\\d{4}$/\nconst ukPhoneRegex = /^((\\+?44\\s?|0044\\s?)(\\s?\\d{3,5}|\\(\\d{3,5}\\))(\\s?\\d{3,4})(\\s?\\d{3,4})$|^07\\d{9}$)/\n\nconst validatePhoneNumber = (phone: string): boolean => {\n if (!phone) return false\n return northAmericanPhoneRegex.test(phone) || ukPhoneRegex.test(phone)\n}\n\nexport const FollowerAuthenticationForm = () => {\n const { state, messages, locationOptions, onActionButtonClick, loading } = useFollowerAuthenticationDialogContext()\n const classes = useStyles()\n\n // sign-up form state\n const formRef = useRef<HTMLFormElement>(null)\n const [formValidity, setFormValidity] = useState(false)\n const [showPhoneErrorText, setShowPhoneErrorText] = useState<boolean | undefined>()\n const [showEmailErrorText, setShowEmailErrorText] = useState<boolean | undefined>()\n const [showLocationErrorText, setShowLocationErrorText] = useState<boolean | undefined>()\n const [signUpPhoneValue, setSignUpPhoneValue] = useState(state.context.phone || '')\n const [signUpEmailValue, setSignUpEmailValue] = useState(state.context.email || '')\n\n const checkFieldValidity: ChangeEventHandler<HTMLInputElement> = (e) => {\n const fieldName = e.target.name\n const fieldValue = e.target.value\n\n switch (fieldName) {\n case 'phone':\n const isPhoneValid = validatePhoneNumber(fieldValue)\n setSignUpPhoneValue(fieldValue)\n setShowPhoneErrorText(!isPhoneValid && fieldValue.length > 0)\n break\n case 'email':\n const emailField = formRef.current?.elements.namedItem(fieldName) as HTMLInputElement\n const isEmailValid = emailField?.validity.valid ?? false\n setSignUpEmailValue(fieldValue)\n setShowEmailErrorText(!isEmailValid && fieldValue.length > 0)\n break\n case 'location':\n setShowLocationErrorText(!fieldValue)\n break\n default:\n break\n }\n }\n\n useEffect(() => {\n setSignUpPhoneValue(state.context.phone || '')\n setSignUpEmailValue(state.context.email || '')\n }, [state.context.phone, state.context.email])\n\n useEffect(() => {\n // Validate pre-filled values (only in signUp state)\n if (state.value === 'signUp') {\n if (signUpPhoneValue) {\n const isPhoneValid = validatePhoneNumber(signUpPhoneValue)\n setShowPhoneErrorText(!isPhoneValid)\n }\n if (signUpEmailValue) {\n const emailField = formRef.current?.elements.namedItem('email') as HTMLInputElement\n const isEmailValid = emailField?.validity.valid ?? false\n setShowEmailErrorText(!isEmailValid)\n }\n }\n\n const hasValidPhone = Boolean(signUpPhoneValue) && !showPhoneErrorText\n const hasValidEmail = Boolean(signUpEmailValue) && !showEmailErrorText\n\n const locationField = formRef.current?.elements.namedItem('location') as HTMLInputElement\n const hasValidLocation = locationField ? Boolean(locationField.value) : true\n\n const hasValidContact = hasValidPhone || hasValidEmail\n setFormValidity(hasValidContact && hasValidLocation)\n }, [state.value, signUpPhoneValue, signUpEmailValue, showPhoneErrorText, showEmailErrorText, showLocationErrorText])\n\n const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault()\n const form = e.target as HTMLFormElement\n const formData = new FormData(form)\n const values = Object.fromEntries(formData.entries()) as Record<string, string>\n onActionButtonClick('submit-form', values)\n }\n const formProps = {\n id: 'follower-authentication-form',\n className: classes.form,\n onSubmit: handleSubmit,\n }\n switch (state.value) {\n case 'initial':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.initialInputLabel}\n key=\"identifier-input\"\n id=\"identifier-input\"\n name=\"identifier\"\n />\n <Button disabled={loading} type=\"submit\">\n {messages.initialCtaButtonLabel}\n </Button>\n </form>\n )\n case 'signUp':\n return (\n <form\n ref={formRef}\n {...formProps}\n onInvalid={(e) => {\n e.preventDefault()\n }}\n >\n <TextField\n disabled={loading}\n label={messages.signUpPhoneInputLabel}\n key=\"phone-input\"\n id=\"phone-input\"\n name=\"phone\"\n onChange={checkFieldValidity}\n error={showPhoneErrorText}\n helperText={showPhoneErrorText && messages.signUpPhoneErrorText}\n inputProps={{\n required: signUpEmailValue ? false : true,\n }}\n defaultValue={state.context.phone}\n />\n <TextField\n disabled={loading}\n label={messages.signUpNameInputLabel}\n key=\"name-input\"\n id=\"name-input\"\n name=\"name\"\n inputProps={{ required: true }}\n />\n <TextField\n disabled={loading}\n label={messages.signUpEmailInputLabel}\n key=\"email-input\"\n id=\"email-input\"\n name=\"email\"\n error={showEmailErrorText}\n helperText={showEmailErrorText && messages.signUpEmailErrorText}\n onChange={checkFieldValidity}\n inputProps={{\n required: signUpPhoneValue ? false : true,\n type: 'email',\n }}\n defaultValue={state.context.email}\n />\n <TextField\n disabled={loading}\n select\n onChange={checkFieldValidity}\n label={messages.signUpLocationInputLabel}\n error={showLocationErrorText}\n helperText={showLocationErrorText && messages.signUpLocationErrorText}\n key=\"location-input\"\n id=\"location-input\"\n inputProps={{ required: true }}\n name=\"location\"\n >\n {locationOptions.map((locationOption) => (\n <MenuItem data-cy={'option'} key={locationOption.value} value={locationOption.value}>\n {locationOption.label}\n </MenuItem>\n ))}\n </TextField>\n <Typography style={{ alignSelf: 'start' }}>{messages.signUpBirthdaySectionLabel}</Typography>\n <TextField\n disabled={loading}\n label={messages.signUpMonthInputLabel}\n key=\"birthday-month-input\"\n id=\"birthday-month-input\"\n name=\"birthdayMonth\"\n />\n <TextField\n disabled={loading}\n label={messages.signUpDayInputLabel}\n key=\"birthday-date-input\"\n id=\"birthday-date-input\"\n name=\"birthdayDate\"\n />\n <Button disabled={loading || !formValidity} type=\"submit\">\n {messages.signUp}\n </Button>\n </form>\n )\n case 'emailFound':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.emailFoundInputLabel}\n key=\"email-input\"\n id=\"email-input\"\n name=\"email\"\n value={state.context.email}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.emailFoundCtaButtonLabel}\n </Button>\n </form>\n )\n case 'emailAuthCode':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.emailAuthCodeInputLabel}\n key=\"code-input\"\n id=\"code-input\"\n name=\"code\"\n />\n <Button disabled={loading} type=\"submit\">\n {messages.signIn}\n </Button>\n </form>\n )\n case 'indirectUserFound': {\n if (state.context.email) {\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.emailFoundInputLabel}\n key=\"email-input\"\n id=\"email-input\"\n name=\"email\"\n value={state.context.email}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.indirectUserFoundCtaButtonLabel}\n </Button>\n </form>\n )\n } else if (state.context.phone) {\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.phoneFoundInputLabel}\n key=\"phone-input\"\n id=\"phone-input\"\n name=\"phone\"\n value={state.context.phone}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.indirectUserFoundCtaButtonLabel}\n </Button>\n </form>\n )\n } else return null\n }\n case 'emailPasswordSignIn':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.emailFoundInputLabel}\n key=\"email-input\"\n id=\"email-input\"\n name=\"email\"\n value={state.context.email}\n InputLabelProps={{ shrink: true }}\n />\n <TextField\n disabled={loading}\n label={messages.passwordInputLabel}\n key=\"password-input\"\n id=\"password-input\"\n name=\"password\"\n inputProps={{ type: 'password' }}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.signIn}\n </Button>\n </form>\n )\n case 'phoneFound':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.phoneFoundInputLabel}\n key=\"phone-input\"\n id=\"phone-input\"\n name=\"phone\"\n value={state.context.phone}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.phoneFoundCtaButtonLabel}\n </Button>\n </form>\n )\n case 'phoneAuthCode':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.phoneAuthCodeInputLabel}\n key=\"code-input\"\n id=\"code-input\"\n name=\"code\"\n autoComplete=\"one-time-code\"\n />\n <Button disabled={loading} type=\"submit\">\n {messages.signIn}\n </Button>\n </form>\n )\n case 'phonePasswordSignIn':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.phoneFoundInputLabel}\n key=\"phone-input\"\n id=\"phone-input\"\n name=\"phone\"\n value={state.context.phone}\n InputLabelProps={{ shrink: true }}\n />\n <TextField\n disabled={loading}\n label={messages.passwordInputLabel}\n key=\"password-input\"\n id=\"password-input\"\n name=\"password\"\n inputProps={{ type: 'password' }}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.signIn}\n </Button>\n </form>\n )\n case 'requirePhone':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.requirePhoneInputLabel}\n key=\"phone-input\"\n id=\"phone-input\"\n name=\"phone\"\n value={state.context.phone}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.requirePhoneCtaButtonLabel}\n </Button>\n </form>\n )\n case 'welcome':\n return null\n default:\n return null\n }\n}\n"],"names":[],"mappings":";;;;;AAIA,IAAM,SAAS,GAAG,UAAU,CAAC,YAAA,EAAM,QAAC;AAClC,IAAA,IAAI,EAAE;AACJ,QAAA,OAAO,EAAE,M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AAI;AACb,QAAA;AACE,YAAA,OAAO,IAAI;AACd;AACH;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
2
|
import { IconProps } from './IconProps';
|
|
3
3
|
export declare const iconStaticClassName = "pop-icon";
|
|
4
|
-
export declare const Icon:
|
|
4
|
+
export declare const Icon: FunctionComponent<IconProps>;
|
|
@@ -1,28 +1,24 @@
|
|
|
1
1
|
import { __rest, __assign } from 'tslib';
|
|
2
|
+
import classNames from 'classnames';
|
|
2
3
|
import { createElement } from 'react';
|
|
3
4
|
import { useIconStyles } from './IconStyles.js';
|
|
4
|
-
import classNames from 'classnames';
|
|
5
5
|
|
|
6
6
|
var iconStaticClassName = 'pop-icon';
|
|
7
|
-
var Icon = function (
|
|
8
|
-
var icon =
|
|
7
|
+
var Icon = function (_a) {
|
|
8
|
+
var className = _a.className, _b = _a.color, color = _b === void 0 ? 'inherit' : _b, icon = _a.icon, _c = _a.size, size = _c === void 0 ? 'inherit' : _c, restProps = __rest(_a, ["className", "color", "icon", "size"]);
|
|
9
9
|
var hasAccessibleAttr = Boolean(restProps['aria-describedby'] || restProps['aria-label']);
|
|
10
10
|
if (!hasAccessibleAttr && restProps['aria-hidden'] === undefined) {
|
|
11
11
|
restProps['aria-hidden'] = true;
|
|
12
12
|
}
|
|
13
|
-
var classes = useIconStyles(
|
|
13
|
+
var classes = useIconStyles({ color: color, size: size });
|
|
14
14
|
var isValid = true;
|
|
15
15
|
if (!icon || (typeof icon === 'function' && icon({}) === undefined)) {
|
|
16
16
|
isValid = false;
|
|
17
17
|
}
|
|
18
18
|
return isValid
|
|
19
|
-
? createElement(icon, __assign({ className: classNames([classes.root, iconStaticClassName, className]) }, restProps))
|
|
19
|
+
? createElement(icon, __assign({ className: classNames([classes.root, iconStaticClassName, className]), color: color, width: undefined, height: undefined }, restProps))
|
|
20
20
|
: null;
|
|
21
21
|
};
|
|
22
|
-
Icon.defaultProps = {
|
|
23
|
-
size: 'inherit',
|
|
24
|
-
color: 'inherit',
|
|
25
|
-
};
|
|
26
22
|
Icon.displayName = 'Icon';
|
|
27
23
|
|
|
28
24
|
export { Icon, iconStaticClassName };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.js","sources":["../../../../src/components/Icon/Icon.tsx"],"sourcesContent":["import { createElement,
|
|
1
|
+
{"version":3,"file":"Icon.js","sources":["../../../../src/components/Icon/Icon.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { createElement, FunctionComponent } from 'react'\nimport { IconProps } from './IconProps'\nimport { useIconStyles } from './IconStyles'\n\nexport const iconStaticClassName = 'pop-icon'\nexport const Icon: FunctionComponent<IconProps> = ({\n className,\n color = 'inherit',\n icon,\n size = 'inherit',\n ...restProps\n}) => {\n const hasAccessibleAttr = Boolean(restProps['aria-describedby'] || restProps['aria-label'])\n if (!hasAccessibleAttr && restProps['aria-hidden'] === undefined) {\n restProps['aria-hidden'] = true\n }\n const classes = useIconStyles({ color, size })\n let isValid = true\n if (!icon || (typeof icon === 'function' && icon({}) === undefined)) {\n isValid = false\n }\n return isValid\n ? createElement(icon, {\n className: classNames([classes.root, iconStaticClassName, className]),\n color,\n width: undefined,\n height: undefined,\n ...restProps,\n })\n : null\n}\n\nIcon.displayName = 'Icon'\n"],"names":[],"mappings":";;;;;AAKO,IAAM,mBAAmB,GAAG;AAC5B,IAAM,IAAI,GAAiC,UAAC,EAMlD,EAAA;IALC,IAAA,SAAS,eAAA,EACT,EAAA,GAAA,EAAA,CAAA,KAAiB,EAAjB,KAAK,GAAA,EAAA,KAAA,MAAA,GAAG,SAAS,GAAA,EAAA,EACjB,IAAI,UAAA,EACJ,EAAA,GAAA,EAAA,CAAA,IAAgB,EAAhB,IAAI,GAAG,EAAA,KAAA,MAAA,GAAA,SAAS,KAAA,EACb,SAAS,GALqC,MAAA,CAAA,EAAA,EAAA,CAAA,WAAA,EAAA,OAAA,EAAA,MAAA,EAAA,MAAA,CAMlD,CADa;AAEZ,IAAA,IAAM,iBAAiB,GAAG,OAAO,CAAC,SAAS,CAAC,kBAAkB,CAAC,IAAI,SAAS,CAAC,YAAY,CAAC,CAAC;IAC3F,IAAI,CAAC,iBAAiB,IAAI,SAAS,CAAC,aAAa,CAAC,KAAK,SAAS,EAAE;AAChE,QAAA,SAAS,CAAC,aAAa,CAAC,GAAG,IAAI;AAChC;AACD,IAAA,IAAM,OAAO,GAAG,aAAa,CAAC,EAAE,KAAK,EAAA,KAAA,EAAE,IAAI,EAAA,IAAA,EAAE,CAAC;IAC9C,IAAI,OAAO,GAAG,IAAI;AAClB,IAAA,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,KAAK,UAAU,IAAI,IAAI,CAAC,EAAE,CAAC,KAAK,SAAS,CAAC,EAAE;QACnE,OAAO,GAAG,KAAK;AAChB;AACD,IAAA,OAAO;AACL,UAAE,aAAa,CAAC,IAAI,aAChB,SAAS,EAAE,UAAU,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,mBAAmB,EAAE,SAAS,CAAC,CAAC,EACrE,KAAK,EAAA,KAAA,EACL,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE,SAAS,EAAA,EACd,SAAS,CACZ;UACF,IAAI;AACV;AAEA,IAAI,CAAC,WAAW,GAAG,MAAM;;;;"}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import { IconProps } from './IconProps';
|
|
2
|
-
|
|
2
|
+
declare type StyleProps = Pick<IconProps, 'color' | 'size'>;
|
|
3
|
+
export declare const useIconStyles: (props: StyleProps) => import("@material-ui/styles").ClassNameMap<string>;
|
|
4
|
+
export {};
|
|
@@ -11,7 +11,9 @@ var useIconStyles = makeStyles(function (_a) {
|
|
|
11
11
|
large: spacing(2.5),
|
|
12
12
|
'extra-large': spacing(3),
|
|
13
13
|
};
|
|
14
|
-
|
|
14
|
+
if (!size || !sizes[size])
|
|
15
|
+
return 'inherit';
|
|
16
|
+
return sizes[size];
|
|
15
17
|
};
|
|
16
18
|
var getColor = function (props) {
|
|
17
19
|
var semanticColors = ['primary', 'secondary', 'info', 'success', 'warning', 'error'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconStyles.js","sources":["../../../../src/components/Icon/IconStyles.ts"],"sourcesContent":["import { makeStyles, Theme } from '@material-ui/core'\nimport { IconProps } from './IconProps'\n\nexport const useIconStyles = makeStyles<Theme,
|
|
1
|
+
{"version":3,"file":"IconStyles.js","sources":["../../../../src/components/Icon/IconStyles.ts"],"sourcesContent":["import { makeStyles, Theme } from '@material-ui/core'\nimport { IconProps } from './IconProps'\n\ntype StyleProps = Pick<IconProps, 'color' | 'size'>\n\nexport const useIconStyles = makeStyles<Theme, StyleProps>(({ spacing, palette }) => {\n const getFontSize = ({ size }: StyleProps) => {\n const sizes = {\n inherit: 'inherit',\n small: spacing(1.5),\n medium: spacing(2),\n large: spacing(2.5),\n 'extra-large': spacing(3),\n }\n if (!size || !sizes[size]) return 'inherit'\n return sizes[size]\n }\n\n const getColor = (props: StyleProps) => {\n const semanticColors = ['primary', 'secondary', 'info', 'success', 'warning', 'error']\n let value = 'inherit'\n if (props.color) {\n if (semanticColors.includes(props.color.split('.')[0])) {\n const [color, variant = 'main'] = props.color.split('.')\n // @ts-expect-error - todo.\n value = palette[color][variant]\n } else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {\n value = props.color\n }\n }\n return value\n }\n\n return {\n root: {\n color: getColor,\n fontSize: getFontSize,\n width: '1em',\n height: '1em',\n strokeWidth: '1.3px',\n },\n }\n})\n"],"names":[],"mappings":";;AAKa,IAAA,aAAa,GAAG,UAAU,CAAoB,UAAC,EAAoB,EAAA;QAAlB,OAAO,GAAA,EAAA,CAAA,OAAA,EAAE,OAAO,GAAA,EAAA,CAAA,OAAA;IAC5E,IAAM,WAAW,GAAG,UAAC,EAAoB,EAAA;AAAlB,QAAA,IAAA,IAAI,GAAA,EAAA,CAAA,IAAA;AACzB,QAAA,IAAM,KAAK,GAA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;AACf,YAAA,QAAQ,EAAE,WAAW;AACrB,YAAA,KAAK,EAAE,KAAK;AACZ,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,WAAW,EAAE,OAAO;AACrB,SAAA;KACF;AACH,CAAC;;;;"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IconButtonProps } from './IconButtonProps';
|
|
3
|
-
export declare const IconButton: React.ForwardRefExoticComponent<Pick<IconButtonProps, "color" | "
|
|
3
|
+
export declare const IconButton: React.ForwardRefExoticComponent<Pick<IconButtonProps, "color" | "size" | "aria-describedby" | "aria-hidden" | "aria-label" | "translate" | "hidden" | "disabled" | "children" | "form" | "slot" | "title" | "id" | "lang" | "name" | "type" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "action" | "disableFocusRipple" | "buttonRef" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "onFocusVisible" | "TouchRippleProps" | "edge" | keyof import("@material-ui/core/OverridableComponent").CommonProps<import("@material-ui/core").IconButtonTypeMap<{}, "button">>> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -3,4 +3,4 @@ import { PaperProps as MuiPaperProps } from '@material-ui/core';
|
|
|
3
3
|
export interface PaperProps extends MuiPaperProps {
|
|
4
4
|
legacyStyles?: boolean;
|
|
5
5
|
}
|
|
6
|
-
export declare const Paper: React.ForwardRefExoticComponent<Pick<PaperProps, "color" | "
|
|
6
|
+
export declare const Paper: React.ForwardRefExoticComponent<Pick<PaperProps, "color" | "aria-describedby" | "aria-hidden" | "aria-label" | "className" | "translate" | "hidden" | "style" | "square" | "variant" | "children" | "slot" | "title" | "id" | "lang" | "role" | "tabIndex" | "elevation" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "classes" | "innerRef" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "component" | "legacyStyles"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RadioProps } from './RadioProps';
|
|
3
|
-
export declare const Radio: React.ForwardRefExoticComponent<Pick<RadioProps, "color" | "
|
|
3
|
+
export declare const Radio: React.ForwardRefExoticComponent<Pick<RadioProps, "color" | "size" | "aria-describedby" | "aria-hidden" | "aria-label" | "className" | "icon" | "translate" | "hidden" | "style" | "disabled" | "form" | "label" | "slot" | "title" | "id" | "lang" | "name" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "classes" | "innerRef" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "readOnly" | "required" | "checked" | "action" | "disableFocusRipple" | "buttonRef" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "onFocusVisible" | "TouchRippleProps" | "checkedIcon" | "edge" | "inputProps" | "inputRef" | "LabelProps"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -4,18 +4,14 @@ import { Box, TextField } from '@material-ui/core';
|
|
|
4
4
|
import { Button } from '../Button/Button.js';
|
|
5
5
|
import { useSplitInputStyles } from './SplitInputStyles.js';
|
|
6
6
|
|
|
7
|
-
var SplitInput = function (
|
|
8
|
-
var
|
|
9
|
-
var classes = useSplitInputStyles(
|
|
7
|
+
var SplitInput = function (_a) {
|
|
8
|
+
var ButtonProps = _a.ButtonProps, TextFieldProps = _a.TextFieldProps, _b = _a.backgroundTransparency, backgroundTransparency = _b === void 0 ? true : _b, buttonLabel = _a.buttonLabel, _c = _a.color, color = _c === void 0 ? 'primary' : _c, inputTextColor = _a.inputTextColor, onChange = _a.onChange, onClick = _a.onClick;
|
|
9
|
+
var classes = useSplitInputStyles({ backgroundTransparency: backgroundTransparency, inputTextColor: inputTextColor });
|
|
10
10
|
return (React.createElement(Box, { display: "flex" },
|
|
11
11
|
React.createElement(TextField, __assign({ classes: { root: classes.textfield }, InputProps: { classes: { root: classes.input, focused: classes.focused } }, color: color, variant: "outlined", onChange: onChange }, TextFieldProps)),
|
|
12
12
|
React.createElement(Button, __assign({ classes: { root: classes.button }, disableElevation: true, color: color, variant: "contained", onClick: onClick }, ButtonProps), buttonLabel)));
|
|
13
13
|
};
|
|
14
14
|
SplitInput.displayName = 'SplitInput';
|
|
15
|
-
SplitInput.defaultProps = {
|
|
16
|
-
backgroundTransparency: true,
|
|
17
|
-
color: 'primary',
|
|
18
|
-
};
|
|
19
15
|
|
|
20
16
|
export { SplitInput };
|
|
21
17
|
//# sourceMappingURL=SplitInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SplitInput.js","sources":["../../../../src/components/SplitInput/SplitInput.tsx"],"sourcesContent":["import React, { FC } from 'react'\n\nimport { Box, TextField } from '@material-ui/core'\nimport { Button } from '../Button'\nimport { SplitInputProps } from './SplitInputProps'\nimport { useSplitInputStyles } from './SplitInputStyles'\n\nexport const SplitInput: FC<SplitInputProps> = (
|
|
1
|
+
{"version":3,"file":"SplitInput.js","sources":["../../../../src/components/SplitInput/SplitInput.tsx"],"sourcesContent":["import React, { FC } from 'react'\n\nimport { Box, TextField } from '@material-ui/core'\nimport { Button } from '../Button'\nimport { SplitInputProps } from './SplitInputProps'\nimport { useSplitInputStyles } from './SplitInputStyles'\n\nexport const SplitInput: FC<SplitInputProps> = ({\n ButtonProps,\n TextFieldProps,\n backgroundTransparency = true,\n buttonLabel,\n color = 'primary',\n inputTextColor,\n onChange,\n onClick,\n}) => {\n const classes = useSplitInputStyles({ backgroundTransparency, inputTextColor })\n return (\n <Box display=\"flex\">\n <TextField\n classes={{ root: classes.textfield }}\n InputProps={{ classes: { root: classes.input, focused: classes.focused } }}\n color={color}\n variant=\"outlined\"\n onChange={onChange}\n {...TextFieldProps}\n />\n <Button\n classes={{ root: classes.button }}\n disableElevation\n color={color}\n variant=\"contained\"\n onClick={onClick}\n {...ButtonProps}\n >\n {buttonLabel}\n </Button>\n </Box>\n )\n}\n\nSplitInput.displayName = 'SplitInput'\n"],"names":[],"mappings":";;;;;;AAOO,IAAM,UAAU,GAAwB,UAAC,EAS/C,EAAA;AARC,IAAA,IAAA,WAAW,GAAA,EAAA,CAAA,WAAA,EACX,cAAc,GAAA,EAAA,CAAA,cAAA,EACd,EAAA,GAAA,EAAA,CAAA,sBAA6B,EAA7B,sBAAsB,GAAG,EAAA,KAAA,MAAA,GAAA,IAAI,GAAA,EAAA,EAC7B,WAAW,GAAA,EAAA,CAAA,WAAA,EACX,EAAA,GAAA,EAAA,CAAA,KAAiB,EAAjB,KAAK,GAAG,EAAA,KAAA,MAAA,GAAA,SAAS,GAAA,EAAA,EACjB,cAAc,GAAA,EAAA,CAAA,cAAA,EACd,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,OAAO,GAAA,EAAA,CAAA,OAAA;AAEP,IAAA,IAAM,OAAO,GAAG,mBAAmB,CAAC,EAAE,sBAAsB,EAAA,sBAAA,EAAE,cAAc,EAAA,cAAA,EAAE,CAAC;AAC/E,IAAA,QACE,KAAC,CAAA,aAAA,CAAA,GAAG,EAAC,EAAA,OAAO,EAAC,MAAM,EAAA;QACjB,KAAC,CAAA,aAAA,CAAA,SAAS,aACR,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,SAAS,EAAE,EACpC,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,EAAE,EAC1E,KAAK,EAAE,KAAK,EACZ,OAAO,EAAC,UAAU,EAClB,QAAQ,EAAE,QAAQ,EACd,EAAA,cAAc,CAClB,CAAA;AACF,QAAA,KAAA,CAAA,aAAA,CAAC,MAAM,EAAA,QAAA,CAAA,EACL,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,MAAM,EAAE,EACjC,gBAAgB,QAChB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,OAAO,EACZ,EAAA,WAAW,CAEd,EAAA,WAAW,CACL,CACL;AAEV;AAEA,UAAU,CAAC,WAAW,GAAG,YAAY;;;;"}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import { SplitInputProps } from './SplitInputProps';
|
|
2
|
-
|
|
2
|
+
declare type StyleProps = Pick<SplitInputProps, 'backgroundTransparency' | 'inputTextColor'>;
|
|
3
|
+
export declare const useSplitInputStyles: (props: StyleProps) => import("@material-ui/styles").ClassNameMap<string>;
|
|
4
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SplitInputStyles.js","sources":["../../../../src/components/SplitInput/SplitInputStyles.ts"],"sourcesContent":["import { makeStyles, Theme } from '@material-ui/core'\n\nimport { SplitInputProps } from './SplitInputProps'\n\nexport const useSplitInputStyles = makeStyles<Theme,
|
|
1
|
+
{"version":3,"file":"SplitInputStyles.js","sources":["../../../../src/components/SplitInput/SplitInputStyles.ts"],"sourcesContent":["import { makeStyles, Theme } from '@material-ui/core'\n\nimport { SplitInputProps } from './SplitInputProps'\n\ntype StyleProps = Pick<SplitInputProps, 'backgroundTransparency' | 'inputTextColor'>\n\nexport const useSplitInputStyles = makeStyles<Theme, StyleProps>(() => ({\n textfield: {\n background: (props) => (props.backgroundTransparency ? '#FFFFFF44' : 'none'),\n borderTopLeftRadius: 4,\n borderBottomLeftRadius: 4,\n '& fieldset': {\n borderRight: 'none',\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n },\n },\n button: {\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n alignSelf: 'stretch',\n },\n input: {\n color: (props) => props.inputTextColor || 'inherit',\n '&$focused fieldset': {\n top: -4,\n },\n },\n focused: {},\n}))\n"],"names":[],"mappings":";;IAMa,mBAAmB,GAAG,UAAU,CAAoB,YAAA,EAAM,QAAC;AACtE,IAAA,SAAS,EAAE;AACT,QAAA,UAAU,EAAE,UAAC,KAAK,IAAK,QAAC,KAAK,CAAC,sBAAsB,GAAG,WAAW,GAAG,MAAM,IAAC;AAC5E,QAAA,mBAAmB,EAAE,CAAC;AACtB,QAAA,sBAAsB,EAAE,CAAC;AACzB,QAAA,YAAY,EAAE;AACZ,YAAA,WAAW,EAAE,MAAM;AACnB,YAAA,oBAAoB,EAAE,CAAC;AACvB,YAAA,uBAAuB,EAAE,CAAC;AAC3B,SAAA;AACF,KAAA;AACD,IAAA,MAAM,EAAE;AACN,QAAA,mBAAmB,EAAE,CAAC;AACtB,QAAA,sBAAsB,EAAE,CAAC;AACzB,QAAA,SAAS,EAAE,SAAS;AACrB,KAAA;AACD,IAAA,KAAK,EAAE;QACL,KAAK,EAAE,UAAC,KAAK,EAAK,EAAA,OAAA,KAAK,CAAC,cAAc,IAAI,SAAS,CAAA,EAAA;AACnD,QAAA,oBAAoB,EAAE;YACpB,GAAG,EAAE,EAAE;AACR,SAAA;AACF,KAAA;AACD,IAAA,OAAO,EAAE,EAAE;CACZ,EAAC,EAAA;;;;"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SwitchProps } from './SwitchProps';
|
|
3
|
-
export declare const Switch: React.ForwardRefExoticComponent<Pick<SwitchProps, "color" | "
|
|
3
|
+
export declare const Switch: React.ForwardRefExoticComponent<Pick<SwitchProps, "color" | "size" | "aria-describedby" | "aria-hidden" | "aria-label" | "className" | "icon" | "translate" | "hidden" | "style" | "disabled" | "form" | "label" | "slot" | "title" | "id" | "lang" | "name" | "type" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "classes" | "innerRef" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "readOnly" | "required" | "checked" | "action" | "disableFocusRipple" | "buttonRef" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "onFocusVisible" | "TouchRippleProps" | "checkedIcon" | "edge" | "inputProps" | "inputRef" | "LabelProps"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ToggleButtonProps } from './ToggleButtonProps';
|
|
3
|
-
export declare const ToggleButton: React.ForwardRefExoticComponent<Pick<ToggleButtonProps, "color" | "
|
|
3
|
+
export declare const ToggleButton: React.ForwardRefExoticComponent<Pick<ToggleButtonProps, "color" | "size" | "aria-describedby" | "aria-hidden" | "aria-label" | "className" | "translate" | "hidden" | "style" | "disabled" | "children" | "form" | "slot" | "title" | "id" | "lang" | "name" | "type" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "classes" | "innerRef" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "action" | "selected" | "disableFocusRipple" | "buttonRef" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "onFocusVisible" | "TouchRippleProps"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ToggleButtonGroupProps } from './ToggleButtonGroupProps';
|
|
3
|
-
export declare const ToggleButtonGroup: React.ForwardRefExoticComponent<Pick<ToggleButtonGroupProps, "color" | "
|
|
3
|
+
export declare const ToggleButtonGroup: React.ForwardRefExoticComponent<Pick<ToggleButtonGroupProps, "color" | "size" | "aria-describedby" | "aria-hidden" | "aria-label" | "className" | "translate" | "hidden" | "style" | "children" | "slot" | "title" | "id" | "lang" | "role" | "tabIndex" | "orientation" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "classes" | "innerRef" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "value" | "exclusive"> & React.RefAttributes<HTMLDivElement>>;
|