@aws-amplify/ui-react 2.19.1 β†’ 2.20.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.
Files changed (30) hide show
  1. package/dist/esm/components/Geo/LocationSearch/index.js +1 -1
  2. package/dist/esm/components/Geo/MapView/index.js +1 -1
  3. package/dist/esm/components/ThemeProvider/index.js +1 -1
  4. package/dist/esm/hooks/actions/shared/useTypeCastFields.js +1 -1
  5. package/dist/esm/hooks/useBreakpointValue.js +1 -1
  6. package/dist/esm/hooks/useTheme.js +1 -1
  7. package/dist/esm/primitives/shared/responsive/utils.js +1 -1
  8. package/dist/esm/primitives/shared/styleUtils.js +1 -1
  9. package/dist/esm/primitives/shared/utils.js +1 -1
  10. package/dist/esm/primitives/types/theme.js +1 -0
  11. package/dist/index.js +1 -1
  12. package/dist/internal.js +1 -1
  13. package/dist/styles.css +30 -30
  14. package/dist/types/components/Geo/LocationSearch/index.d.ts +1 -171
  15. package/dist/types/components/Geo/MapView/index.d.ts +6 -2
  16. package/dist/types/hooks/actions/useDataStoreCreateAction.d.ts +1 -1
  17. package/dist/types/hooks/actions/useDataStoreDeleteAction.d.ts +1 -1
  18. package/dist/types/hooks/actions/useDataStoreUpdateAction.d.ts +1 -1
  19. package/dist/types/hooks/actions/useNavigateAction.d.ts +1 -1
  20. package/dist/types/hooks/useBreakpointValue.d.ts +1 -1
  21. package/dist/types/hooks/useControllable.d.ts +2 -1
  22. package/dist/types/hooks/useStorageURL.d.ts +1 -4
  23. package/dist/types/hooks/useTheme.d.ts +5 -5
  24. package/dist/types/primitives/shared/responsive/utils.d.ts +1 -1
  25. package/dist/types/primitives/shared/utils.d.ts +1 -0
  26. package/dist/types/primitives/types/style.d.ts +41 -40
  27. package/dist/types/primitives/types/theme.d.ts +78 -0
  28. package/dist/utils-beb5a80b.js +1 -0
  29. package/package.json +2 -2
  30. package/dist/utils-55cbae67.js +0 -1
