@aws-amplify/ui-react 3.5.10 → 3.5.11

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
@@ -3,7 +3,7 @@
3
3
  */
4
4
  /**
5
5
  * Do not edit directly
6
- * Generated on Wed, 26 Oct 2022 18:28:07 GMT
6
+ * Generated on Tue, 01 Nov 2022 23:04:11 GMT
7
7
  */
8
8
  :root, [data-amplify-theme] {
9
9
  --amplify-transforms-slide-x-large: translateX(2em);
@@ -1654,21 +1654,16 @@ strong.amplify-text {
1654
1654
  }
1655
1655
  .amplify-loader circle:last-of-type {
1656
1656
  transform-origin: center center;
1657
- -webkit-animation-name: amplify-loader-circular;
1658
- animation-name: amplify-loader-circular;
1659
- -webkit-animation-timing-function: linear;
1660
- animation-timing-function: linear;
1661
- -webkit-animation-iteration-count: infinite;
1662
- animation-iteration-count: infinite;
1663
- -webkit-animation-duration: var(--amplify-components-loader-animation-duration);
1664
- animation-duration: var(--amplify-components-loader-animation-duration);
1657
+ animation-name: amplify-loader-circular;
1658
+ animation-timing-function: linear;
1659
+ animation-iteration-count: infinite;
1660
+ animation-duration: var(--amplify-components-loader-animation-duration);
1665
1661
  stroke: var(--amplify-components-loader-stroke-filled);
1666
1662
  stroke-linecap: var(--amplify-components-loader-stroke-linecap);
1667
1663
  }
1668
1664
  @media (prefers-reduced-motion) {
1669
1665
  .amplify-loader circle:last-of-type {
1670
- -webkit-animation: none;
1671
- animation: none;
1666
+ animation: none;
1672
1667
  stroke-dasharray: 100% 200%;
1673
1668
  stroke-dashoffset: 50%;
1674
1669
  }
@@ -1676,19 +1671,14 @@ strong.amplify-text {
1676
1671
  .amplify-loader line:last-of-type {
1677
1672
  stroke: var(--amplify-components-loader-linear-stroke-filled);
1678
1673
  stroke-dasharray: 50% 200%;
1679
- -webkit-animation-name: amplify-loader-linear;
1680
- animation-name: amplify-loader-linear;
1681
- -webkit-animation-duration: var(--amplify-components-loader-linear-animation-duration);
1682
- animation-duration: var(--amplify-components-loader-linear-animation-duration);
1683
- -webkit-animation-timing-function: linear;
1684
- animation-timing-function: linear;
1685
- -webkit-animation-iteration-count: infinite;
1686
- animation-iteration-count: infinite;
1674
+ animation-name: amplify-loader-linear;
1675
+ animation-duration: var(--amplify-components-loader-linear-animation-duration);
1676
+ animation-timing-function: linear;
1677
+ animation-iteration-count: infinite;
1687
1678
  }
1688
1679
  @media (prefers-reduced-motion) {
1689
1680
  .amplify-loader line:last-of-type {
1690
- -webkit-animation: none;
1691
- animation: none;
1681
+ animation: none;
1692
1682
  stroke-dashoffset: -50%;
1693
1683
  }
1694
1684
  }
@@ -1723,13 +1713,11 @@ strong.amplify-text {
1723
1713
  font-size: var(--amplify-internal-loader-linear-font-size);
1724
1714
  }
1725
1715
  .amplify-loader--determinate circle:last-of-type {
1726
- -webkit-animation: none;
1727
- animation: none;
1716
+ animation: none;
1728
1717
  transform: rotate(-90deg);
1729
1718
  }
1730
1719
  .amplify-loader--determinate line:last-of-type {
1731
- -webkit-animation: none;
1732
- animation: none;
1720
+ animation: none;
1733
1721
  stroke-dashoffset: 0%;
1734
1722
  stroke-dasharray: none;
1735
1723
  }
@@ -1738,20 +1726,6 @@ strong.amplify-text {
1738
1726
  stroke: none;
1739
1727
  }
1740
1728
 
1741
- @-webkit-keyframes amplify-loader-circular {
1742
- 0% {
1743
- stroke-dasharray: 100% 200%;
1744
- transform: rotate(120deg);
1745
- }
1746
- 50% {
1747
- stroke-dasharray: 20% 400%;
1748
- }
1749
- 100% {
1750
- stroke-dasharray: 100% 200%;
1751
- transform: rotate(480deg);
1752
- }
1753
- }
1754
-
1755
1729
  @keyframes amplify-loader-circular {
1756
1730
  0% {
1757
1731
  stroke-dasharray: 100% 200%;
@@ -1765,14 +1739,6 @@ strong.amplify-text {
1765
1739
  transform: rotate(480deg);
1766
1740
  }
1767
1741
  }
1768
- @-webkit-keyframes amplify-loader-linear {
1769
- 0% {
1770
- stroke-dashoffset: 200%;
1771
- }
1772
- 100% {
1773
- stroke-dashoffset: -50%;
1774
- }
1775
- }
1776
1742
  @keyframes amplify-loader-linear {
1777
1743
  0% {
1778
1744
  stroke-dashoffset: 200%;
@@ -1782,14 +1748,10 @@ strong.amplify-text {
1782
1748
  }
1783
1749
  }
1784
1750
  .amplify-placeholder {
1785
- -webkit-animation-direction: alternate;
1786
- animation-direction: alternate;
1787
- -webkit-animation-duration: var(--amplify-components-placeholder-transition-duration);
1788
- animation-duration: var(--amplify-components-placeholder-transition-duration);
1789
- -webkit-animation-iteration-count: infinite;
1790
- animation-iteration-count: infinite;
1791
- -webkit-animation-name: amplify-placeholder-loading;
1792
- animation-name: amplify-placeholder-loading;
1751
+ animation-direction: alternate;
1752
+ animation-duration: var(--amplify-components-placeholder-transition-duration);
1753
+ animation-iteration-count: infinite;
1754
+ animation-name: amplify-placeholder-loading;
1793
1755
  border-radius: var(--amplify-components-placeholder-border-radius);
1794
1756
  height: var(--amplify-components-placeholder-default-height);
1795
1757
  width: 100%;
@@ -1802,15 +1764,6 @@ strong.amplify-text {
1802
1764
  height: var(--amplify-components-placeholder-large-height);
1803
1765
  }
1804
1766
 
1805
- @-webkit-keyframes amplify-placeholder-loading {
1806
- 0% {
1807
- background-color: var(--amplify-components-placeholder-start-color);
1808
- }
1809
- 100% {
1810
- background-color: var(--amplify-components-placeholder-end-color);
1811
- }
1812
- }
1813
-
1814
1767
  @keyframes amplify-placeholder-loading {
1815
1768
  0% {
1816
1769
  background-color: var(--amplify-components-placeholder-start-color);
@@ -1821,8 +1774,7 @@ strong.amplify-text {
1821
1774
  }
1822
1775
  @media (prefers-reduced-motion: reduce) {
1823
1776
  .amplify-placeholder {
1824
- -webkit-animation: none;
1825
- animation: none;
1777
+ animation: none;
1826
1778
  background-color: var(--amplify-components-placeholder-end-color);
1827
1779
  }
1828
1780
  }
@@ -2279,20 +2231,14 @@ strong.amplify-text {
2279
2231
  padding-inline-end: var(--amplify-components-expander-content-padding-inline-end);
2280
2232
  }
2281
2233
  .amplify-expander__content[data-state=open] {
2282
- -webkit-animation-name: amplify-expander-slide-down;
2283
- animation-name: amplify-expander-slide-down;
2284
- -webkit-animation-duration: var(--amplify-components-expander-content-open-animation-duration);
2285
- animation-duration: var(--amplify-components-expander-content-open-animation-duration);
2286
- -webkit-animation-timing-function: var(--amplify-components-expander-content-open-animation-timing-function);
2287
- animation-timing-function: var(--amplify-components-expander-content-open-animation-timing-function);
2234
+ animation-name: amplify-expander-slide-down;
2235
+ animation-duration: var(--amplify-components-expander-content-open-animation-duration);
2236
+ animation-timing-function: var(--amplify-components-expander-content-open-animation-timing-function);
2288
2237
  }
2289
2238
  .amplify-expander__content[data-state=closed] {
2290
- -webkit-animation-name: amplify-expander-slide-up;
2291
- animation-name: amplify-expander-slide-up;
2292
- -webkit-animation-duration: var(--amplify-components-expander-content-closed-animation-duration);
2293
- animation-duration: var(--amplify-components-expander-content-closed-animation-duration);
2294
- -webkit-animation-timing-function: var(--amplify-components-expander-content-closed-animation-timing-function);
2295
- animation-timing-function: var(--amplify-components-expander-content-closed-animation-timing-function);
2239
+ animation-name: amplify-expander-slide-up;
2240
+ animation-duration: var(--amplify-components-expander-content-closed-animation-duration);
2241
+ animation-timing-function: var(--amplify-components-expander-content-closed-animation-timing-function);
2296
2242
  }
2297
2243
 
2298
2244
  .amplify-expander__content__text {
@@ -2313,15 +2259,6 @@ strong.amplify-text {
2313
2259
  transform: rotate(180deg);
2314
2260
  }
2315
2261
 
2316
- @-webkit-keyframes amplify-expander-slide-down {
2317
- from {
2318
- height: 0;
2319
- }
2320
- to {
2321
- height: auto;
2322
- }
2323
- }
2324
-
2325
2262
  @keyframes amplify-expander-slide-down {
2326
2263
  from {
2327
2264
  height: 0;
@@ -2330,14 +2267,6 @@ strong.amplify-text {
2330
2267
  height: auto;
2331
2268
  }
2332
2269
  }
2333
- @-webkit-keyframes amplify-expander-slide-up {
2334
- from {
2335
- height: auto;
2336
- }
2337
- to {
2338
- height: 0;
2339
- }
2340
- }
2341
2270
  @keyframes amplify-expander-slide-up {
2342
2271
  from {
2343
2272
  height: auto;
@@ -2437,7 +2366,6 @@ strong.amplify-text {
2437
2366
  width: 100%;
2438
2367
  }
2439
2368
  .amplify-field-group__field-wrapper--vertical {
2440
- width: -webkit-fit-content;
2441
2369
  width: -moz-fit-content;
2442
2370
  width: fit-content;
2443
2371
  }
@@ -1,4 +1,4 @@
1
- import { PersistentModel, PersistentModelConstructor, ModelInit, Schema } from '@aws-amplify/datastore';
1
+ import { PersistentModel, PersistentModelConstructor, ModelInit, PersistentModelMetaData, Schema } from '@aws-amplify/datastore';
2
2
  /**
3
3
  * Converts a Model's field values to types supported by
4
4
  * Amplify UI field components. This is required
@@ -8,7 +8,7 @@ import { PersistentModel, PersistentModelConstructor, ModelInit, Schema } from '
8
8
  declare type ModelFields<Type> = {
9
9
  [Property in keyof Type]: string | number | boolean;
10
10
  };
11
- export declare type DataStoreActionFields<Model> = ModelInit<Model> | ModelFields<ModelInit<Model>>;
11
+ export declare type DataStoreActionFields<Model> = ModelInit<Model, PersistentModelMetaData<Model>> | ModelFields<ModelInit<Model, PersistentModelMetaData<Model>>>;
12
12
  export interface UseDataStoreActionOptions<Model extends PersistentModel> {
13
13
  model: PersistentModelConstructor<Model>;
14
14
  /**
@@ -23,5 +23,5 @@ export interface UseDataStoreActionOptions<Model extends PersistentModel> {
23
23
  */
24
24
  schema?: Schema;
25
25
  }
26
- export declare function isAlreadyTyped<Model>(fields: DataStoreActionFields<Model>, schema: Schema): fields is ModelInit<Model>;
26
+ export declare function isAlreadyTyped<Model>(fields: DataStoreActionFields<Model>, schema: Schema): fields is ModelInit<Model, PersistentModelMetaData<Model>>;
27
27
  export {};
@@ -1,17 +1,15 @@
1
- import { ModelInit, Schema } from '@aws-amplify/datastore';
1
+ import { ModelInit, PersistentModelMetaData, Schema } from '@aws-amplify/datastore';
2
2
  import { DataStoreActionFields } from './types';
3
3
  interface UseTypeCastFieldsProps<Model> {
4
4
  fields: DataStoreActionFields<Model>;
5
5
  modelName: string;
6
6
  schema: Schema;
7
7
  }
8
- declare type UseTypeCastFieldsReturn<Model> = ModelInit<Model> | undefined;
8
+ declare type UseTypeCastFieldsReturn<Model> = ModelInit<Model, PersistentModelMetaData<Model>> | undefined;
9
9
  /**
10
10
  * Optimistically casts field string values to types required by
11
11
  * datastore based on the schema type
12
12
  * @see: See https://docs.aws.amazon.com/appsync/latest/devguide/scalars.html
13
13
  */
14
- export declare const useTypeCastFields: <Model>({ fields, modelName, schema, }: UseTypeCastFieldsProps<Model>) => ModelInit<Model, {
15
- readOnlyFields: "createdAt" | "updatedAt";
16
- }>;
14
+ export declare const useTypeCastFields: <Model>({ fields, modelName, schema, }: UseTypeCastFieldsProps<Model>) => ModelInit<Model, PersistentModelMetaData<Model>>;
17
15
  export {};
@@ -6,6 +6,4 @@ export interface UseDataStoreCreateActionOptions<Model extends PersistentModel>
6
6
  * Action to Create DataStore item
7
7
  * @internal
8
8
  */
9
- export declare const useDataStoreCreateAction: <Model extends Readonly<{
10
- id: string;
11
- } & Record<string, any>>>({ model, fields, schema, }: UseDataStoreCreateActionOptions<Model>) => (() => Promise<void>);
9
+ export declare const useDataStoreCreateAction: <Model extends Readonly<Record<string, any>>>({ model, fields: initialFields, schema, }: UseDataStoreCreateActionOptions<Model>) => (() => Promise<void>);
@@ -1,12 +1,10 @@
1
- import { PersistentModel, PersistentModelConstructor } from '@aws-amplify/datastore';
1
+ import { PersistentModel, PersistentModelConstructor, PersistentModelMetaData, IdentifierFieldOrIdentifierObject } from '@aws-amplify/datastore';
2
2
  export interface UseDataStoreDeleteActionOptions<Model extends PersistentModel> {
3
3
  model: PersistentModelConstructor<Model>;
4
- id: string;
4
+ id: IdentifierFieldOrIdentifierObject<Model, PersistentModelMetaData<Model>>;
5
5
  }
6
6
  /**
7
7
  * Action to Delete DataStore item
8
8
  * @internal
9
9
  */
10
- export declare const useDataStoreDeleteAction: <Model extends Readonly<{
11
- id: string;
12
- } & Record<string, any>>>({ model, id, }: UseDataStoreDeleteActionOptions<Model>) => (() => Promise<void>);
10
+ export declare const useDataStoreDeleteAction: <Model extends Readonly<Record<string, any>>>({ model, id, }: UseDataStoreDeleteActionOptions<Model>) => (() => Promise<void>);
@@ -1,12 +1,10 @@
1
- import { PersistentModel } from '@aws-amplify/datastore';
1
+ import { IdentifierFieldOrIdentifierObject, PersistentModel, PersistentModelMetaData } from '@aws-amplify/datastore';
2
2
  import { UseDataStoreActionOptions } from './shared/types';
3
3
  export interface UseDataStoreUpdateActionOptions<Model extends PersistentModel> extends UseDataStoreActionOptions<Model> {
4
- id: string;
4
+ id: IdentifierFieldOrIdentifierObject<Model, PersistentModelMetaData<Model>>;
5
5
  }
6
6
  /**
7
7
  * Action to Update DataStore item
8
8
  * @internal
9
9
  */
10
- export declare const useDataStoreUpdateAction: <Model extends Readonly<{
11
- id: string;
12
- } & Record<string, any>>>({ fields, id, model, schema, }: UseDataStoreUpdateActionOptions<Model>) => (() => Promise<void>);
10
+ export declare const useDataStoreUpdateAction: <Model extends Readonly<Record<string, any>>>({ fields: initialFields, id, model, schema, }: UseDataStoreUpdateActionOptions<Model>) => (() => Promise<void>);
@@ -4,16 +4,12 @@ import { DataStoreBindingProps, DataStoreCollectionProps, DataStoreCollectionRes
4
4
  * Perform a collection query against a DataStore model
5
5
  * @internal
6
6
  */
7
- export declare const useDataStoreCollection: <M extends Readonly<{
8
- id: string;
9
- } & Record<string, any>>>({ model, criteria, pagination, }: DataStoreCollectionProps<M>) => DataStoreCollectionResult<M>;
7
+ export declare const useDataStoreCollection: <M extends Readonly<Record<string, any>>>({ model, criteria, pagination, }: DataStoreCollectionProps<M>) => DataStoreCollectionResult<M>;
10
8
  /**
11
9
  * Perform a single record query against a DataStore model
12
10
  * @internal
13
11
  */
14
- export declare const useDataStoreItem: <M extends Readonly<{
15
- id: string;
16
- } & Record<string, any>>>({ model, id, }: DataStoreItemProps<M>) => DataStoreItemResult<M>;
12
+ export declare const useDataStoreItem: <M extends Readonly<Record<string, any>>>({ model, id, }: DataStoreItemProps<M>) => DataStoreItemResult<M>;
17
13
  /**
18
14
  * Perform a query against a DataStore model
19
15
  * @internal
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { StepperFieldProps } from '../types/stepperField';
3
- export declare const useStepper: ({ defaultValue, value, step, max, min, isDisabled, isReadOnly, onDecrease, onIncrease, onStepChange, }: StepperFieldProps) => {
3
+ export declare const useStepper: ({ defaultValue, value: controlledValue, step, max, min, isDisabled, isReadOnly, onDecrease, onIncrease, onStepChange, }: StepperFieldProps) => {
4
4
  step: number;
5
5
  value: number;
6
6
  inputValue: string | number;
@@ -4,6 +4,4 @@ import { DataStorePredicateObject } from '../types/datastore';
4
4
  * Creates a DataStore compatible predicate function from an object representation
5
5
  * @internal
6
6
  */
7
- export declare const createDataStorePredicate: <Model extends Readonly<{
8
- id: string;
9
- } & Record<string, any>>>(predicateObject: DataStorePredicateObject) => ProducerModelPredicate<Model>;
7
+ export declare const createDataStorePredicate: <Model extends Readonly<Record<string, any>>>(predicateObject: DataStorePredicateObject) => ProducerModelPredicate<Model>;
@@ -1,7 +1,7 @@
1
- import { PersistentModel, PersistentModelConstructor, ProducerModelPredicate, ProducerPaginationInput } from '@aws-amplify/datastore';
1
+ import { IdentifierFieldOrIdentifierObject, PersistentModel, PersistentModelConstructor, PersistentModelMetaData, ProducerModelPredicate, ProducerPaginationInput } from '@aws-amplify/datastore';
2
2
  export declare type DataStoreItemProps<Model extends PersistentModel> = {
3
3
  model: PersistentModelConstructor<Model>;
4
- id: string;
4
+ id: IdentifierFieldOrIdentifierObject<Model, PersistentModelMetaData<Model>>;
5
5
  };
6
6
  export declare type DataStoreCollectionProps<Model extends PersistentModel> = {
7
7
  model: PersistentModelConstructor<Model>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/ui-react",
3
- "version": "3.5.10",
3
+ "version": "3.5.11",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "exports": {
@@ -67,7 +67,7 @@
67
67
  "lodash": "4.17.21",
68
68
  "mapbox-gl": "1.13.1",
69
69
  "maplibre-gl": "2.1.9",
70
- "maplibre-gl-js-amplify": "2.0.4",
70
+ "maplibre-gl-js-amplify": "2.1.0",
71
71
  "qrcode": "1.5.0",
72
72
  "react-generate-context": "1.0.1",
73
73
  "react-map-gl": "7.0.15",