@aws-amplify/ui-react-notifications 0.0.0-studio-f560d76-20230620234412 → 0.0.0-update-rn-package-json-fb49bd0-20230728183204
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/esm/components/InAppMessaging/Backdrop/Backdrop.mjs +1 -0
- package/dist/esm/components/InAppMessaging/Backdrop/withBackdrop.mjs +1 -0
- package/dist/esm/components/InAppMessaging/BannerMessage/BannerMessage.mjs +1 -0
- package/dist/esm/components/InAppMessaging/CloseIconButton/CloseIconButton.mjs +1 -0
- package/dist/esm/components/InAppMessaging/FullScreenMessage/FullScreenMessage.mjs +1 -0
- package/dist/esm/components/InAppMessaging/InAppMessageDisplay/InAppMessageDisplay.mjs +1 -0
- package/dist/esm/components/InAppMessaging/MessageLayout/MessageLayout.mjs +1 -0
- package/dist/esm/components/InAppMessaging/ModalMessage/ModalMessage.mjs +1 -0
- package/dist/esm/components/InAppMessaging/hooks/useMessageImage/useMessageImage.mjs +1 -0
- package/dist/esm/components/InAppMessaging/hooks/useMessageProps/useMessageProps.mjs +1 -0
- package/dist/esm/components/InAppMessaging/withInAppMessaging/withInAppMessaging.mjs +1 -0
- package/dist/esm/{index.js → index.mjs} +1 -1
- package/dist/styles.css +135 -9
- package/package.json +11 -12
- package/dist/esm/components/InAppMessaging/Backdrop/Backdrop.js +0 -1
- package/dist/esm/components/InAppMessaging/Backdrop/withBackdrop.js +0 -1
- package/dist/esm/components/InAppMessaging/BannerMessage/BannerMessage.js +0 -1
- package/dist/esm/components/InAppMessaging/CloseIconButton/CloseIconButton.js +0 -1
- package/dist/esm/components/InAppMessaging/FullScreenMessage/FullScreenMessage.js +0 -1
- package/dist/esm/components/InAppMessaging/InAppMessageDisplay/InAppMessageDisplay.js +0 -1
- package/dist/esm/components/InAppMessaging/MessageLayout/MessageLayout.js +0 -1
- package/dist/esm/components/InAppMessaging/ModalMessage/ModalMessage.js +0 -1
- package/dist/esm/components/InAppMessaging/hooks/useMessageImage/useMessageImage.js +0 -1
- package/dist/esm/components/InAppMessaging/hooks/useMessageProps/useMessageProps.js +0 -1
- package/dist/esm/components/InAppMessaging/withInAppMessaging/withInAppMessaging.js +0 -1
- /package/dist/esm/components/InAppMessaging/BannerMessage/{constants.js → constants.mjs} +0 -0
- /package/dist/esm/components/InAppMessaging/FullScreenMessage/{constants.js → constants.mjs} +0 -0
- /package/dist/esm/components/InAppMessaging/InAppMessageDisplay/{handleMessageLinkAction.js → handleMessageLinkAction.mjs} +0 -0
- /package/dist/esm/components/InAppMessaging/MessageLayout/{constants.js → constants.mjs} +0 -0
- /package/dist/esm/components/InAppMessaging/MessageLayout/{utils.js → utils.mjs} +0 -0
- /package/dist/esm/components/InAppMessaging/ModalMessage/{constants.js → constants.mjs} +0 -0
- /package/dist/esm/components/InAppMessaging/hooks/useMessageImage/{types.js → types.mjs} +0 -0
- /package/dist/esm/components/InAppMessaging/hooks/useMessageProps/{utils.js → utils.mjs} +0 -0
- /package/dist/esm/node_modules/tslib/{tslib.es6.js → tslib.es6.mjs} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__rest as a}from"../../../node_modules/tslib/tslib.es6.mjs";import i from"react";import{View as t}from"@aws-amplify/ui-react";const e="inappmessaging-backdrop";function o(o){var{onClick:s}=o,r=a(o,["onClick"]);return i.createElement(t,Object.assign({className:"amplify-inappmessaging-backdrop","data-testid":e,onClick:s},r))}export{e as BACKDROP_TEST_ID,o as Backdrop};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"react";import{Flex as t,View as a}from"@aws-amplify/ui-react";import{Backdrop as n}from"./Backdrop.mjs";function r(r,m={}){return function(c){return e.createElement(e.Fragment,null,e.createElement(n,Object.assign({},m)),e.createElement(t,{className:"amplify-inappmessaging-backdrop-content-container"},e.createElement(a,{className:"amplify-inappmessaging-backdrop-content"},e.createElement(r,Object.assign({},c)))))}}export{r as withBackdrop};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"react";import s from"classnames";import{useBreakpointValue as t,Flex as o}from"@aws-amplify/ui-react";import"../hooks/useMessageImage/useMessageImage.mjs";import a from"../hooks/useMessageProps/useMessageProps.mjs";import{MessageLayout as r}from"../MessageLayout/MessageLayout.mjs";import{BLOCK_CLASS as m}from"./constants.mjs";function i(i){const n=a(i),l=t([!0,!0,!1]),{shouldRenderMessage:g,styles:p}=n;if(!g)return null;const{alignment:u="right",position:c="top"}=i,d="center"===u&&"middle"===c;return e.createElement(o,{className:s(m,{[`${m}--${c}`]:!d,[`${m}--${u}`]:!d,[`${m}--center-middle`]:d,[`${m}--full-width`]:l}),role:"dialog",testId:`inappmessaging-${c}banner-dialog`},e.createElement(r,Object.assign({},i,n,{orientation:"horizontal",buttonSize:"small",styles:p})))}export{i as BannerMessage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__rest as e}from"../../../node_modules/tslib/tslib.es6.mjs";import*as s from"react";import{Button as a}from"@aws-amplify/ui-react";import{IconClose as i}from"@aws-amplify/ui-react/internal";function t(t){var{className:r,dismissButtonLabel:m="Dismiss message",onClick:l,style:o}=t,n=e(t,["className","dismissButtonLabel","onClick","style"]);return s.createElement(a,Object.assign({ariaLabel:m,className:r,onClick:l,style:o,variation:"link"},n),s.createElement(i,{"aria-hidden":"true",size:"1.5rem"}))}export{t as CloseIconButton};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"react";import s from"classnames";import{useBreakpointValue as o,Flex as r}from"@aws-amplify/ui-react";import{withBackdrop as t}from"../Backdrop/withBackdrop.mjs";import"../hooks/useMessageImage/useMessageImage.mjs";import a from"../hooks/useMessageProps/useMessageProps.mjs";import{MessageLayout as m}from"../MessageLayout/MessageLayout.mjs";import{BLOCK_CLASS as n}from"./constants.mjs";function l(l){const i=a(l),c=o([!0,!0,!1]),{shouldRenderMessage:u,styles:p}=i,{onClose:g}=l;if(!u)return null;const f=()=>e.createElement(r,{className:s(n,{[`${n}--fullscreen`]:c}),role:"dialog",testId:"inappmessaging-fullscreen-dialog"},e.createElement(m,Object.assign({},l,i,{styles:p})));if(c)return e.createElement(f,null);const d=t(f,{onClick:g});return e.createElement(d,null)}export{l as FullScreenMessage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"react";import{useMessage as s,handleMessageAction as a}from"@aws-amplify/ui-react-core-notifications";import{ThemeProvider as o}from"@aws-amplify/ui-react";import{BannerMessage as n}from"../BannerMessage/BannerMessage.mjs";import{FullScreenMessage as r}from"../FullScreenMessage/FullScreenMessage.mjs";import{ModalMessage as t}from"../ModalMessage/ModalMessage.mjs";import i from"./handleMessageLinkAction.mjs";function l(e){return null}const c={BannerMessage:n,CarouselMessage:l,FullScreenMessage:r,ModalMessage:t},m=({action:e,url:s})=>{a({action:e,url:s,handleMessageLinkAction:i})};function M({components:a}){const n=e.useMemo((()=>Object.assign(Object.assign({},c),a)),[a]),{Component:r,props:t}=s({components:n,onMessageAction:m});return e.createElement(o,{colorMode:"light"},e.createElement(r,Object.assign({},t)))}M.BannerMessage=n,M.CarouselMessage=l,M.FullScreenMessage=r,M.ModalMessage=t;export{M as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"react";import t from"classnames";import{isEmpty as a}from"@aws-amplify/ui";import{Flex as n,Image as s,Heading as o,Text as r,ButtonGroup as l,Button as m}from"@aws-amplify/ui-react";import{CloseIconButton as c}from"../CloseIconButton/CloseIconButton.mjs";import{CLOSE_BUTTON_CLASS as i,BLOCK_CLASS as d,MESSAGE_LAYOUT_TEST_ID as y,CONTENT_CLASS as u,CONTENT_TEST_ID as p,IMAGE_CONTAINER_CLASS as f,IMAGE_CONTAINER_TEST_ID as E,TEXT_CONTAINER_CLASS as I,TEXT_CONTAINER_TEST_ID as $,HEADER_CLASS as B,HEADER_TEXT_TEST_ID as N,BODY_TEXT_TEST_ID as C,BUTTON_GROUP_TEST_ID as g,BUTTON_CLASS as v,SECONDARY_BUTTON_TEST_ID as b,PRIMARY_BUTTON_TEST_ID as h}from"./constants.mjs";import{getButtonModifier as j}from"./utils.mjs";const k=e=>!a(e);function x({body:a,buttonSize:x,hasRenderableImage:z,header:A,image:w,onClose:M,orientation:R="vertical",primaryButton:S,secondaryButton:T,styles:q}){const D=e.useMemo((()=>({primary:j(q.primaryButton),secondary:j(q.secondaryButton)})),[q]),F="horizontal"===R,G=e.createElement(c,{className:i,onClick:M,style:q.closeIconButton}),H=k(S),J=k(T),K=H||J;return e.createElement(n,{className:d,"data-testid":y,style:q.container},!F&&e.createElement(n,{justifyContent:"flex-end"},G),e.createElement(n,{className:t(u,`${u}--${R}`),"data-testid":p},z&&e.createElement(n,{className:t(f,`${f}--${R}`),"data-testid":E},e.createElement(s,{alt:"In-App Message Image",src:null==w?void 0:w.src,style:q.image})),e.createElement(n,{className:t(I,`${I}--${R}`),"data-testid":$},(null==A?void 0:A.content)&&e.createElement(o,{className:B,isTruncated:!0,level:2,style:q.header,testId:N},A.content),(null==a?void 0:a.content)&&e.createElement(r,{style:q.body,testId:C},a.content)),F&&e.createElement(n,{alignItems:"flex-start"},G)),K&&e.createElement(l,{size:x,testId:g},J&&e.createElement(m,{className:t(v,`${v}--${D.secondary}`),onClick:T.onAction,style:q.secondaryButton,testId:b},T.title),H&&e.createElement(m,{className:t(v,`${v}--${D.primary}`),onClick:S.onAction,style:q.primaryButton,testId:h},S.title)))}export{x as MessageLayout};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as s from"react";import e from"classnames";import{useBreakpointValue as a,Flex as o}from"@aws-amplify/ui-react";import"../hooks/useMessageImage/useMessageImage.mjs";import t from"../hooks/useMessageProps/useMessageProps.mjs";import{MessageLayout as m}from"../MessageLayout/MessageLayout.mjs";import{BLOCK_CLASS as r,DIALOG_CLASS as l}from"./constants.mjs";function i(i){const n=t(i),g=a([!0,!0,!1]),{shouldRenderMessage:p,styles:c}=n;return p?s.createElement(o,{className:r},s.createElement(o,{className:e(l,{[`${l}--full-width`]:g}),role:"dialog",testId:"inappmessaging-modal-dialog"},s.createElement(m,Object.assign({},i,n,{styles:c})))):null}export{i as ModalMessage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useState as e,useEffect as r}from"react";import{ConsoleLogger as o}from"@aws-amplify/core";import{ImagePrefetchStatus as t}from"./types.mjs";const a=new o("Notifications.InAppMessaging");function n(o){const{src:n}=null!=o?o:{},s=!!n,[c,i]=e(s?t.Fetching:null),m=c===t.Fetching,l=c===t.Success;return r((()=>{if(!s)return;const e=new Image;e.onload=()=>{i(t.Success)},e.onabort=()=>{a.error(`Image load aborted: ${n}`),i(t.Aborted)},e.onerror=()=>{a.error(`Image failed to load: ${n}`),i(t.Failure)},e.src=n}),[s,n]),{hasRenderableImage:l,isImageFetching:m}}export{n as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useRef as e,useEffect as s,useMemo as a}from"react";import r from"../useMessageImage/useMessageImage.mjs";import{getMessageStyles as t,getPayloadStyle as m}from"./utils.mjs";function l(l){const{image:o,onDisplay:n}=l,g=e(!1),{hasRenderableImage:i,isImageFetching:u}=r(o),c=!u;s((()=>{!g.current&&c&&(null==n||n(),g.current=!0)}),[n,c]);const d=a((()=>t({styleParams:{payloadStyle:m(l),overrideStyle:l.style}})),[l]);return{hasRenderableImage:i,shouldRenderMessage:c,styles:d}}export{l as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"react";import{InAppMessagingProvider as t}from"@aws-amplify/ui-react-core-notifications";import r from"../InAppMessageDisplay/InAppMessageDisplay.mjs";function a(a,n){return function(i){return e.createElement(t,null,e.createElement(r,Object.assign({},n)),e.createElement(a,Object.assign({},i)))}}export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{InAppMessagingProvider,useInAppMessaging}from"@aws-amplify/ui-react-core-notifications";export{default as InAppMessageDisplay}from"./components/InAppMessaging/InAppMessageDisplay/InAppMessageDisplay.
|
|
1
|
+
export{InAppMessagingProvider,useInAppMessaging}from"@aws-amplify/ui-react-core-notifications";export{default as InAppMessageDisplay}from"./components/InAppMessaging/InAppMessageDisplay/InAppMessageDisplay.mjs";export{default as withInAppMessaging}from"./components/InAppMessaging/withInAppMessaging/withInAppMessaging.mjs";
|
package/dist/styles.css
CHANGED
|
@@ -397,6 +397,7 @@
|
|
|
397
397
|
--amplify-components-fieldcontrol-disabled-border-color: var(--amplify-colors-transparent);
|
|
398
398
|
--amplify-components-fieldcontrol-disabled-background-color: var(--amplify-colors-background-disabled);
|
|
399
399
|
--amplify-components-fieldcontrol-error-border-color: var(--amplify-colors-border-error);
|
|
400
|
+
--amplify-components-fieldcontrol-error-color: var(--amplify-colors-font-error);
|
|
400
401
|
--amplify-components-fieldcontrol-error-focus-box-shadow: 0px 0px 0px 1px var(--amplify-colors-border-error);
|
|
401
402
|
--amplify-components-fieldgroup-gap: var(--amplify-space-zero);
|
|
402
403
|
--amplify-components-fieldgroup-vertical-align-items: center;
|
|
@@ -806,7 +807,9 @@
|
|
|
806
807
|
--amplify-components-switchfield-small-font-size: var(--amplify-font-sizes-small);
|
|
807
808
|
--amplify-components-switchfield-label-padding: var(--amplify-space-xs);
|
|
808
809
|
--amplify-components-switchfield-thumb-background-color: var(--amplify-colors-background-primary);
|
|
809
|
-
--amplify-components-switchfield-thumb-border-color:
|
|
810
|
+
--amplify-components-switchfield-thumb-border-color: transparent;
|
|
811
|
+
--amplify-components-switchfield-thumb-border-width: var(--amplify-border-widths-small);
|
|
812
|
+
--amplify-components-switchfield-thumb-border-style: solid;
|
|
810
813
|
--amplify-components-switchfield-thumb-border-radius: var(--amplify-radii-xxxl);
|
|
811
814
|
--amplify-components-switchfield-thumb-checked-transform: var(--amplify-transforms-slide-x-medium);
|
|
812
815
|
--amplify-components-switchfield-thumb-transition-duration: var(--amplify-time-medium);
|
|
@@ -1221,14 +1224,6 @@ select {
|
|
|
1221
1224
|
display: block;
|
|
1222
1225
|
overflow: auto;
|
|
1223
1226
|
}
|
|
1224
|
-
.amplify-scrollview--horizontal {
|
|
1225
|
-
overflow-x: scroll;
|
|
1226
|
-
overflow-y: initial;
|
|
1227
|
-
}
|
|
1228
|
-
.amplify-scrollview--vertical {
|
|
1229
|
-
overflow-x: initial;
|
|
1230
|
-
overflow-y: scroll;
|
|
1231
|
-
}
|
|
1232
1227
|
|
|
1233
1228
|
.amplify-text {
|
|
1234
1229
|
display: block;
|
|
@@ -2893,10 +2888,14 @@ html[dir=rtl] .amplify-field-group__inner-start {
|
|
|
2893
2888
|
|
|
2894
2889
|
.amplify-liveness-toast {
|
|
2895
2890
|
background-color: var(--amplify-colors-background-primary);
|
|
2891
|
+
padding: var(--amplify-space-small);
|
|
2892
|
+
border-radius: var(--amplify-radii-medium);
|
|
2896
2893
|
}
|
|
2897
2894
|
|
|
2898
2895
|
.amplify-liveness-toast__message {
|
|
2899
2896
|
color: var(--amplify-colors-font-primary);
|
|
2897
|
+
text-align: center;
|
|
2898
|
+
flex-direction: column;
|
|
2900
2899
|
}
|
|
2901
2900
|
|
|
2902
2901
|
.amplify-liveness-toast--large {
|
|
@@ -2908,6 +2907,14 @@ html[dir=rtl] .amplify-field-group__inner-start {
|
|
|
2908
2907
|
}
|
|
2909
2908
|
.amplify-liveness-toast--primary .amplify-liveness-toast__message {
|
|
2910
2909
|
color: var(--amplify-colors-font-inverse);
|
|
2910
|
+
text-align: center;
|
|
2911
|
+
flex-direction: column;
|
|
2912
|
+
}
|
|
2913
|
+
|
|
2914
|
+
.amplify-liveness-toast__container {
|
|
2915
|
+
gap: var(--amplify-space-xs);
|
|
2916
|
+
flex-direction: column;
|
|
2917
|
+
align-items: center;
|
|
2911
2918
|
}
|
|
2912
2919
|
|
|
2913
2920
|
.amplify-liveness-toast--error {
|
|
@@ -3023,6 +3030,117 @@ html[dir=rtl] .amplify-field-group__inner-start {
|
|
|
3023
3030
|
top: 0;
|
|
3024
3031
|
}
|
|
3025
3032
|
|
|
3033
|
+
.amplify-liveness-landscape-error-modal {
|
|
3034
|
+
background-color: var(--amplify-colors-background-primary);
|
|
3035
|
+
direction: column;
|
|
3036
|
+
text-align: center;
|
|
3037
|
+
align-items: center;
|
|
3038
|
+
justify-content: center;
|
|
3039
|
+
width: 100%;
|
|
3040
|
+
}
|
|
3041
|
+
|
|
3042
|
+
.amplify-liveness-landscape-error-modal__header {
|
|
3043
|
+
font-size: large;
|
|
3044
|
+
font-weight: var(--amplify-font-weights-bold);
|
|
3045
|
+
}
|
|
3046
|
+
|
|
3047
|
+
.amplify-liveness-landscape-error-modal__button {
|
|
3048
|
+
justify-content: center;
|
|
3049
|
+
}
|
|
3050
|
+
|
|
3051
|
+
.amplify-liveness-start-screen-header {
|
|
3052
|
+
display: flex;
|
|
3053
|
+
flex-direction: column;
|
|
3054
|
+
}
|
|
3055
|
+
|
|
3056
|
+
.amplify-liveness-start-screen-header__heading {
|
|
3057
|
+
color: var(--amplify-colors-font-primary);
|
|
3058
|
+
font-weight: var(--amplify-font-weights-bold);
|
|
3059
|
+
}
|
|
3060
|
+
|
|
3061
|
+
.amplify-liveness-start-screen-header__body {
|
|
3062
|
+
color: var(--amplify-colors-font-primary);
|
|
3063
|
+
}
|
|
3064
|
+
|
|
3065
|
+
.amplify-liveness-start-screen-warning {
|
|
3066
|
+
color: var(--amplify-colors-orange-80);
|
|
3067
|
+
background-color: var(--amplify-colors-orange-20);
|
|
3068
|
+
align-items: center;
|
|
3069
|
+
}
|
|
3070
|
+
|
|
3071
|
+
.amplify-liveness-start-screen-instructions__heading {
|
|
3072
|
+
color: var(--amplify-colors-font-primary);
|
|
3073
|
+
font-weight: var(--amplify-font-weights-bold);
|
|
3074
|
+
}
|
|
3075
|
+
|
|
3076
|
+
.amplify-liveness-overlay-opaque {
|
|
3077
|
+
background-color: var(--amplify-colors-overlay-40);
|
|
3078
|
+
}
|
|
3079
|
+
|
|
3080
|
+
.amplify-liveness-overlay {
|
|
3081
|
+
flex-direction: column;
|
|
3082
|
+
position: absolute;
|
|
3083
|
+
left: 0;
|
|
3084
|
+
top: 0;
|
|
3085
|
+
width: 100%;
|
|
3086
|
+
height: 100%;
|
|
3087
|
+
padding: var(--amplify-space-xl);
|
|
3088
|
+
}
|
|
3089
|
+
|
|
3090
|
+
.amplify-liveness-error-modal {
|
|
3091
|
+
gap: var(--amplify-space-xs);
|
|
3092
|
+
align-items: center;
|
|
3093
|
+
justify-content: center;
|
|
3094
|
+
color: var(--amplify-colors-font-error);
|
|
3095
|
+
}
|
|
3096
|
+
|
|
3097
|
+
.amplify-liveness-error-modal__heading {
|
|
3098
|
+
font-weight: var(--amplify-font-weights-bold);
|
|
3099
|
+
}
|
|
3100
|
+
|
|
3101
|
+
.amplify-liveness-hint__text {
|
|
3102
|
+
align-items: center;
|
|
3103
|
+
gap: var(--amplify-space-xs);
|
|
3104
|
+
}
|
|
3105
|
+
|
|
3106
|
+
.amplify-liveness-popover {
|
|
3107
|
+
position: relative;
|
|
3108
|
+
cursor: pointer;
|
|
3109
|
+
}
|
|
3110
|
+
|
|
3111
|
+
.amplify-liveness-popover__anchor {
|
|
3112
|
+
position: absolute;
|
|
3113
|
+
top: 26px;
|
|
3114
|
+
left: 3px;
|
|
3115
|
+
z-index: 3;
|
|
3116
|
+
border-style: solid;
|
|
3117
|
+
border-width: 0 9px 9px 9px;
|
|
3118
|
+
border-color: transparent transparent var(--amplify-colors-background-primary) transparent;
|
|
3119
|
+
}
|
|
3120
|
+
|
|
3121
|
+
.amplify-liveness-popover__anchor-secondary {
|
|
3122
|
+
position: absolute;
|
|
3123
|
+
top: 24px;
|
|
3124
|
+
left: 2px;
|
|
3125
|
+
z-index: 2;
|
|
3126
|
+
border-style: solid;
|
|
3127
|
+
border-width: 0 10px 10px 10px;
|
|
3128
|
+
border-color: transparent transparent var(--amplify-colors-border-secondary) transparent;
|
|
3129
|
+
}
|
|
3130
|
+
|
|
3131
|
+
.amplify-liveness-popover__container {
|
|
3132
|
+
position: absolute;
|
|
3133
|
+
background-color: var(--amplify-colors-background-primary);
|
|
3134
|
+
color: var(--amplify-colors-font-primary);
|
|
3135
|
+
flex-direction: row;
|
|
3136
|
+
font-size: var(--amplify-font-sizes-xs);
|
|
3137
|
+
padding: var(--amplify-space-small);
|
|
3138
|
+
top: 33px;
|
|
3139
|
+
width: 240px;
|
|
3140
|
+
border: 1px solid var(--amplify-colors-border-secondary);
|
|
3141
|
+
border-radius: 2px;
|
|
3142
|
+
}
|
|
3143
|
+
|
|
3026
3144
|
.amplify-fileuploader__dropzone {
|
|
3027
3145
|
background-color: var(--amplify-components-fileuploader-dropzone-background-color);
|
|
3028
3146
|
border-color: var(--amplify-components-fileuploader-dropzone-border-color);
|
|
@@ -3323,6 +3441,11 @@ html[dir=rtl] .amplify-field-group__inner-start {
|
|
|
3323
3441
|
);
|
|
3324
3442
|
}
|
|
3325
3443
|
|
|
3444
|
+
.amplify-field__show-password--error {
|
|
3445
|
+
color: var(--amplify-components-fieldcontrol-error-color);
|
|
3446
|
+
border-color: var(--amplify-components-fieldcontrol-error-border-color);
|
|
3447
|
+
}
|
|
3448
|
+
|
|
3326
3449
|
.amplify-phonenumberfield select:not(:focus) {
|
|
3327
3450
|
border-right: none;
|
|
3328
3451
|
}
|
|
@@ -3920,6 +4043,7 @@ html[dir=rtl] .amplify-field-group__inner-start {
|
|
|
3920
4043
|
.amplify-switchfield {
|
|
3921
4044
|
display: inline-block;
|
|
3922
4045
|
font-size: var(--amplify-components-switchfield-font-size);
|
|
4046
|
+
cursor: pointer;
|
|
3923
4047
|
}
|
|
3924
4048
|
.amplify-switchfield--small {
|
|
3925
4049
|
font-size: var(--amplify-components-switchfield-small-font-size);
|
|
@@ -3976,6 +4100,8 @@ html[dir=rtl] .amplify-field-group__inner-start {
|
|
|
3976
4100
|
border-radius: var(--amplify-components-switchfield-thumb-border-radius);
|
|
3977
4101
|
width: var(--amplify-components-switchfield-thumb-width);
|
|
3978
4102
|
height: var(--amplify-components-switchfield-thumb-width);
|
|
4103
|
+
border-width: var(--amplify-components-switchfield-thumb-border-width);
|
|
4104
|
+
border-style: var(--amplify-components-switchfield-thumb-border-style);
|
|
3979
4105
|
border-color: var(--amplify-components-switchfield-thumb-border-color);
|
|
3980
4106
|
overflow-wrap: break-word;
|
|
3981
4107
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/ui-react-notifications",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-update-rn-package-json-fb49bd0-20230728183204",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
|
-
"module": "dist/esm/index.
|
|
5
|
+
"module": "dist/esm/index.mjs",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
8
8
|
"types": "./dist/types/index.d.ts",
|
|
9
|
-
"import": "./dist/esm/index.
|
|
9
|
+
"import": "./dist/esm/index.mjs",
|
|
10
10
|
"require": "./dist/index.js"
|
|
11
11
|
},
|
|
12
12
|
"./styles.css": "./dist/styles.css"
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
"prebuild": "rimraf dist",
|
|
36
36
|
"size": "yarn size-limit",
|
|
37
37
|
"test": "jest",
|
|
38
|
-
"test:ci": "yarn test",
|
|
38
|
+
"test:ci": "yarn test && yarn check:esm",
|
|
39
39
|
"test:watch": "yarn test --watch",
|
|
40
40
|
"typecheck": "tsc --noEmit"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@aws-amplify/ui": "0.0.0-
|
|
44
|
-
"@aws-amplify/ui-react": "0.0.0-
|
|
45
|
-
"@aws-amplify/ui-react-core-notifications": "0.0.0-
|
|
43
|
+
"@aws-amplify/ui": "0.0.0-update-rn-package-json-fb49bd0-20230728183204",
|
|
44
|
+
"@aws-amplify/ui-react": "0.0.0-update-rn-package-json-fb49bd0-20230728183204",
|
|
45
|
+
"@aws-amplify/ui-react-core-notifications": "0.0.0-update-rn-package-json-fb49bd0-20230728183204",
|
|
46
46
|
"classnames": "2.3.1",
|
|
47
47
|
"tinycolor2": "1.4.2"
|
|
48
48
|
},
|
|
@@ -53,9 +53,8 @@
|
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@aws-amplify/eslint-config-amplify-ui": "0.0.0",
|
|
56
|
-
"@rollup/plugin-commonjs": "^22.0.1",
|
|
57
56
|
"@rollup/plugin-typescript": "^8.3.1",
|
|
58
|
-
"@size-limit/preset-big-lib": "^
|
|
57
|
+
"@size-limit/preset-big-lib": "^8.2.6",
|
|
59
58
|
"@testing-library/jest-dom": "^5.14.1",
|
|
60
59
|
"@testing-library/react": "^12.0.0",
|
|
61
60
|
"@testing-library/react-hooks": "^7.0.1",
|
|
@@ -64,7 +63,7 @@
|
|
|
64
63
|
"@types/react": "^17.0.2",
|
|
65
64
|
"@types/testing-library__jest-dom": "^5.14.1",
|
|
66
65
|
"@types/tinycolor2": "^1.4.3",
|
|
67
|
-
"eslint": "^8.
|
|
66
|
+
"eslint": "^8.44.0",
|
|
68
67
|
"jest": "^27.0.4",
|
|
69
68
|
"react": "^17.0.2",
|
|
70
69
|
"react-dom": "^17.0.2",
|
|
@@ -73,7 +72,7 @@
|
|
|
73
72
|
"rollup-plugin-node-externals": "^4.1.1",
|
|
74
73
|
"rollup-plugin-styles": "^4.0.0",
|
|
75
74
|
"rollup-plugin-terser": "^7.0.2",
|
|
76
|
-
"size-limit": "^
|
|
75
|
+
"size-limit": "^8.2.6",
|
|
77
76
|
"ts-jest": "^27.0.3"
|
|
78
77
|
},
|
|
79
78
|
"sideEffects": [
|
|
@@ -82,7 +81,7 @@
|
|
|
82
81
|
"size-limit": [
|
|
83
82
|
{
|
|
84
83
|
"name": "InAppMessaging",
|
|
85
|
-
"path": "dist/esm/index.
|
|
84
|
+
"path": "dist/esm/index.mjs",
|
|
86
85
|
"import": "{ InAppMessagingProvider, InAppMessageDisplay }",
|
|
87
86
|
"limit": "110 kB"
|
|
88
87
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__rest as a}from"../../../node_modules/tslib/tslib.es6.js";import i from"react";import{View as t}from"@aws-amplify/ui-react";const e="inappmessaging-backdrop";function o(o){var{onClick:s}=o,r=a(o,["onClick"]);return i.createElement(t,Object.assign({className:"amplify-inappmessaging-backdrop","data-testid":e,onClick:s},r))}export{e as BACKDROP_TEST_ID,o as Backdrop};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"react";import{Flex as t,View as a}from"@aws-amplify/ui-react";import{Backdrop as n}from"./Backdrop.js";function r(r,c={}){return function(m){return e.createElement(e.Fragment,null,e.createElement(n,Object.assign({},c)),e.createElement(t,{className:"amplify-inappmessaging-backdrop-content-container"},e.createElement(a,{className:"amplify-inappmessaging-backdrop-content"},e.createElement(r,Object.assign({},m)))))}}export{r as withBackdrop};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"react";import s from"classnames";import{useBreakpointValue as t,Flex as o}from"@aws-amplify/ui-react";import"../hooks/useMessageImage/useMessageImage.js";import a from"../hooks/useMessageProps/useMessageProps.js";import{MessageLayout as r}from"../MessageLayout/MessageLayout.js";import{BLOCK_CLASS as i}from"./constants.js";function n(n){const m=a(n),l=t([!0,!0,!1]),{shouldRenderMessage:g,styles:p}=m;if(!g)return null;const{alignment:u="right",position:c="top"}=n,d="center"===u&&"middle"===c;return e.createElement(o,{className:s(i,{[`${i}--${c}`]:!d,[`${i}--${u}`]:!d,[`${i}--center-middle`]:d,[`${i}--full-width`]:l}),role:"dialog",testId:`inappmessaging-${c}banner-dialog`},e.createElement(r,Object.assign({},n,m,{orientation:"horizontal",buttonSize:"small",styles:p})))}export{n as BannerMessage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__rest as e}from"../../../node_modules/tslib/tslib.es6.js";import*as s from"react";import{Button as a}from"@aws-amplify/ui-react";import{IconClose as i}from"@aws-amplify/ui-react/internal";function t(t){var{className:r,dismissButtonLabel:l="Dismiss message",onClick:m,style:o}=t,n=e(t,["className","dismissButtonLabel","onClick","style"]);return s.createElement(a,Object.assign({ariaLabel:l,className:r,onClick:m,style:o,variation:"link"},n),s.createElement(i,{"aria-hidden":"true",size:"1.5rem"}))}export{t as CloseIconButton};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as e from"react";import s from"classnames";import{useBreakpointValue as o,Flex as r}from"@aws-amplify/ui-react";import{withBackdrop as t}from"../Backdrop/withBackdrop.js";import"../hooks/useMessageImage/useMessageImage.js";import a from"../hooks/useMessageProps/useMessageProps.js";import{MessageLayout as n}from"../MessageLayout/MessageLayout.js";import{BLOCK_CLASS as l}from"./constants.js";function m(m){const i=a(m),c=o([!0,!0,!1]),{shouldRenderMessage:u,styles:p}=i,{onClose:g}=m;if(!u)return null;const f=()=>e.createElement(r,{className:s(l,{[`${l}--fullscreen`]:c}),role:"dialog",testId:"inappmessaging-fullscreen-dialog"},e.createElement(n,Object.assign({},m,i,{styles:p})));if(c)return e.createElement(f,null);const d=t(f,{onClick:g});return e.createElement(d,null)}export{m as FullScreenMessage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"react";import{useMessage as s,handleMessageAction as a}from"@aws-amplify/ui-react-core-notifications";import{ThemeProvider as o}from"@aws-amplify/ui-react";import{BannerMessage as n}from"../BannerMessage/BannerMessage.js";import{FullScreenMessage as r}from"../FullScreenMessage/FullScreenMessage.js";import{ModalMessage as t}from"../ModalMessage/ModalMessage.js";import i from"./handleMessageLinkAction.js";function l(e){return null}const c={BannerMessage:n,CarouselMessage:l,FullScreenMessage:r,ModalMessage:t},M=({action:e,url:s})=>{a({action:e,url:s,handleMessageLinkAction:i})};function m({components:a}){const n=e.useMemo((()=>Object.assign(Object.assign({},c),a)),[a]),{Component:r,props:t}=s({components:n,onMessageAction:M});return e.createElement(o,{colorMode:"light"},e.createElement(r,Object.assign({},t)))}m.BannerMessage=n,m.CarouselMessage=l,m.FullScreenMessage=r,m.ModalMessage=t;export{m as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as e from"react";import t from"classnames";import{isEmpty as a}from"@aws-amplify/ui";import{Flex as n,Image as s,Heading as o,Text as r,ButtonGroup as l,Button as c}from"@aws-amplify/ui-react";import{CloseIconButton as m}from"../CloseIconButton/CloseIconButton.js";import{CLOSE_BUTTON_CLASS as i,BLOCK_CLASS as d,MESSAGE_LAYOUT_TEST_ID as y,CONTENT_CLASS as u,CONTENT_TEST_ID as p,IMAGE_CONTAINER_CLASS as f,IMAGE_CONTAINER_TEST_ID as E,TEXT_CONTAINER_CLASS as I,TEXT_CONTAINER_TEST_ID as $,HEADER_CLASS as B,HEADER_TEXT_TEST_ID as N,BODY_TEXT_TEST_ID as C,BUTTON_GROUP_TEST_ID as g,BUTTON_CLASS as v,SECONDARY_BUTTON_TEST_ID as b,PRIMARY_BUTTON_TEST_ID as h}from"./constants.js";import{getButtonModifier as j}from"./utils.js";const k=e=>!a(e);function x({body:a,buttonSize:x,hasRenderableImage:z,header:A,image:w,onClose:M,orientation:R="vertical",primaryButton:S,secondaryButton:T,styles:q}){const D=e.useMemo((()=>({primary:j(q.primaryButton),secondary:j(q.secondaryButton)})),[q]),F="horizontal"===R,G=e.createElement(m,{className:i,onClick:M,style:q.closeIconButton}),H=k(S),J=k(T),K=H||J;return e.createElement(n,{className:d,"data-testid":y,style:q.container},!F&&e.createElement(n,{justifyContent:"flex-end"},G),e.createElement(n,{className:t(u,`${u}--${R}`),"data-testid":p},z&&e.createElement(n,{className:t(f,`${f}--${R}`),"data-testid":E},e.createElement(s,{alt:"In-App Message Image",src:null==w?void 0:w.src,style:q.image})),e.createElement(n,{className:t(I,`${I}--${R}`),"data-testid":$},(null==A?void 0:A.content)&&e.createElement(o,{className:B,isTruncated:!0,level:2,style:q.header,testId:N},A.content),(null==a?void 0:a.content)&&e.createElement(r,{style:q.body,testId:C},a.content)),F&&e.createElement(n,{alignItems:"flex-start"},G)),K&&e.createElement(l,{size:x,testId:g},J&&e.createElement(c,{className:t(v,`${v}--${D.secondary}`),onClick:T.onAction,style:q.secondaryButton,testId:b},T.title),H&&e.createElement(c,{className:t(v,`${v}--${D.primary}`),onClick:S.onAction,style:q.primaryButton,testId:h},S.title)))}export{x as MessageLayout};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as s from"react";import e from"classnames";import{useBreakpointValue as a,Flex as o}from"@aws-amplify/ui-react";import"../hooks/useMessageImage/useMessageImage.js";import t from"../hooks/useMessageProps/useMessageProps.js";import{MessageLayout as r}from"../MessageLayout/MessageLayout.js";import{BLOCK_CLASS as m,DIALOG_CLASS as l}from"./constants.js";function i(i){const n=t(i),g=a([!0,!0,!1]),{shouldRenderMessage:p,styles:c}=n;return p?s.createElement(o,{className:m},s.createElement(o,{className:e(l,{[`${l}--full-width`]:g}),role:"dialog",testId:"inappmessaging-modal-dialog"},s.createElement(r,Object.assign({},i,n,{styles:c})))):null}export{i as ModalMessage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useState as e,useEffect as r}from"react";import{ConsoleLogger as o}from"@aws-amplify/core";import{ImagePrefetchStatus as t}from"./types.js";const a=new o("Notifications.InAppMessaging");function n(o){const{src:n}=null!=o?o:{},s=!!n,[c,i]=e(s?t.Fetching:null),l=c===t.Fetching,m=c===t.Success;return r((()=>{if(!s)return;const e=new Image;e.onload=()=>{i(t.Success)},e.onabort=()=>{a.error(`Image load aborted: ${n}`),i(t.Aborted)},e.onerror=()=>{a.error(`Image failed to load: ${n}`),i(t.Failure)},e.src=n}),[s,n]),{hasRenderableImage:m,isImageFetching:l}}export{n as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useRef as e,useEffect as s,useMemo as a}from"react";import r from"../useMessageImage/useMessageImage.js";import{getMessageStyles as t,getPayloadStyle as l}from"./utils.js";function o(o){const{image:m,onDisplay:n}=o,g=e(!1),{hasRenderableImage:i,isImageFetching:u}=r(m),c=!u;s((()=>{!g.current&&c&&(null==n||n(),g.current=!0)}),[n,c]);const d=a((()=>t({styleParams:{payloadStyle:l(o),overrideStyle:o.style}})),[o]);return{hasRenderableImage:i,shouldRenderMessage:c,styles:d}}export{o as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"react";import{InAppMessagingProvider as t}from"@aws-amplify/ui-react-core-notifications";import r from"../InAppMessageDisplay/InAppMessageDisplay.js";function a(a,n){return function(i){return e.createElement(t,null,e.createElement(r,Object.assign({},n)),e.createElement(a,Object.assign({},i)))}}export{a as default};
|
|
File without changes
|
/package/dist/esm/components/InAppMessaging/FullScreenMessage/{constants.js → constants.mjs}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|