package/dist/internal.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@aws-amplify/auth"),a=require("@aws-amplify/core"),r=require("@aws-amplify/datastore"),i=require("@aws-amplify/storage"),s=require("./utils-55cbae67.js"),o=require("aws-amplify");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function d(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,r.get?r:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}require("lodash/isEmpty"),require("lodash/isArray"),require("lodash/isObject");var c=d(e),u=n(t);const l=({model:e,criteria:t,pagination:a})=>{const[i,s]=c.useState({items:[],isLoading:!1,error:void 0});return c.useEffect((()=>{s({isLoading:!0,items:[]});const i=r.DataStore.observeQuery(e,t,a).subscribe((e=>s({items:e.items,isLoading:!1})),(e=>s({items:[],error:e,isLoading:!1})));if(i)return()=>i.unsubscribe()}),[]),i},f=({model:e,id:t})=>{const[a,i]=c.useState(),[s,o]=c.useState(!1),[n,d]=c.useState();return c.useEffect((()=>{o(!0),r.DataStore.query(e,t).then(i).catch(d).finally((()=>o(!1)))}),[]),{error:n,item:a,isLoading:s}};const p="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default";const h=({fields:e,modelName:t,schema:a})=>c.useMemo((()=>{if(function(e,t){return!t}(0,a))return e;let r={};return Object.keys(e).forEach((i=>{var s,o,n;switch(null===(n=null===(o=null===(s=null==a?void 0:a.models[t])||void 0===s?void 0:s.fields)||void 0===o?void 0:o[i])||void 0===n?void 0:n.type){case"AWSTimestamp":case"Float":r[i]=Number(e[i]);break;case"Boolean":r[i]=Boolean(e[i]);break;case"Int":r[i]=parseInt(e[i]);break;default:r[i]=e[i]}})),r}),[e,a,t]),v=e=>e.reduce(((e,t)=>a=>t(e(a))),(e=>e)),g=e=>{const{and:t,or:a,field:r,operator:i,operand:o}=e;if(Array.isArray(t)){const e=t.map((e=>g(e)));return t=>t.and(v(e))}if(Array.isArray(a)){const e=a.map((e=>g(e)));return t=>t.or(v(e))}return e=>s.isFunction(e[r])?e[r].call(e,i,o):e};exports.findChildOverrides=s.findChildOverrides,exports.getOverrideProps=s.getOverrideProps,exports.getOverridesFromVariants=s.getOverridesFromVariants,exports.mergeVariantsAndOverrides=s.mergeVariantsAndOverrides,exports.createDataStorePredicate=g,exports.useAuth=()=>{const[e,t]=c.useState({error:void 0,isLoading:!0,user:void 0}),r=({payload:e})=>{switch(e.event){case"signIn":return t({user:e.data,isLoading:!1});case"signOut":return t({isLoading:!1})}},i=()=>(t({isLoading:!0}),u.default.currentAuthenticatedUser().then((e=>t({user:e,isLoading:!1}))).catch((e=>t({error:e,isLoading:!1}))),a.Hub.listen("auth",r),()=>a.Hub.remove("auth",r));return c.useEffect(i,[]),Object.assign(Object.assign({},e),{fetch:i})},exports.useAuthSignOutAction=e=>()=>s.__awaiter(void 0,void 0,void 0,(function*(){try{o.Hub.dispatch("ui",{event:"actions:auth:signout:started",data:{options:e}},"actions:auth:signout",p),yield o.Auth.signOut(e),o.Hub.dispatch("ui",{event:"actions:auth:signout:finished",data:{options:e}},"actions:auth:signout",p)}catch(t){o.Hub.dispatch("ui",{event:"actions:auth:signout:finished",data:{options:e,errorMessage:s.getErrorMessage(t)}},"actions:auth:signout",p)}})),exports.useDataStoreBinding=function(e){return"record"===e.type?f(e):l(e)},exports.useDataStoreCollection=l,exports.useDataStoreCreateAction=({model:e,fields:t,schema:a})=>{const r=h({fields:t,modelName:e.name,schema:a});return()=>s.__awaiter(void 0,void 0,void 0,(function*(){try{o.Hub.dispatch("ui",{event:"actions:datastore:create:started",data:{fields:r}},"actions:datastore:create",p);const t=yield o.DataStore.save(new e(r));o.Hub.dispatch("ui",{event:"actions:datastore:create:finished",data:{fields:r,item:t}},"actions:datastore:create",p)}catch(e){o.Hub.dispatch("ui",{event:"actions:datastore:create:finished",data:{fields:r,errorMessage:s.getErrorMessage(e)}},"actions:datastore:create",p)}}))},exports.useDataStoreDeleteAction=({model:e,id:t})=>()=>s.__awaiter(void 0,void 0,void 0,(function*(){try{o.Hub.dispatch("ui",{event:"actions:datastore:delete:started",data:{id:t}},"actions:datastore:delete",p),yield o.DataStore.delete(e,t),o.Hub.dispatch("ui",{event:"actions:datastore:delete:finished",data:{id:t}},"actions:datastore:delete",p)}catch(e){o.Hub.dispatch("ui",{event:"actions:datastore:delete:finished",data:{id:t,errorMessage:s.getErrorMessage(e)}},"actions:datastore:delete",p)}})),exports.useDataStoreItem=f,exports.useDataStoreUpdateAction=({fields:e,id:t,model:a,schema:r})=>{const i=h({fields:e,modelName:a.name,schema:r});return()=>s.__awaiter(void 0,void 0,void 0,(function*(){try{o.Hub.dispatch("ui",{event:"actions:datastore:update:started",data:{fields:i,id:t}},"actions:datastore:update",p);const e=yield o.DataStore.query(a,t);if(!e)throw new Error(`Error querying datastore item by id: ${t}`);const r=yield o.DataStore.save(a.copyOf(e,(e=>{Object.assign(e,i)})));o.Hub.dispatch("ui",{event:"actions:datastore:update:finished",data:{fields:i,id:t,item:r}},"actions:datastore:update",p)}catch(e){o.Hub.dispatch("ui",{event:"actions:datastore:update:finished",data:{fields:i,id:t,errorMessage:s.getErrorMessage(e)}},"actions:datastore:update",p)}}))},exports.useNavigateAction=e=>{const{type:t,url:a,anchor:r,target:i}=e,s=c.useMemo((()=>{switch(t){case"url":return()=>{window.open(a,i||"_self","noopener noreferrer")};case"anchor":return()=>{window.location.hash=r};case"reload":return()=>{window.location.reload()};default:return()=>{console.warn('Please provide a valid navigate type. Available types are "url", "anchor" and "reload".')}}}),[r,i,t,a]);return()=>{o.Hub.dispatch("ui",{event:"actions:core:navigate:started",data:e},"actions:core:navigate",p),s(),o.Hub.dispatch("ui",{event:"actions:core:navigate:finished",data:e},"actions:core:navigate",p)}},exports.useStateMutationAction=e=>{const[t,a]=c.useState(e),r=c.useCallback((e=>{const r=t;o.Hub.dispatch("ui",{event:"actions:core:statemutation:started",data:{prevState:r,newState:e}},"actions:core:statemutation",p),a(e),o.Hub.dispatch("ui",{event:"actions:core:statemutation:finished",data:{prevState:r,newState:e}},"actions:core:statemutation",p)}),[t]);return[t,r]},exports.useStorageURL=(e,t)=>{const[a,r]=c.useState({isLoading:!0}),s=JSON.stringify(t),o=()=>{r({isLoading:!0});const a=i.Storage.get(e,t);return a.then((e=>r({url:e,isLoading:!1}))).catch((e=>r({error:e,isLoading:!1}))),()=>i.Storage.cancel(a)};return c.useEffect(o,[e,t,s]),Object.assign(Object.assign({},a),{fetch:o})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@aws-amplify/auth"),a=require("@aws-amplify/core"),r=require("@aws-amplify/datastore"),i=require("@aws-amplify/storage"),s=require("./utils-beb5a80b.js"),o=require("aws-amplify");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function d(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,r.get?r:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}require("lodash/isEmpty"),require("lodash/isArray"),require("lodash/isObject"),require("@aws-amplify/ui");var c=d(e),u=n(t);const l=({model:e,criteria:t,pagination:a})=>{const[i,s]=c.useState({items:[],isLoading:!1,error:void 0});return c.useEffect((()=>{s({isLoading:!0,items:[]});const i=r.DataStore.observeQuery(e,t,a).subscribe((e=>s({items:e.items,isLoading:!1})),(e=>s({items:[],error:e,isLoading:!1})));if(i)return()=>i.unsubscribe()}),[]),i},f=({model:e,id:t})=>{const[a,i]=c.useState(),[s,o]=c.useState(!1),[n,d]=c.useState();return c.useEffect((()=>{o(!0),r.DataStore.query(e,t).then(i).catch(d).finally((()=>o(!1)))}),[]),{error:n,item:a,isLoading:s}};const p="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default";const h=({fields:e,modelName:t,schema:a})=>c.useMemo((()=>{if(function(e,t){return!t}(0,a))return e;const r={};return Object.keys(e).forEach((i=>{var s,o,n;const d=e[i];switch(null===(n=null===(o=null===(s=null==a?void 0:a.models[t])||void 0===s?void 0:s.fields)||void 0===o?void 0:o[i])||void 0===n?void 0:n.type){case"AWSTimestamp":case"Float":r[i]=Number(d);break;case"Boolean":r[i]=Boolean(d);break;case"Int":r[i]=parseInt(d);break;default:r[i]=d}})),r}),[e,a,t]),v=e=>e.reduce(((e,t)=>a=>t(e(a))),(e=>e)),g=e=>{const{and:t,or:a,field:r,operator:i,operand:o}=e;if(Array.isArray(t)){const e=t.map((e=>g(e)));return t=>t.and(v(e))}if(Array.isArray(a)){const e=a.map((e=>g(e)));return t=>t.or(v(e))}return e=>s.isFunction(e[r])?e[r].call(e,i,o):e};exports.findChildOverrides=s.findChildOverrides,exports.getOverrideProps=s.getOverrideProps,exports.getOverridesFromVariants=s.getOverridesFromVariants,exports.mergeVariantsAndOverrides=s.mergeVariantsAndOverrides,exports.createDataStorePredicate=g,exports.useAuth=()=>{const[e,t]=c.useState({error:void 0,isLoading:!0,user:void 0}),r=({payload:e})=>{switch(e.event){case"signIn":return t({user:e.data,isLoading:!1});case"signOut":return t({isLoading:!1})}},i=()=>(t({isLoading:!0}),u.default.currentAuthenticatedUser().then((e=>t({user:e,isLoading:!1}))).catch((e=>t({error:e,isLoading:!1}))),a.Hub.listen("auth",r),()=>a.Hub.remove("auth",r));return c.useEffect(i,[]),Object.assign(Object.assign({},e),{fetch:i})},exports.useAuthSignOutAction=e=>()=>s.__awaiter(void 0,void 0,void 0,(function*(){try{o.Hub.dispatch("ui",{event:"actions:auth:signout:started",data:{options:e}},"actions:auth:signout",p),yield o.Auth.signOut(e),o.Hub.dispatch("ui",{event:"actions:auth:signout:finished",data:{options:e}},"actions:auth:signout",p)}catch(t){o.Hub.dispatch("ui",{event:"actions:auth:signout:finished",data:{options:e,errorMessage:s.getErrorMessage(t)}},"actions:auth:signout",p)}})),exports.useDataStoreBinding=function(e){return"record"===e.type?f(e):l(e)},exports.useDataStoreCollection=l,exports.useDataStoreCreateAction=({model:e,fields:t,schema:a})=>{const r=h({fields:t,modelName:e.name,schema:a});return()=>s.__awaiter(void 0,void 0,void 0,(function*(){try{o.Hub.dispatch("ui",{event:"actions:datastore:create:started",data:{fields:r}},"actions:datastore:create",p);const t=yield o.DataStore.save(new e(r));o.Hub.dispatch("ui",{event:"actions:datastore:create:finished",data:{fields:r,item:t}},"actions:datastore:create",p)}catch(e){o.Hub.dispatch("ui",{event:"actions:datastore:create:finished",data:{fields:r,errorMessage:s.getErrorMessage(e)}},"actions:datastore:create",p)}}))},exports.useDataStoreDeleteAction=({model:e,id:t})=>()=>s.__awaiter(void 0,void 0,void 0,(function*(){try{o.Hub.dispatch("ui",{event:"actions:datastore:delete:started",data:{id:t}},"actions:datastore:delete",p),yield o.DataStore.delete(e,t),o.Hub.dispatch("ui",{event:"actions:datastore:delete:finished",data:{id:t}},"actions:datastore:delete",p)}catch(e){o.Hub.dispatch("ui",{event:"actions:datastore:delete:finished",data:{id:t,errorMessage:s.getErrorMessage(e)}},"actions:datastore:delete",p)}})),exports.useDataStoreItem=f,exports.useDataStoreUpdateAction=({fields:e,id:t,model:a,schema:r})=>{const i=h({fields:e,modelName:a.name,schema:r});return()=>s.__awaiter(void 0,void 0,void 0,(function*(){try{o.Hub.dispatch("ui",{event:"actions:datastore:update:started",data:{fields:i,id:t}},"actions:datastore:update",p);const e=yield o.DataStore.query(a,t);if(!e)throw new Error(`Error querying datastore item by id: ${t}`);const r=yield o.DataStore.save(a.copyOf(e,(e=>{Object.assign(e,i)})));o.Hub.dispatch("ui",{event:"actions:datastore:update:finished",data:{fields:i,id:t,item:r}},"actions:datastore:update",p)}catch(e){o.Hub.dispatch("ui",{event:"actions:datastore:update:finished",data:{fields:i,id:t,errorMessage:s.getErrorMessage(e)}},"actions:datastore:update",p)}}))},exports.useNavigateAction=e=>{const{type:t,url:a,anchor:r,target:i}=e,s=c.useMemo((()=>{switch(t){case"url":return()=>{window.open(a,i||"_self","noopener noreferrer")};case"anchor":return()=>{window.location.hash=r};case"reload":return()=>{window.location.reload()};default:return()=>{console.warn('Please provide a valid navigate type. Available types are "url", "anchor" and "reload".')}}}),[r,i,t,a]);return()=>{o.Hub.dispatch("ui",{event:"actions:core:navigate:started",data:e},"actions:core:navigate",p),s(),o.Hub.dispatch("ui",{event:"actions:core:navigate:finished",data:e},"actions:core:navigate",p)}},exports.useStateMutationAction=e=>{const[t,a]=c.useState(e),r=c.useCallback((e=>{const r=t;o.Hub.dispatch("ui",{event:"actions:core:statemutation:started",data:{prevState:r,newState:e}},"actions:core:statemutation",p),a(e),o.Hub.dispatch("ui",{event:"actions:core:statemutation:finished",data:{prevState:r,newState:e}},"actions:core:statemutation",p)}),[t]);return[t,r]},exports.useStorageURL=(e,t)=>{const[a,r]=c.useState({isLoading:!0}),s=JSON.stringify(t),o=()=>{r({isLoading:!0});const a=i.Storage.get(e,t);return a.then((e=>r({url:e,isLoading:!1}))).catch((e=>r({error:e,isLoading:!1}))),()=>i.Storage.cancel(a)};return c.useEffect(o,[e,t,s]),Object.assign(Object.assign({},a),{fetch:o})};
package/dist/styles.css CHANGED
@@ -3,7 +3,7 @@
3
3
  */
