@aws-amplify/ui 4.1.0 → 5.1.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/esm/helpers/authenticator/constants.js +1 -1
- package/dist/esm/helpers/authenticator/facade.js +1 -1
- package/dist/esm/helpers/authenticator/textUtil.js +1 -0
- package/dist/esm/helpers/authenticator/utils.js +1 -1
- package/dist/esm/i18n/dictionaries/authenticator/defaultTexts.js +1 -1
- package/dist/esm/i18n/dictionaries/authenticator/en.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/machines/authenticator/actors/signIn.js +1 -1
- package/dist/esm/machines/authenticator/defaultServices.js +1 -1
- package/dist/esm/machines/authenticator/index.js +1 -1
- package/dist/esm/machines/authenticator/signUp.js +1 -1
- package/dist/esm/theme/createTheme.js +1 -1
- package/dist/esm/theme/defaultDarkModeOverride.js +1 -1
- package/dist/esm/theme/tokens/components/fieldControl.js +1 -1
- package/dist/esm/theme/tokens/components/inAppMessaging.js +1 -0
- package/dist/esm/theme/tokens/components/index.js +1 -1
- package/dist/esm/theme/tokens/index.js +1 -1
- package/dist/esm/theme/utils.js +1 -1
- package/dist/esm/types/authenticator/user.js +1 -1
- package/dist/esm/types/authenticator/utils.js +1 -0
- package/dist/esm/types/primitives/componentClassName.js +1 -1
- package/dist/index.js +1 -1
- package/dist/styles.css +1164 -977
- package/dist/theme.css +983 -978
- package/dist/types/helpers/authenticator/facade.d.ts +1 -1
- package/dist/types/helpers/authenticator/index.d.ts +1 -0
- package/dist/types/helpers/authenticator/textUtil.d.ts +47 -0
- package/dist/types/helpers/authenticator/utils.d.ts +7 -3
- package/dist/types/i18n/dictionaries/authenticator/defaultTexts.d.ts +2 -1
- package/dist/types/i18n/dictionaries/index.d.ts +2 -1
- package/dist/types/i18n/translations.d.ts +2 -1
- package/dist/types/machines/authenticator/defaultServices.d.ts +2 -1
- package/dist/types/theme/createTheme.d.ts +2 -2
- package/dist/types/theme/defaultDarkModeOverride.d.ts +2 -0
- package/dist/types/theme/defaultTheme.d.ts +2 -2
- package/dist/types/theme/index.d.ts +3 -2
- package/dist/types/theme/tokens/borderWidths.d.ts +5 -19
- package/dist/types/theme/tokens/colors.d.ts +36 -75
- package/dist/types/theme/tokens/components/alert.d.ts +14 -27
- package/dist/types/theme/tokens/components/authenticator.d.ts +26 -46
- package/dist/types/theme/tokens/components/autocomplete.d.ts +12 -41
- package/dist/types/theme/tokens/components/badge.d.ts +15 -28
- package/dist/types/theme/tokens/components/button.d.ts +39 -82
- package/dist/types/theme/tokens/components/card.d.ts +7 -14
- package/dist/types/theme/tokens/components/checkbox.d.ts +27 -80
- package/dist/types/theme/tokens/components/checkboxField.d.ts +3 -8
- package/dist/types/theme/tokens/components/collection.d.ts +20 -28
- package/dist/types/theme/tokens/components/copy.d.ts +8 -20
- package/dist/types/theme/tokens/components/dialCodeSelect.d.ts +3 -5
- package/dist/types/theme/tokens/components/divider.d.ts +8 -20
- package/dist/types/theme/tokens/components/expander.d.ts +21 -68
- package/dist/types/theme/tokens/components/field.d.ts +8 -16
- package/dist/types/theme/tokens/components/fieldControl.d.ts +22 -71
- package/dist/types/theme/tokens/components/fieldGroup.d.ts +6 -14
- package/dist/types/theme/tokens/components/fieldMessages.d.ts +6 -16
- package/dist/types/theme/tokens/components/flex.d.ts +3 -9
- package/dist/types/theme/tokens/components/heading.d.ts +5 -16
- package/dist/types/theme/tokens/components/highlightMatch.d.ts +5 -9
- package/dist/types/theme/tokens/components/icon.d.ts +3 -6
- package/dist/types/theme/tokens/components/image.d.ts +3 -8
- package/dist/types/theme/tokens/components/inAppMessaging.d.ts +13 -0
- package/dist/types/theme/tokens/components/index.d.ts +59 -48
- package/dist/types/theme/tokens/components/link.d.ts +4 -12
- package/dist/types/theme/tokens/components/loader.d.ts +14 -39
- package/dist/types/theme/tokens/components/menu.d.ts +8 -26
- package/dist/types/theme/tokens/components/pagination.d.ts +12 -48
- package/dist/types/theme/tokens/components/passwordField.d.ts +12 -14
- package/dist/types/theme/tokens/components/phoneNumberField.d.ts +4 -9
- package/dist/types/theme/tokens/components/placeholder.d.ts +8 -14
- package/dist/types/theme/tokens/components/radio.d.ts +21 -72
- package/dist/types/theme/tokens/components/radioGroup.d.ts +8 -17
- package/dist/types/theme/tokens/components/rating.d.ts +9 -19
- package/dist/types/theme/tokens/components/searchField.d.ts +12 -15
- package/dist/types/theme/tokens/components/select.d.ts +11 -35
- package/dist/types/theme/tokens/components/selectField.d.ts +6 -14
- package/dist/types/theme/tokens/components/sliderField.d.ts +20 -61
- package/dist/types/theme/tokens/components/stepperField.d.ts +11 -23
- package/dist/types/theme/tokens/components/switchField.d.ts +20 -54
- package/dist/types/theme/tokens/components/table.d.ts +24 -60
- package/dist/types/theme/tokens/components/tabs.d.ts +12 -43
- package/dist/types/theme/tokens/components/text.d.ts +6 -15
- package/dist/types/theme/tokens/components/textAreaField.d.ts +6 -10
- package/dist/types/theme/tokens/components/textField.d.ts +5 -12
- package/dist/types/theme/tokens/components/toggleButton.d.ts +30 -115
- package/dist/types/theme/tokens/components/toggleButtonGroup.d.ts +5 -7
- package/dist/types/theme/tokens/fontSizes.d.ts +5 -17
- package/dist/types/theme/tokens/fontWeights.d.ts +5 -16
- package/dist/types/theme/tokens/fonts.d.ts +7 -12
- package/dist/types/theme/tokens/index.d.ts +58 -48
- package/dist/types/theme/tokens/lineHeights.d.ts +5 -10
- package/dist/types/theme/tokens/opacities.d.ts +5 -18
- package/dist/types/theme/tokens/outlineOffsets.d.ts +5 -10
- package/dist/types/theme/tokens/outlineWidths.d.ts +5 -10
- package/dist/types/theme/tokens/radii.d.ts +5 -14
- package/dist/types/theme/tokens/shadows.d.ts +5 -10
- package/dist/types/theme/tokens/space.d.ts +8 -25
- package/dist/types/theme/tokens/time.d.ts +5 -10
- package/dist/types/theme/tokens/transforms.d.ts +7 -13
- package/dist/types/theme/tokens/types/designToken.d.ts +161 -20
- package/dist/types/theme/types.d.ts +7 -8
- package/dist/types/theme/utils.d.ts +30 -2
- package/dist/types/types/authenticator/index.d.ts +1 -0
- package/dist/types/types/authenticator/stateMachine/authMachine.d.ts +5 -1
- package/dist/types/types/authenticator/stateMachine/event.d.ts +1 -1
- package/dist/types/types/authenticator/user.d.ts +7 -0
- package/dist/types/types/authenticator/utils.d.ts +1 -0
- package/dist/types/types/primitives/componentClassName.d.ts +1 -0
- package/package.json +9 -6
- package/dist/esm/theme/tokens/types/designToken.js +0 -1
- package/dist/types/theme/tokens/types/scales.d.ts +0 -13
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { Sender } from 'xstate';
|
|
7
7
|
import { AuthEvent, AuthEventData, AuthMachineState, CodeDeliveryDetails, AmplifyUser, ValidationError, SocialProvider, UnverifiedContactMethods } from '../../types';
|
|
8
|
-
export declare type AuthenticatorRoute = 'authenticated' | '
|
|
8
|
+
export declare type AuthenticatorRoute = 'authenticated' | 'confirmResetPassword' | 'confirmSignIn' | 'confirmSignUp' | 'confirmVerifyUser' | 'forceNewPassword' | 'idle' | 'resetPassword' | 'setup' | 'signOut' | 'setupTOTP' | 'signIn' | 'signUp' | 'transition' | 'verifyUser';
|
|
9
9
|
declare type AuthenticatorValidationErrors = ValidationError;
|
|
10
10
|
declare type AuthStatus = 'configuring' | 'authenticated' | 'unauthenticated';
|
|
11
11
|
interface AuthenticatorServiceContextFacade {
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { AuthChallengeName, CodeDeliveryDetails, SocialProvider } from '../../types';
|
|
2
|
+
import { AuthenticatorRoute } from './facade';
|
|
3
|
+
export declare const authenticatorTextUtil: {
|
|
4
|
+
/** Shared */
|
|
5
|
+
readonly getBackToSignInText: () => string;
|
|
6
|
+
readonly getChangePasswordText: () => string;
|
|
7
|
+
readonly getChangingText: () => string;
|
|
8
|
+
readonly getConfirmText: () => string;
|
|
9
|
+
readonly getConfirmingText: () => string;
|
|
10
|
+
readonly getCopyText: () => string;
|
|
11
|
+
readonly getHidePasswordText: () => string;
|
|
12
|
+
readonly getLoadingText: () => string;
|
|
13
|
+
readonly getResendCodeText: () => string;
|
|
14
|
+
readonly getSendCodeText: () => string;
|
|
15
|
+
readonly getSendingText: () => string;
|
|
16
|
+
readonly getShowPasswordText: () => string;
|
|
17
|
+
readonly getSubmitText: () => string;
|
|
18
|
+
readonly getSubmittingText: () => string;
|
|
19
|
+
/** SignInSignUpTabs */
|
|
20
|
+
readonly getSignInTabText: () => string;
|
|
21
|
+
readonly getSignUpTabText: () => string;
|
|
22
|
+
/** SignIn */
|
|
23
|
+
readonly getForgotPasswordText: (shortVersion?: boolean) => string;
|
|
24
|
+
readonly getSigningInText: () => string;
|
|
25
|
+
readonly getSignInText: () => string;
|
|
26
|
+
/** SignUp */
|
|
27
|
+
readonly getCreatingAccountText: () => string;
|
|
28
|
+
readonly getCreateAccountText: () => string;
|
|
29
|
+
/** ConfirmSignUp */
|
|
30
|
+
readonly getDeliveryMessageText: (codeDeliveryDetails: CodeDeliveryDetails) => string;
|
|
31
|
+
readonly getDeliveryMethodText: (codeDeliveryDetails: CodeDeliveryDetails) => string;
|
|
32
|
+
/** ConfirmSignIn */
|
|
33
|
+
readonly getChallengeText: (challengeName: AuthChallengeName) => string;
|
|
34
|
+
/** ResetPassword */
|
|
35
|
+
readonly getResetYourPasswordText: () => string;
|
|
36
|
+
/** SetupTOTP */
|
|
37
|
+
readonly getSetupTOTPText: () => string;
|
|
38
|
+
readonly getSetupTOTPInstructionsText: () => string;
|
|
39
|
+
readonly getCopiedText: () => string;
|
|
40
|
+
/** FederatedSignIn */
|
|
41
|
+
readonly getSignInWithFederationText: (route: AuthenticatorRoute, provider: SocialProvider) => string;
|
|
42
|
+
/** VerifyUser */
|
|
43
|
+
readonly getSkipText: () => string;
|
|
44
|
+
readonly getVerifyText: () => string;
|
|
45
|
+
readonly getVerifyContactText: () => string;
|
|
46
|
+
readonly getAccountRecoveryInfoText: () => string;
|
|
47
|
+
};
|
|
@@ -2,10 +2,14 @@
|
|
|
2
2
|
* This file contains general helpers that state machine or authenticator
|
|
3
3
|
* implementations can use.
|
|
4
4
|
*/
|
|
5
|
-
import { AuthInterpreter,
|
|
5
|
+
import { AuthInterpreter, AuthMachineHubHandler } from '../../types';
|
|
6
6
|
export declare const censorAllButFirstAndLast: (value: string) => string;
|
|
7
7
|
export declare const censorPhoneNumber: (val: string) => string;
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Handles Amplify JS Auth hub events, by forwarding hub events as appropriate
|
|
10
|
+
* xstate events.
|
|
11
|
+
*/
|
|
12
|
+
export declare const defaultAuthHubHandler: AuthMachineHubHandler;
|
|
9
13
|
/**
|
|
10
14
|
* Listens to external auth Hub events and sends corresponding event to
|
|
11
15
|
* the `authService` of interest
|
|
@@ -14,6 +18,6 @@ export declare const defaultAuthHubHandler: HubHandler;
|
|
|
14
18
|
*
|
|
15
19
|
* @returns function that unsubscribes to the hub evenmt
|
|
16
20
|
*/
|
|
17
|
-
export declare const listenToAuthHub: (service: AuthInterpreter, handler?:
|
|
21
|
+
export declare const listenToAuthHub: (service: AuthInterpreter, handler?: AuthMachineHubHandler) => () => void;
|
|
18
22
|
export declare const hasSpecialChars: (password: string) => boolean;
|
|
19
23
|
export declare const getTotpCodeURL: (issuer: string, username: string, secret: string) => string;
|
|
@@ -19,8 +19,8 @@ export declare const defaultTexts: {
|
|
|
19
19
|
ENTER_USERNAME: string;
|
|
20
20
|
FAMILY_NAME: string;
|
|
21
21
|
GIVEN_NAME: string;
|
|
22
|
+
FORGOT_PASSWORD: string;
|
|
22
23
|
FORGOT_YOUR_PASSWORD: string;
|
|
23
|
-
FORGOT_YOUR_PASSWORD_LEGACY: string;
|
|
24
24
|
HIDE_PASSWORD: string;
|
|
25
25
|
LOADING: string;
|
|
26
26
|
LOGIN_NAME: string;
|
|
@@ -51,6 +51,7 @@ export declare const defaultTexts: {
|
|
|
51
51
|
SKIP: string;
|
|
52
52
|
SUBMIT: string;
|
|
53
53
|
SUBMITTING: string;
|
|
54
|
+
UPPERCASE_COPY: string;
|
|
54
55
|
VERIFY_CONTACT: string;
|
|
55
56
|
VERIFY_HEADING: string;
|
|
56
57
|
VERIFY: string;
|
|
@@ -799,8 +799,8 @@ export declare const defaultTexts: {
|
|
|
799
799
|
ENTER_USERNAME: string;
|
|
800
800
|
FAMILY_NAME: string;
|
|
801
801
|
GIVEN_NAME: string;
|
|
802
|
+
FORGOT_PASSWORD: string;
|
|
802
803
|
FORGOT_YOUR_PASSWORD: string;
|
|
803
|
-
FORGOT_YOUR_PASSWORD_LEGACY: string;
|
|
804
804
|
HIDE_PASSWORD: string;
|
|
805
805
|
LOADING: string;
|
|
806
806
|
LOGIN_NAME: string;
|
|
@@ -831,6 +831,7 @@ export declare const defaultTexts: {
|
|
|
831
831
|
SKIP: string;
|
|
832
832
|
SUBMIT: string;
|
|
833
833
|
SUBMITTING: string;
|
|
834
|
+
UPPERCASE_COPY: string;
|
|
834
835
|
VERIFY_CONTACT: string;
|
|
835
836
|
VERIFY_HEADING: string;
|
|
836
837
|
VERIFY: string;
|
|
@@ -31,8 +31,8 @@ export declare const DefaultTexts: {
|
|
|
31
31
|
readonly ENTER_USERNAME: string;
|
|
32
32
|
readonly FAMILY_NAME: string;
|
|
33
33
|
readonly GIVEN_NAME: string;
|
|
34
|
+
readonly FORGOT_PASSWORD: string;
|
|
34
35
|
readonly FORGOT_YOUR_PASSWORD: string;
|
|
35
|
-
readonly FORGOT_YOUR_PASSWORD_LEGACY: string;
|
|
36
36
|
readonly HIDE_PASSWORD: string;
|
|
37
37
|
readonly LOADING: string;
|
|
38
38
|
readonly LOGIN_NAME: string;
|
|
@@ -63,6 +63,7 @@ export declare const DefaultTexts: {
|
|
|
63
63
|
readonly SKIP: string;
|
|
64
64
|
readonly SUBMIT: string;
|
|
65
65
|
readonly SUBMITTING: string;
|
|
66
|
+
readonly UPPERCASE_COPY: string;
|
|
66
67
|
readonly VERIFY_CONTACT: string;
|
|
67
68
|
readonly VERIFY_HEADING: string;
|
|
68
69
|
readonly VERIFY: string;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
/// <reference types="amazon-cognito-identity-js" />
|
|
1
2
|
import { AuthChallengeName, PasswordSettings, SignInResult, ValidatorResult } from '../../types';
|
|
2
3
|
export declare const defaultServices: {
|
|
3
4
|
getAmplifyConfig(): Promise<{}>;
|
|
4
5
|
getCurrentUser(): Promise<any>;
|
|
5
|
-
handleSignUp(formData: any): Promise<
|
|
6
|
+
handleSignUp(formData: any): Promise<import("amazon-cognito-identity-js").ISignUpResult>;
|
|
6
7
|
handleSignIn({ username, password, }: {
|
|
7
8
|
username: string;
|
|
8
9
|
password: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Theme,
|
|
1
|
+
import { Theme, DefaultTheme, WebTheme } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* This will be used like `const myTheme = createTheme({})`
|
|
4
4
|
* `myTheme` can then be passed to a Provider or the generated CSS
|
|
@@ -6,4 +6,4 @@ import { Theme, BaseTheme, WebTheme } from './types';
|
|
|
6
6
|
* const myTheme = createTheme({})
|
|
7
7
|
* const myOtherTheme = createTheme({}, myTheme);
|
|
8
8
|
*/
|
|
9
|
-
export declare function createTheme(theme?: Theme,
|
|
9
|
+
export declare function createTheme(theme?: Theme, DefaultTheme?: DefaultTheme | WebTheme): WebTheme;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ColorModeOverride } from './types';
|
|
2
|
+
import { ReactNativeTokens } from './tokens';
|
|
2
3
|
/**
|
|
3
4
|
* A basic dark mode that just flips the base color
|
|
4
5
|
* palette.
|
|
5
6
|
*/
|
|
6
7
|
export declare const defaultDarkModeOverride: ColorModeOverride;
|
|
8
|
+
export declare const reactNativeDarkTokens: ReactNativeTokens<'optional'>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const defaultTheme:
|
|
1
|
+
import { DefaultTheme } from './types';
|
|
2
|
+
export declare const defaultTheme: DefaultTheme;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { createTheme } from './createTheme';
|
|
2
2
|
export { defaultTheme } from './defaultTheme';
|
|
3
|
-
export { defaultDarkModeOverride } from './defaultDarkModeOverride';
|
|
3
|
+
export { defaultDarkModeOverride, reactNativeDarkTokens, } from './defaultDarkModeOverride';
|
|
4
|
+
export { reactNativeTokens, ReactNativeTokens } from './tokens';
|
|
4
5
|
export * from './types';
|
|
5
|
-
export { cssNameTransform } from './utils';
|
|
6
|
+
export { cssNameTransform, isDesignToken, setupTokens, SetupToken, } from './utils';
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
small: DesignToken<BorderWidthValue>;
|
|
7
|
-
/**
|
|
8
|
-
* Medium border, used for
|
|
9
|
-
*/
|
|
10
|
-
medium: DesignToken<BorderWidthValue>;
|
|
11
|
-
/**
|
|
12
|
-
* Large border
|
|
13
|
-
*/
|
|
14
|
-
large: DesignToken<BorderWidthValue>;
|
|
15
|
-
};
|
|
16
|
-
export declare type WebBorderWidths = {
|
|
17
|
-
[Property in keyof BorderWidths]: WebDesignToken<BorderWidthValue>;
|
|
18
|
-
};
|
|
19
|
-
export declare const borderWidths: BorderWidths;
|
|
1
|
+
import { BorderWidthValue, DesignTokenValues, OutputVariantKey } from './types/designToken';
|
|
2
|
+
declare type BorderWidthSize = 'small' | 'medium' | 'large';
|
|
3
|
+
export declare type BorderWidths<Output extends OutputVariantKey = unknown, Platform = unknown> = Output extends 'required' | 'default' ? Required<DesignTokenValues<BorderWidthSize, BorderWidthValue<Platform, Output>, Output, Platform>> : Partial<DesignTokenValues<BorderWidthSize, BorderWidthValue<Platform, Output>, Output, Platform>>;
|
|
4
|
+
export declare const borderWidths: BorderWidths<'default'>;
|
|
5
|
+
export {};
|
|
@@ -1,77 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
declare type
|
|
6
|
-
|
|
1
|
+
import { ColorValue, DesignTokenValues, OutputVariantKey } from './types/designToken';
|
|
2
|
+
/**
|
|
3
|
+
* Util type for creating color interfaces using `ColorValue` from string and number unions
|
|
4
|
+
*/
|
|
5
|
+
declare type BaseColorValues<VariantKey extends string | number, Output, Platform = unknown> = DesignTokenValues<VariantKey, ColorValue, Output, Platform>;
|
|
6
|
+
declare type ColorValues<VariantKey extends string | number, Output, Platform = unknown> = Output extends 'required' | 'default' ? BaseColorValues<VariantKey, Output, Platform> : Partial<BaseColorValues<VariantKey, Output, Platform>>;
|
|
7
|
+
/**
|
|
8
|
+
* Util type for creating nested color scale interfaces from variant keys
|
|
9
|
+
*/
|
|
10
|
+
declare type BaseColorValueScale<VariantKey extends string | number, Output, Platform = unknown> = Record<VariantKey, ColorValues<ScaleKey, Output, Platform>>;
|
|
11
|
+
declare type ColorValueScale<VariantKey extends string | number, Output, Platform = unknown> = Output extends 'required' | 'default' ? BaseColorValueScale<VariantKey, Output, Platform> : Partial<BaseColorValueScale<VariantKey, Output, Platform>>;
|
|
12
|
+
declare type ScaleKey = 10 | 20 | 40 | 60 | 80 | 90 | 100;
|
|
13
|
+
declare type OverlayKey = 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90;
|
|
14
|
+
declare type ColorPaletteKey = 'red' | 'orange' | 'yellow' | 'green' | 'teal' | 'blue' | 'purple' | 'pink' | 'neutral';
|
|
15
|
+
declare type GreyscalePaletteKey = 'white' | 'black' | 'transparent';
|
|
16
|
+
declare type OrderVariant = 'primary' | 'secondary' | 'tertiary';
|
|
17
|
+
declare type OrderVariantKey<Output = unknown> = Output extends 'default' ? Exclude<OrderVariant, 'quaternary'> : OrderVariant;
|
|
18
|
+
declare type InformationVariantKey = 'info' | 'warning' | 'error' | 'success';
|
|
19
|
+
declare type WebStateVariantKey = 'active' | 'disabled' | 'error' | 'hover' | 'focus' | 'pressed';
|
|
20
|
+
declare type ReactNativeStateVariantKey = Exclude<WebStateVariantKey, 'focused' | 'hover'>;
|
|
21
|
+
declare type StateVariantKey<Platform> = Platform extends 'react-native' ? ReactNativeStateVariantKey : WebStateVariantKey;
|
|
22
|
+
declare type BrandVariantKey = Extract<OrderVariantKey, 'primary' | 'secondary'>;
|
|
23
|
+
declare type FontVariantKey<Output, Platform> = 'inverse' | 'interactive' | Extract<StateVariantKey<Platform>, 'active' | 'disabled' | 'hover' | 'focus'> | OrderVariantKey<Output> | InformationVariantKey;
|
|
24
|
+
declare type BackgroundColorKey<Platform> = Extract<StateVariantKey<Platform>, 'disabled'> | OrderVariantKey | InformationVariantKey | 'quaternary';
|
|
25
|
+
declare type BorderColorKey<Output, Platform> = Extract<StateVariantKey<Platform>, 'disabled' | 'error'> | OrderVariantKey<Output> | (Output extends 'default' ? Exclude<StateVariantKey<Platform>, 'active' | 'hover'> : StateVariantKey<Platform>);
|
|
26
|
+
declare type PaletteValues<Output, Platform> = ColorValueScale<ColorPaletteKey, Output, Platform>;
|
|
27
|
+
declare type GreyscaleColors<Output, Platform> = ColorValues<GreyscalePaletteKey, Output, Platform>;
|
|
28
|
+
declare type BaseColors<Output extends OutputVariantKey = unknown, Platform = unknown> = PaletteValues<Output, Platform> & GreyscaleColors<Output, Platform> & {
|
|
29
|
+
brand?: ColorValueScale<BrandVariantKey, Output, Platform>;
|
|
30
|
+
background?: ColorValues<BackgroundColorKey<Platform>, Output, Platform>;
|
|
31
|
+
border?: ColorValues<BorderColorKey<Output, Platform>, Output, Platform>;
|
|
32
|
+
font?: ColorValues<FontVariantKey<Output, Platform>, Output, Platform>;
|
|
33
|
+
overlay?: ColorValues<OverlayKey, Output, Platform>;
|
|
34
|
+
shadow?: ColorValues<OrderVariantKey, Output, Platform>;
|
|
7
35
|
};
|
|
8
|
-
declare type
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
declare type FontColors<DesignTokenType = DesignToken<ColorValue>> = {
|
|
12
|
-
inverse: DesignTokenType;
|
|
13
|
-
interactive: DesignTokenType;
|
|
14
|
-
hover: DesignTokenType;
|
|
15
|
-
focus: DesignTokenType;
|
|
16
|
-
active: DesignTokenType;
|
|
17
|
-
disabled: DesignTokenType;
|
|
18
|
-
} & OrdinalScale<DesignTokenType> & OrdinalVariation<DesignTokenType>;
|
|
19
|
-
declare type BackgroundColors<DesignTokenType = DesignToken<ColorValue>> = {
|
|
20
|
-
disabled: DesignTokenType;
|
|
21
|
-
} & OrdinalScale<DesignTokenType> & OrdinalVariation<DesignTokenType>;
|
|
22
|
-
declare type BorderColors<DesignTokenType = DesignToken<ColorValue>> = {
|
|
23
|
-
disabled: DesignTokenType;
|
|
24
|
-
pressed: DesignTokenType;
|
|
25
|
-
focus: DesignTokenType;
|
|
26
|
-
error: DesignTokenType;
|
|
27
|
-
} & OrdinalScale<DesignTokenType>;
|
|
28
|
-
declare type ColorTypes<DesignTokenType = DesignToken<ColorValue>> = {
|
|
29
|
-
[key in ScaleKeys]: DesignTokenType;
|
|
30
|
-
} | FontColors | BackgroundColors | DesignTokenType | BorderColors;
|
|
31
|
-
declare type WebColorTypes = ColorTypes<WebDesignToken<ColorValue>>;
|
|
32
|
-
export declare type Colors = {
|
|
33
|
-
red: ColorScale;
|
|
34
|
-
orange: ColorScale;
|
|
35
|
-
yellow: ColorScale;
|
|
36
|
-
green: ColorScale;
|
|
37
|
-
teal: ColorScale;
|
|
38
|
-
blue: ColorScale;
|
|
39
|
-
purple: ColorScale;
|
|
40
|
-
pink: ColorScale;
|
|
41
|
-
neutral: ColorScale;
|
|
42
|
-
white: DesignToken<ColorValue>;
|
|
43
|
-
black: DesignToken<ColorValue>;
|
|
44
|
-
font: FontColors;
|
|
45
|
-
background: BackgroundColors;
|
|
46
|
-
border: BorderColors;
|
|
47
|
-
brand: {
|
|
48
|
-
primary: ColorScale;
|
|
49
|
-
secondary: ColorScale;
|
|
50
|
-
};
|
|
51
|
-
overlay: OverlayColors;
|
|
52
|
-
[key: string]: ColorTypes | Record<string, ColorTypes>;
|
|
53
|
-
};
|
|
54
|
-
export declare type WebColors = {
|
|
55
|
-
red: ColorScale<WebDesignToken<ColorValue>>;
|
|
56
|
-
orange: ColorScale<WebDesignToken<ColorValue>>;
|
|
57
|
-
yellow: ColorScale<WebDesignToken<ColorValue>>;
|
|
58
|
-
green: ColorScale<WebDesignToken<ColorValue>>;
|
|
59
|
-
teal: ColorScale<WebDesignToken<ColorValue>>;
|
|
60
|
-
blue: ColorScale<WebDesignToken<ColorValue>>;
|
|
61
|
-
purple: ColorScale<WebDesignToken<ColorValue>>;
|
|
62
|
-
pink: ColorScale<WebDesignToken<ColorValue>>;
|
|
63
|
-
neutral: ColorScale<WebDesignToken<ColorValue>>;
|
|
64
|
-
white: WebDesignToken<ColorValue>;
|
|
65
|
-
black: WebDesignToken<ColorValue>;
|
|
66
|
-
font: FontColors<WebDesignToken<ColorValue>>;
|
|
67
|
-
background: BackgroundColors<WebDesignToken<ColorValue>>;
|
|
68
|
-
border: BorderColors<WebDesignToken<ColorValue>>;
|
|
69
|
-
brand: {
|
|
70
|
-
primary: ColorScale<WebDesignToken<ColorValue>>;
|
|
71
|
-
secondary: ColorScale<WebDesignToken<ColorValue>>;
|
|
72
|
-
};
|
|
73
|
-
overlay: OverlayColors<WebDesignToken<ColorValue>>;
|
|
74
|
-
[key: string]: WebColorTypes | Record<string, WebColorTypes>;
|
|
75
|
-
};
|
|
76
|
-
export declare const colors: Colors;
|
|
36
|
+
export declare type Colors<Output extends OutputVariantKey = unknown, Platform = unknown> = (Output extends 'required' | 'default' ? Required<BaseColors<Output, Platform>> : BaseColors<Output, Platform>) & Record<string, any>;
|
|
37
|
+
export declare const colors: Colors<'default'>;
|
|
77
38
|
export {};
|
|
@@ -1,28 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
justifyContent: DesignToken<JustifyContentValue>;
|
|
16
|
-
color: DesignToken<ColorValue>;
|
|
17
|
-
backgroundColor: DesignToken<BackgroundColorValue>;
|
|
18
|
-
paddingBlock: DesignToken<SpaceValue>;
|
|
19
|
-
paddingInline: DesignToken<SpaceValue>;
|
|
20
|
-
icon: AlertIconTokens;
|
|
21
|
-
heading: AlertHeadingTokens;
|
|
22
|
-
info: AlertVariationTokens;
|
|
23
|
-
error: AlertVariationTokens;
|
|
24
|
-
warning: AlertVariationTokens;
|
|
25
|
-
success: AlertVariationTokens;
|
|
26
|
-
}
|
|
27
|
-
export declare const alert: AlertTokens;
|
|
1
|
+
import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
|
|
2
|
+
declare type AlertVariationTokens<OutputType> = DesignTokenProperties<'backgroundColor' | 'color', OutputType>;
|
|
3
|
+
declare type AlertIconTokens<OutputType> = DesignTokenProperties<'size', OutputType>;
|
|
4
|
+
declare type AlertHeadingTokens<OutputType> = DesignTokenProperties<'fontSize' | 'fontWeight', OutputType>;
|
|
5
|
+
declare type AlertTokenKey = 'alignItems' | 'justifyContent' | 'color' | 'backgroundColor' | 'paddingBlock' | 'paddingInline';
|
|
6
|
+
export declare type AlertTokens<OutputType extends OutputVariantKey> = DesignTokenProperties<AlertTokenKey, OutputType> & {
|
|
7
|
+
icon?: AlertIconTokens<OutputType>;
|
|
8
|
+
heading?: AlertHeadingTokens<OutputType>;
|
|
9
|
+
info?: AlertVariationTokens<OutputType>;
|
|
10
|
+
error?: AlertVariationTokens<OutputType>;
|
|
11
|
+
warning?: AlertVariationTokens<OutputType>;
|
|
12
|
+
success?: AlertVariationTokens<OutputType>;
|
|
13
|
+
};
|
|
14
|
+
export declare const alert: Required<AlertTokens<'default'>>;
|
|
28
15
|
export {};
|
|
@@ -1,47 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
interface AuthenticatorOrContainerTokens {
|
|
28
|
-
color: DesignToken<ColorValue>;
|
|
29
|
-
orLine: {
|
|
30
|
-
backgroundColor: DesignToken<BackgroundColorValue>;
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
interface AuthenticatorContainerToken {
|
|
34
|
-
widthMax: DesignToken<SpaceValue>;
|
|
35
|
-
}
|
|
36
|
-
export interface AuthenticatorTokens {
|
|
37
|
-
maxWidth: DesignToken<SpaceValue>;
|
|
38
|
-
modal: AuthenticatorModalTokens;
|
|
39
|
-
container: AuthenticatorContainerToken;
|
|
40
|
-
router: AuthenticatorRouterTokens;
|
|
41
|
-
footer: AuthenticatorFooterTokens;
|
|
42
|
-
form: AuthenticatorFormTokens;
|
|
43
|
-
state: AuthenticatorStateTokens;
|
|
44
|
-
orContainer: AuthenticatorOrContainerTokens;
|
|
45
|
-
}
|
|
46
|
-
export declare const authenticator: AuthenticatorTokens;
|
|
1
|
+
import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
|
|
2
|
+
declare type ModalTokenKey = 'width' | 'height' | 'backgroundColor' | 'top' | 'left';
|
|
3
|
+
declare type AuthenticatorModalTokens<OutputType> = DesignTokenProperties<ModalTokenKey, OutputType>;
|
|
4
|
+
declare type RouterKey = 'borderWidth' | 'borderStyle' | 'borderColor' | 'backgroundColor' | 'boxShadow';
|
|
5
|
+
declare type AuthenticatorRouterTokens<OutputType> = DesignTokenProperties<RouterKey, OutputType>;
|
|
6
|
+
declare type AuthenticatorFooterTokens<OutputType> = DesignTokenProperties<'paddingBottom', OutputType>;
|
|
7
|
+
declare type AuthenticatorFormTokens<OutputType> = DesignTokenProperties<'padding', OutputType>;
|
|
8
|
+
declare type AuthenticatorStateTokens<OutputType> = {
|
|
9
|
+
inactive?: DesignTokenProperties<'backgroundColor', OutputType>;
|
|
10
|
+
};
|
|
11
|
+
declare type AuthenticatorOrContainerTokens<OutputType> = DesignTokenProperties<'color', OutputType> & {
|
|
12
|
+
orLine?: DesignTokenProperties<'backgroundColor', OutputType>;
|
|
13
|
+
};
|
|
14
|
+
declare type AuthenticatorContainerToken<OutputType> = {
|
|
15
|
+
widthMax?: DesignTokenProperties<'maxWidth', OutputType>['maxWidth'];
|
|
16
|
+
};
|
|
17
|
+
export declare type AuthenticatorTokens<OutputType extends OutputVariantKey> = DesignTokenProperties<'maxWidth', OutputType> & {
|
|
18
|
+
modal?: AuthenticatorModalTokens<OutputType>;
|
|
19
|
+
container?: AuthenticatorContainerToken<OutputType>;
|
|
20
|
+
router?: AuthenticatorRouterTokens<OutputType>;
|
|
21
|
+
footer?: AuthenticatorFooterTokens<OutputType>;
|
|
22
|
+
form?: AuthenticatorFormTokens<OutputType>;
|
|
23
|
+
state?: AuthenticatorStateTokens<OutputType>;
|
|
24
|
+
orContainer?: AuthenticatorOrContainerTokens<OutputType>;
|
|
25
|
+
};
|
|
26
|
+
export declare const authenticator: Required<AuthenticatorTokens<'default'>>;
|
|
47
27
|
export {};
|
|
@@ -1,42 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
3
|
-
menu
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
options: {
|
|
12
|
-
display: DesignToken<DisplayValue>;
|
|
13
|
-
flexDirection: DesignToken<FlexDirectionValue>;
|
|
14
|
-
maxHeight: DesignToken<SpaceValue>;
|
|
15
|
-
};
|
|
16
|
-
option: {
|
|
17
|
-
backgroundColor: DesignToken<BackgroundColorValue>;
|
|
18
|
-
color: DesignToken<ColorValue>;
|
|
19
|
-
cursor: DesignToken<CursorValue>;
|
|
20
|
-
transitionDuration: DesignToken<TransitionDurationValue>;
|
|
21
|
-
transitionProperty: DesignToken<TransitionPropertyValue>;
|
|
22
|
-
transitionTimingFunction: DesignToken<TransitionTimingFunctionValue>;
|
|
23
|
-
_active: {
|
|
24
|
-
backgroundColor: DesignToken<BackgroundColorValue>;
|
|
25
|
-
color: DesignToken<ColorValue>;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
_empty: {
|
|
29
|
-
display: DesignToken<DisplayValue>;
|
|
30
|
-
};
|
|
31
|
-
_loading: {
|
|
32
|
-
alignItems: DesignToken<AlignItemsValue>;
|
|
33
|
-
display: DesignToken<DisplayValue>;
|
|
34
|
-
gap: DesignToken<SpaceValue>;
|
|
35
|
-
};
|
|
36
|
-
spaceShared: {
|
|
37
|
-
paddingBlock: DesignToken<SpaceValue>;
|
|
38
|
-
paddingInline: DesignToken<SpaceValue>;
|
|
39
|
-
};
|
|
1
|
+
import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
|
|
2
|
+
export declare type AutocompleteTokens<OutputType extends OutputVariantKey> = {
|
|
3
|
+
menu?: DesignTokenProperties<'backgroundColor' | 'borderColor' | 'borderRadius' | 'borderStyle' | 'borderWidth' | 'marginBlockStart' | 'width', OutputType> & {
|
|
4
|
+
options: DesignTokenProperties<'display' | 'flexDirection' | 'maxHeight', OutputType>;
|
|
5
|
+
option: DesignTokenProperties<'backgroundColor' | 'color' | 'cursor' | 'transitionDuration' | 'transitionProperty' | 'transitionTimingFunction', OutputType> & {
|
|
6
|
+
_active: DesignTokenProperties<'backgroundColor' | 'color', OutputType>;
|
|
7
|
+
};
|
|
8
|
+
_empty: DesignTokenProperties<'display', OutputType>;
|
|
9
|
+
_loading: DesignTokenProperties<'alignItems' | 'display' | 'gap', OutputType>;
|
|
10
|
+
spaceShared: DesignTokenProperties<'paddingBlock' | 'paddingInline', OutputType>;
|
|
40
11
|
};
|
|
41
|
-
}
|
|
42
|
-
export declare const autocomplete: AutocompleteTokens
|
|
12
|
+
};
|
|
13
|
+
export declare const autocomplete: Required<AutocompleteTokens<'default'>>;
|
|
@@ -1,29 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
fontSize: DesignToken<FontSizeValue>;
|
|
17
|
-
fontWeight: DesignToken<FontWeightValue>;
|
|
18
|
-
info: BadgeVariationTokens;
|
|
19
|
-
large: BadgeSizeTokens;
|
|
20
|
-
lineHeight: DesignToken<LineHeightValue>;
|
|
21
|
-
paddingHorizontal: DesignToken<SpaceValue>;
|
|
22
|
-
paddingVertical: DesignToken<SpaceValue>;
|
|
23
|
-
small: BadgeSizeTokens;
|
|
24
|
-
success: BadgeVariationTokens;
|
|
25
|
-
textAlign: DesignToken<TextAlignValue>;
|
|
26
|
-
warning: BadgeVariationTokens;
|
|
27
|
-
}
|
|
28
|
-
export declare const badge: BadgeTokens;
|
|
1
|
+
import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
|
|
2
|
+
declare type VariationKey = 'backgroundColor' | 'color';
|
|
3
|
+
declare type BadgeVariationTokens<OutputType> = DesignTokenProperties<VariationKey, OutputType>;
|
|
4
|
+
declare type SizeKey = 'fontSize' | 'paddingHorizontal' | 'paddingVertical';
|
|
5
|
+
declare type BadgeSizeTokens<OutputType> = DesignTokenProperties<SizeKey, OutputType>;
|
|
6
|
+
declare type BadgeKey = 'backgroundColor' | 'borderRadius' | 'color' | 'fontSize' | 'fontWeight' | 'lineHeight' | 'paddingHorizontal' | 'paddingVertical' | 'textAlign';
|
|
7
|
+
export declare type BadgeTokens<OutputType extends OutputVariantKey> = DesignTokenProperties<BadgeKey, OutputType> & {
|
|
8
|
+
error?: BadgeVariationTokens<OutputType>;
|
|
9
|
+
large?: BadgeSizeTokens<OutputType>;
|
|
10
|
+
small?: BadgeSizeTokens<OutputType>;
|
|
11
|
+
info?: BadgeVariationTokens<OutputType>;
|
|
12
|
+
success?: BadgeVariationTokens<OutputType>;
|
|
13
|
+
warning?: BadgeVariationTokens<OutputType>;
|
|
14
|
+
};
|
|
15
|
+
export declare const badge: Required<BadgeTokens<'default'>>;
|
|
29
16
|
export {};
|