@aws-amplify/ui-react 2.15.2 → 2.15.3

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/styles.css CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  /**
6
6
  * Do not edit directly
7
- * Generated on Mon, 11 Apr 2022 18:40:17 GMT
7
+ * Generated on Wed, 13 Apr 2022 22:17:55 GMT
8
8
  */
9
9
 
10
10
  :root, [data-amplify-theme] {
@@ -249,7 +249,6 @@
249
249
  --amplify-components-menu-item-min-height: 2.5rem;
250
250
  --amplify-components-menu-min-width: 14rem;
251
251
  --amplify-components-menu-max-width: 30rem;
252
- --amplify-components-menu-gap: 0;
253
252
  --amplify-components-menu-flex-direction: column;
254
253
  --amplify-components-menu-border-style: solid;
255
254
  --amplify-components-loader-linear-animation-duration: 1s;
@@ -271,7 +270,6 @@
271
270
  --amplify-components-fieldmessages-description-font-style: italic;
272
271
  --amplify-components-fieldgroup-outer-align-items: center;
273
272
  --amplify-components-fieldgroup-vertical-align-items: center;
274
- --amplify-components-fieldgroup-gap: 0;
275
273
  --amplify-components-fieldcontrol-disabled-cursor: not-allowed;
276
274
  --amplify-components-fieldcontrol-quiet-border-radius: 0;
277
275
  --amplify-components-fieldcontrol-quiet-border-block-start: none;
@@ -290,7 +288,6 @@
290
288
  --amplify-components-expander-width: 100%;
291
289
  --amplify-components-expander-display: block;
292
290
  --amplify-components-divider-border-style: solid;
293
- --amplify-components-countrycodeselect-height: 100%;
294
291
  --amplify-components-checkboxfield-justify-content: center;
295
292
  --amplify-components-checkboxfield-flex-direction: column;
296
293
  --amplify-components-checkboxfield-align-content: center;
@@ -327,12 +324,10 @@
327
324
  --amplify-components-button-link-active-border-color: transparent;
328
325
  --amplify-components-button-link-focus-border-color: transparent;
329
326
  --amplify-components-button-link-hover-border-color: transparent;
330
- --amplify-components-button-link-background-color: transparent;
331
327
  --amplify-components-button-link-border-color: transparent;
332
- --amplify-components-button-link-border-width: 0;
328
+ --amplify-components-button-link-background-color: transparent;
333
329
  --amplify-components-button-menu-justify-content: start;
334
330
  --amplify-components-button-menu-background-color: transparent;
335
- --amplify-components-button-menu-border-width: 0;
336
331
  --amplify-components-button-primary-active-border-color: transparent;
337
332
  --amplify-components-button-primary-focus-border-color: transparent;
338
333
  --amplify-components-button-primary-hover-border-color: transparent;
@@ -492,6 +487,7 @@
492
487
  --amplify-components-menu-large-width: var(--amplify-font-sizes-xxxl);
493
488
  --amplify-components-menu-small-height: var(--amplify-font-sizes-medium);
494
489
  --amplify-components-menu-small-width: var(--amplify-font-sizes-medium);
490
+ --amplify-components-menu-gap: var(--amplify-space-zero);
495
491
  --amplify-components-menu-border-width: var(--amplify-border-widths-small);
496
492
  --amplify-components-menu-border-radius: var(--amplify-radii-medium);
497
493
  --amplify-components-menu-background-color: var(--amplify-colors-white);
@@ -530,6 +526,7 @@
530
526
  --amplify-components-flex-gap: var(--amplify-space-medium);
531
527
  --amplify-components-fieldmessages-description-font-size: var(--amplify-font-sizes-small);
532
528
  --amplify-components-fieldmessages-error-font-size: var(--amplify-font-sizes-small);
529
+ --amplify-components-fieldgroup-gap: var(--amplify-space-zero);
533
530
  --amplify-components-fieldcontrol-disabled-border-color: var(--amplify-colors-transparent);
534
531
  --amplify-components-fieldcontrol-quiet-border-block-end: var(--amplify-border-widths-small) solid var(--amplify-colors-border-primary);
535
532
  --amplify-components-fieldcontrol-large-padding-inline-end: var(--amplify-space-medium);
@@ -584,6 +581,7 @@
584
581
  --amplify-components-divider-label-font-size: var(--amplify-font-sizes-small);
585
582
  --amplify-components-divider-label-padding-inline: var(--amplify-space-medium);
586
583
  --amplify-components-divider-border-width: var(--amplify-border-widths-medium);
584
+ --amplify-components-countrycodeselect-height: var(--amplify-space-relative-full);
587
585
  --amplify-components-copy-tool-tip-font-size: var(--amplify-font-sizes-xxs);
588
586
  --amplify-components-copy-tool-tip-color: var(--amplify-colors-teal-100);
589
587
  --amplify-components-copy-tool-tip-bottom: var(--amplify-space-large);
@@ -606,6 +604,8 @@
606
604
  --amplify-components-card-padding: var(--amplify-space-medium);
607
605
  --amplify-components-card-border-radius: var(--amplify-radii-xs);
608
606
  --amplify-components-button-loader-wrapper-gap: var(--amplify-space-xs);
607
+ --amplify-components-button-link-border-width: var(--amplify-space-zero);
608
+ --amplify-components-button-menu-border-width: var(--amplify-space-zero);
609
609
  --amplify-components-button-primary-border-width: var(--amplify-border-widths-small);
610
610
  --amplify-components-button-border-style: var(--amplify-components-fieldcontrol-border-style);
611
611
  --amplify-components-button-font-weight: 700;
@@ -701,7 +701,7 @@
701
701
  --amplify-components-fieldmessages-error-color: var(--amplify-colors-font-error);
702
702
  --amplify-components-fieldcontrol-error-focus-box-shadow: 0px 0px 0px 1px var(--amplify-colors-border-error);
703
703
  --amplify-components-fieldcontrol-error-border-color: var(--amplify-colors-border-error);
704
- --amplify-components-fieldcontrol-quiet-error-focus-box-shadow: 0px 1px var(--amplify-colors-border-error);
704
+ --amplify-components-fieldcontrol-quiet-error-focus-box-shadow: 0px 1px 0px var(--amplify-colors-border-error);
705
705
  --amplify-components-fieldcontrol-quiet-error-border-block-end-color: var(--amplify-colors-border-error);
706
706
  --amplify-components-fieldcontrol-large-font-size: var(--amplify-components-field-large-font-size);
707
707
  --amplify-components-fieldcontrol-small-font-size: var(--amplify-components-field-small-font-size);
@@ -820,7 +820,7 @@
820
820
  --amplify-components-fieldcontrol-disabled-color: var(--amplify-colors-font-disabled);
821
821
  --amplify-components-fieldcontrol-focus-box-shadow: 0px 0px 0px 1px var(--amplify-colors-border-focus);
822
822
  --amplify-components-fieldcontrol-focus-border-color: var(--amplify-colors-border-focus);
823
- --amplify-components-fieldcontrol-quiet-focus-box-shadow: 0px 1px var(--amplify-colors-border-focus);
823
+ --amplify-components-fieldcontrol-quiet-focus-box-shadow: 0px 1px 0px var(--amplify-colors-border-focus);
824
824
  --amplify-components-fieldcontrol-quiet-focus-border-block-end-color: var(--amplify-colors-border-focus);
825
825
  --amplify-components-expander-item-focus-box-shadow: 0 0 0 2px var(--amplify-colors-border-focus);
826
826
  --amplify-components-checkbox-label-disabled-color: var(--amplify-colors-font-disabled);
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export declare function SignIn(): JSX.Element;
3
3
  export declare namespace SignIn {
4
- var Header: () => JSX.Element;
5
4
  var Footer: () => JSX.Element;
5
+ var Header: () => JSX.Element;
6
6
  }
@@ -1,45 +1,20 @@
1
1
  /// <reference types="react" />
2
- export declare const defaultComponents: {
3
- Header: () => JSX.Element;
4
- SignIn: {
5
- Header: () => JSX.Element;
6
- Footer: () => JSX.Element;
7
- };
8
- SignUp: {
9
- Header: () => JSX.Element;
10
- FormFields: () => JSX.Element;
11
- Footer: () => JSX.Element;
12
- };
13
- ConfirmSignUp: {
14
- Header: () => JSX.Element;
15
- Footer: () => JSX.Element;
16
- };
17
- SetupTOTP: {
18
- Header: () => JSX.Element;
19
- Footer: () => JSX.Element;
20
- };
21
- ConfirmResetPassword: {
22
- Header: () => JSX.Element;
23
- Footer: () => JSX.Element;
24
- };
25
- ConfirmSignIn: {
26
- Header: () => JSX.Element;
27
- Footer: () => JSX.Element;
28
- };
29
- VerifyUser: {
30
- Header: () => JSX.Element;
31
- Footer: () => JSX.Element;
32
- };
33
- ConfirmVerifyUser: {
34
- Header: () => JSX.Element;
35
- Footer: () => JSX.Element;
36
- };
37
- ForceNewPassword: {
38
- FormFields: () => JSX.Element;
39
- };
40
- ResetPassword: {
41
- Header: () => JSX.Element;
42
- Footer: () => JSX.Element;
43
- };
44
- Footer: () => JSX.Element;
45
- };
2
+ interface Components {
3
+ Footer?: () => JSX.Element;
4
+ FormFields?: () => JSX.Element;
5
+ Header?: () => JSX.Element;
6
+ }
7
+ export interface DefaultComponents extends Omit<Components, 'FormFields'> {
8
+ ConfirmSignIn?: Omit<Components, 'FormFields'>;
9
+ ConfirmSignUp?: Omit<Components, 'FormFields'>;
10
+ ConfirmResetPassword?: Omit<Components, 'FormFields'>;
11
+ ConfirmVerifyUser?: Omit<Components, 'FormFields'>;
12
+ ForceNewPassword?: Pick<Components, 'FormFields'>;
13
+ ResetPassword?: Omit<Components, 'FormFields'>;
14
+ SetupTOTP?: Omit<Components, 'FormFields'>;
15
+ SignIn?: Omit<Components, 'FormFields'>;
16
+ SignUp?: Components;
17
+ VerifyUser?: Omit<Components, 'FormFields'>;
18
+ }
19
+ export declare const defaultComponents: DefaultComponents;
20
+ export {};
@@ -1,8 +1,7 @@
1
1
  import * as React from 'react';
2
- import { PartialDeep } from 'src/types';
3
- import { defaultComponents } from './defaultComponents';
2
+ import { DefaultComponents } from './defaultComponents';
4
3
  export interface ComponentsProviderProps {
5
- components?: PartialDeep<typeof defaultComponents>;
4
+ components?: DefaultComponents;
6
5
  }
7
6
  export declare const CustomComponentsContext: React.Context<ComponentsProviderProps>;
8
7
  export declare const useCustomComponents: () => ComponentsProviderProps;
@@ -3,8 +3,8 @@ export interface UseComposeRefsCallbackProps<RefType> {
3
3
  externalRef: React.ForwardedRef<RefType>;
4
4
  internalRef: React.MutableRefObject<RefType>;
5
5
  }
6
- export declare type UseComposeRefsCallbackReturn<RefType> = (node: RefType) => void;
6
+ export declare type UseComposeRefsCallback<RefType> = (node: RefType) => void;
7
7
  /**
8
8
  * Creates ref callback to compose together external and internal refs
9
9
  */
10
- export declare const useComposeRefsCallback: <RefType>({ externalRef, internalRef, }: UseComposeRefsCallbackProps<RefType>) => UseComposeRefsCallbackReturn<RefType>;
10
+ export declare function useComposeRefsCallback<RefType>({ externalRef, internalRef, }: UseComposeRefsCallbackProps<RefType>): UseComposeRefsCallback<RefType>;
@@ -5,5 +5,5 @@ export declare const useSearchField: ({ onSubmit, onClear, externalRef, }: UseSe
5
5
  onKeyDown: (event: any) => void;
6
6
  onInput: (event: any) => void;
7
7
  onClick: () => void;
8
- composedRefs: import("../../hooks/useComposeRefsCallback").UseComposeRefsCallbackReturn<HTMLInputElement>;
8
+ composedRefs: import("../../hooks/useComposeRefsCallback").UseComposeRefsCallback<HTMLInputElement>;
9
9
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/ui-react",
3
- "version": "2.15.2",
3
+ "version": "2.15.3",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "exports": {
@@ -45,20 +45,18 @@
45
45
  "build:ts": "rollup --config",
46
46
  "build:catalog": "ts-node scripts/generatePrimitivesCatalog.ts",
47
47
  "dev": "rollup --config --watch",
48
- "eslint:primitives": "eslint ./src/primitives --ext .js,.ts,.tsx",
49
48
  "update:icons": "node scripts/updateIcons.js",
50
49
  "build:icons": "yarn run clean:icons && node scripts/generateIcons.js",
51
50
  "clean": "rimraf dist node_modules",
52
51
  "clean:icons": "rimraf ./src/primitives/Icon/icons",
53
- "primitives:new": "hygen primitives new",
54
- "lint": "tsc --noEmit && yarn eslint:primitives",
52
+ "lint": "tsc --noEmit && yarn eslint ./src --ext .js,.ts,.tsx",
55
53
  "test": "yarn test:unit",
56
54
  "test:watch": "yarn test:unit:watch",
57
55
  "test:unit": "jest",
58
56
  "test:unit:watch": "jest --watch"
59
57
  },
60
58
  "dependencies": {
61
- "@aws-amplify/ui": "3.6.2",
59
+ "@aws-amplify/ui": "3.6.3",
62
60
  "@aws-amplify/ui-react-v1": "npm:@aws-amplify/ui-react@1.2.9",
63
61
  "@radix-ui/react-accordion": "0.1.6",
64
62
  "@radix-ui/react-dropdown-menu": "0.1.6",
@@ -69,8 +67,8 @@
69
67
  "deepmerge": "4.2.2",
70
68
  "lodash": "4.17.21",
71
69
  "mapbox-gl": "npm:empty-npm-package@1.0.0",
72
- "maplibre-gl-js-amplify": "1.2.3",
73
70
  "maplibre-gl": "1.15.2",
71
+ "maplibre-gl-js-amplify": "1.2.3",
74
72
  "qrcode": "1.5.0",
75
73
  "react-generate-context": "1.0.1",
76
74
  "react-map-gl": "7.0.10"
@@ -100,7 +98,6 @@
100
98
  "degit": "^2.8.4",
101
99
  "eslint": "^8.4.1",
102
100
  "eslint-plugin-react-hooks": "^4.3.0",
103
- "hygen": "^6.1.0",
104
101
  "jest": "^27.0.4",
105
102
  "jest-matchmedia-mock": "^1.1.0",
106
103
  "react-router-dom": "^6.2.1",
@@ -1,59 +0,0 @@
1
- import { Primitive } from './Primitive';
2
- /**
3
- Create a type from another type with all keys and nested keys set to optional.
4
-
5
- Use-cases:
6
- - Merging a default settings/config object with another object, the second object would be a deep partial of the default object.
7
- - Mocking and testing complex entities, where populating an entire object with its keys would be redundant in terms of the mock or test.
8
-
9
- @example
10
- ```
11
- import {PartialDeep} from 'type-fest';
12
-
13
- const settings: Settings = {
14
- textEditor: {
15
- fontSize: 14;
16
- fontColor: '#000000';
17
- fontWeight: 400;
18
- }
19
- autocomplete: false;
20
- autosave: true;
21
- };
22
-
23
- const applySavedSettings = (savedSettings: PartialDeep<Settings>) => {
24
- return {...settings, ...savedSettings};
25
- }
26
-
27
- settings = applySavedSettings({textEditor: {fontWeight: 500}});
28
- ```
29
-
30
- @category Utilities
31
- */
32
- export declare type PartialDeep<T> = T extends Primitive ? Partial<T> : T extends Map<infer KeyType, infer ValueType> ? PartialMapDeep<KeyType, ValueType> : T extends Set<infer ItemType> ? PartialSetDeep<ItemType> : T extends ReadonlyMap<infer KeyType, infer ValueType> ? PartialReadonlyMapDeep<KeyType, ValueType> : T extends ReadonlySet<infer ItemType> ? PartialReadonlySetDeep<ItemType> : T extends (...args: any[]) => unknown ? T | undefined : T extends object ? T extends Array<infer ItemType> ? ItemType[] extends T ? Array<PartialDeep<ItemType | undefined>> : PartialObjectDeep<T> : PartialObjectDeep<T> : unknown;
33
- /**
34
- Same as `PartialDeep`, but accepts only `Map`s and as inputs. Internal helper for `PartialDeep`.
35
- */
36
- interface PartialMapDeep<KeyType, ValueType> extends Map<PartialDeep<KeyType>, PartialDeep<ValueType>> {
37
- }
38
- /**
39
- Same as `PartialDeep`, but accepts only `Set`s as inputs. Internal helper for `PartialDeep`.
40
- */
41
- interface PartialSetDeep<T> extends Set<PartialDeep<T>> {
42
- }
43
- /**
44
- Same as `PartialDeep`, but accepts only `ReadonlyMap`s as inputs. Internal helper for `PartialDeep`.
45
- */
46
- interface PartialReadonlyMapDeep<KeyType, ValueType> extends ReadonlyMap<PartialDeep<KeyType>, PartialDeep<ValueType>> {
47
- }
48
- /**
49
- Same as `PartialDeep`, but accepts only `ReadonlySet`s as inputs. Internal helper for `PartialDeep`.
50
- */
51
- interface PartialReadonlySetDeep<T> extends ReadonlySet<PartialDeep<T>> {
52
- }
53
- /**
54
- Same as `PartialDeep`, but accepts only `object`s as inputs. Internal helper for `PartialDeep`.
55
- */
56
- declare type PartialObjectDeep<ObjectType extends object> = {
57
- [KeyType in keyof ObjectType]?: PartialDeep<ObjectType[KeyType]>;
58
- };
59
- export {};
@@ -1,5 +0,0 @@
1
- /**
2
- Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
3
- @category Basic
4
- */
5
- export declare type Primitive = null | undefined | string | number | boolean | symbol | bigint;
@@ -1 +0,0 @@
1
- export * from './PartialDeep';