@aws-amplify/ui 5.0.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.
Files changed (93) hide show
  1. package/dist/esm/helpers/authenticator/textUtil.js +1 -1
  2. package/dist/esm/i18n/dictionaries/authenticator/defaultTexts.js +1 -1
  3. package/dist/esm/i18n/dictionaries/authenticator/en.js +1 -1
  4. package/dist/esm/index.js +1 -1
  5. package/dist/esm/theme/createTheme.js +1 -1
  6. package/dist/esm/theme/defaultDarkModeOverride.js +1 -1
  7. package/dist/esm/theme/tokens/components/fieldControl.js +1 -1
  8. package/dist/esm/theme/tokens/index.js +1 -1
  9. package/dist/esm/theme/utils.js +1 -1
  10. package/dist/esm/types/authenticator/user.js +1 -1
  11. package/dist/esm/types/authenticator/utils.js +1 -0
  12. package/dist/index.js +1 -1
  13. package/dist/styles.css +982 -986
  14. package/dist/theme.css +983 -989
  15. package/dist/types/helpers/authenticator/textUtil.d.ts +5 -2
  16. package/dist/types/i18n/dictionaries/authenticator/defaultTexts.d.ts +2 -0
  17. package/dist/types/i18n/dictionaries/index.d.ts +2 -0
  18. package/dist/types/i18n/translations.d.ts +2 -0
  19. package/dist/types/theme/createTheme.d.ts +2 -2
  20. package/dist/types/theme/defaultDarkModeOverride.d.ts +2 -0
  21. package/dist/types/theme/defaultTheme.d.ts +2 -2
  22. package/dist/types/theme/index.d.ts +3 -2
  23. package/dist/types/theme/tokens/borderWidths.d.ts +5 -19
  24. package/dist/types/theme/tokens/colors.d.ts +36 -75
  25. package/dist/types/theme/tokens/components/alert.d.ts +14 -27
  26. package/dist/types/theme/tokens/components/authenticator.d.ts +26 -46
  27. package/dist/types/theme/tokens/components/autocomplete.d.ts +12 -41
  28. package/dist/types/theme/tokens/components/badge.d.ts +15 -28
  29. package/dist/types/theme/tokens/components/button.d.ts +39 -82
  30. package/dist/types/theme/tokens/components/card.d.ts +7 -14
  31. package/dist/types/theme/tokens/components/checkbox.d.ts +27 -80
  32. package/dist/types/theme/tokens/components/checkboxField.d.ts +3 -8
  33. package/dist/types/theme/tokens/components/collection.d.ts +20 -28
  34. package/dist/types/theme/tokens/components/copy.d.ts +8 -20
  35. package/dist/types/theme/tokens/components/dialCodeSelect.d.ts +3 -5
  36. package/dist/types/theme/tokens/components/divider.d.ts +8 -20
  37. package/dist/types/theme/tokens/components/expander.d.ts +21 -68
  38. package/dist/types/theme/tokens/components/field.d.ts +8 -16
  39. package/dist/types/theme/tokens/components/fieldControl.d.ts +22 -71
  40. package/dist/types/theme/tokens/components/fieldGroup.d.ts +6 -14
  41. package/dist/types/theme/tokens/components/fieldMessages.d.ts +6 -16
  42. package/dist/types/theme/tokens/components/flex.d.ts +3 -9
  43. package/dist/types/theme/tokens/components/heading.d.ts +5 -16
  44. package/dist/types/theme/tokens/components/highlightMatch.d.ts +5 -9
  45. package/dist/types/theme/tokens/components/icon.d.ts +3 -6
  46. package/dist/types/theme/tokens/components/image.d.ts +3 -8
  47. package/dist/types/theme/tokens/components/inAppMessaging.d.ts +12 -27
  48. package/dist/types/theme/tokens/components/index.d.ts +58 -49
  49. package/dist/types/theme/tokens/components/link.d.ts +4 -12
  50. package/dist/types/theme/tokens/components/loader.d.ts +14 -39
  51. package/dist/types/theme/tokens/components/menu.d.ts +8 -26
  52. package/dist/types/theme/tokens/components/pagination.d.ts +12 -48
  53. package/dist/types/theme/tokens/components/passwordField.d.ts +12 -14
  54. package/dist/types/theme/tokens/components/phoneNumberField.d.ts +4 -9
  55. package/dist/types/theme/tokens/components/placeholder.d.ts +8 -14
  56. package/dist/types/theme/tokens/components/radio.d.ts +21 -72
  57. package/dist/types/theme/tokens/components/radioGroup.d.ts +8 -17
  58. package/dist/types/theme/tokens/components/rating.d.ts +9 -19
  59. package/dist/types/theme/tokens/components/searchField.d.ts +12 -15
  60. package/dist/types/theme/tokens/components/select.d.ts +11 -35
  61. package/dist/types/theme/tokens/components/selectField.d.ts +6 -14
  62. package/dist/types/theme/tokens/components/sliderField.d.ts +20 -61
  63. package/dist/types/theme/tokens/components/stepperField.d.ts +11 -23
  64. package/dist/types/theme/tokens/components/switchField.d.ts +20 -54
  65. package/dist/types/theme/tokens/components/table.d.ts +24 -60
  66. package/dist/types/theme/tokens/components/tabs.d.ts +12 -43
  67. package/dist/types/theme/tokens/components/text.d.ts +6 -15
  68. package/dist/types/theme/tokens/components/textAreaField.d.ts +6 -10
  69. package/dist/types/theme/tokens/components/textField.d.ts +5 -12
  70. package/dist/types/theme/tokens/components/toggleButton.d.ts +30 -115
  71. package/dist/types/theme/tokens/components/toggleButtonGroup.d.ts +5 -7
  72. package/dist/types/theme/tokens/fontSizes.d.ts +5 -17
  73. package/dist/types/theme/tokens/fontWeights.d.ts +5 -16
  74. package/dist/types/theme/tokens/fonts.d.ts +7 -12
  75. package/dist/types/theme/tokens/index.d.ts +58 -48
  76. package/dist/types/theme/tokens/lineHeights.d.ts +5 -10
  77. package/dist/types/theme/tokens/opacities.d.ts +5 -18
  78. package/dist/types/theme/tokens/outlineOffsets.d.ts +5 -10
  79. package/dist/types/theme/tokens/outlineWidths.d.ts +5 -10
  80. package/dist/types/theme/tokens/radii.d.ts +5 -14
  81. package/dist/types/theme/tokens/shadows.d.ts +5 -10
  82. package/dist/types/theme/tokens/space.d.ts +8 -25
  83. package/dist/types/theme/tokens/time.d.ts +5 -10
  84. package/dist/types/theme/tokens/transforms.d.ts +7 -13
  85. package/dist/types/theme/tokens/types/designToken.d.ts +161 -20
  86. package/dist/types/theme/types.d.ts +7 -8
  87. package/dist/types/theme/utils.d.ts +30 -2
  88. package/dist/types/types/authenticator/index.d.ts +1 -0
  89. package/dist/types/types/authenticator/user.d.ts +7 -0
  90. package/dist/types/types/authenticator/utils.d.ts +1 -0
  91. package/package.json +8 -6
  92. package/dist/esm/theme/tokens/types/designToken.js +0 -1
  93. package/dist/types/theme/tokens/types/scales.d.ts +0 -13