4
4
  /**
5
5
  * Do not edit directly
6
- * Generated on Wed, 08 Jun 2022 19:50:16 GMT
6
+ * Generated on Tue, 14 Jun 2022 23:36:33 GMT
7
7
  */
8
8
  :root, [data-amplify-theme] {
9
9
  --amplify-transforms-slide-x-large: translateX(2em);
@@ -362,6 +362,7 @@
362
362
  --amplify-colors-font-warning: var(--amplify-colors-orange-90);
363
363
  --amplify-colors-font-info: var(--amplify-colors-blue-90);
364
364
  --amplify-colors-font-inverse: var(--amplify-colors-white);
365
+ --amplify-colors-font-disabled: var(--amplify-colors-neutral-60);
365
366
  --amplify-colors-font-tertiary: var(--amplify-colors-neutral-80);
366
367
  --amplify-colors-font-secondary: var(--amplify-colors-neutral-90);
367
368
  --amplify-colors-font-primary: var(--amplify-colors-neutral-100);
@@ -392,9 +393,6 @@
392
393
  --amplify-components-togglebutton-link-hover-background-color: var(--amplify-colors-transparent);
393
394
  --amplify-components-togglebutton-link-color: var(--amplify-colors-overlay-50);
394
395
  --amplify-components-togglebutton-link-background-color: var(--amplify-colors-transparent);
395
- --amplify-components-togglebutton-primary-pressed-hover-color: var(--amplify-colors-white);
396
- --amplify-components-togglebutton-primary-pressed-focus-color: var(--amplify-colors-white);
397
- --amplify-components-togglebutton-primary-pressed-color: var(--amplify-colors-white);
398
396
  --amplify-components-togglebutton-primary-hover-background-color: var(--amplify-colors-overlay-10);
399
397
  --amplify-components-togglebutton-primary-focus-background-color: var(--amplify-colors-transparent);
400
398
  --amplify-components-togglebutton-primary-border-width: var(--amplify-border-widths-small);
@@ -460,8 +458,6 @@
460
458
  --amplify-components-radio-button-outline-width: var(--amplify-outline-widths-medium);
461
459
  --amplify-components-radio-button-outline-color: var(--amplify-colors-transparent);
462
460
  --amplify-components-radio-button-transition-duration: var(--amplify-time-medium);
463
- --amplify-components-radio-button-background-color: var(--amplify-colors-white);
464
- --amplify-components-radio-button-color: var(--amplify-colors-white);
465
461
  --amplify-components-radio-button-border-width: var(--amplify-border-widths-medium);
466
462
  --amplify-components-radio-button-height: var(--amplify-font-sizes-medium);
467
463
  --amplify-components-radio-button-width: var(--amplify-font-sizes-medium);
@@ -483,7 +479,6 @@
483
479
  --amplify-components-pagination-button-padding-inline-start: var(--amplify-space-xxs);
484
480
  --amplify-components-pagination-current-background-color: var(--amplify-colors-overlay-40);
485
481
  --amplify-components-pagination-current-font-size: var(--amplify-font-sizes-small);
486
- --amplify-components-pagination-current-color: var(--amplify-colors-white);
487
482
  --amplify-components-menu-item-padding-inline-end: var(--amplify-space-medium);
488
483
  --amplify-components-menu-item-padding-inline-start: var(--amplify-space-medium);
489
484
  --amplify-components-menu-large-height: var(--amplify-font-sizes-xxxl);
@@ -493,7 +488,6 @@
493
488
  --amplify-components-menu-gap: var(--amplify-space-zero);
494
489
  --amplify-components-menu-border-width: var(--amplify-border-widths-small);
495
490
  --amplify-components-menu-border-radius: var(--amplify-radii-medium);
496
- --amplify-components-menu-background-color: var(--amplify-colors-white);
497
491
  --amplify-components-loader-linear-large-font-size: var(--amplify-font-sizes-large);
498
492
  --amplify-components-loader-linear-large-stroke-width: var(--amplify-font-sizes-large);
499
493
  --amplify-components-loader-linear-small-font-size: var(--amplify-font-sizes-small);
@@ -575,7 +569,6 @@
575
569
  --amplify-components-expander-item-border-bottom-right-radius: var(--amplify-radii-medium);
576
570
  --amplify-components-expander-item-border-bottom-left-radius: var(--amplify-radii-medium);
577
571
  --amplify-components-expander-border-radius: var(--amplify-radii-medium);
578
- --amplify-components-expander-background-color: var(--amplify-colors-white);
579
572
  --amplify-components-divider-opacity: var(--amplify-opacities-60);
580
573
  --amplify-components-divider-large-border-width: var(--amplify-border-widths-large);
581
574
  --amplify-components-divider-small-border-width: var(--amplify-border-widths-small);
@@ -597,7 +590,6 @@
597
590
  --amplify-components-checkbox-button-focus-outline-width: var(--amplify-outline-widths-medium);
598
591
  --amplify-components-checkbox-button-focus-outline-color: var(--amplify-colors-transparent);
599
592
  --amplify-components-checkbox-button-before-border-width: var(--amplify-border-widths-medium);
600
- --amplify-components-checkbox-button-color: var(--amplify-colors-white);
601
593
  --amplify-components-card-elevated-border-radius: var(--amplify-radii-xs);
602
594
  --amplify-components-card-outlined-box-shadow: var(--amplify-components-card-box-shadow);
603
595
  --amplify-components-card-outlined-border-width: var(--amplify-border-widths-small);
@@ -643,15 +635,20 @@
643
635
  --amplify-colors-font-focus: var(--amplify-colors-brand-primary-100);
644
636
  --amplify-colors-font-hover: var(--amplify-colors-brand-primary-90);
645
637
  --amplify-colors-font-interactive: var(--amplify-colors-brand-primary-80);
646
- --amplify-colors-font-disabled: var(--amplify-colors-font-tertiary);
638
+ --amplify-components-togglebutton-link-disabled-color: var(--amplify-colors-font-disabled);
639
+ --amplify-components-togglebutton-primary-pressed-hover-color: var(--amplify-colors-background-primary);
647
640
  --amplify-components-togglebutton-primary-pressed-hover-box-shadow: var(--amplify-colors-brand-primary-60);
648
641
  --amplify-components-togglebutton-primary-pressed-hover-background-color: var(--amplify-colors-brand-primary-60);
649
642
  --amplify-components-togglebutton-primary-pressed-hover-border-color: var(--amplify-colors-brand-primary-60);
643
+ --amplify-components-togglebutton-primary-pressed-focus-color: var(--amplify-colors-background-primary);
644
+ --amplify-components-togglebutton-primary-pressed-color: var(--amplify-colors-background-primary);
650
645
  --amplify-components-togglebutton-primary-pressed-border-color: var(--amplify-colors-brand-primary-80);
651
646
  --amplify-components-togglebutton-primary-pressed-background-color: var(--amplify-colors-brand-primary-80);
647
+ --amplify-components-togglebutton-primary-disabled-color: var(--amplify-colors-font-disabled);
652
648
  --amplify-components-togglebutton-primary-hover-color: var(--amplify-colors-font-primary);
653
649
  --amplify-components-togglebutton-primary-focus-color: var(--amplify-colors-font-primary);
654
650
  --amplify-components-togglebutton-pressed-color: var(--amplify-colors-font-primary);
651
+ --amplify-components-togglebutton-disabled-color: var(--amplify-colors-font-disabled);
655
652
  --amplify-components-togglebutton-focus-color: var(--amplify-colors-font-primary);
656
653
  --amplify-components-togglebutton-color: var(--amplify-colors-font-primary);
657
654
  --amplify-components-togglebutton-border-color: var(--amplify-colors-border-primary);
@@ -664,6 +661,7 @@
664
661
  --amplify-components-text-primary-color: var(--amplify-colors-font-primary);
665
662
  --amplify-components-text-color: var(--amplify-colors-font-primary);
666
663
  --amplify-components-tabs-item-disabled-border-color: var(--amplify-colors-border-tertiary);
664
+ --amplify-components-tabs-item-disabled-color: var(--amplify-colors-font-disabled);
667
665
  --amplify-components-tabs-item-color: var(--amplify-colors-font-secondary);
668
666
  --amplify-components-tabs-item-border-color: var(--amplify-colors-border-secondary);
669
667
  --amplify-components-tabs-border-color: var(--amplify-colors-border-secondary);
@@ -687,16 +685,22 @@
687
685
  --amplify-components-select-option-background-color: var(--amplify-colors-background-primary);
688
686
  --amplify-components-rating-empty-color: var(--amplify-colors-background-tertiary);
689
687
  --amplify-components-rating-filled-color: var(--amplify-colors-brand-secondary-80);
688
+ --amplify-components-radio-label-disabled-color: var(--amplify-colors-font-disabled);
690
689
  --amplify-components-radio-button-disabled-background-color: var(--amplify-colors-background-primary);
691
690
  --amplify-components-radio-button-error-border-color: var(--amplify-colors-border-error);
692
691
  --amplify-components-radio-button-checked-color: var(--amplify-colors-brand-primary-80);
692
+ --amplify-components-radio-button-background-color: var(--amplify-colors-background-primary);
693
+ --amplify-components-radio-button-color: var(--amplify-colors-background-primary);
693
694
  --amplify-components-radio-button-border-color: var(--amplify-colors-border-primary);
694
695
  --amplify-components-placeholder-end-color: var(--amplify-colors-background-tertiary);
695
696
  --amplify-components-placeholder-start-color: var(--amplify-colors-background-secondary);
697
+ --amplify-components-pagination-button-disabled-color: var(--amplify-colors-font-disabled);
696
698
  --amplify-components-pagination-button-hover-color: var(--amplify-colors-font-primary);
697
699
  --amplify-components-pagination-button-color: var(--amplify-colors-font-primary);
700
+ --amplify-components-pagination-current-color: var(--amplify-colors-font-inverse);
698
701
  --amplify-components-menu-box-shadow: var(--amplify-shadows-large);
699
702
  --amplify-components-menu-border-color: var(--amplify-colors-border-primary);
703
+ --amplify-components-menu-background-color: var(--amplify-colors-background-primary);
700
704
  --amplify-components-loader-text-fill: var(--amplify-colors-font-primary);
701
705
  --amplify-components-loader-linear-stroke-filled: var(--amplify-colors-brand-primary-80);
702
706
  --amplify-components-loader-stroke-filled: var(--amplify-colors-brand-primary-80);
@@ -705,6 +709,7 @@
705
709
  --amplify-components-fieldmessages-error-color: var(--amplify-colors-font-error);
706
710
  --amplify-components-fieldcontrol-error-focus-box-shadow: 0px 0px 0px 1px var(--amplify-colors-border-error);
707
711
  --amplify-components-fieldcontrol-error-border-color: var(--amplify-colors-border-error);
712
+ --amplify-components-fieldcontrol-disabled-color: var(--amplify-colors-font-disabled);
708
713
  --amplify-components-fieldcontrol-quiet-error-focus-box-shadow: 0px 1px 0px var(--amplify-colors-border-error);
709
714
  --amplify-components-fieldcontrol-quiet-error-border-block-end-color: var(--amplify-colors-border-error);
710
715
  --amplify-components-fieldcontrol-large-font-size: var(--amplify-components-field-large-font-size);
@@ -716,6 +721,7 @@
716
721
  --amplify-components-expander-content-text-color: var(--amplify-colors-font-secondary);
717
722
  --amplify-components-expander-item-box-shadow: var(--amplify-shadows-small);
718
723
  --amplify-components-expander-box-shadow: var(--amplify-shadows-large);
724
+ --amplify-components-expander-background-color: var(--amplify-colors-background-primary);
719
725
  --amplify-components-divider-label-background-color: var(--amplify-colors-background-primary);
720
726
  --amplify-components-divider-label-color: var(--amplify-colors-font-tertiary);
721
727
  --amplify-components-divider-border-color: var(--amplify-colors-border-primary);
@@ -723,11 +729,12 @@
723
729
  --amplify-components-collection-search-button-disabled-background-color: var(--amplify-components-searchfield-button-disabled-background-color);
724
730
  --amplify-components-collection-pagination-button-hover-background-color: var(--amplify-components-pagination-button-hover-background-color);
725
731
  --amplify-components-collection-pagination-current-background-color: var(--amplify-components-pagination-current-background-color);
726
- --amplify-components-collection-pagination-current-color: var(--amplify-components-pagination-current-color);
732
+ --amplify-components-checkbox-label-disabled-color: var(--amplify-colors-font-disabled);
727
733
  --amplify-components-checkbox-icon-background-color: var(--amplify-colors-brand-primary-80);
728
734
  --amplify-components-checkbox-button-error-focus-box-shadow: 0px 0px 0px 2px var(--amplify-colors-border-error);
729
735
  --amplify-components-checkbox-button-error-border-color: var(--amplify-colors-border-error);
730
736
  --amplify-components-checkbox-button-before-border-color: var(--amplify-colors-border-primary);
737
+ --amplify-components-checkbox-button-color: var(--amplify-colors-font-inverse);
731
738
  --amplify-components-card-elevated-box-shadow: var(--amplify-shadows-medium);
732
739
  --amplify-components-card-outlined-border-color: var(--amplify-colors-border-primary);
733
740
  --amplify-components-card-background-color: var(--amplify-colors-background-primary);
@@ -739,9 +746,12 @@
739
746
  --amplify-components-button-small-padding-inline-start: var(--amplify-components-fieldcontrol-small-padding-inline-start);
740
747
  --amplify-components-button-small-padding-block-end: var(--amplify-components-fieldcontrol-small-padding-block-end);
741
748
  --amplify-components-button-small-padding-block-start: var(--amplify-components-fieldcontrol-small-padding-block-start);
749
+ --amplify-components-button-link-loading-color: var(--amplify-colors-font-disabled);
750
+ --amplify-components-button-link-disabled-color: var(--amplify-colors-font-disabled);
742
751
  --amplify-components-button-link-active-background-color: var(--amplify-colors-brand-primary-20);
743
752
  --amplify-components-button-link-focus-background-color: var(--amplify-colors-brand-primary-10);
744
753
  --amplify-components-button-link-hover-background-color: var(--amplify-colors-brand-primary-10);
754
+ --amplify-components-button-menu-disabled-color: var(--amplify-colors-font-disabled);
745
755
  --amplify-components-button-menu-active-background-color: var(--amplify-colors-brand-primary-90);
746
756
  --amplify-components-button-menu-active-color: var(--amplify-colors-font-inverse);
747
757
  --amplify-components-button-menu-focus-background-color: var(--amplify-colors-brand-primary-80);
@@ -754,10 +764,14 @@
754
764
  --amplify-components-button-primary-focus-background-color: var(--amplify-colors-brand-primary-90);
755
765
  --amplify-components-button-primary-hover-color: var(--amplify-colors-font-inverse);
756
766
  --amplify-components-button-primary-hover-background-color: var(--amplify-colors-brand-primary-90);
767
+ --amplify-components-button-primary-loading-color: var(--amplify-colors-font-disabled);
768
+ --amplify-components-button-primary-disabled-color: var(--amplify-colors-font-disabled);
757
769
  --amplify-components-button-primary-color: var(--amplify-colors-font-inverse);
758
770
  --amplify-components-button-primary-background-color: var(--amplify-colors-brand-primary-80);
759
771
  --amplify-components-button-disabled-border-color: var(--amplify-colors-border-tertiary);
772
+ --amplify-components-button-disabled-color: var(--amplify-colors-font-disabled);
760
773
  --amplify-components-button-loading-border-color: var(--amplify-colors-border-tertiary);
774
+ --amplify-components-button-loading-color: var(--amplify-colors-font-disabled);
761
775
  --amplify-components-button-active-border-color: var(--amplify-colors-brand-primary-100);
762
776
  --amplify-components-button-active-background-color: var(--amplify-colors-brand-primary-20);
763
777
  --amplify-components-button-focus-background-color: var(--amplify-colors-brand-primary-10);
@@ -797,18 +811,14 @@
797
811
  --amplify-components-alert-info-color: var(--amplify-colors-font-info);
798
812
  --amplify-components-alert-background-color: var(--amplify-colors-background-tertiary);
799
813
  --amplify-components-alert-color: var(--amplify-colors-font-primary);
800
- --amplify-components-togglebutton-link-disabled-color: var(--amplify-colors-font-disabled);
801
814
  --amplify-components-togglebutton-primary-pressed-focus-border-color: var(--amplify-colors-border-focus);
802
815
  --amplify-components-togglebutton-primary-pressed-focus-background-color: var(--amplify-colors-border-focus);
803
- --amplify-components-togglebutton-primary-disabled-color: var(--amplify-colors-font-disabled);
804
816
  --amplify-components-togglebutton-primary-disabled-background-color: var(--amplify-colors-background-disabled);
805
817
  --amplify-components-togglebutton-primary-disabled-border-color: var(--amplify-colors-border-disabled);
806
818
  --amplify-components-togglebutton-primary-focus-border-color: var(--amplify-colors-border-focus);
807
819
  --amplify-components-togglebutton-pressed-border-color: var(--amplify-colors-border-pressed);
808
- --amplify-components-togglebutton-disabled-color: var(--amplify-colors-font-disabled);
809
820
  --amplify-components-togglebutton-disabled-border-color: var(--amplify-colors-border-disabled);
810
821
  --amplify-components-togglebutton-focus-border-color: var(--amplify-colors-border-focus);
811
- --amplify-components-tabs-item-disabled-color: var(--amplify-colors-font-disabled);
812
822
  --amplify-components-tabs-item-active-border-color: var(--amplify-colors-font-interactive);
813
823
  --amplify-components-tabs-item-active-color: var(--amplify-colors-font-interactive);
814
824
  --amplify-components-tabs-item-focus-color: var(--amplify-colors-font-focus);
@@ -822,32 +832,31 @@
822
832
  --amplify-components-searchfield-button-hover-border-color: var(--amplify-components-button-hover-border-color);
823
833
  --amplify-components-searchfield-button-hover-background-color: var(--amplify-components-button-hover-background-color);
824
834
  --amplify-components-searchfield-button-focus-background-color: var(--amplify-components-button-focus-background-color);
835
+ --amplify-components-searchfield-button-disabled-color: var(--amplify-components-button-disabled-color);
825
836
  --amplify-components-searchfield-button-disabled-border-color: var(--amplify-components-button-disabled-border-color);
826
837
  --amplify-components-searchfield-button-active-border-color: var(--amplify-components-button-active-border-color);
827
838
  --amplify-components-searchfield-button-active-background-color: var(--amplify-components-button-active-background-color);
828
839
  --amplify-components-searchfield-button-color: var(--amplify-components-button-color);
829
840
  --amplify-components-searchfield-color: var(--amplify-components-fieldcontrol-color);
830
- --amplify-components-radio-label-disabled-color: var(--amplify-colors-font-disabled);
831
841
  --amplify-components-radio-button-disabled-border-color: var(--amplify-colors-border-disabled);
832
842
  --amplify-components-radio-button-error-focus-box-shadow: var(--amplify-components-fieldcontrol-error-focus-box-shadow);
833
843
  --amplify-components-radio-button-focus-border-color: var(--amplify-colors-border-focus);
834
844
  --amplify-components-radio-button-checked-disabled-color: var(--amplify-colors-background-disabled);
835
- --amplify-components-pagination-button-disabled-color: var(--amplify-colors-font-disabled);
836
845
  --amplify-components-link-visited-color: var(--amplify-colors-font-interactive);
837
846
  --amplify-components-link-hover-color: var(--amplify-colors-font-hover);
838
847
  --amplify-components-link-focus-color: var(--amplify-colors-font-focus);
839
848
  --amplify-components-link-color: var(--amplify-colors-font-interactive);
840
849
  --amplify-components-link-active-color: var(--amplify-colors-font-active);
841
850
  --amplify-components-fieldcontrol-disabled-background-color: var(--amplify-colors-background-disabled);
842
- --amplify-components-fieldcontrol-disabled-color: var(--amplify-colors-font-disabled);
843
851
  --amplify-components-fieldcontrol-focus-box-shadow: 0px 0px 0px 1px var(--amplify-colors-border-focus);
844
852
  --amplify-components-fieldcontrol-focus-border-color: var(--amplify-colors-border-focus);
845
853
  --amplify-components-fieldcontrol-quiet-focus-box-shadow: 0px 1px 0px var(--amplify-colors-border-focus);
846
854
  --amplify-components-fieldcontrol-quiet-focus-border-block-end-color: var(--amplify-colors-border-focus);
847
855
  --amplify-components-expander-item-focus-box-shadow: 0 0 0 2px var(--amplify-colors-border-focus);
856
+ --amplify-components-collection-pagination-button-disabled-color: var(--amplify-components-pagination-button-disabled-color);
848
857
  --amplify-components-collection-pagination-button-hover-color: var(--amplify-components-pagination-button-hover-color);
849
858
  --amplify-components-collection-pagination-button-color: var(--amplify-components-pagination-button-color);
850
- --amplify-components-checkbox-label-disabled-color: var(--amplify-colors-font-disabled);
859
+ --amplify-components-collection-pagination-current-color: var(--amplify-components-pagination-current-color);
851
860
  --amplify-components-checkbox-icon-checked-disabled-background-color: var(--amplify-colors-background-disabled);
852
861
  --amplify-components-checkbox-button-disabled-border-color: var(--amplify-colors-border-disabled);
853
862
  --amplify-components-checkbox-button-focus-box-shadow: 0px 0px 0px 2px var(--amplify-colors-border-focus);
@@ -855,19 +864,12 @@
855
864
  --amplify-components-card-outlined-background-color: var(--amplify-components-card-background-color);
856
865
  --amplify-components-button-large-font-size: var(--amplify-components-fieldcontrol-large-font-size);
857
866
  --amplify-components-button-small-font-size: var(--amplify-components-fieldcontrol-small-font-size);
858
- --amplify-components-button-link-loading-color: var(--amplify-colors-font-disabled);
859
- --amplify-components-button-link-disabled-color: var(--amplify-colors-font-disabled);
860
867
  --amplify-components-button-link-active-color: var(--amplify-colors-font-active);
861
868
  --amplify-components-button-link-focus-color: var(--amplify-colors-font-focus);
862
869
  --amplify-components-button-link-hover-color: var(--amplify-colors-font-hover);
863
870
  --amplify-components-button-link-color: var(--amplify-colors-font-interactive);
864
- --amplify-components-button-menu-disabled-color: var(--amplify-colors-font-disabled);
865
- --amplify-components-button-primary-loading-color: var(--amplify-colors-font-disabled);
866
871
  --amplify-components-button-primary-loading-background-color: var(--amplify-colors-background-disabled);
867
- --amplify-components-button-primary-disabled-color: var(--amplify-colors-font-disabled);
868
872
  --amplify-components-button-primary-disabled-background-color: var(--amplify-colors-background-disabled);
869
- --amplify-components-button-disabled-color: var(--amplify-colors-font-disabled);
870
- --amplify-components-button-loading-color: var(--amplify-colors-font-disabled);
871
873
  --amplify-components-button-active-color: var(--amplify-colors-font-active);
872
874
  --amplify-components-button-focus-border-color: var(--amplify-colors-border-focus);
873
875
  --amplify-components-button-focus-color: var(--amplify-colors-font-focus);
@@ -878,25 +880,23 @@
878
880
  --amplify-components-searchfield-button-hover-color: var(--amplify-components-button-hover-color);
879
881
  --amplify-components-searchfield-button-focus-color: var(--amplify-components-button-focus-color);
880
882
  --amplify-components-searchfield-button-focus-border-color: var(--amplify-components-button-focus-border-color);
881
- --amplify-components-searchfield-button-disabled-color: var(--amplify-components-button-disabled-color);
882
883
  --amplify-components-searchfield-button-active-color: var(--amplify-components-button-active-color);
883
884
  --amplify-components-radio-button-focus-box-shadow: var(--amplify-components-fieldcontrol-focus-box-shadow);
884
885
  --amplify-components-collection-search-button-hover-border-color: var(--amplify-components-searchfield-button-hover-border-color);
885
886
  --amplify-components-collection-search-button-hover-background-color: var(--amplify-components-searchfield-button-hover-background-color);
886
887
  --amplify-components-collection-search-button-focus-background-color: var(--amplify-components-searchfield-button-focus-background-color);
888
+ --amplify-components-collection-search-button-disabled-color: var(--amplify-components-searchfield-button-disabled-color);
887
889
  --amplify-components-collection-search-button-disabled-border-color: var(--amplify-components-searchfield-button-disabled-border-color);
888
890
  --amplify-components-collection-search-button-active-border-color: var(--amplify-components-searchfield-button-active-border-color);
889
891
  --amplify-components-collection-search-button-active-background-color: var(--amplify-components-searchfield-button-active-background-color);
890
892
  --amplify-components-collection-search-button-color: var(--amplify-components-searchfield-button-color);
891
893
  --amplify-components-collection-search-input-color: var(--amplify-components-searchfield-color);
892
- --amplify-components-collection-pagination-button-disabled-color: var(--amplify-components-pagination-button-disabled-color);
893
894
  --amplify-components-button-link-focus-box-shadow: var(--amplify-components-fieldcontrol-focus-box-shadow);
894
895
  --amplify-components-button-primary-focus-box-shadow: var(--amplify-components-fieldcontrol-focus-box-shadow);
895
896
  --amplify-components-button-focus-box-shadow: var(--amplify-components-fieldcontrol-focus-box-shadow);
896
897
  --amplify-components-collection-search-button-hover-color: var(--amplify-components-searchfield-button-hover-color);
897
898
  --amplify-components-collection-search-button-focus-color: var(--amplify-components-searchfield-button-focus-color);
898
899
  --amplify-components-collection-search-button-focus-border-color: var(--amplify-components-searchfield-button-focus-border-color);
899
- --amplify-components-collection-search-button-disabled-color: var(--amplify-components-searchfield-button-disabled-color);
900
900
  --amplify-components-collection-search-button-active-color: var(--amplify-components-searchfield-button-active-color);
901
901
  }
