@aws-amplify/ui 3.8.1 → 3.9.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/theme.css CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Mon, 09 May 2022 17:14:39 GMT
3
+ * Generated on Tue, 17 May 2022 21:59:14 GMT
4
4
  */
5
5
 
6
6
  :root, [data-amplify-theme] {
@@ -99,7 +99,7 @@
99
99
  --amplify-colors-neutral-100: hsl(210, 50%, 10%);
100
100
  --amplify-colors-neutral-90: hsl(210, 25%, 25%);
101
101
  --amplify-colors-neutral-80: hsl(210, 10%, 40%);
102
- --amplify-colors-neutral-60: hsl(210, 6%, 70%);
102
+ --amplify-colors-neutral-60: hsl(210, 8%, 55%);
103
103
  --amplify-colors-neutral-40: hsl(210, 5%, 87%);
104
104
  --amplify-colors-neutral-20: hsl(210, 5%, 94%);
105
105
  --amplify-colors-neutral-10: hsl(210, 5%, 98%);
@@ -351,6 +351,7 @@
351
351
  --amplify-colors-background-error: var(--amplify-colors-red-20);
352
352
  --amplify-colors-background-warning: var(--amplify-colors-orange-20);
353
353
  --amplify-colors-background-info: var(--amplify-colors-blue-20);
354
+ --amplify-colors-background-quaternary: var(--amplify-colors-neutral-60);
354
355
  --amplify-colors-background-tertiary: var(--amplify-colors-neutral-20);
355
356
  --amplify-colors-background-secondary: var(--amplify-colors-neutral-10);
356
357
  --amplify-colors-background-primary: var(--amplify-colors-white);
@@ -504,8 +505,6 @@
504
505
  --amplify-components-loader-font-size: var(--amplify-font-sizes-xs);
505
506
  --amplify-components-loader-height: var(--amplify-font-sizes-medium);
506
507
  --amplify-components-loader-width: var(--amplify-font-sizes-medium);
507
- --amplify-components-link-small-font-size: var(--amplify-font-sizes-small);
508
- --amplify-components-link-large-font-size: var(--amplify-font-sizes-large);
509
508
  --amplify-components-heading-line-height: var(--amplify-line-heights-small);
510
509
  --amplify-components-heading-6-font-weight: 800;
511
510
  --amplify-components-heading-6-font-size: var(--amplify-font-sizes-medium);
@@ -665,8 +664,8 @@
665
664
  --amplify-components-table-header-border-color: var(--amplify-colors-border-tertiary);
666
665
  --amplify-components-table-row-striped-background-color: var(--amplify-colors-background-secondary);
667
666
  --amplify-components-table-row-hover-background-color: var(--amplify-colors-background-tertiary);
668
- --amplify-components-switchfield-track-checked-background-color: var(--amplify-colors-brand-primary-60);
669
- --amplify-components-switchfield-track-background-color: var(--amplify-colors-background-tertiary);
667
+ --amplify-components-switchfield-track-checked-background-color: var(--amplify-colors-brand-primary-80);
668
+ --amplify-components-switchfield-track-background-color: var(--amplify-colors-background-quaternary);
670
669
  --amplify-components-switchfield-thumb-border-color: var(--amplify-colors-border-tertiary);
671
670
  --amplify-components-switchfield-thumb-background-color: var(--amplify-colors-background-primary);
672
671
  --amplify-components-sliderfield-thumb-hover-background-color: var(--amplify-colors-background-primary);
@@ -674,7 +673,7 @@
674
673
  --amplify-components-sliderfield-thumb-box-shadow: var(--amplify-shadows-small);
675
674
  --amplify-components-sliderfield-thumb-background-color: var(--amplify-colors-background-primary);
676
675
  --amplify-components-sliderfield-range-background-color: var(--amplify-colors-brand-primary-80);
677
- --amplify-components-sliderfield-track-background-color: var(--amplify-colors-background-tertiary);
676
+ --amplify-components-sliderfield-track-background-color: var(--amplify-colors-background-quaternary);
678
677
  --amplify-components-select-option-background-color: var(--amplify-colors-background-primary);
679
678
  --amplify-components-rating-empty-color: var(--amplify-colors-background-tertiary);
680
679
  --amplify-components-rating-filled-color: var(--amplify-colors-brand-secondary-80);
@@ -2,9 +2,10 @@
2
2
  * This file contains general helpers that state machine or authenticator
3
3
  * implementations can use.
4
4
  */
5
- import { AuthMachineSend } from '../../types';
5
+ import { AuthInterpreter, HubHandler } from '../../types';
6
6
  export declare const censorAllButFirstAndLast: (value: string) => string;
7
7
  export declare const censorPhoneNumber: (val: string) => string;
8
+ export declare const defaultAuthHubHandler: HubHandler;
8
9
  /**
9
10
  * Listens to external auth Hub events and sends corresponding event to
10
11
  * the `authService` of interest
@@ -13,4 +14,4 @@ export declare const censorPhoneNumber: (val: string) => string;
13
14
  *
14
15
  * @returns function that unsubscribes to the hub evenmt
15
16
  */
16
- export declare const listenToAuthHub: (send: AuthMachineSend) => () => void;
17
+ export declare const listenToAuthHub: (service: AuthInterpreter, handler?: HubHandler) => () => void;
@@ -0,0 +1,6 @@
1
+ import { ColorModeOverride } from './types';
2
+ /**
3
+ * A basic dark mode that just flips the base color
4
+ * palette.
5
+ */
6
+ export declare const defaultDarkModeOverride: ColorModeOverride;
@@ -1,3 +1,4 @@
1
1
  export { createTheme } from './createTheme';
2
2
  export { defaultTheme } from './defaultTheme';
3
+ export { defaultDarkModeOverride } from './defaultDarkModeOverride';
3
4
  export * from './types';
@@ -1,17 +1,12 @@
1
- import { ColorValue, DesignToken, FontSizeValue } from '../types/designToken';
1
+ import { ColorValue, DesignToken } from '../types/designToken';
2
2
  interface LinkStateTokens {
3
3
  color: DesignToken<ColorValue>;
4
4
  }
5
- interface LinkSizeTokens {
6
- fontSize: DesignToken<FontSizeValue>;
7
- }
8
5
  export interface LinkTokens {
9
6
  active: LinkStateTokens;
10
7
  color: DesignToken<ColorValue>;
11
8
  focus: LinkStateTokens;
12
9
  hover: LinkStateTokens;
13
- large: LinkSizeTokens;
14
- small: LinkSizeTokens;
15
10
  visited: LinkStateTokens;
16
11
  }
17
12
  export declare const link: LinkTokens;
@@ -3,6 +3,7 @@ export interface OrdinalScale<DesignTokenType = DesignToken<ColorValue>> {
3
3
  primary: DesignTokenType;
4
4
  secondary: DesignTokenType;
5
5
  tertiary: DesignTokenType;
6
+ quaternary?: DesignTokenType;
6
7
  }
7
8
  export interface OrdinalVariation<DesignTokenType = DesignToken<ColorValue>> {
8
9
  info: DesignTokenType;
@@ -5,6 +5,7 @@
5
5
  import { Interpreter } from 'xstate';
6
6
  import { AuthContext } from './context';
7
7
  import { AuthEvent } from './event';
8
+ import { HubCapsule } from '@aws-amplify/core';
8
9
  /**
9
10
  * Intefrace for `authMachine` machine interpreter
10
11
  *
@@ -15,3 +16,4 @@ export declare type AuthInterpreter = Interpreter<AuthContext, any, AuthEvent, a
15
16
  * Function type for `send` in `authMachine`
16
17
  */
17
18
  export declare type AuthMachineSend = AuthInterpreter['send'];
19
+ export declare type HubHandler = (data: HubCapsule, service: AuthInterpreter) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/ui",
3
- "version": "3.8.1",
3
+ "version": "3.9.0",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "exports": {