@aws-amplify/ui-react 3.5.9 → 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/IconWarning-05f44a4f.js +1 -0
- package/dist/esm/primitives/StepperField/StepperField.js +1 -1
- package/dist/esm/primitives/SwitchField/SwitchField.js +1 -1
- package/dist/esm/primitives/TextAreaField/TextAreaField.js +1 -1
- package/dist/esm/primitives/TextField/TextField.js +1 -1
- package/dist/esm/primitives/shared/constants.js +1 -1
- package/dist/index.js +1 -1
- package/dist/internal.js +1 -1
- package/dist/styles.css +34 -98
- package/dist/types/hooks/actions/shared/types.d.ts +3 -3
- package/dist/types/hooks/actions/shared/useTypeCastFields.d.ts +3 -5
- package/dist/types/hooks/actions/useDataStoreCreateAction.d.ts +1 -3
- package/dist/types/hooks/actions/useDataStoreDeleteAction.d.ts +3 -5
- package/dist/types/hooks/actions/useDataStoreUpdateAction.d.ts +3 -5
- package/dist/types/hooks/useDataStore.d.ts +2 -6
- package/dist/types/primitives/StepperField/useStepper.d.ts +1 -1
- package/dist/types/primitives/shared/datastore.d.ts +1 -3
- package/dist/types/primitives/shared/types.d.ts +1 -117
- package/dist/types/primitives/shared/utils.d.ts +1 -1
- package/dist/types/primitives/types/datastore.d.ts +2 -2
- package/package.json +4 -4
- package/dist/IconWarning-7029201b.js +0 -1
- package/dist/esm/primitives/shared/types.js +0 -1
package/dist/styles.css
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* Do not edit directly
|
|
6
|
-
* Generated on Tue,
|
|
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);
|
|
@@ -677,6 +677,7 @@
|
|
|
677
677
|
--amplify-components-table-header-border-color: var(--amplify-colors-border-tertiary);
|
|
678
678
|
--amplify-components-table-row-striped-background-color: var(--amplify-colors-background-secondary);
|
|
679
679
|
--amplify-components-table-row-hover-background-color: var(--amplify-colors-background-tertiary);
|
|
680
|
+
--amplify-components-switchfield-track-error-background-color: var(--amplify-colors-background-error);
|
|
680
681
|
--amplify-components-switchfield-track-checked-background-color: var(--amplify-colors-brand-primary-80);
|
|
681
682
|
--amplify-components-switchfield-track-background-color: var(--amplify-colors-background-quaternary);
|
|
682
683
|
--amplify-components-switchfield-thumb-border-color: var(--amplify-colors-border-tertiary);
|
|
@@ -957,12 +958,14 @@
|
|
|
957
958
|
--amplify-components-collection-search-button-active-color: var(--amplify-components-searchfield-button-active-color);
|
|
958
959
|
}
|
|
959
960
|
|
|
960
|
-
html
|
|
961
|
+
html,
|
|
962
|
+
[data-amplify-theme] {
|
|
961
963
|
font-family: var(--amplify-fonts-default-static);
|
|
962
964
|
}
|
|
963
965
|
|
|
964
966
|
@supports (font-variation-settings: normal) {
|
|
965
|
-
html
|
|
967
|
+
html,
|
|
968
|
+
[data-amplify-theme] {
|
|
966
969
|
font-family: var(--amplify-fonts-default-variable);
|
|
967
970
|
}
|
|
968
971
|
}
|
|
@@ -1651,21 +1654,16 @@ strong.amplify-text {
|
|
|
1651
1654
|
}
|
|
1652
1655
|
.amplify-loader circle:last-of-type {
|
|
1653
1656
|
transform-origin: center center;
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
-webkit-animation-iteration-count: infinite;
|
|
1659
|
-
animation-iteration-count: infinite;
|
|
1660
|
-
-webkit-animation-duration: var(--amplify-components-loader-animation-duration);
|
|
1661
|
-
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);
|
|
1662
1661
|
stroke: var(--amplify-components-loader-stroke-filled);
|
|
1663
1662
|
stroke-linecap: var(--amplify-components-loader-stroke-linecap);
|
|
1664
1663
|
}
|
|
1665
1664
|
@media (prefers-reduced-motion) {
|
|
1666
1665
|
.amplify-loader circle:last-of-type {
|
|
1667
|
-
|
|
1668
|
-
animation: none;
|
|
1666
|
+
animation: none;
|
|
1669
1667
|
stroke-dasharray: 100% 200%;
|
|
1670
1668
|
stroke-dashoffset: 50%;
|
|
1671
1669
|
}
|
|
@@ -1673,19 +1671,14 @@ strong.amplify-text {
|
|
|
1673
1671
|
.amplify-loader line:last-of-type {
|
|
1674
1672
|
stroke: var(--amplify-components-loader-linear-stroke-filled);
|
|
1675
1673
|
stroke-dasharray: 50% 200%;
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
-
|
|
1679
|
-
|
|
1680
|
-
-webkit-animation-timing-function: linear;
|
|
1681
|
-
animation-timing-function: linear;
|
|
1682
|
-
-webkit-animation-iteration-count: infinite;
|
|
1683
|
-
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;
|
|
1684
1678
|
}
|
|
1685
1679
|
@media (prefers-reduced-motion) {
|
|
1686
1680
|
.amplify-loader line:last-of-type {
|
|
1687
|
-
|
|
1688
|
-
animation: none;
|
|
1681
|
+
animation: none;
|
|
1689
1682
|
stroke-dashoffset: -50%;
|
|
1690
1683
|
}
|
|
1691
1684
|
}
|
|
@@ -1720,13 +1713,11 @@ strong.amplify-text {
|
|
|
1720
1713
|
font-size: var(--amplify-internal-loader-linear-font-size);
|
|
1721
1714
|
}
|
|
1722
1715
|
.amplify-loader--determinate circle:last-of-type {
|
|
1723
|
-
|
|
1724
|
-
animation: none;
|
|
1716
|
+
animation: none;
|
|
1725
1717
|
transform: rotate(-90deg);
|
|
1726
1718
|
}
|
|
1727
1719
|
.amplify-loader--determinate line:last-of-type {
|
|
1728
|
-
|
|
1729
|
-
animation: none;
|
|
1720
|
+
animation: none;
|
|
1730
1721
|
stroke-dashoffset: 0%;
|
|
1731
1722
|
stroke-dasharray: none;
|
|
1732
1723
|
}
|
|
@@ -1735,20 +1726,6 @@ strong.amplify-text {
|
|
|
1735
1726
|
stroke: none;
|
|
1736
1727
|
}
|
|
1737
1728
|
|
|
1738
|
-
@-webkit-keyframes amplify-loader-circular {
|
|
1739
|
-
0% {
|
|
1740
|
-
stroke-dasharray: 100% 200%;
|
|
1741
|
-
transform: rotate(120deg);
|
|
1742
|
-
}
|
|
1743
|
-
50% {
|
|
1744
|
-
stroke-dasharray: 20% 400%;
|
|
1745
|
-
}
|
|
1746
|
-
100% {
|
|
1747
|
-
stroke-dasharray: 100% 200%;
|
|
1748
|
-
transform: rotate(480deg);
|
|
1749
|
-
}
|
|
1750
|
-
}
|
|
1751
|
-
|
|
1752
1729
|
@keyframes amplify-loader-circular {
|
|
1753
1730
|
0% {
|
|
1754
1731
|
stroke-dasharray: 100% 200%;
|
|
@@ -1762,14 +1739,6 @@ strong.amplify-text {
|
|
|
1762
1739
|
transform: rotate(480deg);
|
|
1763
1740
|
}
|
|
1764
1741
|
}
|
|
1765
|
-
@-webkit-keyframes amplify-loader-linear {
|
|
1766
|
-
0% {
|
|
1767
|
-
stroke-dashoffset: 200%;
|
|
1768
|
-
}
|
|
1769
|
-
100% {
|
|
1770
|
-
stroke-dashoffset: -50%;
|
|
1771
|
-
}
|
|
1772
|
-
}
|
|
1773
1742
|
@keyframes amplify-loader-linear {
|
|
1774
1743
|
0% {
|
|
1775
1744
|
stroke-dashoffset: 200%;
|
|
@@ -1779,14 +1748,10 @@ strong.amplify-text {
|
|
|
1779
1748
|
}
|
|
1780
1749
|
}
|
|
1781
1750
|
.amplify-placeholder {
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
-
|
|
1785
|
-
|
|
1786
|
-
-webkit-animation-iteration-count: infinite;
|
|
1787
|
-
animation-iteration-count: infinite;
|
|
1788
|
-
-webkit-animation-name: amplify-placeholder-loading;
|
|
1789
|
-
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;
|
|
1790
1755
|
border-radius: var(--amplify-components-placeholder-border-radius);
|
|
1791
1756
|
height: var(--amplify-components-placeholder-default-height);
|
|
1792
1757
|
width: 100%;
|
|
@@ -1799,15 +1764,6 @@ strong.amplify-text {
|
|
|
1799
1764
|
height: var(--amplify-components-placeholder-large-height);
|
|
1800
1765
|
}
|
|
1801
1766
|
|
|
1802
|
-
@-webkit-keyframes amplify-placeholder-loading {
|
|
1803
|
-
0% {
|
|
1804
|
-
background-color: var(--amplify-components-placeholder-start-color);
|
|
1805
|
-
}
|
|
1806
|
-
100% {
|
|
1807
|
-
background-color: var(--amplify-components-placeholder-end-color);
|
|
1808
|
-
}
|
|
1809
|
-
}
|
|
1810
|
-
|
|
1811
1767
|
@keyframes amplify-placeholder-loading {
|
|
1812
1768
|
0% {
|
|
1813
1769
|
background-color: var(--amplify-components-placeholder-start-color);
|
|
@@ -1818,8 +1774,7 @@ strong.amplify-text {
|
|
|
1818
1774
|
}
|
|
1819
1775
|
@media (prefers-reduced-motion: reduce) {
|
|
1820
1776
|
.amplify-placeholder {
|
|
1821
|
-
|
|
1822
|
-
animation: none;
|
|
1777
|
+
animation: none;
|
|
1823
1778
|
background-color: var(--amplify-components-placeholder-end-color);
|
|
1824
1779
|
}
|
|
1825
1780
|
}
|
|
@@ -2276,20 +2231,14 @@ strong.amplify-text {
|
|
|
2276
2231
|
padding-inline-end: var(--amplify-components-expander-content-padding-inline-end);
|
|
2277
2232
|
}
|
|
2278
2233
|
.amplify-expander__content[data-state=open] {
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
-
|
|
2282
|
-
animation-duration: var(--amplify-components-expander-content-open-animation-duration);
|
|
2283
|
-
-webkit-animation-timing-function: var(--amplify-components-expander-content-open-animation-timing-function);
|
|
2284
|
-
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);
|
|
2285
2237
|
}
|
|
2286
2238
|
.amplify-expander__content[data-state=closed] {
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
-
|
|
2290
|
-
animation-duration: var(--amplify-components-expander-content-closed-animation-duration);
|
|
2291
|
-
-webkit-animation-timing-function: var(--amplify-components-expander-content-closed-animation-timing-function);
|
|
2292
|
-
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);
|
|
2293
2242
|
}
|
|
2294
2243
|
|
|
2295
2244
|
.amplify-expander__content__text {
|
|
@@ -2310,15 +2259,6 @@ strong.amplify-text {
|
|
|
2310
2259
|
transform: rotate(180deg);
|
|
2311
2260
|
}
|
|
2312
2261
|
|
|
2313
|
-
@-webkit-keyframes amplify-expander-slide-down {
|
|
2314
|
-
from {
|
|
2315
|
-
height: 0;
|
|
2316
|
-
}
|
|
2317
|
-
to {
|
|
2318
|
-
height: auto;
|
|
2319
|
-
}
|
|
2320
|
-
}
|
|
2321
|
-
|
|
2322
2262
|
@keyframes amplify-expander-slide-down {
|
|
2323
2263
|
from {
|
|
2324
2264
|
height: 0;
|
|
@@ -2327,14 +2267,6 @@ strong.amplify-text {
|
|
|
2327
2267
|
height: auto;
|
|
2328
2268
|
}
|
|
2329
2269
|
}
|
|
2330
|
-
@-webkit-keyframes amplify-expander-slide-up {
|
|
2331
|
-
from {
|
|
2332
|
-
height: auto;
|
|
2333
|
-
}
|
|
2334
|
-
to {
|
|
2335
|
-
height: 0;
|
|
2336
|
-
}
|
|
2337
|
-
}
|
|
2338
2270
|
@keyframes amplify-expander-slide-up {
|
|
2339
2271
|
from {
|
|
2340
2272
|
height: auto;
|
|
@@ -2384,6 +2316,7 @@ strong.amplify-text {
|
|
|
2384
2316
|
|
|
2385
2317
|
.amplify-field-group {
|
|
2386
2318
|
gap: var(--amplify-components-fieldgroup-gap);
|
|
2319
|
+
align-self: stretch;
|
|
2387
2320
|
}
|
|
2388
2321
|
.amplify-field-group--horizontal {
|
|
2389
2322
|
flex-direction: row;
|
|
@@ -2433,7 +2366,6 @@ strong.amplify-text {
|
|
|
2433
2366
|
width: 100%;
|
|
2434
2367
|
}
|
|
2435
2368
|
.amplify-field-group__field-wrapper--vertical {
|
|
2436
|
-
width: -webkit-fit-content;
|
|
2437
2369
|
width: -moz-fit-content;
|
|
2438
2370
|
width: fit-content;
|
|
2439
2371
|
}
|
|
@@ -2876,6 +2808,7 @@ html[dir=rtl] .amplify-field-group__inner-start {
|
|
|
2876
2808
|
display: var(--amplify-components-select-wrapper-display);
|
|
2877
2809
|
position: var(--amplify-components-select-wrapper-position);
|
|
2878
2810
|
cursor: var(--amplify-components-select-wrapper-cursor);
|
|
2811
|
+
align-self: stretch;
|
|
2879
2812
|
}
|
|
2880
2813
|
|
|
2881
2814
|
.amplify-select__icon-wrapper {
|
|
@@ -3286,6 +3219,9 @@ html[dir=rtl] .amplify-field-group__inner-start {
|
|
|
3286
3219
|
.amplify-switch-track--focused {
|
|
3287
3220
|
box-shadow: var(--amplify-components-switchfield-focused-shadow);
|
|
3288
3221
|
}
|
|
3222
|
+
.amplify-switch-track--error {
|
|
3223
|
+
background-color: var(--amplify-components-switchfield-track-error-background-color);
|
|
3224
|
+
}
|
|
3289
3225
|
|
|
3290
3226
|
.amplify-switch-thumb {
|
|
3291
3227
|
background-color: var(--amplify-components-switchfield-thumb-background-color);
|
|
@@ -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
|
|
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
|
|
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:
|
|
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:
|
|
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,122 +1,6 @@
|
|
|
1
|
+
import { ComponentClassName } from '@aws-amplify/ui';
|
|
1
2
|
declare type ComponentNameKey = 'Alert' | 'Badge' | 'Button' | 'Button' | 'Card' | 'Checkbox' | 'CheckboxField' | 'Collection' | 'PhoneNumberField' | 'Divider' | 'Expander' | 'Flex' | 'Grid' | 'Heading' | 'Icon' | 'Image' | 'Link' | 'Loader' | 'Menu' | 'Pagination' | 'PasswordField' | 'PhoneNumberField' | 'Placeholder' | 'Radio' | 'RadioGroupField' | 'Rating' | 'ScrollView' | 'SearchField' | 'Select' | 'SliderField' | 'SelectField' | 'StepperField' | 'SwitchField' | 'Table' | 'Tabs' | 'Text' | 'TextAreaField' | 'TextField' | 'ToggleButton' | 'ToggleButtonGroup' | 'VisuallyHidden';
|
|
2
3
|
declare type ComponentClassNameKey = 'Alert' | 'AlertIcon' | 'AlertHeading' | 'AlertBody' | 'AlertDismiss' | 'Badge' | 'Button' | 'ButtonGroup' | 'ButtonLoaderWrapper' | 'Card' | 'Checkbox' | 'CheckboxButton' | 'CheckboxIcon' | 'CheckboxInput' | 'CheckboxLabel' | 'CheckboxField' | 'Collection' | 'CollectionItems' | 'CollectionSearch' | 'CollectionPagination' | 'CountryCodeSelect' | 'DialCodeSelect' | 'Divider' | 'DividerLabel' | 'Expander' | 'ExpanderContent' | 'ExpanderContentText' | 'ExpanderHeader' | 'ExpanderIcon' | 'ExpanderItem' | 'ExpanderTrigger' | 'Field' | 'FieldDescription' | 'FieldErrorMessage' | 'FieldGroup' | 'FieldGroupControl' | 'FieldGroupOuterEnd' | 'FieldGroupOuterStart' | 'FieldGroupInnerEnd' | 'FieldGroupInnerStart' | 'FieldGroupIcon' | 'FieldGroupIconButton' | 'FieldGroupHasInnerEnd' | 'FieldGroupHasInnerStart' | 'FieldShowPassword' | 'FieldGroupFieldWrapper' | 'Flex' | 'Grid' | 'Heading' | 'Icon' | 'Image' | 'Input' | 'Label' | 'Link' | 'Loader' | 'LoaderDeterminate' | 'LoaderPercentageText' | 'MenuContent' | 'MenuItem' | 'MenuTrigger' | 'Pagination' | 'PaginationItemButton' | 'PaginationItemCurrent' | 'PaginationItemEllipsis' | 'PasswordField' | 'PhoneNumberField' | 'Placeholder' | 'Radio' | 'RadioButton' | 'RadioInput' | 'RadioLabel' | 'RadioGroupField' | 'RadioGroup' | 'Rating' | 'ScrollView' | 'SearchField' | 'SearchFieldClear' | 'SearchFieldSearch' | 'Select' | 'SelectField' | 'SelectWrapper' | 'SelectIconWrapper' | 'SliderField' | 'SliderFieldGroup' | 'SliderFieldLabel' | 'SliderFieldRange' | 'SliderFieldRoot' | 'SliderFieldThumb' | 'SliderFieldTrack' | 'StepperField' | 'StepperFieldButtonDecrease' | 'StepperFieldButtonIncrease' | 'StepperFieldInput' | 'SwitchField' | 'SwitchLabel' | 'SwitchThumb' | 'SwitchTrack' | 'SwitchWrapper' | 'Table' | 'TableCaption' | 'TableBody' | 'TableTd' | 'TableTh' | 'TableFoot' | 'TableHead' | 'TableRow' | 'Tabs' | 'TabItems' | 'Text' | 'Textarea' | 'TextAreaField' | 'TextField' | 'ToggleButton' | 'ToggleButtonGroup' | 'VisuallyHidden';
|
|
3
|
-
export declare enum ComponentClassName {
|
|
4
|
-
Alert = "amplify-alert",
|
|
5
|
-
AlertIcon = "amplify-alert__icon",
|
|
6
|
-
AlertHeading = "amplify-alert__heading",
|
|
7
|
-
AlertBody = "amplify-alert__body",
|
|
8
|
-
AlertDismiss = "amplify-alert__dismiss",
|
|
9
|
-
Badge = "amplify-badge",
|
|
10
|
-
Button = "amplify-button",
|
|
11
|
-
ButtonGroup = "amplify-buttongroup",
|
|
12
|
-
ButtonLoaderWrapper = "amplify-button__loader-wrapper",
|
|
13
|
-
Card = "amplify-card",
|
|
14
|
-
Checkbox = "amplify-checkbox",
|
|
15
|
-
CheckboxButton = "amplify-checkbox__button",
|
|
16
|
-
CheckboxIcon = "amplify-checkbox__icon",
|
|
17
|
-
CheckboxInput = "amplify-checkbox__input",
|
|
18
|
-
CheckboxLabel = "amplify-checkbox__label",
|
|
19
|
-
CheckboxField = "amplify-checkboxfield",
|
|
20
|
-
Collection = "amplify-collection",
|
|
21
|
-
CollectionItems = "amplify-collection-items",
|
|
22
|
-
CollectionSearch = "amplify-collection-search",
|
|
23
|
-
CollectionPagination = "amplify-collection-pagination",
|
|
24
|
-
CountryCodeSelect = "amplify-countrycodeselect",
|
|
25
|
-
DialCodeSelect = "amplify-dialcodeselect",
|
|
26
|
-
Divider = "amplify-divider",
|
|
27
|
-
DividerLabel = "amplify-divider--label",
|
|
28
|
-
Expander = "amplify-expander",
|
|
29
|
-
ExpanderContent = "amplify-expander__content",
|
|
30
|
-
ExpanderContentText = "amplify-expander__content__text",
|
|
31
|
-
ExpanderHeader = "amplify-expander__header",
|
|
32
|
-
ExpanderIcon = "amplify-expander__icon",
|
|
33
|
-
ExpanderItem = "amplify-expander__item",
|
|
34
|
-
ExpanderTrigger = "amplify-expander__trigger",
|
|
35
|
-
Field = "amplify-field",
|
|
36
|
-
FieldDescription = "amplify-field__description",
|
|
37
|
-
FieldErrorMessage = "amplify-field__error-message",
|
|
38
|
-
FieldGroup = "amplify-field-group",
|
|
39
|
-
FieldGroupControl = "amplify-field-group__control",
|
|
40
|
-
FieldGroupOuterEnd = "amplify-field-group__outer-end",
|
|
41
|
-
FieldGroupOuterStart = "amplify-field-group__outer-start",
|
|
42
|
-
FieldGroupInnerEnd = "amplify-field-group__inner-end",
|
|
43
|
-
FieldGroupInnerStart = "amplify-field-group__inner-start",
|
|
44
|
-
FieldGroupIcon = "amplify-field-group__icon",
|
|
45
|
-
FieldGroupIconButton = "amplify-field-group__icon-button",
|
|
46
|
-
FieldGroupHasInnerEnd = "amplify-field-group--has-inner-end",
|
|
47
|
-
FieldGroupHasInnerStart = "amplify-field-group--has-inner-start",
|
|
48
|
-
FieldShowPassword = "amplify-field__show-password",
|
|
49
|
-
FieldGroupFieldWrapper = "amplify-field-group__field-wrapper",
|
|
50
|
-
Flex = "amplify-flex",
|
|
51
|
-
Grid = "amplify-grid",
|
|
52
|
-
Heading = "amplify-heading",
|
|
53
|
-
Icon = "amplify-icon",
|
|
54
|
-
Image = "amplify-image",
|
|
55
|
-
Input = "amplify-input",
|
|
56
|
-
Label = "amplify-label",
|
|
57
|
-
Link = "amplify-link",
|
|
58
|
-
Loader = "amplify-loader",
|
|
59
|
-
LoaderDeterminate = "amplify-loader--determinate",
|
|
60
|
-
LoaderPercentageText = "amplify-loader__percentage-text",
|
|
61
|
-
MenuContent = "amplify-menu-content",
|
|
62
|
-
MenuItem = "amplify-menu-content__item",
|
|
63
|
-
MenuTrigger = "amplify-menu-trigger",
|
|
64
|
-
Pagination = "amplify-pagination",
|
|
65
|
-
PaginationItemButton = "amplify-pagination__item-button",
|
|
66
|
-
PaginationItemCurrent = "amplify-pagination__item-current",
|
|
67
|
-
PaginationItemEllipsis = "amplify-pagination__item-ellipsis",
|
|
68
|
-
PasswordField = "amplify-passwordfield",
|
|
69
|
-
PhoneNumberField = "amplify-phonenumberfield",
|
|
70
|
-
Placeholder = "amplify-placeholder",
|
|
71
|
-
Radio = "amplify-radio",
|
|
72
|
-
RadioButton = "amplify-radio__button",
|
|
73
|
-
RadioInput = "amplify-radio__input",
|
|
74
|
-
RadioLabel = "amplify-radio__label",
|
|
75
|
-
RadioGroupField = "amplify-radiogroupfield",
|
|
76
|
-
RadioGroup = "amplify-radiogroup",
|
|
77
|
-
Rating = "amplify-rating",
|
|
78
|
-
ScrollView = "amplify-scrollview",
|
|
79
|
-
SearchField = "amplify-searchfield",
|
|
80
|
-
SearchFieldClear = "amplify-searchfield__clear",
|
|
81
|
-
SearchFieldSearch = "amplify-searchfield__search",
|
|
82
|
-
Select = "amplify-select",
|
|
83
|
-
SelectField = "amplify-selectfield",
|
|
84
|
-
SelectWrapper = "amplify-select__wrapper",
|
|
85
|
-
SelectIconWrapper = "amplify-select__icon-wrapper",
|
|
86
|
-
SliderField = "amplify-sliderfield",
|
|
87
|
-
SliderFieldGroup = "amplify-sliderfield__group",
|
|
88
|
-
SliderFieldLabel = "amplify-sliderfield__label",
|
|
89
|
-
SliderFieldRange = "amplify-sliderfield__range",
|
|
90
|
-
SliderFieldRoot = "amplify-sliderfield__root",
|
|
91
|
-
SliderFieldThumb = "amplify-sliderfield__thumb",
|
|
92
|
-
SliderFieldTrack = "amplify-sliderfield__track",
|
|
93
|
-
StepperField = "amplify-stepperfield",
|
|
94
|
-
StepperFieldButtonDecrease = "amplify-stepperfield__button--decrease",
|
|
95
|
-
StepperFieldButtonIncrease = "amplify-stepperfield__button--increase",
|
|
96
|
-
StepperFieldInput = "amplify-stepperfield__input",
|
|
97
|
-
SwitchField = "amplify-switchfield",
|
|
98
|
-
SwitchLabel = "amplify-switch-label",
|
|
99
|
-
SwitchThumb = "amplify-switch-thumb",
|
|
100
|
-
SwitchTrack = "amplify-switch-track",
|
|
101
|
-
SwitchWrapper = "amplify-switch__wrapper",
|
|
102
|
-
Table = "amplify-table",
|
|
103
|
-
TableCaption = "amplify-table__caption",
|
|
104
|
-
TableBody = "amplify-table__body",
|
|
105
|
-
TableTd = "amplify-table__td",
|
|
106
|
-
TableTh = "amplify-table__th",
|
|
107
|
-
TableFoot = "amplify-table__foot",
|
|
108
|
-
TableHead = "amplify-table__head",
|
|
109
|
-
TableRow = "amplify-table__row",
|
|
110
|
-
Tabs = "amplify-tabs",
|
|
111
|
-
TabItems = "amplify-tabs-item",
|
|
112
|
-
Text = "amplify-text",
|
|
113
|
-
Textarea = "amplify-textarea",
|
|
114
|
-
TextAreaField = "amplify-textareafield",
|
|
115
|
-
TextField = "amplify-textfield",
|
|
116
|
-
ToggleButton = "amplify-togglebutton",
|
|
117
|
-
ToggleButtonGroup = "amplify-togglebuttongroup",
|
|
118
|
-
VisuallyHidden = "amplify-visually-hidden"
|
|
119
|
-
}
|
|
120
4
|
interface ComponentClassNameMetadata {
|
|
121
5
|
className: ComponentClassName;
|
|
122
6
|
components?: ComponentNameKey[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { ComponentClassName } from '@aws-amplify/ui';
|
|
1
2
|
import { ThemeStylePropKey } from '../types/theme';
|
|
2
|
-
import { ComponentClassName } from './types';
|
|
3
3
|
export declare const strHasLength: (str: unknown) => str is string;
|
|
4
4
|
export declare const isFunction: (fn: unknown) => fn is Function;
|
|
5
5
|
export declare const isEmptyString: (value: unknown) => boolean;
|
|
@@ -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:
|
|
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.
|
|
3
|
+
"version": "3.5.11",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"size": "yarn run size-limit"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@aws-amplify/ui": "4.0.
|
|
59
|
-
"@aws-amplify/ui-react-core": "1.0.
|
|
58
|
+
"@aws-amplify/ui": "4.0.1",
|
|
59
|
+
"@aws-amplify/ui-react-core": "1.0.4",
|
|
60
60
|
"@aws-amplify/ui-react-v1": "npm:@aws-amplify/ui-react@1.2.9",
|
|
61
61
|
"@radix-ui/react-accordion": "0.1.6",
|
|
62
62
|
"@radix-ui/react-dropdown-menu": "0.1.6",
|
|
@@ -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
|
|
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",
|