902
902
 
@@ -1,3 +1,4 @@
1
+ import { LocationSearchProps } from 'maplibre-gl-geocoder';
1
2
  /**
2
3
  * The `<LocationSearch>` component provides location search.
3
4
  *
@@ -21,174 +22,3 @@
21
22
  */
22
23
  export declare const LocationSearch: (props: LocationSearchProps) => JSX.Element;
23
24
  export declare const Geocoder: (props: LocationSearchProps) => JSX.Element;
24
- export declare type LocationSearchProps = {
25
- /**
26
- * A bounding box given as an array in the format `[minX, minY, maxX, maxY]`.
27
- * Search results will be limited to the bounding box.
28
- */
29
- bbox?: number[];
30
- /**
31
- * Default: false
32
- * If `true`, the LocationSearch control will clear it's contents and blur when user presses the escape key.
33
- */
34
- clearAndBlurOnEsc?: boolean;
35
- /**
36
- * Default: false
37
- * If `true`, the LocationSearch control will clear its value when the input blurs.
38
- */
39
- clearOnBlur?: boolean;
40
- /**
41
- * Default: false
42
- * If `true`, the LocationSearch control will collapse until hovered or in focus.
43
- */
44
- collapsed?: boolean;
45
- /**
46
- * a comma separated list of country codes to limit results to specified country or countries.
47
- */
48
- countries?: string;
49
- /**
50
- * Default: 200
51
- * Sets the amount of time, in milliseconds, to wait before querying the server when a user types into the LocationSearch
52
- * input box. This parameter may be useful for reducing the total number of API calls made for a single query.
53
- */
54
- debounceSearch?: number;
55
- /**
56
- * Default: true
57
- * Allow Maplibre to collect anonymous usage statistics from the plugin.
58
- */
59
- enableEventLogging?: boolean;
60
- /**
61
- * A function accepting the query string, current features list, and LocationSearch options which performs geocoding to
62
- * supplement results from the Maplibre Geocoding API. Expected to return a Promise which resolves to an Array of
63
- * GeoJSON Features in the [Carmen GeoJSON](https://github.com/mapbox/carmen/blob/master/carmen-geojson.md) format.
64
- */
65
- externalGeocoder?: Function;
66
- /**
67
- * Default: true
68
- * If `false`, animating the map to a selected result is disabled. If `true`, animating the map will use the default
69
- * animation parameters. If an object, it will be passed as `options` to the map [`flyTo`](https://maplibre.org/maplibre-gl-js-docs/api/map/#map#flyto)
70
- * or [`fitBounds`](https://maplibre.org/maplibre-gl-js-docs/api/map/#map#fitbounds) method providing control over the animation of the transition.
71
- */
72
- flyTo?: boolean | object;
73
- /**
74
- * A function which accepts a Feature in the [Carmen GeoJSON](https://github.com/mapbox/carmen/blob/master/carmen-geojson.md) format to filter out
75
- * results from the Geocoding API response before they are included in the suggestions list. Return `true` to keep the item, `false` otherwise.
76
- */
77
- filter?: Function;
78
- /**
79
- * A function that specifies how the selected result should be rendered in the search bar. This function should accept a single [Carmen GeoJSON](https://github.com/mapbox/carmen/blob/master/carmen-geojson.md) object as input and return a string.
80
- * HTML tags in the output string will not be rendered. Defaults to `(item) => item.place_name`.
81
- */
82
- getItemValue?: Function;
83
- /**
84
- * Specify the language to use for response text and query result weighting. Options are IETF language tags comprised
85
- * of a mandatory ISO 639-1 language code and optionally one or more IETF subtags for country or script. More than
86
- * one value can also be specified, separated by commas. Defaults to the browser's language settings.
87
- */
88
- language?: string;
89
- /**
90
- * Default: 5
91
- * Maximum number of results to show.
92
- */
93
- limit?: number;
94
- /**
95
- * A function accepting the query string which performs local geocoding to supplement results from the Maplibre
96
- * Geocoding API. Expected to return an Array of GeoJSON Features in the [Carmen GeoJSON](https://github.com/mapbox/carmen/blob/master/carmen-geojson.md) format.
97
- */
98
- localGeocoder?: Function;
99
- /**
100
- * Default: false
101
- * If `true`, indicates that the `localGeocoder` results should be the only ones returned to the user. If `false`,
102
- * indicates that the `localGeocoder` results should be combined with those from the Maplibre API with the `localGeocoder` results ranked higher.
103
- */
104
- localGeocoderOnly?: boolean;
105
- /**
106
- * Default: { color: '#4668F2' }
107
- * If `true`, a [Marker](https://maplibre.org/maplibre-gl-js-docs/api/markers/#marker) will be added to the map at the location of the user-selected
108
- * result using a default set of Marker options. If the value is an object, the marker will be constructed using these
109
- * options. If `false`, no marker will be added to the map. Requires that `options.maplibregl` also be set (which it is by default).
110
- */
111
- marker?: boolean | object;
112
- /**
113
- * Default: 2
114
- * Minimum number of characters to enter before results are shown.
115
- */
116
- minLength?: number;
117
- /**
118
- * Default: 'Search'
119
- * Override the default placeholder attribute value.
120
- */
121
- placeholder?: string;
122
- /**
123
- * Default: true
124
- * If `true`, a [Popup](https://maplibre.org/maplibre-gl-js-docs/api/markers/#popup) will be added to the map when clicking on a marker using a default set of popup options.
125
- * If the value is an object, the popup will be constructed using these options. If `false`, no popup will be added to the map.
126
- * Requires that `options.maplibregl` also be set (which it is by default).
127
- */
128
- popup?: boolean | object;
129
- /**
130
- * A function that specifies how the results should be rendered in the popup menu. This function should accept a single [Carmen GeoJSON](https://github.com/mapbox/carmen/blob/master/carmen-geojson.md) object as input and return a string.
131
- * Any HTML in the returned string will be rendered.
132
- */
133
- popupRender?: Function;
134
- /**
135
- * Default: 'top-right'
136
- * Position the LocationSearch will be rendered on the map. Only relevant when `<LocationSearch>` is used with a map.
137
- */
138
- position?: 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right';
139
- /**
140
- * A geographical point given as an object with `latitude` and `longitude`
141
- * properties. Search results closer to this point will be given
142
- * higher priority. Defaults to map viewport if rendered as a map control.
143
- */
144
- proximity?: {
145
- latitude: number;
146
- longitude: number;
147
- };
148
- /**
149
- * A function that specifies how the results should be rendered in the dropdown menu. This function should accepts a single [Carmen GeoJSON](https://github.com/mapbox/carmen/blob/master/carmen-geojson.md)
150
- * object as input and return a string. Any HTML in the returned string will be rendered.
151
- */
152
- render?: Function;
153
- /**
154
- * Default: false
155
- * If `true`, enable reverse geocoding mode. In reverse geocoding, search input is expected to be coordinates in the
156
- * form `lat, lon`, with suggestions being the reverse geocodes.
157
- */
158
- reverseGeocoder?: boolean;
159
- /**
160
- * Default: 'distance'
161
- * Set the factors that are used to sort nearby results.
162
- */
163
- reverseMode?: 'distance' | 'score';
164
- /**
165
- * Default: { color: '#4668F2' }
166
- * If `true`, [Markers](https://maplibre.org/maplibre-gl-js-docs/api/markers/#marker) will be added to the map at the location the top results for the query.
167
- * If the value is an object, the marker will be constructed using these options. If `false`, no marker will be added to the map.
168
- * Requires that `options.maplibregl` also be set (which it is by default).
169
- */
170
- showResultMarkers?: boolean | object;
171
- /**
172
- * Default: true
173
- * If `false`, indicates that search will only occur on enter key press. If `true`, indicates that the LocationSearch will
174
- * search on the input box being updated above the minLength option.
175
- */
176
- showResultsWhileTyping?: boolean;
177
- /**
178
- * Default: true
179
- * If `true`, the LocationSearch proximity will automatically update based on the map view.
180
- */
181
- trackProximity?: boolean;
182
- /**
183
- * A comma separated list of types that filter results to match those specified. See https://docs.mapbox.com/api/search/#data-types
184
- * for available types. If reverseGeocode is enabled, you should specify one type. If you configure more than one type, the first
185
- * type will be used.
186
- */
187
- types?: string;
188
- /**
189
- * Default: 16
190
- * On geocoded result, what zoom level should the map animate to when a `bbox` isn't found in the response.
191
- * If a `bbox` is found the map will fit to the `bbox`.
192
- */
193
- zoom?: number;
194
- };
@@ -1,6 +1,9 @@
1
1
  import React from 'react';
