@@ -395,6 +401,11 @@ const BaseCarousel: React.FC
= ({
[styles.vars.itemsPerPageDesktop]: String(itemsPerPageConfig.desktop),
[styles.vars.itemsPerPageTablet]: String(itemsPerPageConfig.tablet),
[styles.vars.itemsPerPageMobile]: String(itemsPerPageConfig.mobile),
+ ...(mobilePageOffset === 'large'
+ ? {[styles.vars.mobilePageOffset]: largePageOffset}
+ : skinName === VIVO_NEW_SKIN
+ ? {[styles.vars.mobilePageOffset]: vivoNewMobilePageOffset}
+ : {}),
...(gap !== undefined ? {[styles.vars.gap]: String(gap)} : {}),
}),
scrollSnapType: free ? 'initial' : 'x mandatory',
@@ -441,6 +452,7 @@ type CarouselProps = {
itemsPerPage?: ItemsPerPageProp;
/** scrolls one page by default */
itemsToScroll?: number;
+ mobilePageOffset?: 'regular' | 'large';
/** If true, scroll snap doesn't apply and the user has a free scroll */
free?: boolean;
autoplay?: boolean | {time: number; loop?: boolean};
diff --git a/src/community/advanced-data-card.css.ts b/src/community/advanced-data-card.css.ts
index 4beefbf49e..2cd525678a 100644
--- a/src/community/advanced-data-card.css.ts
+++ b/src/community/advanced-data-card.css.ts
@@ -98,6 +98,9 @@ export const cardContentStyle = style([
export const minHeight = style({minHeight: 216});
export const dataCard = style([
+ {
+ isolation: 'isolate', // This avoids problems with some screenshot tests in webapp
+ },
sprinkles({
position: 'relative',
display: 'flex',
diff --git a/src/fixed-footer-layout.css.ts b/src/fixed-footer-layout.css.ts
index 573fc3c680..7bdc899765 100644
--- a/src/fixed-footer-layout.css.ts
+++ b/src/fixed-footer-layout.css.ts
@@ -47,6 +47,7 @@ export const withoutFooter = sprinkles({display: 'none'});
export const container = style({
'@media': {
[mq.tabletOrSmaller]: {
+ isolation: 'isolate',
paddingBottom: footerHeight,
background: fallbackVar(backgroundColor, skinVars.colors.background),
},
diff --git a/src/generated/mistica-icons/icon-alert-regular.tsx b/src/generated/mistica-icons/icon-alert-regular.tsx
index a7de7826ef..8af8699353 100644
--- a/src/generated/mistica-icons/icon-alert-regular.tsx
+++ b/src/generated/mistica-icons/icon-alert-regular.tsx
@@ -20,7 +20,7 @@ const IconAlertRegular = ({color, size = 24, ...rest}: IconProps): JSX.Element =
);
diff --git a/src/generated/mistica-icons/icon-battery-regular.tsx b/src/generated/mistica-icons/icon-battery-regular.tsx
index a20dadde48..23ae8690c1 100644
--- a/src/generated/mistica-icons/icon-battery-regular.tsx
+++ b/src/generated/mistica-icons/icon-battery-regular.tsx
@@ -18,7 +18,7 @@ const IconBatteryRegular = ({color, size = 24, ...rest}: IconProps): JSX.Element
);
diff --git a/src/generated/mistica-icons/icon-chip-device-regular.tsx b/src/generated/mistica-icons/icon-chip-device-regular.tsx
index 06b20e3ed8..9475d9eabb 100644
--- a/src/generated/mistica-icons/icon-chip-device-regular.tsx
+++ b/src/generated/mistica-icons/icon-chip-device-regular.tsx
@@ -18,11 +18,11 @@ const IconChipDeviceRegular = ({color, size = 24, ...rest}: IconProps): JSX.Elem
);
diff --git a/src/generated/mistica-icons/icon-chip-sim-card-filled.tsx b/src/generated/mistica-icons/icon-chip-sim-card-filled.tsx
index 3c9469d6b4..e355fec0b7 100644
--- a/src/generated/mistica-icons/icon-chip-sim-card-filled.tsx
+++ b/src/generated/mistica-icons/icon-chip-sim-card-filled.tsx
@@ -33,7 +33,11 @@ const IconChipSimCardFilled = ({color, size = 24, ...rest}: IconProps): JSX.Elem
);
diff --git a/src/generated/mistica-icons/icon-chip-sim-card-light.tsx b/src/generated/mistica-icons/icon-chip-sim-card-light.tsx
index b3c54f3e36..1c01c94c1e 100644
--- a/src/generated/mistica-icons/icon-chip-sim-card-light.tsx
+++ b/src/generated/mistica-icons/icon-chip-sim-card-light.tsx
@@ -33,11 +33,11 @@ const IconChipSimCardLight = ({color, size = 24, ...rest}: IconProps): JSX.Eleme
);
diff --git a/src/generated/mistica-icons/icon-data-settings-regular.tsx b/src/generated/mistica-icons/icon-data-settings-regular.tsx
index 23b0d0022a..6513a66ab4 100644
--- a/src/generated/mistica-icons/icon-data-settings-regular.tsx
+++ b/src/generated/mistica-icons/icon-data-settings-regular.tsx
@@ -18,7 +18,7 @@ const IconDataSettingsRegular = ({color, size = 24, ...rest}: IconProps): JSX.El
);
diff --git a/src/generated/mistica-icons/icon-diamond-regular.tsx b/src/generated/mistica-icons/icon-diamond-regular.tsx
index ce40e99f71..30b6e041d6 100644
--- a/src/generated/mistica-icons/icon-diamond-regular.tsx
+++ b/src/generated/mistica-icons/icon-diamond-regular.tsx
@@ -18,7 +18,7 @@ const IconDiamondRegular = ({color, size = 24, ...rest}: IconProps): JSX.Element
);
diff --git a/src/generated/mistica-icons/icon-edit-pencil-regular.tsx b/src/generated/mistica-icons/icon-edit-pencil-regular.tsx
index 73f8cb1892..ef7665ec0b 100644
--- a/src/generated/mistica-icons/icon-edit-pencil-regular.tsx
+++ b/src/generated/mistica-icons/icon-edit-pencil-regular.tsx
@@ -39,7 +39,7 @@ const IconEditPencilRegular = ({color, size = 24, ...rest}: IconProps): JSX.Elem
);
diff --git a/src/generated/mistica-icons/icon-euro-symbol-light.tsx b/src/generated/mistica-icons/icon-euro-symbol-light.tsx
index 9bd42810ca..431c6888a1 100644
--- a/src/generated/mistica-icons/icon-euro-symbol-light.tsx
+++ b/src/generated/mistica-icons/icon-euro-symbol-light.tsx
@@ -18,7 +18,7 @@ const IconEuroSymbolLight = ({color, size = 24, ...rest}: IconProps): JSX.Elemen
);
diff --git a/src/generated/mistica-icons/icon-file-compressed-regular.tsx b/src/generated/mistica-icons/icon-file-compressed-regular.tsx
index 4e265e1200..66df147f94 100644
--- a/src/generated/mistica-icons/icon-file-compressed-regular.tsx
+++ b/src/generated/mistica-icons/icon-file-compressed-regular.tsx
@@ -18,7 +18,7 @@ const IconFileCompressedRegular = ({color, size = 24, ...rest}: IconProps): JSX.
);
diff --git a/src/generated/mistica-icons/icon-file-error-regular.tsx b/src/generated/mistica-icons/icon-file-error-regular.tsx
index f85cbe9f31..3df72dca54 100644
--- a/src/generated/mistica-icons/icon-file-error-regular.tsx
+++ b/src/generated/mistica-icons/icon-file-error-regular.tsx
@@ -18,7 +18,7 @@ const IconFileErrorRegular = ({color, size = 24, ...rest}: IconProps): JSX.Eleme
);
diff --git a/src/generated/mistica-icons/icon-file-illustrator-filled.tsx b/src/generated/mistica-icons/icon-file-illustrator-filled.tsx
index fec53fa120..ee3463c2fc 100644
--- a/src/generated/mistica-icons/icon-file-illustrator-filled.tsx
+++ b/src/generated/mistica-icons/icon-file-illustrator-filled.tsx
@@ -18,11 +18,11 @@ const IconFileIllustratorFilled = ({color, size = 24, ...rest}: IconProps): JSX.
);
diff --git a/src/generated/mistica-icons/icon-file-png-filled.tsx b/src/generated/mistica-icons/icon-file-png-filled.tsx
index f7e5ec38fa..f4017d7146 100644
--- a/src/generated/mistica-icons/icon-file-png-filled.tsx
+++ b/src/generated/mistica-icons/icon-file-png-filled.tsx
@@ -18,11 +18,11 @@ const IconFilePngFilled = ({color, size = 24, ...rest}: IconProps): JSX.Element
);
diff --git a/src/generated/mistica-icons/icon-fingerprint-regular.tsx b/src/generated/mistica-icons/icon-fingerprint-regular.tsx
index 43ebef315f..8a3a45bc2b 100644
--- a/src/generated/mistica-icons/icon-fingerprint-regular.tsx
+++ b/src/generated/mistica-icons/icon-fingerprint-regular.tsx
@@ -18,7 +18,7 @@ const IconFingerprintRegular = ({color, size = 24, ...rest}: IconProps): JSX.Ele
);
diff --git a/src/generated/mistica-icons/icon-flower-regular.tsx b/src/generated/mistica-icons/icon-flower-regular.tsx
index e05c9efcba..e0e135eea9 100644
--- a/src/generated/mistica-icons/icon-flower-regular.tsx
+++ b/src/generated/mistica-icons/icon-flower-regular.tsx
@@ -18,7 +18,7 @@ const IconFlowerRegular = ({color, size = 24, ...rest}: IconProps): JSX.Element
);
diff --git a/src/generated/mistica-icons/icon-folder-encrypted-filled.tsx b/src/generated/mistica-icons/icon-folder-encrypted-filled.tsx
index ba9f2eabeb..3e0ed9cd2b 100644
--- a/src/generated/mistica-icons/icon-folder-encrypted-filled.tsx
+++ b/src/generated/mistica-icons/icon-folder-encrypted-filled.tsx
@@ -18,7 +18,7 @@ const IconFolderEncryptedFilled = ({color, size = 24, ...rest}: IconProps): JSX.
);
diff --git a/src/generated/mistica-icons/icon-gift-light.tsx b/src/generated/mistica-icons/icon-gift-light.tsx
index 0c744a4759..dfe93900bd 100644
--- a/src/generated/mistica-icons/icon-gift-light.tsx
+++ b/src/generated/mistica-icons/icon-gift-light.tsx
@@ -38,7 +38,7 @@ const IconGiftLight = ({color, size = 24, ...rest}: IconProps): JSX.Element => {
);
diff --git a/src/generated/mistica-icons/icon-hamburguer-filled.tsx b/src/generated/mistica-icons/icon-hamburguer-filled.tsx
index 5c572fbea8..4bcce1ecae 100644
--- a/src/generated/mistica-icons/icon-hamburguer-filled.tsx
+++ b/src/generated/mistica-icons/icon-hamburguer-filled.tsx
@@ -18,7 +18,7 @@ const IconHamburguerFilled = ({color, size = 24, ...rest}: IconProps): JSX.Eleme
);
diff --git a/src/generated/mistica-icons/icon-hand-right-regular.tsx b/src/generated/mistica-icons/icon-hand-right-regular.tsx
index cdc9a20680..6abfe5a452 100644
--- a/src/generated/mistica-icons/icon-hand-right-regular.tsx
+++ b/src/generated/mistica-icons/icon-hand-right-regular.tsx
@@ -18,7 +18,7 @@ const IconHandRightRegular = ({color, size = 24, ...rest}: IconProps): JSX.Eleme
);
diff --git a/src/generated/mistica-icons/icon-hand-up-regular.tsx b/src/generated/mistica-icons/icon-hand-up-regular.tsx
index eca6448c96..75cc3d64ed 100644
--- a/src/generated/mistica-icons/icon-hand-up-regular.tsx
+++ b/src/generated/mistica-icons/icon-hand-up-regular.tsx
@@ -18,7 +18,7 @@ const IconHandUpRegular = ({color, size = 24, ...rest}: IconProps): JSX.Element
);
diff --git a/src/generated/mistica-icons/icon-hard-disk-regular.tsx b/src/generated/mistica-icons/icon-hard-disk-regular.tsx
index 07c553d9ca..d6a7bdaf58 100644
--- a/src/generated/mistica-icons/icon-hard-disk-regular.tsx
+++ b/src/generated/mistica-icons/icon-hard-disk-regular.tsx
@@ -18,7 +18,7 @@ const IconHardDiskRegular = ({color, size = 24, ...rest}: IconProps): JSX.Elemen
);
diff --git a/src/generated/mistica-icons/icon-heart-regular.tsx b/src/generated/mistica-icons/icon-heart-regular.tsx
index 89d1d776f0..857f3434cc 100644
--- a/src/generated/mistica-icons/icon-heart-regular.tsx
+++ b/src/generated/mistica-icons/icon-heart-regular.tsx
@@ -38,7 +38,7 @@ const IconHeartRegular = ({color, size = 24, ...rest}: IconProps): JSX.Element =
);
diff --git a/src/generated/mistica-icons/icon-hotel-filled.tsx b/src/generated/mistica-icons/icon-hotel-filled.tsx
index 4ccc8831c4..b93e7840eb 100644
--- a/src/generated/mistica-icons/icon-hotel-filled.tsx
+++ b/src/generated/mistica-icons/icon-hotel-filled.tsx
@@ -18,7 +18,7 @@ const IconHotelFilled = ({color, size = 24, ...rest}: IconProps): JSX.Element =>
);
diff --git a/src/generated/mistica-icons/icon-invoice-digital-filled.tsx b/src/generated/mistica-icons/icon-invoice-digital-filled.tsx
index 58dd0c296d..c684b38dee 100644
--- a/src/generated/mistica-icons/icon-invoice-digital-filled.tsx
+++ b/src/generated/mistica-icons/icon-invoice-digital-filled.tsx
@@ -18,12 +18,12 @@ const IconInvoiceDigitalFilled = ({color, size = 24, ...rest}: IconProps): JSX.E
);
diff --git a/src/generated/mistica-icons/icon-invoice-plan-file-filled.tsx b/src/generated/mistica-icons/icon-invoice-plan-file-filled.tsx
index 338772a991..db2f83ed80 100644
--- a/src/generated/mistica-icons/icon-invoice-plan-file-filled.tsx
+++ b/src/generated/mistica-icons/icon-invoice-plan-file-filled.tsx
@@ -30,7 +30,7 @@ const IconInvoicePlanFileFilled = ({color, size = 24, ...rest}: IconProps): JSX.
);
diff --git a/src/generated/mistica-icons/icon-invoice-plan-file-regular.tsx b/src/generated/mistica-icons/icon-invoice-plan-file-regular.tsx
index 9ffa7523a2..c16ae55787 100644
--- a/src/generated/mistica-icons/icon-invoice-plan-file-regular.tsx
+++ b/src/generated/mistica-icons/icon-invoice-plan-file-regular.tsx
@@ -46,11 +46,11 @@ const IconInvoicePlanFileRegular = ({color, size = 24, ...rest}: IconProps): JSX
);
diff --git a/src/generated/mistica-icons/icon-lightbulb-regular.tsx b/src/generated/mistica-icons/icon-lightbulb-regular.tsx
index 66e13ecff7..77b95dfd71 100644
--- a/src/generated/mistica-icons/icon-lightbulb-regular.tsx
+++ b/src/generated/mistica-icons/icon-lightbulb-regular.tsx
@@ -29,7 +29,7 @@ const IconLightbulbRegular = ({color, size = 24, ...rest}: IconProps): JSX.Eleme
);
diff --git a/src/generated/mistica-icons/icon-location-filled.tsx b/src/generated/mistica-icons/icon-location-filled.tsx
index df26f8e9af..779e2fc0f9 100644
--- a/src/generated/mistica-icons/icon-location-filled.tsx
+++ b/src/generated/mistica-icons/icon-location-filled.tsx
@@ -29,7 +29,7 @@ const IconLocationFilled = ({color, size = 24, ...rest}: IconProps): JSX.Element
);
diff --git a/src/generated/mistica-icons/icon-lock-open-light.tsx b/src/generated/mistica-icons/icon-lock-open-light.tsx
index c80e6b7aa4..33d19bf380 100644
--- a/src/generated/mistica-icons/icon-lock-open-light.tsx
+++ b/src/generated/mistica-icons/icon-lock-open-light.tsx
@@ -33,7 +33,7 @@ const IconLockOpenLight = ({color, size = 24, ...rest}: IconProps): JSX.Element
);
diff --git a/src/generated/mistica-icons/icon-loudspeaker-regular.tsx b/src/generated/mistica-icons/icon-loudspeaker-regular.tsx
index 87e593945f..e99b3048e1 100644
--- a/src/generated/mistica-icons/icon-loudspeaker-regular.tsx
+++ b/src/generated/mistica-icons/icon-loudspeaker-regular.tsx
@@ -18,7 +18,7 @@ const IconLoudspeakerRegular = ({color, size = 24, ...rest}: IconProps): JSX.Ele
);
diff --git a/src/generated/mistica-icons/icon-lungs-filled.tsx b/src/generated/mistica-icons/icon-lungs-filled.tsx
index 7f3be1f8a7..bd1996aef9 100644
--- a/src/generated/mistica-icons/icon-lungs-filled.tsx
+++ b/src/generated/mistica-icons/icon-lungs-filled.tsx
@@ -18,7 +18,7 @@ const IconLungsFilled = ({color, size = 24, ...rest}: IconProps): JSX.Element =>
);
diff --git a/src/generated/mistica-icons/icon-lungs-regular.tsx b/src/generated/mistica-icons/icon-lungs-regular.tsx
index 0a6ad8bd81..3388654716 100644
--- a/src/generated/mistica-icons/icon-lungs-regular.tsx
+++ b/src/generated/mistica-icons/icon-lungs-regular.tsx
@@ -18,7 +18,7 @@ const IconLungsRegular = ({color, size = 24, ...rest}: IconProps): JSX.Element =
);
diff --git a/src/generated/mistica-icons/icon-menu-light.tsx b/src/generated/mistica-icons/icon-menu-light.tsx
index f8e72809eb..021779f4b5 100644
--- a/src/generated/mistica-icons/icon-menu-light.tsx
+++ b/src/generated/mistica-icons/icon-menu-light.tsx
@@ -18,7 +18,7 @@ const IconMenuLight = ({color, size = 24, ...rest}: IconProps): JSX.Element => {
);
diff --git a/src/generated/mistica-icons/icon-microchip-regular.tsx b/src/generated/mistica-icons/icon-microchip-regular.tsx
index 301ad473e4..c382acec4a 100644
--- a/src/generated/mistica-icons/icon-microchip-regular.tsx
+++ b/src/generated/mistica-icons/icon-microchip-regular.tsx
@@ -18,7 +18,7 @@ const IconMicrochipRegular = ({color, size = 24, ...rest}: IconProps): JSX.Eleme
);
diff --git a/src/generated/mistica-icons/icon-microphone-regular.tsx b/src/generated/mistica-icons/icon-microphone-regular.tsx
index 60362631ae..d4ba610af7 100644
--- a/src/generated/mistica-icons/icon-microphone-regular.tsx
+++ b/src/generated/mistica-icons/icon-microphone-regular.tsx
@@ -29,7 +29,7 @@ const IconMicrophoneRegular = ({color, size = 24, ...rest}: IconProps): JSX.Elem
);
diff --git a/src/generated/mistica-icons/icon-mobile-question-light.tsx b/src/generated/mistica-icons/icon-mobile-question-light.tsx
index 4da56f9bf7..e336363372 100644
--- a/src/generated/mistica-icons/icon-mobile-question-light.tsx
+++ b/src/generated/mistica-icons/icon-mobile-question-light.tsx
@@ -18,7 +18,7 @@ const IconMobileQuestionLight = ({color, size = 24, ...rest}: IconProps): JSX.El
);
diff --git a/src/generated/mistica-icons/icon-money-drop-filled.tsx b/src/generated/mistica-icons/icon-money-drop-filled.tsx
index 905e0b5335..6c89075b5f 100644
--- a/src/generated/mistica-icons/icon-money-drop-filled.tsx
+++ b/src/generated/mistica-icons/icon-money-drop-filled.tsx
@@ -18,7 +18,7 @@ const IconMoneyDropFilled = ({color, size = 24, ...rest}: IconProps): JSX.Elemen
);
diff --git a/src/generated/mistica-icons/icon-moon-filled.tsx b/src/generated/mistica-icons/icon-moon-filled.tsx
index 334437b9aa..2417ed2f12 100644
--- a/src/generated/mistica-icons/icon-moon-filled.tsx
+++ b/src/generated/mistica-icons/icon-moon-filled.tsx
@@ -18,7 +18,7 @@ const IconMoonFilled = ({color, size = 24, ...rest}: IconProps): JSX.Element =>
);
diff --git a/src/generated/mistica-icons/icon-neural-network-human-filled.tsx b/src/generated/mistica-icons/icon-neural-network-human-filled.tsx
index 09df17307c..9489f0054b 100644
--- a/src/generated/mistica-icons/icon-neural-network-human-filled.tsx
+++ b/src/generated/mistica-icons/icon-neural-network-human-filled.tsx
@@ -18,7 +18,7 @@ const IconNeuralNetworkHumanFilled = ({color, size = 24, ...rest}: IconProps): J
);
diff --git a/src/generated/mistica-icons/icon-neural-network-regular.tsx b/src/generated/mistica-icons/icon-neural-network-regular.tsx
index c8995d4866..90ae50db1f 100644
--- a/src/generated/mistica-icons/icon-neural-network-regular.tsx
+++ b/src/generated/mistica-icons/icon-neural-network-regular.tsx
@@ -18,7 +18,7 @@ const IconNeuralNetworkRegular = ({color, size = 24, ...rest}: IconProps): JSX.E
);
diff --git a/src/generated/mistica-icons/icon-not-conexion-filled.tsx b/src/generated/mistica-icons/icon-not-conexion-filled.tsx
index c4482b5b51..87cab10655 100644
--- a/src/generated/mistica-icons/icon-not-conexion-filled.tsx
+++ b/src/generated/mistica-icons/icon-not-conexion-filled.tsx
@@ -18,7 +18,7 @@ const IconNotConexionFilled = ({color, size = 24, ...rest}: IconProps): JSX.Elem
);
diff --git a/src/generated/mistica-icons/icon-notes-filled.tsx b/src/generated/mistica-icons/icon-notes-filled.tsx
index 5e1d790880..d879d694b8 100644
--- a/src/generated/mistica-icons/icon-notes-filled.tsx
+++ b/src/generated/mistica-icons/icon-notes-filled.tsx
@@ -18,7 +18,7 @@ const IconNotesFilled = ({color, size = 24, ...rest}: IconProps): JSX.Element =>
);
diff --git a/src/generated/mistica-icons/icon-notes-regular.tsx b/src/generated/mistica-icons/icon-notes-regular.tsx
index ee9099a3b8..4bdb9df4cd 100644
--- a/src/generated/mistica-icons/icon-notes-regular.tsx
+++ b/src/generated/mistica-icons/icon-notes-regular.tsx
@@ -18,7 +18,7 @@ const IconNotesRegular = ({color, size = 24, ...rest}: IconProps): JSX.Element =
);
diff --git a/src/generated/mistica-icons/icon-offer-percent-light.tsx b/src/generated/mistica-icons/icon-offer-percent-light.tsx
index 0a7e8ccde3..0e5f62d137 100644
--- a/src/generated/mistica-icons/icon-offer-percent-light.tsx
+++ b/src/generated/mistica-icons/icon-offer-percent-light.tsx
@@ -29,11 +29,11 @@ const IconOfferPercentLight = ({color, size = 24, ...rest}: IconProps): JSX.Elem
);
diff --git a/src/generated/mistica-icons/icon-offer-regular.tsx b/src/generated/mistica-icons/icon-offer-regular.tsx
index 55d10b1f26..56662d2829 100644
--- a/src/generated/mistica-icons/icon-offer-regular.tsx
+++ b/src/generated/mistica-icons/icon-offer-regular.tsx
@@ -29,7 +29,7 @@ const IconOfferRegular = ({color, size = 24, ...rest}: IconProps): JSX.Element =
);
diff --git a/src/generated/mistica-icons/icon-optical-fiber-filled.tsx b/src/generated/mistica-icons/icon-optical-fiber-filled.tsx
index fa7603e201..ad41b0255d 100644
--- a/src/generated/mistica-icons/icon-optical-fiber-filled.tsx
+++ b/src/generated/mistica-icons/icon-optical-fiber-filled.tsx
@@ -29,11 +29,11 @@ const IconOpticalFiberFilled = ({color, size = 24, ...rest}: IconProps): JSX.Ele
);
diff --git a/src/generated/mistica-icons/icon-outgoing-call-filled.tsx b/src/generated/mistica-icons/icon-outgoing-call-filled.tsx
index d43cf92d14..1f6b2f83b9 100644
--- a/src/generated/mistica-icons/icon-outgoing-call-filled.tsx
+++ b/src/generated/mistica-icons/icon-outgoing-call-filled.tsx
@@ -18,7 +18,7 @@ const IconOutgoingCallFilled = ({color, size = 24, ...rest}: IconProps): JSX.Ele
);
diff --git a/src/generated/mistica-icons/icon-pause-circle-filled.tsx b/src/generated/mistica-icons/icon-pause-circle-filled.tsx
index 9c3ac7a714..84c38c8f81 100644
--- a/src/generated/mistica-icons/icon-pause-circle-filled.tsx
+++ b/src/generated/mistica-icons/icon-pause-circle-filled.tsx
@@ -29,7 +29,7 @@ const IconPauseCircleFilled = ({color, size = 24, ...rest}: IconProps): JSX.Elem
);
diff --git a/src/generated/mistica-icons/icon-pause-circle-light.tsx b/src/generated/mistica-icons/icon-pause-circle-light.tsx
index 72633c07de..3e87acd737 100644
--- a/src/generated/mistica-icons/icon-pause-circle-light.tsx
+++ b/src/generated/mistica-icons/icon-pause-circle-light.tsx
@@ -29,7 +29,7 @@ const IconPauseCircleLight = ({color, size = 24, ...rest}: IconProps): JSX.Eleme
);
diff --git a/src/generated/mistica-icons/icon-pay-invoice-light.tsx b/src/generated/mistica-icons/icon-pay-invoice-light.tsx
index 26cce581b2..1dc068f55f 100644
--- a/src/generated/mistica-icons/icon-pay-invoice-light.tsx
+++ b/src/generated/mistica-icons/icon-pay-invoice-light.tsx
@@ -29,11 +29,11 @@ const IconPayInvoiceLight = ({color, size = 24, ...rest}: IconProps): JSX.Elemen
);
diff --git a/src/generated/mistica-icons/icon-pendrive-regular.tsx b/src/generated/mistica-icons/icon-pendrive-regular.tsx
index 5e636c5106..b68e524e0e 100644
--- a/src/generated/mistica-icons/icon-pendrive-regular.tsx
+++ b/src/generated/mistica-icons/icon-pendrive-regular.tsx
@@ -18,7 +18,7 @@ const IconPendriveRegular = ({color, size = 24, ...rest}: IconProps): JSX.Elemen
);
diff --git a/src/generated/mistica-icons/icon-people-network-filled.tsx b/src/generated/mistica-icons/icon-people-network-filled.tsx
index 99da46ddc7..5d841f87e1 100644
--- a/src/generated/mistica-icons/icon-people-network-filled.tsx
+++ b/src/generated/mistica-icons/icon-people-network-filled.tsx
@@ -29,7 +29,7 @@ const IconPeopleNetworkFilled = ({color, size = 24, ...rest}: IconProps): JSX.El
);
diff --git a/src/generated/mistica-icons/icon-percent-regular.tsx b/src/generated/mistica-icons/icon-percent-regular.tsx
index ecdd73705a..4077457ea9 100644
--- a/src/generated/mistica-icons/icon-percent-regular.tsx
+++ b/src/generated/mistica-icons/icon-percent-regular.tsx
@@ -18,7 +18,7 @@ const IconPercentRegular = ({color, size = 24, ...rest}: IconProps): JSX.Element
);
diff --git a/src/generated/mistica-icons/icon-photo-camera-regular.tsx b/src/generated/mistica-icons/icon-photo-camera-regular.tsx
index be25768ab9..ae5c71f27f 100644
--- a/src/generated/mistica-icons/icon-photo-camera-regular.tsx
+++ b/src/generated/mistica-icons/icon-photo-camera-regular.tsx
@@ -33,7 +33,7 @@ const IconPhotoCameraRegular = ({color, size = 24, ...rest}: IconProps): JSX.Ele
);
diff --git a/src/generated/mistica-icons/icon-pills-regular.tsx b/src/generated/mistica-icons/icon-pills-regular.tsx
index 01b2a7ab60..1b0248db70 100644
--- a/src/generated/mistica-icons/icon-pills-regular.tsx
+++ b/src/generated/mistica-icons/icon-pills-regular.tsx
@@ -18,7 +18,7 @@ const IconPillsRegular = ({color, size = 24, ...rest}: IconProps): JSX.Element =
);
diff --git a/src/generated/mistica-icons/icon-play-circle-light.tsx b/src/generated/mistica-icons/icon-play-circle-light.tsx
index 2238a819b9..35aac31dd1 100644
--- a/src/generated/mistica-icons/icon-play-circle-light.tsx
+++ b/src/generated/mistica-icons/icon-play-circle-light.tsx
@@ -18,7 +18,7 @@ const IconPlayCircleLight = ({color, size = 24, ...rest}: IconProps): JSX.Elemen
);
diff --git a/src/generated/mistica-icons/icon-teddy-bear-light.tsx b/src/generated/mistica-icons/icon-teddy-bear-light.tsx
index 76a762532f..4c06926e9c 100644
--- a/src/generated/mistica-icons/icon-teddy-bear-light.tsx
+++ b/src/generated/mistica-icons/icon-teddy-bear-light.tsx
@@ -18,7 +18,7 @@ const IconTeddyBearLight = ({color, size = 24, ...rest}: IconProps): JSX.Element
);
diff --git a/src/generated/mistica-icons/icon-teddy-bear-regular.tsx b/src/generated/mistica-icons/icon-teddy-bear-regular.tsx
index 2230900205..13fb29caf5 100644
--- a/src/generated/mistica-icons/icon-teddy-bear-regular.tsx
+++ b/src/generated/mistica-icons/icon-teddy-bear-regular.tsx
@@ -18,7 +18,7 @@ const IconTeddyBearRegular = ({color, size = 24, ...rest}: IconProps): JSX.Eleme
);
diff --git a/src/generated/mistica-icons/icon-theater-regular.tsx b/src/generated/mistica-icons/icon-theater-regular.tsx
index f8e39509a7..e3ed2cb68f 100644
--- a/src/generated/mistica-icons/icon-theater-regular.tsx
+++ b/src/generated/mistica-icons/icon-theater-regular.tsx
@@ -18,7 +18,7 @@ const IconTheaterRegular = ({color, size = 24, ...rest}: IconProps): JSX.Element
);
diff --git a/src/generated/mistica-icons/icon-tongue-filled.tsx b/src/generated/mistica-icons/icon-tongue-filled.tsx
index c386b2fd19..c2ed2504cb 100644
--- a/src/generated/mistica-icons/icon-tongue-filled.tsx
+++ b/src/generated/mistica-icons/icon-tongue-filled.tsx
@@ -18,7 +18,7 @@ const IconTongueFilled = ({color, size = 24, ...rest}: IconProps): JSX.Element =
);
diff --git a/src/generated/mistica-icons/icon-tongue-light.tsx b/src/generated/mistica-icons/icon-tongue-light.tsx
index ae9088b357..dc9b42efd1 100644
--- a/src/generated/mistica-icons/icon-tongue-light.tsx
+++ b/src/generated/mistica-icons/icon-tongue-light.tsx
@@ -18,7 +18,7 @@ const IconTongueLight = ({color, size = 24, ...rest}: IconProps): JSX.Element =>
);
diff --git a/src/generated/mistica-icons/icon-tooth-filled.tsx b/src/generated/mistica-icons/icon-tooth-filled.tsx
index 2d74c30086..e6679cfe45 100644
--- a/src/generated/mistica-icons/icon-tooth-filled.tsx
+++ b/src/generated/mistica-icons/icon-tooth-filled.tsx
@@ -18,7 +18,7 @@ const IconToothFilled = ({color, size = 24, ...rest}: IconProps): JSX.Element =>
);
diff --git a/src/generated/mistica-icons/icon-tow-truck-filled.tsx b/src/generated/mistica-icons/icon-tow-truck-filled.tsx
index 27c0f2714a..0693faa2bb 100644
--- a/src/generated/mistica-icons/icon-tow-truck-filled.tsx
+++ b/src/generated/mistica-icons/icon-tow-truck-filled.tsx
@@ -18,7 +18,7 @@ const IconTowTruckFilled = ({color, size = 24, ...rest}: IconProps): JSX.Element
);
diff --git a/src/generated/mistica-icons/icon-train-filled.tsx b/src/generated/mistica-icons/icon-train-filled.tsx
index ec96c7e14d..ab0b1afd83 100644
--- a/src/generated/mistica-icons/icon-train-filled.tsx
+++ b/src/generated/mistica-icons/icon-train-filled.tsx
@@ -29,7 +29,7 @@ const IconTrainFilled = ({color, size = 24, ...rest}: IconProps): JSX.Element =>
);
diff --git a/src/generated/mistica-icons/icon-train-light.tsx b/src/generated/mistica-icons/icon-train-light.tsx
index 7e40192375..cb9c0ce958 100644
--- a/src/generated/mistica-icons/icon-train-light.tsx
+++ b/src/generated/mistica-icons/icon-train-light.tsx
@@ -29,7 +29,7 @@ const IconTrainLight = ({color, size = 24, ...rest}: IconProps): JSX.Element =>
);
diff --git a/src/generated/mistica-icons/icon-tram-train-light.tsx b/src/generated/mistica-icons/icon-tram-train-light.tsx
index 9637d82620..5c22ba5318 100644
--- a/src/generated/mistica-icons/icon-tram-train-light.tsx
+++ b/src/generated/mistica-icons/icon-tram-train-light.tsx
@@ -18,7 +18,7 @@ const IconTramTrainLight = ({color, size = 24, ...rest}: IconProps): JSX.Element
);
diff --git a/src/generated/mistica-icons/icon-tram-train-regular.tsx b/src/generated/mistica-icons/icon-tram-train-regular.tsx
index 14f9c66671..9b124f6a05 100644
--- a/src/generated/mistica-icons/icon-tram-train-regular.tsx
+++ b/src/generated/mistica-icons/icon-tram-train-regular.tsx
@@ -18,7 +18,7 @@ const IconTramTrainRegular = ({color, size = 24, ...rest}: IconProps): JSX.Eleme
);
diff --git a/src/generated/mistica-icons/icon-trash-can-filled.tsx b/src/generated/mistica-icons/icon-trash-can-filled.tsx
index 1ae5b6e926..555cd12865 100644
--- a/src/generated/mistica-icons/icon-trash-can-filled.tsx
+++ b/src/generated/mistica-icons/icon-trash-can-filled.tsx
@@ -29,7 +29,7 @@ const IconTrashCanFilled = ({color, size = 24, ...rest}: IconProps): JSX.Element
);
diff --git a/src/generated/mistica-icons/icon-trash-can-light.tsx b/src/generated/mistica-icons/icon-trash-can-light.tsx
index f6201755ac..6f631829f4 100644
--- a/src/generated/mistica-icons/icon-trash-can-light.tsx
+++ b/src/generated/mistica-icons/icon-trash-can-light.tsx
@@ -33,7 +33,7 @@ const IconTrashCanLight = ({color, size = 24, ...rest}: IconProps): JSX.Element
);
diff --git a/src/generated/mistica-icons/icon-travel-bag-filled.tsx b/src/generated/mistica-icons/icon-travel-bag-filled.tsx
index d1f10b51dd..96e8efb9d4 100644
--- a/src/generated/mistica-icons/icon-travel-bag-filled.tsx
+++ b/src/generated/mistica-icons/icon-travel-bag-filled.tsx
@@ -18,7 +18,7 @@ const IconTravelBagFilled = ({color, size = 24, ...rest}: IconProps): JSX.Elemen
);
diff --git a/src/generated/mistica-icons/icon-travel-bag-regular.tsx b/src/generated/mistica-icons/icon-travel-bag-regular.tsx
index 1c1338f32f..5a93cba9b4 100644
--- a/src/generated/mistica-icons/icon-travel-bag-regular.tsx
+++ b/src/generated/mistica-icons/icon-travel-bag-regular.tsx
@@ -18,7 +18,7 @@ const IconTravelBagRegular = ({color, size = 24, ...rest}: IconProps): JSX.Eleme
);
diff --git a/src/generated/mistica-icons/icon-tree-2-filled.tsx b/src/generated/mistica-icons/icon-tree-2-filled.tsx
index 2836721a3e..f61606bd34 100644
--- a/src/generated/mistica-icons/icon-tree-2-filled.tsx
+++ b/src/generated/mistica-icons/icon-tree-2-filled.tsx
@@ -18,7 +18,7 @@ const IconTree2Filled = ({color, size = 24, ...rest}: IconProps): JSX.Element =>
);
diff --git a/src/generated/mistica-icons/icon-trophy-filled.tsx b/src/generated/mistica-icons/icon-trophy-filled.tsx
index 2937b67710..c694f0183f 100644
--- a/src/generated/mistica-icons/icon-trophy-filled.tsx
+++ b/src/generated/mistica-icons/icon-trophy-filled.tsx
@@ -29,7 +29,7 @@ const IconTrophyFilled = ({color, size = 24, ...rest}: IconProps): JSX.Element =
);
diff --git a/src/generated/mistica-icons/icon-tshirt-filled.tsx b/src/generated/mistica-icons/icon-tshirt-filled.tsx
index 5e5cdc0238..9bf76ae264 100644
--- a/src/generated/mistica-icons/icon-tshirt-filled.tsx
+++ b/src/generated/mistica-icons/icon-tshirt-filled.tsx
@@ -18,7 +18,7 @@ const IconTshirtFilled = ({color, size = 24, ...rest}: IconProps): JSX.Element =
);
diff --git a/src/generated/mistica-icons/icon-tshirt-regular.tsx b/src/generated/mistica-icons/icon-tshirt-regular.tsx
index eff46cf772..a1d90d8db3 100644
--- a/src/generated/mistica-icons/icon-tshirt-regular.tsx
+++ b/src/generated/mistica-icons/icon-tshirt-regular.tsx
@@ -18,7 +18,7 @@ const IconTshirtRegular = ({color, size = 24, ...rest}: IconProps): JSX.Element
);
diff --git a/src/generated/mistica-icons/icon-umbrella-regular.tsx b/src/generated/mistica-icons/icon-umbrella-regular.tsx
index b14e49f3a6..49eee2a217 100644
--- a/src/generated/mistica-icons/icon-umbrella-regular.tsx
+++ b/src/generated/mistica-icons/icon-umbrella-regular.tsx
@@ -18,7 +18,7 @@ const IconUmbrellaRegular = ({color, size = 24, ...rest}: IconProps): JSX.Elemen
);
diff --git a/src/generated/mistica-icons/icon-user-account-light.tsx b/src/generated/mistica-icons/icon-user-account-light.tsx
index 8ecdb40dfd..d29cf22c59 100644
--- a/src/generated/mistica-icons/icon-user-account-light.tsx
+++ b/src/generated/mistica-icons/icon-user-account-light.tsx
@@ -29,7 +29,7 @@ const IconUserAccountLight = ({color, size = 24, ...rest}: IconProps): JSX.Eleme
);
diff --git a/src/generated/mistica-icons/icon-user-account-regular.tsx b/src/generated/mistica-icons/icon-user-account-regular.tsx
index 49378fb132..6807eb5c02 100644
--- a/src/generated/mistica-icons/icon-user-account-regular.tsx
+++ b/src/generated/mistica-icons/icon-user-account-regular.tsx
@@ -38,7 +38,7 @@ const IconUserAccountRegular = ({color, size = 24, ...rest}: IconProps): JSX.Ele
);
diff --git a/src/generated/mistica-icons/icon-video-surveillance-security-filled.tsx b/src/generated/mistica-icons/icon-video-surveillance-security-filled.tsx
index 2c1ce53406..500b00179a 100644
--- a/src/generated/mistica-icons/icon-video-surveillance-security-filled.tsx
+++ b/src/generated/mistica-icons/icon-video-surveillance-security-filled.tsx
@@ -18,7 +18,7 @@ const IconVideoSurveillanceSecurityFilled = ({color, size = 24, ...rest}: IconPr
);
diff --git a/src/generated/mistica-icons/icon-virus-scan-filled.tsx b/src/generated/mistica-icons/icon-virus-scan-filled.tsx
index 1e1a674f84..ab395655f8 100644
--- a/src/generated/mistica-icons/icon-virus-scan-filled.tsx
+++ b/src/generated/mistica-icons/icon-virus-scan-filled.tsx
@@ -18,7 +18,7 @@ const IconVirusScanFilled = ({color, size = 24, ...rest}: IconProps): JSX.Elemen
);
diff --git a/src/generated/mistica-icons/icon-web-filled.tsx b/src/generated/mistica-icons/icon-web-filled.tsx
index f416940c82..f1039a6d14 100644
--- a/src/generated/mistica-icons/icon-web-filled.tsx
+++ b/src/generated/mistica-icons/icon-web-filled.tsx
@@ -18,7 +18,7 @@ const IconWebFilled = ({color, size = 24, ...rest}: IconProps): JSX.Element => {
);
diff --git a/src/generated/mistica-icons/icon-wifi-regular.tsx b/src/generated/mistica-icons/icon-wifi-regular.tsx
index 7524f3dfa2..1d74ebfa85 100644
--- a/src/generated/mistica-icons/icon-wifi-regular.tsx
+++ b/src/generated/mistica-icons/icon-wifi-regular.tsx
@@ -54,11 +54,11 @@ const IconWifiRegular = ({color, size = 24, ...rest}: IconProps): JSX.Element =>
);
diff --git a/src/generated/mistica-icons/icon-winner-filled.tsx b/src/generated/mistica-icons/icon-winner-filled.tsx
index 4330b4bd67..4ea8806e47 100644
--- a/src/generated/mistica-icons/icon-winner-filled.tsx
+++ b/src/generated/mistica-icons/icon-winner-filled.tsx
@@ -29,7 +29,7 @@ const IconWinnerFilled = ({color, size = 24, ...rest}: IconProps): JSX.Element =
);
diff --git a/src/generated/mistica-icons/icon-winner-regular.tsx b/src/generated/mistica-icons/icon-winner-regular.tsx
index 24088c517f..ce04775c10 100644
--- a/src/generated/mistica-icons/icon-winner-regular.tsx
+++ b/src/generated/mistica-icons/icon-winner-regular.tsx
@@ -29,7 +29,7 @@ const IconWinnerRegular = ({color, size = 24, ...rest}: IconProps): JSX.Element
);
diff --git a/src/header.tsx b/src/header.tsx
index 5f36e08d2c..b356ed64e0 100644
--- a/src/header.tsx
+++ b/src/header.tsx
@@ -94,7 +94,8 @@ export const Header: React.FC = ({
{pretitle && renderRichText(pretitle, {color: vars.colors.textPrimary})}
- {small ? {title} : {title}}
+ {title &&
+ (small ? {title} : {title})}
{description &&
(small ? (
diff --git a/src/icons/icon-success-vivo-new.tsx b/src/icons/icon-success-vivo-new.tsx
index 0858dbcf7a..67ae08710e 100644
--- a/src/icons/icon-success-vivo-new.tsx
+++ b/src/icons/icon-success-vivo-new.tsx
@@ -15,9 +15,9 @@ const IconSuccessVivoNew = ({size = 48}: Props): JSX.Element => {
{
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
- points="25.75,32.75 29.69,37.5 38.25,26.5"
+ points="24,32.75 30,39 40.5,24.5"
{...getAnimateDrawLineProps('44', '0.4s', platformOverrides, '0.5 0 0.83 0.83')}
/>
diff --git a/src/package-version.tsx b/src/package-version.tsx
index b56d4ce221..94089bc1cd 100644
--- a/src/package-version.tsx
+++ b/src/package-version.tsx
@@ -1,2 +1,2 @@
// DO NOT EDIT THIS FILE. It's autogenerated by set-version.js
-export const PACKAGE_VERSION = '14.22.0' as string;
+export const PACKAGE_VERSION = '14.24.0' as string;
diff --git a/src/sheet-root.tsx b/src/sheet-root.tsx
index 0e5795d4ff..fb3cb83a14 100644
--- a/src/sheet-root.tsx
+++ b/src/sheet-root.tsx
@@ -18,7 +18,7 @@ type SheetProps = Id<
{
title?: string;
subtitle?: string;
- description?: string;
+ description?: string | Array;
} & T
>;
@@ -95,6 +95,17 @@ let listener: SheetPropsListener | null = null;
let sheetPromiseResolve: SheetPromiseResolve | null = null;
let nativeSheetImplementation: NativeSheetImplementation | null = null;
+const normalizeDescriptionForNative = (description?: string | Array): string | undefined => {
+ if (Array.isArray(description)) {
+ if (description.length) {
+ return description.join('\n\n');
+ } else {
+ return undefined;
+ }
+ }
+ return description;
+};
+
const showRadioListNativeSheet = ({
title,
subtitle,
@@ -105,7 +116,8 @@ const showRadioListNativeSheet = ({
(nativeSheetImplementation as NativeSheetImplementation)({
title,
subtitle,
- description,
+ // TODO: add multiline support to native sheet
+ description: normalizeDescriptionForNative(description),
content: [
{
type: 'LIST',
@@ -139,7 +151,8 @@ const showActionsListNativeSheet = ({
(nativeSheetImplementation as NativeSheetImplementation)({
title,
subtitle,
- description,
+ // TODO: add multiline support to native sheet
+ description: normalizeDescriptionForNative(description),
content: [
{
type: 'LIST',
@@ -168,7 +181,8 @@ const showInfoNativeSheet = async ({title, subtitle, description, items}: SheetP
await (nativeSheetImplementation as NativeSheetImplementation)({
title,
subtitle,
- description,
+ // TODO: add multiline support to native sheet
+ description: normalizeDescriptionForNative(description),
content: [
{
type: 'LIST',
@@ -193,7 +207,8 @@ const showActionsNativeSheet = async ({
return (nativeSheetImplementation as NativeSheetImplementation)({
title,
subtitle,
- description,
+ // TODO: add multiline support to native sheet
+ description: normalizeDescriptionForNative(description),
content: [
{
type: 'BOTTOM_ACTIONS',
diff --git a/src/sheet.tsx b/src/sheet.tsx
index d1b4ba2b89..e5cde6740a 100644
--- a/src/sheet.tsx
+++ b/src/sheet.tsx
@@ -295,7 +295,7 @@ const Sheet = React.forwardRef(({onClose, children,
type SheetBodyProps = {
title?: string;
subtitle?: string;
- description?: string;
+ description?: string | Array;
button?: RendersNullableElement;
secondaryButton?: RendersNullableElement;
link?: RendersNullableElement;
@@ -360,11 +360,29 @@ export const SheetBody = ({
{subtitle}
)}
- {description && (
-
- {description}
-
- )}
+ {description &&
+ (Array.isArray(description) ? (
+
+ {description.map((text, index) => (
+
+ {text}
+
+ ))}
+
+ ) : (
+
+ {description}
+
+ ))}
) : null}
{children}
@@ -393,7 +411,7 @@ export const SheetBody = ({
type RadioListSheetProps = {
title?: string;
subtitle?: string;
- description?: string;
+ description?: string | Array;
items: Array<{
id: string;
title?: string;
@@ -487,7 +505,7 @@ export const RadioListSheet = React.forwardRef;
items: Array<{
id: string;
title: string;
@@ -582,7 +600,7 @@ export const ActionsListSheet = React.forwardRef;
items: Array<{
id?: string;
title: string;
@@ -674,7 +692,7 @@ type ButtonProps = {
type ActionsSheetProps = {
title?: string;
subtitle?: string;
- description?: string;
+ description?: string | Array;
button: ButtonProps;
secondaryButton?: ButtonProps;
buttonLink?: ButtonProps & {withChevron?: boolean};
diff --git a/src/snackbar.tsx b/src/snackbar.tsx
index 2f6d80f28d..00eb0d9acb 100644
--- a/src/snackbar.tsx
+++ b/src/snackbar.tsx
@@ -8,6 +8,7 @@ import * as styles from './snackbar.css';
import {sprinkles} from './sprinkles.css';
import {vars} from './skins/skin-contract.css';
import {getPrefixedDataAttributes} from './utils/dom';
+import {Portal} from './portal';
import type {DataAttributes} from './utils/types';
@@ -58,54 +59,56 @@ const SnackbarComponent: React.FC = ({
}, [close, duration]);
return (
-
-
+
+
-
- {message}
-
- {buttonText && (
-
-
+
+ {message}
+
+ {buttonText && (
+
- {buttonText}
-
-
- )}
+
+ {buttonText}
+
+
+ )}
+
-
+
);
};
diff --git a/src/sprinkles.css.ts b/src/sprinkles.css.ts
index 4ca8676220..2d6a8895e0 100644
--- a/src/sprinkles.css.ts
+++ b/src/sprinkles.css.ts
@@ -42,6 +42,7 @@ const responsiveProperties = defineProperties({
const commonProperties = defineProperties({
properties: {
+ isolation: ['isolate'],
position: ['relative', 'absolute', 'fixed', 'static', 'sticky'],
display: ['none', 'flex', 'inline-flex', 'block', 'inline', 'inline-block'],
flexDirection: ['row', 'column'],
diff --git a/src/tabs.css.ts b/src/tabs.css.ts
index 4ef8482264..506810227a 100644
--- a/src/tabs.css.ts
+++ b/src/tabs.css.ts
@@ -55,11 +55,6 @@ const baseTab = style([
background: 'transparent',
}),
{
- /**
- * Setting margin to 0, in order to avoid Safari from automatically adding extra margin to
- * the touchable container (https://stackoverflow.com/a/71093016)
- */
- margin: 0,
textAlign: 'center',
verticalAlign: 'baseline',
borderBottom: '2px solid transparent',
diff --git a/src/title.tsx b/src/title.tsx
index 51d0640fcb..289f52c4da 100644
--- a/src/title.tsx
+++ b/src/title.tsx
@@ -4,6 +4,7 @@ import Inline from './inline';
import Box from './box';
import {vars} from './skins/skin-contract.css';
import {useTheme} from './hooks';
+import {getPrefixedDataAttributes} from './utils/dom';
import type {DataAttributes} from './utils/types';
@@ -16,7 +17,7 @@ type TitleLayoutProps = {
const TitleLayout = ({title, right, dataAttributes}: TitleLayoutProps): React.ReactElement => {
const {textPresets} = useTheme();
if (!right) {
- return title;
+ return {title}
;
}
return (
@@ -29,7 +30,7 @@ const TitleLayout = ({title, right, dataAttributes}: TitleLayoutProps): React.Re
);
};
-type TitleProps = {
+export type TitleProps = {
children: React.ReactNode;
id?: string;
right?: React.ReactNode;
diff --git a/src/touchable.css.ts b/src/touchable.css.ts
index 6f626d23f7..3040bddc81 100644
--- a/src/touchable.css.ts
+++ b/src/touchable.css.ts
@@ -6,6 +6,10 @@ export const base = style([
cursor: 'pointer',
}),
{
+ /**
+ * Setting margin to 0, in order to avoid Safari from automatically adding extra margin to
+ * the touchable container (https://stackoverflow.com/a/71093016)
+ */
margin: 0,
verticalAlign: 'bottom', // required to remove bottom gap when rendered as inline-block div
fontFamily: 'inherit',
diff --git a/src/utils/__tests__/helpers-test.tsx b/src/utils/__tests__/helpers-test.tsx
index 73235f57a5..bacd935737 100644
--- a/src/utils/__tests__/helpers-test.tsx
+++ b/src/utils/__tests__/helpers-test.tsx
@@ -4,7 +4,7 @@ beforeEach(() => {
jest.useFakeTimers();
});
-test('debounce happy case', () => {
+test('debounce without leading and with trailing', () => {
const fn = jest.fn().mockImplementation((a) => a);
const debounced = debounce(fn, 5000);
@@ -16,12 +16,10 @@ test('debounce happy case', () => {
expect(fn).not.toHaveBeenCalled();
jest.runAllTimers();
-
- expect(fn).toHaveBeenCalledTimes(1);
expect(fn.mock.calls).toEqual([[3]]);
});
-test('debounce with leading', () => {
+test('debounce with leading and trailing', () => {
const fn = jest.fn().mockImplementation((a) => a);
const debounced = debounce(fn, 5000, {leading: true});
@@ -33,11 +31,24 @@ test('debounce with leading', () => {
expect(fn.mock.calls).toEqual([[1]]);
jest.runAllTimers();
-
- expect(fn).toHaveBeenCalledTimes(2);
expect(fn.mock.calls).toEqual([[1], [3]]);
});
+test('debounce with leading and without trailing', () => {
+ const fn = jest.fn().mockImplementation((a) => a);
+ const debounced = debounce(fn, 5000, {leading: true, trailing: false});
+
+ debounced(1);
+ expect(fn.mock.calls).toEqual([[1]]);
+
+ debounced(2);
+ debounced(3);
+ expect(fn.mock.calls).toEqual([[1]]);
+
+ jest.runAllTimers();
+ expect(fn.mock.calls).toEqual([[1]]);
+});
+
test('debounce with maxWait', () => {
const fn = jest.fn().mockImplementation((a) => a);
const debounced = debounce(fn, 2500, {maxWait: 3000});
@@ -66,6 +77,24 @@ test("debounce with leading and maxWait don't gets called twice", () => {
expect(fn.mock.calls).toEqual([[1]]);
});
+test('debounce calls the function when maxWait expires', () => {
+ const fn = jest.fn().mockImplementation((a) => a);
+ const debounced = debounce(fn, 1000, {maxWait: 2000});
+
+ debounced(1);
+ jest.advanceTimersByTime(500);
+ debounced(2);
+ jest.advanceTimersByTime(500);
+ debounced(3);
+ jest.advanceTimersByTime(500);
+ debounced(4);
+ jest.advanceTimersByTime(500);
+
+ expect(fn.mock.calls).toEqual([[4]]);
+ jest.runAllTimers();
+ expect(fn.mock.calls).toEqual([[4]]);
+});
+
test('debounce cancel', () => {
const fn = jest.fn().mockImplementation((a) => a);
const debounced = debounce(fn, 5000);
@@ -81,6 +110,20 @@ test('debounce cancel', () => {
expect(fn).not.toHaveBeenCalled();
});
+test('debounce flush', () => {
+ const fn = jest.fn().mockImplementation((a) => a);
+ const debounced = debounce(fn, 5000);
+
+ debounced(1);
+ debounced(2);
+ debounced(3);
+
+ debounced.flush();
+
+ jest.runAllTimers();
+ expect(fn.mock.calls).toEqual([[3]]);
+});
+
test('isEqual happy case', () => {
const symbol = Symbol('abc');
diff --git a/src/utils/helpers.tsx b/src/utils/helpers.tsx
index 3e17a7af76..d9b1bb33c9 100644
--- a/src/utils/helpers.tsx
+++ b/src/utils/helpers.tsx
@@ -1,59 +1,123 @@
-type Debounced = T & {cancel: () => void};
+/** These functions are copies of the ones located in webapp packages */
+type Debounced = T & {cancel: () => void; flush: () => void};
+
+/**
+ * Creates a debounced function that delays invoking func until after wait milliseconds
+ * have elapsed since the last time the debounced function was invoked. The debounced function
+ * comes with a cancel method to cancel delayed func invocations and a flush method to immediately
+ * invoke them. The func is invoked with the last arguments provided to the debounced function.
+ * Subsequent calls to the debounced function return the result of the last func invocation.
+ */
export const debounce = ) => any>(
func: T,
wait: number,
options: {
leading?: boolean;
+ trailing?: boolean;
maxWait?: number;
} = {}
): Debounced => {
- let debounceTimeoutId: ReturnType | undefined;
- let maxWaitTimeoutId: ReturnType | undefined;
- let currentArgs: Parameters;
- let isLeading = true;
-
- const debounced = (...args: Parameters) => {
- if (debounceTimeoutId) {
- clearTimeout(debounceTimeoutId);
+ const waitTime = wait;
+ const leading = options.leading ?? false;
+ const trailing = options.trailing ?? true;
+ const maxWait = options.maxWait !== undefined ? Math.max(options.maxWait, waitTime) : undefined;
+
+ let currentArgs: Parameters | undefined;
+ let lastInvokeTime = 0;
+ let lastCallTime = -1;
+ let result: any;
+
+ let timerId: ReturnType | undefined;
+
+ const invokeFunction = (time: number): any => {
+ lastInvokeTime = time;
+ if (currentArgs) {
+ result = func(...currentArgs);
}
+ currentArgs = undefined;
+ return result;
+ };
+
+ const shouldInvoke = (time: number): boolean => {
+ const timeSinceLastCall = time - lastCallTime;
+ const timeSinceLastInvoke = time - lastInvokeTime;
+
+ return (
+ lastCallTime < 0 ||
+ timeSinceLastCall >= wait ||
+ timeSinceLastCall < 0 ||
+ (maxWait !== undefined && timeSinceLastInvoke >= maxWait)
+ );
+ };
- if (isLeading && options.leading) {
- isLeading = false;
- func(...args);
- return;
+ const remainingWait = (time: number): number => {
+ const timeSinceLastCall = time - lastCallTime;
+ const timeSinceLastInvoke = time - lastInvokeTime;
+ const timeWaiting = wait - timeSinceLastCall;
+ return maxWait !== undefined ? Math.min(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
+ };
+
+ const trailingEdge = (time: number): any => {
+ timerId = undefined;
+
+ if (trailing && currentArgs) {
+ return invokeFunction(time);
}
- currentArgs = args;
+ currentArgs = undefined;
+ return result;
+ };
- if (!maxWaitTimeoutId && options.maxWait) {
- maxWaitTimeoutId = setTimeout(() => {
- func(...currentArgs);
- maxWaitTimeoutId = undefined;
- clearTimeout(debounceTimeoutId);
- }, options.maxWait);
+ const timerExpired = (): any => {
+ const time = Date.now();
+ if (shouldInvoke(time)) {
+ return trailingEdge(time);
}
+ timerId = setTimeout(timerExpired, remainingWait(time));
+ };
- debounceTimeoutId = setTimeout(() => {
- func(...args);
- if (maxWaitTimeoutId) {
- clearTimeout(maxWaitTimeoutId);
- }
- debounceTimeoutId = undefined;
- maxWaitTimeoutId = undefined;
- // eslint-disable-next-line testing-library/await-async-utils
- }, wait);
+ const leadingEdge = (time: number): any => {
+ lastInvokeTime = time;
+
+ timerId = setTimeout(timerExpired, waitTime);
+ return leading ? invokeFunction(time) : result;
};
- debounced.cancel = () => {
- if (debounceTimeoutId) {
- clearTimeout(debounceTimeoutId);
- debounceTimeoutId = undefined;
+ const debounced = (...args: Parameters) => {
+ const time = Date.now();
+ const isInvoking = shouldInvoke(time);
+
+ currentArgs = args;
+ lastCallTime = time;
+
+ if (isInvoking) {
+ if (timerId === undefined) {
+ return leadingEdge(lastCallTime);
+ }
+ if (maxWait !== undefined) {
+ timerId = setTimeout(timerExpired, waitTime);
+ return invokeFunction(lastCallTime);
+ }
+ }
+ if (timerId === undefined) {
+ timerId = setTimeout(timerExpired, waitTime);
}
- if (maxWaitTimeoutId) {
- clearTimeout(maxWaitTimeoutId);
- maxWaitTimeoutId = undefined;
+ return result;
+ };
+
+ debounced.cancel = (): void => {
+ if (timerId !== undefined) {
+ clearTimeout(timerId);
+ timerId = undefined;
}
+ lastInvokeTime = 0;
+ lastCallTime = -1;
+ currentArgs = undefined;
+ };
+
+ debounced.flush = (): any => {
+ return timerId === undefined ? result : trailingEdge(Date.now());
};
return debounced as Debounced;
@@ -69,6 +133,9 @@ const isPrimitive = (v: unknown): v is string | number | undefined | null | bool
return true;
};
+/**
+ * Performs a deep comparison between two values to determine if they are equivalent.
+ */
export const isEqual = (a: unknown, b: unknown): boolean => {
if (a === b) {
return true;