@@ -8,17 +8,19 @@ export declare const authenticatorTextUtil: {
8
8
  readonly getConfirmText: () => string;
9
9
  readonly getConfirmingText: () => string;
10
10
  readonly getCopyText: () => string;
11
+ readonly getHidePasswordText: () => string;
12
+ readonly getLoadingText: () => string;
11
13
  readonly getResendCodeText: () => string;
12
14
  readonly getSendCodeText: () => string;
13
15
  readonly getSendingText: () => string;
16
+ readonly getShowPasswordText: () => string;
14
17
  readonly getSubmitText: () => string;
15
18
  readonly getSubmittingText: () => string;
16
- readonly getLoadingText: () => string;
17
19
  /** SignInSignUpTabs */
18
20
  readonly getSignInTabText: () => string;
19
21
  readonly getSignUpTabText: () => string;
20
22
  /** SignIn */
21
- readonly getForgotPasswordText: () => string;
23
+ readonly getForgotPasswordText: (shortVersion?: boolean) => string;
22
24
  readonly getSigningInText: () => string;
23
25
  readonly getSignInText: () => string;
24
26
  /** SignUp */
@@ -33,6 +35,7 @@ export declare const authenticatorTextUtil: {
33
35
  readonly getResetYourPasswordText: () => string;
34
36
  /** SetupTOTP */
35
37
  readonly getSetupTOTPText: () => string;
38
+ readonly getSetupTOTPInstructionsText: () => string;
36
39
  readonly getCopiedText: () => string;
37
40
  /** FederatedSignIn */
38
41
  readonly getSignInWithFederationText: (route: AuthenticatorRoute, provider: SocialProvider) => string;
@@ -19,6 +19,7 @@ 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
24
  HIDE_PASSWORD: string;
24
25
  LOADING: string;
@@ -50,6 +51,7 @@ export declare const defaultTexts: {
50
51
  SKIP: string;
51
52
  SUBMIT: string;
52
53
  SUBMITTING: string;
54
+ UPPERCASE_COPY: string;
53
55
  VERIFY_CONTACT: string;
54
56
  VERIFY_HEADING: string;
55
57
  VERIFY: string;
@@ -799,6 +799,7 @@ 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
804
  HIDE_PASSWORD: string;
804
805
  LOADING: string;
@@ -830,6 +831,7 @@ export declare const defaultTexts: {
830
831
  SKIP: string;
831
832
  SUBMIT: string;
832
833
  SUBMITTING: string;
834
+ UPPERCASE_COPY: string;
833
835
  VERIFY_CONTACT: string;
834
836
  VERIFY_HEADING: string;
835
837
  VERIFY: string;
@@ -31,6 +31,7 @@ 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
36
  readonly HIDE_PASSWORD: string;
36
37
  readonly LOADING: string;
@@ -62,6 +63,7 @@ export declare const DefaultTexts: {
62
63
  readonly SKIP: string;
63
64
  readonly SUBMIT: string;
64
65
  readonly SUBMITTING: string;
66
+ readonly UPPERCASE_COPY: string;
65
67
  readonly VERIFY_CONTACT: string;
66
68
  readonly VERIFY_HEADING: string;
67
69
  readonly VERIFY: string;
@@ -1,4 +1,4 @@
1
- import { Theme, BaseTheme, WebTheme } from './types';
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, baseTheme?: BaseTheme): WebTheme;
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 { BaseTheme } from './types';
2
- export declare const defaultTheme: BaseTheme;
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 { DesignToken, WebDesignToken, BorderWidthValue } from './types/designToken';
2
- export declare type BorderWidths = {
3
- /**
4
- * Small border, used for inputs and such
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 { DesignToken, WebDesignToken, ColorValue } from './types/designToken';
2
- import { OrdinalScale, OrdinalVariation } from './types/scales';
3
- declare type ScaleKeys = 10 | 20 | 40 | 60 | 80 | 90 | 100;
4
- declare type OverlayKeys = 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90;
5
- declare type ColorScale<DesignTokenType = DesignToken<ColorValue>> = {
6
- [key in ScaleKeys]: DesignTokenType;
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 OverlayColors<DesignTokenType = DesignToken<ColorValue>> = {
9
- [key in OverlayKeys]: DesignTokenType;
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 { AlignItemsValue, BackgroundColorValue, ColorValue, DesignToken, FontSizeValue, FontWeightValue, JustifyContentValue, SpaceValue } from '../types/designToken';
2
- interface AlertVariationTokens {
3
- color: DesignToken<ColorValue>;
4
- backgroundColor: DesignToken<BackgroundColorValue>;
5
- }
6
- interface AlertIconTokens {
7
- size: DesignToken<FontSizeValue>;
8
- }
9
- interface AlertHeadingTokens {
10
- fontSize: DesignToken<FontSizeValue>;
11
- fontWeight: DesignToken<FontWeightValue>;
12
- }
13
- export interface AlertTokens {
14
- alignItems: DesignToken<AlignItemsValue>;
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 { DesignToken, ColorValue, SpaceValue, BorderWidthValue, BorderColorValue, BackgroundColorValue, BorderStyleValue, BoxShadowValue } from '../types/designToken';
2
- interface AuthenticatorModalTokens {
3
- width: DesignToken<SpaceValue>;
4
- height: DesignToken<SpaceValue>;
5
- backgroundColor: DesignToken<BackgroundColorValue>;
6
- top: DesignToken<SpaceValue>;
7
- left: DesignToken<SpaceValue>;
8
- }
9
- interface AuthenticatorRouterTokens {
10
- borderWidth: DesignToken<BorderWidthValue>;
11
- borderStyle: DesignToken<BorderStyleValue>;
12
- borderColor: DesignToken<BorderColorValue>;
13
- backgroundColor: DesignToken<BackgroundColorValue>;
14
- boxShadow: DesignToken<BoxShadowValue>;
15
- }
16
- interface AuthenticatorFooterTokens {
17
- paddingBottom: DesignToken<SpaceValue>;
18
- }
19
- interface AuthenticatorFormTokens {
20
- padding: DesignToken<SpaceValue>;
21
- }
22
- interface AuthenticatorStateTokens {
23
- inactive: {
24
- backgroundColor: DesignToken<BackgroundColorValue>;
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 { AlignItemsValue, BackgroundColorValue, BorderColorValue, BorderWidthValue, BorderStyleValue, BorderRadiusValue, ColorValue, CursorValue, DesignToken, DisplayValue, FlexDirectionValue, SpaceValue, TransitionDurationValue, TransitionPropertyValue, TransitionTimingFunctionValue } from '../types/designToken';
2
- export interface AutocompleteTokens {
3
- menu: {
4
- width: DesignToken<SpaceValue>;
5
- marginBlockStart: DesignToken<SpaceValue>;
6
- backgroundColor: DesignToken<BackgroundColorValue>;
7
- borderColor: DesignToken<BorderColorValue>;
8
- borderWidth: DesignToken<BorderWidthValue>;
9
- borderStyle: DesignToken<BorderStyleValue>;
10
- borderRadius: DesignToken<BorderRadiusValue>;
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 { BackgroundColorValue, ColorValue, DesignToken, FontSizeValue, FontWeightValue, LineHeightValue, RadiusValue, SpaceValue, TextAlignValue } from '../types/designToken';
2
- interface BadgeVariationTokens {
3
- backgroundColor: DesignToken<BackgroundColorValue>;
4
- color: DesignToken<ColorValue>;
5
- }
6
- interface BadgeSizeTokens {
7
- fontSize: DesignToken<FontSizeValue>;
8
- paddingHorizontal: DesignToken<SpaceValue>;
9
- paddingVertical: DesignToken<SpaceValue>;
10
- }
11
- export interface BadgeTokens {
12
- backgroundColor: DesignToken<BackgroundColorValue>;
13
- borderRadius: DesignToken<RadiusValue>;
14
- color: DesignToken<ColorValue>;
15
- error: BadgeVariationTokens;
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 {};
@@ -1,83 +1,40 @@
1
- import { AlignItemsValue, BackgroundColorValue, BorderColorValue, BorderRadiusValue, BorderStyleValue, BorderWidthValue, BoxShadowValue, ColorValue, DesignToken, FontSizeValue, FontWeightValue, JustifyContentValue, LineHeightValue, SpaceValue, TransitionDurationValue } from '../types/designToken';
2
- export interface StateTokens {
3
- color: DesignToken<ColorValue>;
4
- backgroundColor: DesignToken<BackgroundColorValue>;
5
- borderColor: DesignToken<BorderColorValue>;
6
- }
7
- interface StateWithShadowTokens extends StateTokens {
8
- boxShadow: DesignToken<BoxShadowValue>;
9
- }
10
- interface MenuStateDisabledTokens extends Omit<StateTokens, 'borderColor' | 'backgroundColor'> {
11
- }
12
- interface MenuStateTokens extends Omit<StateTokens, 'borderColor'> {
13
- }
14
- interface PrimaryVariationTokens {
15
- borderWidth: DesignToken<BorderWidthValue>;
16
- borderStyle: DesignToken<BorderStyleValue>;
17
- borderColor: DesignToken<BorderColorValue>;
18
- backgroundColor: DesignToken<BackgroundColorValue>;
19
- color: DesignToken<ColorValue>;
20
- _disabled: StateTokens;
21
- _loading: StateTokens;
22
- _hover: StateTokens;
23
- _focus: StateWithShadowTokens;
24
- _active: StateTokens;
25
- }
26
- interface MenuVariationTokens {
27
- borderWidth: DesignToken<BorderWidthValue>;
28
- backgroundColor: DesignToken<BackgroundColorValue>;
29
- justifyContent: DesignToken<JustifyContentValue>;
30
- _hover: MenuStateTokens;
31
- _focus: MenuStateTokens;
32
- _active: MenuStateTokens;
33
- _disabled: MenuStateDisabledTokens;
34
- }
35
- interface LinkVariationTokens {
36
- backgroundColor: DesignToken<BackgroundColorValue>;
37
- borderColor: DesignToken<BorderColorValue>;
38
- borderWidth: DesignToken<BorderWidthValue>;
39
- color: DesignToken<ColorValue>;
40
- _hover: StateTokens;
41
- _focus: StateWithShadowTokens;
42
- _active: StateTokens;
43
- _disabled: StateTokens;
44
- _loading: StateTokens;
45
- }
46
- interface ButtonSizeTokens {
47
- fontSize: DesignToken<FontSizeValue>;
48
- paddingBlockStart: DesignToken<SpaceValue>;
49
- paddingBlockEnd: DesignToken<SpaceValue>;
50
- paddingInlineStart: DesignToken<SpaceValue>;
51
- paddingInlineEnd: DesignToken<SpaceValue>;
52
- }
53
- export interface ButtonTokens {
54
- fontWeight: DesignToken<FontWeightValue>;
55
- transitionDuration: DesignToken<TransitionDurationValue>;
56
- fontSize: DesignToken<FontSizeValue>;
57
- lineHeight: DesignToken<LineHeightValue>;
58
- paddingBlockStart: DesignToken<SpaceValue>;
59
- paddingBlockEnd: DesignToken<SpaceValue>;
60
- paddingInlineStart: DesignToken<SpaceValue>;
61
- paddingInlineEnd: DesignToken<SpaceValue>;
62
- borderColor: DesignToken<BorderColorValue>;
63
- borderWidth: DesignToken<BorderWidthValue>;
64
- borderStyle: DesignToken<BorderStyleValue>;
65
- borderRadius: DesignToken<BorderRadiusValue>;
66
- color: DesignToken<ColorValue>;
67
- _hover: StateTokens;
68
- _focus: StateWithShadowTokens;
69
- _active: StateTokens;
70
- _loading: StateTokens;
71
- _disabled: StateTokens;
72
- primary: PrimaryVariationTokens;
73
- menu: MenuVariationTokens;
74
- link: LinkVariationTokens;
75
- small: ButtonSizeTokens;
76
- large: ButtonSizeTokens;
77
- loaderWrapper: {
78
- alignItems: DesignToken<AlignItemsValue>;
79
- gap: DesignToken<SpaceValue>;
80
- };
81
- }
82
- export declare const button: ButtonTokens;
1
+ import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
2
+ declare type StateTokens<Output> = DesignTokenProperties<'backgroundColor' | 'borderColor' | 'color', Output>;
3
+ declare type StateWithShadowTokens<Output> = StateTokens<Output> & DesignTokenProperties<'boxShadow', Output>;
4
+ declare type MenuStateTokens<Output> = Omit<StateTokens<Output>, 'borderColor'>;
5
+ declare type PrimaryVariationTokens<Output> = StateTokens<Output> & DesignTokenProperties<'borderStyle' | 'borderWidth', Output> & {
6
+ _disabled?: StateTokens<Output>;
7
+ _loading?: StateTokens<Output>;
8
+ _hover?: StateTokens<Output>;
9
+ _focus?: StateWithShadowTokens<Output>;
10
+ _active?: StateTokens<Output>;
11
+ };
12
+ declare type MenuVariationTokens<Output> = DesignTokenProperties<'backgroundColor' | 'borderWidth' | 'justifyContent', Output> & {
13
+ _hover?: MenuStateTokens<Output>;
14
+ _focus?: MenuStateTokens<Output>;
15
+ _active?: MenuStateTokens<Output>;
16
+ _disabled?: Omit<StateTokens<Output>, 'borderColor' | 'backgroundColor'>;
17
+ };
18
+ declare type LinkVariationTokens<Output> = DesignTokenProperties<'backgroundColor' | 'borderColor' | 'borderWidth' | 'color', Output> & {
19
+ _hover?: StateTokens<Output>;
20
+ _focus?: StateWithShadowTokens<Output>;
21
+ _active?: StateTokens<Output>;
22
+ _disabled?: StateTokens<Output>;
23
+ _loading?: StateTokens<Output>;
24
+ };
25
+ declare type ButtonSizeTokens<Output> = DesignTokenProperties<'fontSize' | 'paddingBlockStart' | 'paddingBlockEnd' | 'paddingInlineStart' | 'paddingInlineEnd', Output>;
26
+ export declare type ButtonTokens<Output extends OutputVariantKey> = DesignTokenProperties<'fontWeight' | 'transitionDuration' | 'fontSize' | 'lineHeight' | 'paddingBlockStart' | 'paddingBlockEnd' | 'paddingInlineStart' | 'paddingInlineEnd' | 'borderColor' | 'borderWidth' | 'borderStyle' | 'borderRadius' | 'color'> & {
27
+ _hover?: StateTokens<Output>;
28
+ _focus?: StateWithShadowTokens<Output>;
29
+ _active?: StateTokens<Output>;
30
+ _loading?: StateTokens<Output>;
31
+ _disabled?: StateTokens<Output>;
32
+ primary?: PrimaryVariationTokens<Output>;
33
+ menu?: MenuVariationTokens<Output>;
34
+ link?: LinkVariationTokens<Output>;
35
+ small?: ButtonSizeTokens<Output>;
36
+ large?: ButtonSizeTokens<Output>;
37
+ loaderWrapper: DesignTokenProperties<'alignItems' | 'gap', Output>;
38
+ };
39
+ export declare const button: Required<ButtonTokens<'default'>>;
83
40
  export {};
@@ -1,16 +1,9 @@
1
- import { BackgroundColorValue, BorderColorValue, BorderRadiusValue, BorderStyleValue, BorderWidthValue, BoxShadowValue, DesignToken, SpaceValue } from '../types/designToken';
2
- interface CardVariationTokens {
3
- backgroundColor: DesignToken<BackgroundColorValue>;
4
- borderRadius: DesignToken<BorderRadiusValue>;
5
- borderWidth: DesignToken<BorderWidthValue>;
6
- borderStyle: DesignToken<BorderStyleValue>;
7
- borderColor: DesignToken<BorderColorValue>;
8
- boxShadow: DesignToken<BoxShadowValue>;
9
- }
10
- export declare type CardTokens = CardVariationTokens & {
11
- padding: DesignToken<SpaceValue>;
12
- outlined: CardVariationTokens;
13
- elevated: CardVariationTokens;
1
+ import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
2
+ declare type CardVariationStyleKey = 'backgroundColor' | 'borderRadius' | 'borderWidth' | 'borderStyle' | 'borderColor' | 'boxShadow';
3
+ declare type CardVariationTokens<OutputType> = DesignTokenProperties<CardVariationStyleKey, OutputType>;
4
+ export declare type CardTokens<OutputType extends OutputVariantKey> = CardVariationTokens<OutputType> & DesignTokenProperties<'padding', OutputType> & {
5
+ elevated?: CardVariationTokens<OutputType>;
6
+ outlined?: CardVariationTokens<OutputType>;
14
7
  };
15
- export declare const card: CardTokens;
8
+ export declare const card: Required<CardTokens<'default'>>;
16
9
  export {};