2
+ import maplibregl from 'maplibre-gl';
2
3
  import type { MapProps, MapRef } from 'react-map-gl';
3
- export declare type MapViewProps = Omit<MapProps, 'transformRequest'>;
4
+ interface MapViewProps extends Omit<MapProps, 'mapLib' | 'transformRequest'> {
5
+ mapLib?: typeof maplibregl;
6
+ }
4
7
  /**
5
8
  * The `MapView` component uses [react-map-gl](https://visgl.github.io/react-map-gl/) and
6
9
  * [maplibre-gl-js](https://visgl.github.io/react-map-gl/) to provide an interactive map using
@@ -17,4 +20,5 @@ export declare type MapViewProps = Omit<MapProps, 'transformRequest'>;
17
20
  * return <MapView />
18
21
  * }
19
22
  */
20
- export declare const MapView: React.ForwardRefExoticComponent<MapViewProps & React.RefAttributes<MapRef>>;
23
+ declare const MapView: React.ForwardRefExoticComponent<MapViewProps & React.RefAttributes<MapRef>>;
24
+ export { MapView };
@@ -8,4 +8,4 @@ export interface UseDataStoreCreateActionOptions<Model extends PersistentModel>
8
8
  */
9
9
  export declare const useDataStoreCreateAction: <Model extends Readonly<{
10
10
  id: string;
11
- } & Record<string, any>>>({ model, fields: initialFields, schema, }: UseDataStoreCreateActionOptions<Model>) => () => Promise<void>;
11
+ } & Record<string, any>>>({ model, fields: initialFields, schema, }: UseDataStoreCreateActionOptions<Model>) => (() => Promise<void>);
@@ -9,4 +9,4 @@ export interface UseDataStoreDeleteActionOptions<Model extends PersistentModel>
9
9
  */
