@ledgerhq/lumen-ui-rnative 0.1.20 → 0.1.21
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/module/lib/Components/AmountInput/AmountInput.js +2 -0
- package/dist/module/lib/Components/AmountInput/AmountInput.js.map +1 -1
- package/dist/module/lib/Components/Banner/Banner.js +13 -7
- package/dist/module/lib/Components/Banner/Banner.js.map +1 -1
- package/dist/module/lib/Components/BaseInput/BaseInput.js +7 -6
- package/dist/module/lib/Components/BaseInput/BaseInput.js.map +1 -1
- package/dist/module/lib/Components/BottomSheet/BottomSheet.mdx +4 -4
- package/dist/module/lib/Components/BottomSheet/BottomSheet.stories.js +10 -10
- package/dist/module/lib/Components/BottomSheet/BottomSheet.stories.js.map +1 -1
- package/dist/module/lib/Components/BottomSheet/BottomSheetHeader.js +12 -12
- package/dist/module/lib/Components/BottomSheet/BottomSheetHeader.js.map +1 -1
- package/dist/module/lib/Components/Button/BaseButton.js +3 -1
- package/dist/module/lib/Components/Button/BaseButton.js.map +1 -1
- package/dist/module/lib/Components/Card/Card.js +3 -1
- package/dist/module/lib/Components/Card/Card.js.map +1 -1
- package/dist/module/lib/Components/ListItem/ListItem.js +2 -2
- package/dist/module/lib/Components/ListItem/ListItem.js.map +1 -1
- package/dist/module/lib/Components/MediaBanner/MediaBanner.js +1 -1
- package/dist/module/lib/Components/MediaBanner/MediaBanner.js.map +1 -1
- package/dist/module/lib/Components/MediaCard/MediaCard.js +1 -1
- package/dist/module/lib/Components/MediaCard/MediaCard.js.map +1 -1
- package/dist/module/lib/Components/NavBar/NavBar.js +27 -25
- package/dist/module/lib/Components/NavBar/NavBar.js.map +1 -1
- package/dist/module/lib/Components/NavBar/NavBar.mdx +7 -7
- package/dist/module/lib/Components/NavBar/NavBar.stories.js +6 -6
- package/dist/module/lib/Components/NavBar/NavBar.stories.js.map +1 -1
- package/dist/module/lib/Components/NavBar/NavBar.test.js +24 -24
- package/dist/module/lib/Components/NavBar/NavBar.test.js.map +1 -1
- package/dist/module/lib/Components/Select/GlobalSelectBottomSheet.js +1 -1
- package/dist/module/lib/Components/Select/GlobalSelectBottomSheet.js.map +1 -1
- package/dist/module/lib/Components/Spot/Spot.js +1 -0
- package/dist/module/lib/Components/Spot/Spot.js.map +1 -1
- package/dist/module/lib/Components/Stepper/Stepper.js +3 -0
- package/dist/module/lib/Components/Stepper/Stepper.js.map +1 -1
- package/dist/module/lib/Components/TabBar/TabBar.js +2 -2
- package/dist/module/lib/Components/TabBar/TabBar.js.map +1 -1
- package/dist/module/lib/Components/Tag/Tag.js +0 -2
- package/dist/module/lib/Components/Tag/Tag.js.map +1 -1
- package/dist/module/lib/Components/Tooltip/GlobalTooltipBottomSheet.js +1 -1
- package/dist/module/lib/Components/Tooltip/GlobalTooltipBottomSheet.js.map +1 -1
- package/dist/typescript/src/lib/Components/AmountInput/AmountInput.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Banner/Banner.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/BottomSheet/BottomSheetHeader.d.ts +1 -1
- package/dist/typescript/src/lib/Components/BottomSheet/BottomSheetHeader.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/BottomSheet/types.d.ts +3 -2
- package/dist/typescript/src/lib/Components/BottomSheet/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Button/BaseButton.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Card/Card.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/NavBar/NavBar.d.ts +1 -1
- package/dist/typescript/src/lib/Components/NavBar/NavBar.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/NavBar/types.d.ts +3 -3
- package/dist/typescript/src/lib/Components/NavBar/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Spot/Spot.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Stepper/Stepper.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Tag/Tag.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/lib/Components/AmountInput/AmountInput.tsx +8 -2
- package/src/lib/Components/Banner/Banner.tsx +10 -4
- package/src/lib/Components/BaseInput/BaseInput.tsx +4 -3
- package/src/lib/Components/BottomSheet/BottomSheet.mdx +4 -4
- package/src/lib/Components/BottomSheet/BottomSheet.stories.tsx +10 -10
- package/src/lib/Components/BottomSheet/BottomSheetHeader.tsx +14 -14
- package/src/lib/Components/BottomSheet/types.ts +3 -2
- package/src/lib/Components/Button/BaseButton.tsx +4 -1
- package/src/lib/Components/Card/Card.tsx +2 -0
- package/src/lib/Components/ListItem/ListItem.tsx +4 -4
- package/src/lib/Components/MediaBanner/MediaBanner.tsx +1 -1
- package/src/lib/Components/MediaCard/MediaCard.tsx +1 -1
- package/src/lib/Components/NavBar/NavBar.mdx +7 -7
- package/src/lib/Components/NavBar/NavBar.stories.tsx +6 -6
- package/src/lib/Components/NavBar/NavBar.test.tsx +25 -25
- package/src/lib/Components/NavBar/NavBar.tsx +31 -29
- package/src/lib/Components/NavBar/types.ts +3 -4
- package/src/lib/Components/Select/GlobalSelectBottomSheet.tsx +1 -1
- package/src/lib/Components/Spot/Spot.tsx +5 -1
- package/src/lib/Components/Stepper/Stepper.tsx +15 -3
- package/src/lib/Components/TabBar/TabBar.tsx +2 -2
- package/src/lib/Components/Tag/Tag.tsx +1 -3
- package/src/lib/Components/Tooltip/GlobalTooltipBottomSheet.tsx +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useEffect","BottomSheet","BottomSheetHeader","BottomSheetView","useBottomSheetRef","useGlobalTooltipSafeContext","jsx","_jsx","GlobalTooltipBottomSheet","bottomSheetRef","currentTooltip","hideTooltipRef","consumerName","contextRequired","current","present","dismiss","handleClose","setOpen","ref","snapPoints","backdropPressBehavior","onClose","maxDynamicContentSize","enableDynamicSizing","enablePanDownToClose","children","title","content","
|
|
1
|
+
{"version":3,"names":["useCallback","useEffect","BottomSheet","BottomSheetHeader","BottomSheetView","useBottomSheetRef","useGlobalTooltipSafeContext","jsx","_jsx","GlobalTooltipBottomSheet","bottomSheetRef","currentTooltip","hideTooltipRef","consumerName","contextRequired","current","present","dismiss","handleClose","setOpen","ref","snapPoints","backdropPressBehavior","onClose","maxDynamicContentSize","enableDynamicSizing","enablePanDownToClose","children","title","content","density","description"],"sourceRoot":"../../../../../src","sources":["lib/Components/Tooltip/GlobalTooltipBottomSheet.tsx"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,SAAS,QAAQ,OAAO;AAC9C,SACEC,WAAW,EACXC,iBAAiB,EACjBC,eAAe,EACfC,iBAAiB,QACZ,yBAAgB;AACvB,SAASC,2BAA2B,QAAQ,2BAAwB;;AAEpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAjBA,SAAAC,GAAA,IAAAC,IAAA;AAkBA,OAAO,MAAMC,wBAAkC,GAAGA,CAAA,KAAM;EACtD,MAAMC,cAAc,GAAGL,iBAAiB,CAAC,CAAC;EAC1C;AACF;AACA;AACA;EACE,MAAM;IAAEM,cAAc;IAAEC;EAAe,CAAC,GAAGN,2BAA2B,CAAC;IACrEO,YAAY,EAAE,oCAAoC;IAClDC,eAAe,EAAE;EACnB,CAAC,CAAC;EAEFb,SAAS,CAAC,MAAM;IACd,IAAIU,cAAc,EAAE;MAClBD,cAAc,CAACK,OAAO,EAAEC,OAAO,CAAC,CAAC;IACnC,CAAC,MAAM;MACLN,cAAc,CAACK,OAAO,EAAEE,OAAO,CAAC,CAAC;IACnC;EACF,CAAC,EAAE,CAACN,cAAc,EAAED,cAAc,CAAC,CAAC;EAEpC,MAAMQ,WAAW,GAAGlB,WAAW,CAAC,MAAM;IACpCW,cAAc,EAAEQ,OAAO,GAAG,KAAK,CAAC;IAChCP,cAAc,CAACG,OAAO,CAAC,CAAC;EAC1B,CAAC,EAAE,CAACH,cAAc,EAAED,cAAc,EAAEQ,OAAO,CAAC,CAAC;EAE7C,oBACEX,IAAA,CAACN,WAAW;IACVkB,GAAG,EAAEV,cAAe;IACpBW,UAAU,EAAE,IAAK;IACjBC,qBAAqB,EAAC,OAAO;IAC7BC,OAAO,EAAEL,WAAY;IACrBM,qBAAqB,EAAC,gBAAgB;IACtCC,mBAAmB;IACnBC,oBAAoB;IAAAC,QAAA,eAEpBnB,IAAA,CAACJ,eAAe;MAAAuB,QAAA,EACb,CAAChB,cAAc,EAAEiB,KAAK,IAAIjB,cAAc,EAAEkB,OAAO,kBAChDrB,IAAA,CAACL,iBAAiB;QAChByB,KAAK,EAAEjB,cAAc,CAACiB,KAAM;QAC5BE,OAAO,EAAC,UAAU;QAClBC,WAAW,EAAEpB,cAAc,CAACkB;MAAQ,CACrC;IACF,CACc;EAAC,CACP,CAAC;AAElB,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AmountInput.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/AmountInput/AmountInput.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,uMAgBzB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"AmountInput.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/AmountInput/AmountInput.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,uMAgBzB,gBAAgB,4CAoJlB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Banner/Banner.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Banner/Banner.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAmFtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,MAAM,GAAI,uHAYpB,WAAW,4CA4Db,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { BottomSheetHeaderProps } from './types';
|
|
2
|
-
export declare const BottomSheetHeader: ({ lx, style, title, description,
|
|
2
|
+
export declare const BottomSheetHeader: ({ lx, style, title, description, density, spacing, ...props }: BottomSheetHeaderProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
3
3
|
//# sourceMappingURL=BottomSheetHeader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheetHeader.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/BottomSheet/BottomSheetHeader.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AA+EjD,eAAO,MAAM,iBAAiB,GAAI
|
|
1
|
+
{"version":3,"file":"BottomSheetHeader.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/BottomSheet/BottomSheetHeader.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AA+EjD,eAAO,MAAM,iBAAiB,GAAI,+DAQ/B,sBAAsB,mDA+ExB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BottomSheetModal as GorhomBottomSheetModal, BottomSheetView as GorhomBottomSheetView, BottomSheetFlatList as GorhomBottomSheetFlatList, BottomSheetSectionList as GorhomBottomSheetSectionList, BottomSheetScrollView as GorhomBottomSheetScrollView, BottomSheetVirtualizedList as GorhomBottomSheetVirtualizedList } from '@gorhom/bottom-sheet';
|
|
2
|
+
import { Density } from '@ledgerhq/lumen-utils-shared';
|
|
2
3
|
import { PropsWithChildren, ReactNode, Ref } from 'react';
|
|
3
4
|
import { StyledViewProps } from '../../../styles';
|
|
4
5
|
export type BottomSheetProps = PropsWithChildren & {
|
|
@@ -113,10 +114,10 @@ export type BottomSheetProps = PropsWithChildren & {
|
|
|
113
114
|
};
|
|
114
115
|
export type BottomSheetHeaderProps = {
|
|
115
116
|
/**
|
|
116
|
-
* The
|
|
117
|
+
* The density of the header.
|
|
117
118
|
* @default 'compact'
|
|
118
119
|
*/
|
|
119
|
-
|
|
120
|
+
density?: Density;
|
|
120
121
|
/**
|
|
121
122
|
* The title of the header.
|
|
122
123
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/BottomSheet/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,IAAI,sBAAsB,EAC1C,eAAe,IAAI,qBAAqB,EACxC,mBAAmB,IAAI,yBAAyB,EAChD,sBAAsB,IAAI,4BAA4B,EACtD,qBAAqB,IAAI,2BAA2B,EACpD,0BAA0B,IAAI,gCAAgC,EAC/D,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,GAAG;IACjD;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC,CAAC;IAC3D;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,UAAU,CAAC,EACP,MAAM,GACN,gBAAgB,GAChB,QAAQ,GACR,OAAO,GACP,MAAM,EAAE,GACR,MAAM,EAAE,GACR,IAAI,CAAC;IACT;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;;OAKG;IACH,qBAAqB,CAAC,EAAE,MAAM,GAAG,gBAAgB,GAAG,MAAM,CAAC;IAC3D;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC;IAClE;;;OAGG;IACH,SAAS,CAAC,EAAE,CACV,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,KACf,IAAI,CAAC;IACV;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;IAClD;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B;;;;OAIG;IACH,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC;;;OAGG;IACH,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/BottomSheet/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,IAAI,sBAAsB,EAC1C,eAAe,IAAI,qB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C,CACxC,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseButton.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Button/BaseButton.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseButton.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Button/BaseButton.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAmI1C;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,mHAYxB,eAAe,4CAgCjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Card/Card.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAa,GAAG,EAAmC,MAAM,OAAO,CAAC;AACxE,OAAO,EAAiC,IAAI,EAAa,MAAM,cAAc,CAAC;AAW9E,OAAO,EAEL,2BAA2B,EAC3B,gBAAgB,EAChB,mBAAmB,EACnB,qBAAqB,EAErB,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,iBAAiB,EAElB,MAAM,SAAS,CAAC;AA4FjB;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,IAAI,GAAI,qFAWlB,SAAS,4CAoDX,CAAC;AAsCF;;;GAGG;AACH,eAAO,MAAM,UAAU,GAAI,wCAMxB,eAAe,4CA6CjB,CAAC;AAaF;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAI,wCAMzB,gBAAgB,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;CAAE,4CAwBxC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAI,wCAMzB,gBAAgB,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,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AG,CAAC,IAAI,CAAC,CAAA;CAAE,4CAiC3C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,wCAM9B,qBAAqB,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;CAAE,4CAwD7C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,GAAI,wCAMpC,2BAA2B,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;CAAE,4CAwDnD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,wCAM1B,iBAAiB,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;CAAE,4CAwBzC,CAAC;AA2CF;;;GAGG;AACH,eAAO,MAAM,UAAU,GAAI,wCAMxB,eAAe,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;CAAE,4CAwCvC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAAI,wCAM/B,sBAAsB,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;CAAE,4CAsB9C,CAAC"}
|
|
@@ -26,5 +26,5 @@ export declare namespace NavBarTrailing {
|
|
|
26
26
|
/**
|
|
27
27
|
* NavBar component for top navigation
|
|
28
28
|
*/
|
|
29
|
-
export declare function NavBar({
|
|
29
|
+
export declare function NavBar({ density, children, ...props }: NavBarProps): import("react/jsx-runtime").JSX.Element;
|
|
30
30
|
//# sourceMappingURL=NavBar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavBar.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/NavBar/NavBar.tsx"],"names":[],"mappings":"AASA,OAAO,
|
|
1
|
+
{"version":3,"file":"NavBar.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/NavBar/NavBar.tsx"],"names":[],"mappings":"AASA,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EAClB,sBAAsB,EACtB,WAAW,EACX,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,SAAS,CAAC;AA2CjB,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACT,EAAE,kBAAkB,2CAYpB;yBAhBe,aAAa;;;AAoB7B,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,2CAgB1E;AAED,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACT,EAAE,sBAAsB,2CAgBxB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,sBAAsB,2CAMxB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,kBAAkB,EAClB,OAAO,EACP,KAAK,EACL,GAAG,KAAK,EACT,EAAE,qBAAqB,2CAgBvB;yBArBe,gBAAgB;;;AAyBhC;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACT,EAAE,mBAAmB,2CAiBrB;yBArBe,cAAc;;;AAyB9B;;GAEG;AACH,wBAAgB,MAAM,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,2CA6BlE"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import { Density } from '@ledgerhq/lumen-utils-shared';
|
|
1
2
|
import { ReactElement, ReactNode } from 'react';
|
|
2
3
|
import { StyledViewProps } from '../../../styles';
|
|
3
4
|
import { IconButtonProps } from '../IconButton';
|
|
4
|
-
export type NavBarAppearance = 'compact' | 'expanded';
|
|
5
5
|
export type NavBarProps = {
|
|
6
6
|
/**
|
|
7
|
-
* Controls the
|
|
7
|
+
* Controls the density/layout of the NavBar.
|
|
8
8
|
* - 'compact': Content displayed vertically, centered with standard spacing
|
|
9
9
|
* - 'expanded': Content displayed vertically, left-aligned with increased spacing
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
density: Density;
|
|
12
12
|
} & StyledViewProps;
|
|
13
13
|
export type NavBarBackButtonProps = {
|
|
14
14
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/NavBar/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/NavBar/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,MAAM,WAAW,GAAG;IACxB;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB,GAAG,eAAe,CAAC;AAEpB,MAAM,MAAM,qBAAqB,GAAG;IAClC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,GAAG,IAAI,CACN,eAAe,EACf,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,oBAAoB,CACtD,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;;;;OAKG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;AAEtC,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;AAEtC,MAAM,MAAM,sBAAsB,GAAG;IACnC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;AAEtC;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,EAAE,YAAY,CAAC;CACpB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;AAEtC;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,gBAAgB,CAAC;AAEtD,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spot.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Spot/Spot.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAkB,SAAS,EAAY,MAAM,SAAS,CAAC;AAiF9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,IAAI,GAAI,OAAO,SAAS,
|
|
1
|
+
{"version":3,"file":"Spot.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Spot/Spot.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAkB,SAAS,EAAY,MAAM,SAAS,CAAC;AAiF9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,IAAI,GAAI,OAAO,SAAS,4CAoEpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Stepper/Stepper.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAiCvC;;;;;;;;;GASG;AACH,eAAO,MAAM,OAAO,GAAI,+EAQrB,YAAY,
|
|
1
|
+
{"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Stepper/Stepper.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAiCvC;;;;;;;;;GASG;AACH,eAAO,MAAM,OAAO,GAAI,+EAQrB,YAAY,4CAkId,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Tag/Tag.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Tag/Tag.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AA+FnC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,GAAG,GAAI,qFAUjB,QAAQ,4CAuBV,CAAC"}
|
package/package.json
CHANGED
|
@@ -130,7 +130,10 @@ export const AmountInput = ({
|
|
|
130
130
|
};
|
|
131
131
|
|
|
132
132
|
const CurrencyText = currencyText ? (
|
|
133
|
-
<Animated.Text
|
|
133
|
+
<Animated.Text
|
|
134
|
+
style={[styles.currency, animatedCurrencyStyle]}
|
|
135
|
+
allowFontScaling={false}
|
|
136
|
+
>
|
|
134
137
|
{currencyText}
|
|
135
138
|
</Animated.Text>
|
|
136
139
|
) : null;
|
|
@@ -169,7 +172,10 @@ export const AmountInput = ({
|
|
|
169
172
|
{currencyPosition === 'left' && CurrencyText}
|
|
170
173
|
|
|
171
174
|
{/** display text that mirrors the hidden input's value */}
|
|
172
|
-
<Animated.Text
|
|
175
|
+
<Animated.Text
|
|
176
|
+
style={[styles.displayText, animatedInputStyle, style]}
|
|
177
|
+
allowFontScaling={false}
|
|
178
|
+
>
|
|
173
179
|
{inputValue || '0'}
|
|
174
180
|
</Animated.Text>
|
|
175
181
|
|
|
@@ -51,15 +51,18 @@ const useStyles = ({ appearance }: { appearance: Appearance }) => {
|
|
|
51
51
|
iconWrapper: {
|
|
52
52
|
flexShrink: 0,
|
|
53
53
|
flexDirection: 'row',
|
|
54
|
-
alignItems: '
|
|
55
|
-
|
|
54
|
+
alignItems: 'center',
|
|
55
|
+
},
|
|
56
|
+
iconSpacer: {
|
|
57
|
+
...t.typographies.body1SemiBold,
|
|
58
|
+
width: 0,
|
|
59
|
+
overflow: 'hidden',
|
|
56
60
|
},
|
|
57
61
|
contentWrapper: {
|
|
58
62
|
marginRight: t.spacings.s8,
|
|
59
63
|
flex: 1,
|
|
60
64
|
flexDirection: 'column',
|
|
61
65
|
gap: t.spacings.s8,
|
|
62
|
-
paddingVertical: t.spacings.s4,
|
|
63
66
|
},
|
|
64
67
|
textWrapper: {
|
|
65
68
|
flexDirection: 'column',
|
|
@@ -154,6 +157,7 @@ export const Banner = ({
|
|
|
154
157
|
{...props}
|
|
155
158
|
>
|
|
156
159
|
<View style={styles.iconWrapper}>
|
|
160
|
+
<Text style={styles.iconSpacer} />
|
|
157
161
|
<IconComponent lx={{ color: iconColor }} />
|
|
158
162
|
</View>
|
|
159
163
|
<View style={styles.contentWrapper}>
|
|
@@ -168,7 +172,9 @@ export const Banner = ({
|
|
|
168
172
|
<Wrap
|
|
169
173
|
if={isTextChildren(description)}
|
|
170
174
|
with={(children) => (
|
|
171
|
-
<Text style={styles.description}
|
|
175
|
+
<Text style={styles.description} numberOfLines={5}>
|
|
176
|
+
{children}
|
|
177
|
+
</Text>
|
|
172
178
|
)}
|
|
173
179
|
>
|
|
174
180
|
{description}
|
|
@@ -186,7 +186,7 @@ const useStyles = ({
|
|
|
186
186
|
{
|
|
187
187
|
position: 'relative',
|
|
188
188
|
flexDirection: 'row',
|
|
189
|
-
|
|
189
|
+
minHeight: t.sizes.s48,
|
|
190
190
|
width: t.sizes.full,
|
|
191
191
|
alignItems: 'center',
|
|
192
192
|
gap: t.spacings.s8,
|
|
@@ -212,17 +212,18 @@ const useStyles = ({
|
|
|
212
212
|
{
|
|
213
213
|
position: 'relative',
|
|
214
214
|
flex: 1,
|
|
215
|
-
height: t.sizes.full,
|
|
216
215
|
width: t.sizes.full,
|
|
217
216
|
color: t.colors.text.base,
|
|
218
217
|
backgroundColor: t.colors.bg.muted,
|
|
219
218
|
outline: 'none',
|
|
219
|
+
...t.typographies.body2,
|
|
220
|
+
paddingTop: t.spacings.s12,
|
|
221
|
+
paddingBottom: t.spacings.s12,
|
|
220
222
|
},
|
|
221
223
|
hasLabel && {
|
|
222
224
|
paddingTop: t.spacings.s20,
|
|
223
225
|
paddingBottom: t.spacings.s4,
|
|
224
226
|
paddingHorizontal: 0,
|
|
225
|
-
...t.typographies.body2,
|
|
226
227
|
},
|
|
227
228
|
RuntimeConstants.isIOS && hasLabel && { lineHeight: 0 },
|
|
228
229
|
RuntimeConstants.isAndroid && { includeFontPadding: false },
|
|
@@ -144,7 +144,7 @@ function MyComponent() {
|
|
|
144
144
|
<BottomSheetView>
|
|
145
145
|
<BottomSheetHeader
|
|
146
146
|
title="Welcome"
|
|
147
|
-
|
|
147
|
+
density="compact"
|
|
148
148
|
description="Get started with our platform"
|
|
149
149
|
/>
|
|
150
150
|
<Text typography='body2' lx={{ color: 'base' }}>Your content here</Text>
|
|
@@ -263,7 +263,7 @@ import {
|
|
|
263
263
|
|
|
264
264
|
// Use spacing prop on header when using list components
|
|
265
265
|
<BottomSheet ref={ref} snapPoints="full">
|
|
266
|
-
<BottomSheetHeader spacing title="List"
|
|
266
|
+
<BottomSheetHeader spacing title="List" density="compact" />
|
|
267
267
|
<BottomSheetFlatList data={data} renderItem={renderItem} />
|
|
268
268
|
</BottomSheet>
|
|
269
269
|
```
|
|
@@ -288,7 +288,7 @@ import {
|
|
|
288
288
|
```tsx
|
|
289
289
|
<BottomSheet ref={bottomSheetRef} snapPoints='full'>
|
|
290
290
|
<BottomSheetScrollView>
|
|
291
|
-
<BottomSheetHeader title='Title'
|
|
291
|
+
<BottomSheetHeader title='Title' density='compact' />
|
|
292
292
|
<Text typography='body2' lx={{ color: 'base' }}>Content</Text>
|
|
293
293
|
</BottomSheetScrollView>
|
|
294
294
|
</BottomSheet>
|
|
@@ -304,7 +304,7 @@ import {
|
|
|
304
304
|
```tsx
|
|
305
305
|
<BottomSheet ref={bottomSheetRef} snapPoints='full'>
|
|
306
306
|
<ScrollView>
|
|
307
|
-
<BottomSheetHeader title='Title'
|
|
307
|
+
<BottomSheetHeader title='Title' density='compact' />
|
|
308
308
|
<Text typography='body2' lx={{ color: 'base' }}>Content</Text>
|
|
309
309
|
</ScrollView>
|
|
310
310
|
</BottomSheet>
|
|
@@ -129,7 +129,7 @@ export const Base: Story = {
|
|
|
129
129
|
<BottomSheetView>
|
|
130
130
|
<BottomSheetHeader
|
|
131
131
|
title='Title'
|
|
132
|
-
|
|
132
|
+
density='compact'
|
|
133
133
|
description='Description'
|
|
134
134
|
/>
|
|
135
135
|
<Box lx={{ flexDirection: 'column', gap: 's12' }}>
|
|
@@ -179,7 +179,7 @@ export const TitleExpanded: Story = {
|
|
|
179
179
|
<BottomSheetView>
|
|
180
180
|
<BottomSheetHeader
|
|
181
181
|
title='Expanded title'
|
|
182
|
-
|
|
182
|
+
density='expanded'
|
|
183
183
|
description='Expanded description.'
|
|
184
184
|
/>
|
|
185
185
|
<Box lx={{ flexDirection: 'column', gap: 's12' }}>
|
|
@@ -224,7 +224,7 @@ export const DynamicSizingWithoutSnapPoints: Story = {
|
|
|
224
224
|
<BottomSheetScrollView>
|
|
225
225
|
<BottomSheetHeader
|
|
226
226
|
title='Dynamic Sizing'
|
|
227
|
-
|
|
227
|
+
density='compact'
|
|
228
228
|
description='This bottom sheet adapts to its content height'
|
|
229
229
|
/>
|
|
230
230
|
<Box lx={{ flexDirection: 'column', gap: 's12' }}>
|
|
@@ -266,7 +266,7 @@ export const DynamicSizingWithSnapPoints: Story = {
|
|
|
266
266
|
<BottomSheetScrollView>
|
|
267
267
|
<BottomSheetHeader
|
|
268
268
|
title='Dynamic Sizing'
|
|
269
|
-
|
|
269
|
+
density='compact'
|
|
270
270
|
description='This bottom sheet adapts to its content height and has snap points'
|
|
271
271
|
/>
|
|
272
272
|
<Box lx={{ flexDirection: 'column', gap: 's12' }}>
|
|
@@ -311,7 +311,7 @@ export const PreventClose: Story = {
|
|
|
311
311
|
<BottomSheetView>
|
|
312
312
|
<BottomSheetHeader
|
|
313
313
|
title='Hidden Close Button'
|
|
314
|
-
|
|
314
|
+
density='compact'
|
|
315
315
|
description='This bottom sheet cannot be closed by dragging or button'
|
|
316
316
|
/>
|
|
317
317
|
<Box lx={{ flexDirection: 'column', gap: 's12' }}>
|
|
@@ -355,7 +355,7 @@ export const ScrollView: Story = {
|
|
|
355
355
|
<BottomSheetScrollView>
|
|
356
356
|
<BottomSheetHeader
|
|
357
357
|
title='Scrollable Content'
|
|
358
|
-
|
|
358
|
+
density='compact'
|
|
359
359
|
description='This bottom sheet contains a scrollable view'
|
|
360
360
|
/>
|
|
361
361
|
<Box lx={{ flexDirection: 'column', gap: 's12' }}>
|
|
@@ -411,7 +411,7 @@ export const VirtualList: Story = {
|
|
|
411
411
|
<BottomSheetHeader
|
|
412
412
|
spacing
|
|
413
413
|
title='Virtual List'
|
|
414
|
-
|
|
414
|
+
density='compact'
|
|
415
415
|
description='This bottom sheet contains a virtualized list'
|
|
416
416
|
/>
|
|
417
417
|
<BottomSheetFlatList
|
|
@@ -491,7 +491,7 @@ export const StickyHeaderContent: Story = {
|
|
|
491
491
|
<BottomSheetHeader
|
|
492
492
|
spacing
|
|
493
493
|
title='BottomSheetFlatList'
|
|
494
|
-
|
|
494
|
+
density='compact'
|
|
495
495
|
description='The search input is rendered as a sticky list header'
|
|
496
496
|
/>
|
|
497
497
|
<BottomSheetFlatList
|
|
@@ -543,7 +543,7 @@ export const StickyHeaderContent: Story = {
|
|
|
543
543
|
<BottomSheetHeader
|
|
544
544
|
spacing
|
|
545
545
|
title='BottomSheetScrollView'
|
|
546
|
-
|
|
546
|
+
density='compact'
|
|
547
547
|
description='The search input is rendered as a sticky list header'
|
|
548
548
|
/>
|
|
549
549
|
{data.map((item) => (
|
|
@@ -613,7 +613,7 @@ export const VirtualizedList: Story = {
|
|
|
613
613
|
<BottomSheetHeader
|
|
614
614
|
spacing
|
|
615
615
|
title='Virtualized List'
|
|
616
|
-
|
|
616
|
+
density='compact'
|
|
617
617
|
description='This bottom sheet uses a VirtualizedList with custom getItem/getItemCount'
|
|
618
618
|
/>
|
|
619
619
|
<BottomSheetVirtualizedList
|
|
@@ -9,16 +9,16 @@ import { Box, Text } from '../Utility';
|
|
|
9
9
|
import { useBottomSheetContext } from './BottomSheet';
|
|
10
10
|
import { BottomSheetHeaderProps } from './types';
|
|
11
11
|
|
|
12
|
-
type
|
|
12
|
+
type DensityValue = NonNullable<BottomSheetHeaderProps['density']>;
|
|
13
13
|
|
|
14
14
|
const Z_INDEX_DIALOG_CONTENT = 1000;
|
|
15
15
|
|
|
16
16
|
const useStyles = ({
|
|
17
|
-
|
|
17
|
+
density,
|
|
18
18
|
spacing,
|
|
19
19
|
hidden,
|
|
20
20
|
}: {
|
|
21
|
-
|
|
21
|
+
density: DensityValue;
|
|
22
22
|
spacing: boolean;
|
|
23
23
|
hidden: boolean;
|
|
24
24
|
}) => {
|
|
@@ -42,7 +42,7 @@ const useStyles = ({
|
|
|
42
42
|
justifyContent: 'space-between',
|
|
43
43
|
gap: t.spacings.s16,
|
|
44
44
|
},
|
|
45
|
-
|
|
45
|
+
density === 'expanded' && {
|
|
46
46
|
marginBottom: t.spacings.s16,
|
|
47
47
|
},
|
|
48
48
|
hidden && {
|
|
@@ -53,7 +53,7 @@ const useStyles = ({
|
|
|
53
53
|
{
|
|
54
54
|
flex: 1,
|
|
55
55
|
},
|
|
56
|
-
|
|
56
|
+
density === 'expanded' && {
|
|
57
57
|
gap: t.spacings.s4,
|
|
58
58
|
flex: 0,
|
|
59
59
|
},
|
|
@@ -62,10 +62,10 @@ const useStyles = ({
|
|
|
62
62
|
{
|
|
63
63
|
color: t.colors.text.base,
|
|
64
64
|
},
|
|
65
|
-
|
|
65
|
+
density === 'expanded' && {
|
|
66
66
|
...t.typographies.heading3SemiBold,
|
|
67
67
|
},
|
|
68
|
-
|
|
68
|
+
density === 'compact' && {
|
|
69
69
|
textAlign: 'center',
|
|
70
70
|
...t.typographies.heading5SemiBold,
|
|
71
71
|
},
|
|
@@ -74,7 +74,7 @@ const useStyles = ({
|
|
|
74
74
|
t.typographies.body2,
|
|
75
75
|
{
|
|
76
76
|
color: t.colors.text.muted,
|
|
77
|
-
textAlign:
|
|
77
|
+
textAlign: density === 'compact' ? 'center' : 'left',
|
|
78
78
|
},
|
|
79
79
|
]),
|
|
80
80
|
iconPlaceholder: {
|
|
@@ -82,7 +82,7 @@ const useStyles = ({
|
|
|
82
82
|
height: t.sizes.s32,
|
|
83
83
|
},
|
|
84
84
|
}),
|
|
85
|
-
[
|
|
85
|
+
[density, spacing, hidden],
|
|
86
86
|
);
|
|
87
87
|
};
|
|
88
88
|
|
|
@@ -91,7 +91,7 @@ export const BottomSheetHeader = ({
|
|
|
91
91
|
style,
|
|
92
92
|
title,
|
|
93
93
|
description,
|
|
94
|
-
|
|
94
|
+
density = 'compact',
|
|
95
95
|
spacing = false,
|
|
96
96
|
...props
|
|
97
97
|
}: BottomSheetHeaderProps) => {
|
|
@@ -110,9 +110,9 @@ export const BottomSheetHeader = ({
|
|
|
110
110
|
const hasIcons = Boolean(onBack || !hideCloseButton);
|
|
111
111
|
|
|
112
112
|
const styles = useStyles({
|
|
113
|
-
|
|
113
|
+
density,
|
|
114
114
|
spacing,
|
|
115
|
-
hidden: !hasIcons &&
|
|
115
|
+
hidden: !hasIcons && density !== 'compact',
|
|
116
116
|
});
|
|
117
117
|
|
|
118
118
|
if (!title && !description && !onBack && hideCloseButton) {
|
|
@@ -154,7 +154,7 @@ export const BottomSheetHeader = ({
|
|
|
154
154
|
/>
|
|
155
155
|
)}
|
|
156
156
|
</Box>
|
|
157
|
-
{
|
|
157
|
+
{density === 'compact' && titleComponent}
|
|
158
158
|
<Box style={styles.iconPlaceholder}>
|
|
159
159
|
{!hideCloseButton && (
|
|
160
160
|
<IconButton
|
|
@@ -170,7 +170,7 @@ export const BottomSheetHeader = ({
|
|
|
170
170
|
)}
|
|
171
171
|
</Box>
|
|
172
172
|
</Box>
|
|
173
|
-
{
|
|
173
|
+
{density === 'expanded' && titleComponent}
|
|
174
174
|
</Box>
|
|
175
175
|
);
|
|
176
176
|
};
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
BottomSheetVirtualizedList as GorhomBottomSheetVirtualizedList,
|
|
8
8
|
} from '@gorhom/bottom-sheet';
|
|
9
9
|
|
|
10
|
+
import { Density } from '@ledgerhq/lumen-utils-shared';
|
|
10
11
|
import { PropsWithChildren, ReactNode, Ref } from 'react';
|
|
11
12
|
import { StyledViewProps } from '../../../styles';
|
|
12
13
|
export type BottomSheetProps = PropsWithChildren & {
|
|
@@ -134,10 +135,10 @@ export type BottomSheetProps = PropsWithChildren & {
|
|
|
134
135
|
|
|
135
136
|
export type BottomSheetHeaderProps = {
|
|
136
137
|
/**
|
|
137
|
-
* The
|
|
138
|
+
* The density of the header.
|
|
138
139
|
* @default 'compact'
|
|
139
140
|
*/
|
|
140
|
-
|
|
141
|
+
density?: Density;
|
|
141
142
|
/**
|
|
142
143
|
* The title of the header.
|
|
143
144
|
*/
|
|
@@ -35,6 +35,7 @@ const useStyles = ({
|
|
|
35
35
|
size,
|
|
36
36
|
disabled,
|
|
37
37
|
pressed,
|
|
38
|
+
hasIcon,
|
|
38
39
|
iconOnly,
|
|
39
40
|
isFull,
|
|
40
41
|
}: {
|
|
@@ -42,6 +43,7 @@ const useStyles = ({
|
|
|
42
43
|
size: Size;
|
|
43
44
|
disabled: boolean;
|
|
44
45
|
pressed: boolean;
|
|
46
|
+
hasIcon: boolean;
|
|
45
47
|
iconOnly: boolean;
|
|
46
48
|
isFull: boolean;
|
|
47
49
|
}) => {
|
|
@@ -121,7 +123,7 @@ const useStyles = ({
|
|
|
121
123
|
typography,
|
|
122
124
|
{
|
|
123
125
|
color: disabled ? t.colors.text.disabled : textColors[appearance],
|
|
124
|
-
textAlign: 'left',
|
|
126
|
+
textAlign: hasIcon ? 'left' : 'center',
|
|
125
127
|
},
|
|
126
128
|
]),
|
|
127
129
|
icon: {
|
|
@@ -212,6 +214,7 @@ const BaseButtonContent = ({
|
|
|
212
214
|
size,
|
|
213
215
|
disabled,
|
|
214
216
|
pressed,
|
|
217
|
+
hasIcon: !!IconProp,
|
|
215
218
|
iconOnly,
|
|
216
219
|
isFull,
|
|
217
220
|
});
|
|
@@ -472,6 +472,7 @@ export const CardContentTitle = ({
|
|
|
472
472
|
asText: StyleSheet.flatten([
|
|
473
473
|
t.typographies.body2SemiBold,
|
|
474
474
|
{
|
|
475
|
+
flexShrink: 1,
|
|
475
476
|
color: disabled ? t.colors.text.disabled : t.colors.text.base,
|
|
476
477
|
textAlign: align === 'right' ? 'right' : 'left',
|
|
477
478
|
},
|
|
@@ -538,6 +539,7 @@ export const CardContentDescription = ({
|
|
|
538
539
|
asText: StyleSheet.flatten([
|
|
539
540
|
t.typographies.body3,
|
|
540
541
|
{
|
|
542
|
+
flexShrink: 1,
|
|
541
543
|
color: disabled ? t.colors.text.disabled : t.colors.text.muted,
|
|
542
544
|
textAlign: align === 'right' ? 'right' : 'left',
|
|
543
545
|
},
|
|
@@ -265,12 +265,11 @@ export const ListItemTitle = ({
|
|
|
265
265
|
title: StyleSheet.flatten([
|
|
266
266
|
t.typographies.body2SemiBold,
|
|
267
267
|
{
|
|
268
|
-
flex: 1,
|
|
269
268
|
minWidth: 0,
|
|
270
269
|
flexShrink: 1,
|
|
271
270
|
textAlign: isInTrailing ? 'right' : 'left',
|
|
272
271
|
color: disabled ? t.colors.text.disabled : t.colors.text.base,
|
|
273
|
-
}
|
|
272
|
+
},
|
|
274
273
|
]),
|
|
275
274
|
}),
|
|
276
275
|
[disabled, isInTrailing],
|
|
@@ -283,6 +282,7 @@ export const ListItemTitle = ({
|
|
|
283
282
|
style={StyleSheet.flatten([styles.title, style])}
|
|
284
283
|
numberOfLines={1}
|
|
285
284
|
ellipsizeMode='tail'
|
|
285
|
+
allowFontScaling={false}
|
|
286
286
|
{...textProps}
|
|
287
287
|
>
|
|
288
288
|
{children}
|
|
@@ -315,12 +315,11 @@ export const ListItemDescription = ({
|
|
|
315
315
|
description: StyleSheet.flatten([
|
|
316
316
|
t.typographies.body3,
|
|
317
317
|
{
|
|
318
|
-
flex: 1,
|
|
319
318
|
minWidth: 0,
|
|
320
319
|
flexShrink: 1,
|
|
321
320
|
textAlign: isInTrailing ? 'right' : 'left',
|
|
322
321
|
color: disabled ? t.colors.text.disabled : t.colors.text.muted,
|
|
323
|
-
}
|
|
322
|
+
},
|
|
324
323
|
]),
|
|
325
324
|
}),
|
|
326
325
|
[disabled, isInTrailing],
|
|
@@ -333,6 +332,7 @@ export const ListItemDescription = ({
|
|
|
333
332
|
style={StyleSheet.flatten([styles.description, style])}
|
|
334
333
|
numberOfLines={1}
|
|
335
334
|
ellipsizeMode='tail'
|
|
335
|
+
allowFontScaling={false}
|
|
336
336
|
{...textProps}
|
|
337
337
|
>
|
|
338
338
|
{children}
|