@aws-amplify/ui-react 4.4.1 → 4.4.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
@@ -3237,6 +3237,7 @@ html[dir=rtl] .amplify-field-group__inner-start {
3237
3237
  }
3238
3238
 
3239
3239
  .amplify-select__icon-wrapper {
3240
+ color: var(--amplify-components-fieldcontrol-color);
3240
3241
  align-items: var(--amplify-components-select-icon-wrapper-align-items);
3241
3242
  position: var(--amplify-components-select-icon-wrapper-position);
3242
3243
  top: var(--amplify-components-select-icon-wrapper-top);
@@ -1,27 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { MaplibreGeocoderOptions, MaplibreGeocoderResults, MaplibreGeocoderResult } from '../types/maplibre-gl-geocoder';
3
- declare type OnClear = () => void;
4
- declare type OnLoading = (query: string) => void;
5
- declare type OnResult = (result: MaplibreGeocoderResult) => void;
6
- declare type OnResults = (results: MaplibreGeocoderResults) => void;
7
- interface LocationSearchProps extends MaplibreGeocoderOptions {
8
- /**
9
- * Emitted when the input is cleared
10
- */
11
- onClear?: OnClear;
12
- /**
13
- * Emitted when the geocoder is looking up a query
14
- */
15
- onLoading?: OnLoading;
16
- /**
17
- * Fired when the geocoder returns a response
18
- */
19
- onResults?: OnResults;
20
- /**
21
- * Fired when input is set
22
- */
23
- onResult?: OnResult;
24
- }
2
+ import { LocationSearchProps } from '../types/maplibre-gl-geocoder';
25
3
  /**
26
4
  * The `<LocationSearch>` component provides location search.
27
5
  *
@@ -45,4 +23,3 @@ interface LocationSearchProps extends MaplibreGeocoderOptions {
45
23
  */
46
24
  export declare const LocationSearch: (props: LocationSearchProps) => JSX.Element;
47
25
  export declare const Geocoder: (props: LocationSearchProps) => JSX.Element;
48
- export {};
@@ -1,4 +1,4 @@
1
- export declare type MaplibreGeocoderOptions = {
1
+ export declare type LocationSearchProps = {
2
2
  /**
3
3
  * A bounding box given as an array in the format `[minX, minY, maxX, maxY]`.
4
4
  * Search results will be limited to the bounding box.
@@ -169,16 +169,3 @@ export declare type MaplibreGeocoderOptions = {
169
169
  */
170
170
  zoom?: number;
171
171
  };
172
- export interface MaplibreGeocoderResults extends GeoJSON.FeatureCollection<GeoJSON.Point> {
173
- attribution: string;
174
- query: string[];
175
- }
176
- export interface MaplibreGeocoderResult extends GeoJSON.Feature<GeoJSON.Point> {
177
- center: number[];
178
- place_name: string;
179
- place_type: string[];
180
- relevance: number;
181
- text: string;
182
- address: string;
183
- context: any[];
184
- }
@@ -8,7 +8,7 @@ import { PersistentModel, PersistentModelConstructor, ModelInit, PersistentModel
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, PersistentModelMetaData<Model>> | ModelFields<ModelInit<Model, PersistentModelMetaData<Model>>>;
11
+ export declare type DataStoreActionFields<Model extends PersistentModel> = 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, PersistentModelMetaData<Model>>;
26
+ export declare function isAlreadyTyped<Model extends PersistentModel>(fields: DataStoreActionFields<Model>, schema?: Schema): fields is ModelInit<Model, PersistentModelMetaData<Model>>;
27
27
  export {};
@@ -1,9 +1,9 @@
1
- import { ModelInit, PersistentModelMetaData, Schema } from '@aws-amplify/datastore';
1
+ import { ModelInit, PersistentModel, PersistentModelMetaData, Schema } from '@aws-amplify/datastore';
2
2
  import { DataStoreActionFields } from './types';
3
- interface UseTypeCastFieldsProps<Model> {
3
+ interface UseTypeCastFieldsProps<Model extends PersistentModel> {
4
4
  fields: DataStoreActionFields<Model>;
5
5
  modelName: string;
6
- schema: Schema;
6
+ schema?: Schema;
7
7
  }
8
8
  declare type UseTypeCastFieldsReturn<Model> = ModelInit<Model, PersistentModelMetaData<Model>> | undefined;
9
9
  /**
@@ -11,5 +11,5 @@ declare type UseTypeCastFieldsReturn<Model> = ModelInit<Model, PersistentModelMe
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, PersistentModelMetaData<Model>>;
14
+ export declare const useTypeCastFields: <Model extends Readonly<Record<string, any>>>({ fields, modelName, schema, }: UseTypeCastFieldsProps<Model>) => ModelInit<Model, PersistentModelMetaData<Model>>;
15
15
  export {};
@@ -1 +1 @@
1
- export declare const VERSION = "4.4.1";
1
+ export declare const VERSION = "4.4.3";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/ui-react",
3
- "version": "4.4.1",
3
+ "version": "4.4.3",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/esm/index.mjs",
6
6
  "exports": {
@@ -47,8 +47,8 @@
47
47
  "typecheck": "tsc --noEmit"
48
48
  },
49
49
  "dependencies": {
50
- "@aws-amplify/ui": "5.5.8",
51
- "@aws-amplify/ui-react-core": "2.1.16",
50
+ "@aws-amplify/ui": "5.5.9",
51
+ "@aws-amplify/ui-react-core": "2.1.17",
52
52
  "@radix-ui/react-accordion": "1.0.0",
53
53
  "@radix-ui/react-direction": "1.0.0",
54
54
  "@radix-ui/react-dropdown-menu": "1.0.0",