10
10
  export declare const useDataStoreDeleteAction: <Model extends Readonly<{
11
11
  id: string;
12
- } & Record<string, any>>>({ model, id, }: UseDataStoreDeleteActionOptions<Model>) => () => Promise<void>;
12
+ } & Record<string, any>>>({ model, id, }: UseDataStoreDeleteActionOptions<Model>) => (() => Promise<void>);
@@ -9,4 +9,4 @@ export interface UseDataStoreUpdateActionOptions<Model extends PersistentModel>
9
9
  */
10
10
  export declare const useDataStoreUpdateAction: <Model extends Readonly<{
11
11
  id: string;
12
- } & Record<string, any>>>({ fields: initialFields, id, model, schema, }: UseDataStoreUpdateActionOptions<Model>) => () => Promise<void>;
12
+ } & Record<string, any>>>({ fields: initialFields, id, model, schema, }: UseDataStoreUpdateActionOptions<Model>) => (() => Promise<void>);
@@ -12,4 +12,4 @@ export declare const defaultTarget = "_self";
12
12
  * Action to instruct user’s browser to change current location
13
13
  * @internal
14
14
  */
15
- export declare const useNavigateAction: (options: UseNavigateActionOptions) => () => void;
15
+ export declare const useNavigateAction: (options: UseNavigateActionOptions) => (() => void);
@@ -2,4 +2,4 @@ import { Breakpoint } from '../primitives/types/responsive';
2
2
  /**
3
3
  * [πŸ“– Docs](https://ui.docs.amplify.aws/react/theming/responsive#usebreakpointvalue)
4
4
  */
5
- export declare function useBreakpointValue<T>(values: Record<string, T> | T[], defaultBreakpoint?: Breakpoint): T | null;
5
+ export declare function useBreakpointValue<T>(values: Record<string, T> | T[], defaultBreakpoint?: Breakpoint, propKey?: string): T | string;
@@ -31,6 +31,7 @@ export interface UseControllableProps<ValueType> {
31
31
  */
32
32
  propertyDescription: PropertyDescription;
33
33
  }
34
+ declare function defaultCallback(): any;
34
35
  /**
35
36
  * This hook allows you to make a component that can be used both in controlled mode and uncontrolled mode.
36
37
  * Pass in your component's props, and then implement your component as if it was only controlled.
@@ -64,5 +65,5 @@ export interface UseControllableProps<ValueType> {
64
65
  * />
65
66
  * ```
66
67
  */
67
- export declare function useControllable<ValueType>({ controlledValue, handler, defaultValue, propertyDescription: { componentName, changeHandler, controlledProp }, }: UseControllableProps<ValueType>): readonly [ValueType, (newValue: React.SetStateAction<ValueType>) => void];
68
+ export declare function useControllable<ValueType>({ controlledValue, handler, defaultValue, propertyDescription: { componentName, changeHandler, controlledProp }, }: UseControllableProps<ValueType>): [ValueType, typeof defaultCallback] | [ValueType, (newValue: React.SetStateAction<ValueType>) => void];
68
69
  export {};
@@ -8,9 +8,6 @@ export interface UseStorageURLResult {
8
8
  * Computes a public URL for an Amplify Storage file
9
9
  * @internal
10
10
  */
11
- export declare const useStorageURL: (key: string, options?: S3ProviderGetConfig) => {
11
+ export declare const useStorageURL: (key: string, options?: S3ProviderGetConfig) => UseStorageURLResult & {
12
12
  fetch: () => () => void;
13
- url?: string;
14
- error?: Error;
15
- isLoading: boolean;
16
13
  };
@@ -1,11 +1,11 @@
1
1
  import { WebTheme } from '@aws-amplify/ui';
2
2
  import { AmplifyContextType } from '../components/ThemeProvider/AmplifyContext';
3
- /**
4
- * [πŸ“– Docs](https://ui.docs.amplify.aws/react/theming)
5
- */
6
- export declare const useTheme: () => WebTheme;
7
3
  /**
8
4
  * Get current Theme object value from Amplify context.
9
5
  * Returns a default theme if context is not available
10
6
  */
11
- export declare const getThemeFromContext: (context: AmplifyContextType) => WebTheme;
7
+ export declare const getThemeFromContext: (context: AmplifyContextType) => AmplifyContextType['theme'];
8
+ /**
9
+ * [πŸ“– Docs](https://ui.docs.amplify.aws/react/theming)
10
+ */
11
+ export declare const useTheme: () => WebTheme;
@@ -1,2 +1,2 @@
1
1
  import { Breakpoint, Breakpoints } from '../../types/responsive';
2
- export declare const getValueAtCurrentBreakpoint: (values: Record<string, any> | string[] | string, breakpoint: Breakpoint, breakpoints: Breakpoints) => any;
2
+ export declare const getValueAtCurrentBreakpoint: <Value>(values: Value | Record<string, Value> | Value[], breakpoint: Breakpoint, breakpoints: Breakpoints, propKey?: string) => string | Value;
@@ -76,4 +76,5 @@ export declare const classNameModifier: (base: ComponentClasses, modifier: Modif
76
76
  * @returns the modified class name or null
77
77
  */
78
78
  export declare const classNameModifierByFlag: (base: ComponentClasses, modifier: Modifiers, flag: boolean) => string;
79
+ export declare const getCSSVariableIfValueIsThemeKey: <Value>(propKey: string, value: Value) => string | Value;
79
80
  export {};