@ledgerhq/lumen-ui-rnative 0.1.64 → 0.1.65
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/core/CardButton/CardButton.js +2 -0
- package/dist/module/lib/Components/core/CardButton/CardButton.js.map +1 -1
- package/dist/module/lib/Components/core/CardButton/CardButton.mdx +4 -0
- package/dist/module/lib/Components/core/CardButton/CardButton.stories.js +1 -0
- package/dist/module/lib/Components/core/CardButton/CardButton.stories.js.map +1 -1
- package/dist/module/lib/Components/core/Link/Link.figma.js +2 -1
- package/dist/module/lib/Components/core/Link/Link.figma.js.map +1 -1
- package/dist/module/lib/Components/core/Link/Link.js +5 -3
- package/dist/module/lib/Components/core/Link/Link.js.map +1 -1
- package/dist/module/lib/Components/core/Link/Link.mdx +3 -2
- package/dist/module/lib/Components/core/Link/Link.stories.js +4 -1
- package/dist/module/lib/Components/core/Link/Link.stories.js.map +1 -1
- package/dist/module/lib/Components/core/Link/Link.test.js +2 -2
- package/dist/module/lib/Components/core/Link/Link.test.js.map +1 -1
- package/dist/module/lib/Components/core/Stepper/Stepper.js +76 -30
- package/dist/module/lib/Components/core/Stepper/Stepper.js.map +1 -1
- package/dist/module/lib/Components/core/Stepper/Stepper.mdx +37 -16
- package/dist/module/lib/Components/core/Stepper/Stepper.stories.js +102 -2
- package/dist/module/lib/Components/core/Stepper/Stepper.stories.js.map +1 -1
- package/dist/module/lib/Components/core/Stepper/Stepper.test.js +32 -1
- package/dist/module/lib/Components/core/Stepper/Stepper.test.js.map +1 -1
- package/dist/module/lib/Components/core/Timeline/Timeline.figma.js +83 -0
- package/dist/module/lib/Components/core/Timeline/Timeline.figma.js.map +1 -0
- package/dist/module/lib/Components/core/Timeline/Timeline.js +464 -0
- package/dist/module/lib/Components/core/Timeline/Timeline.js.map +1 -0
- package/dist/module/lib/Components/core/Timeline/Timeline.mdx +49 -0
- package/dist/module/lib/Components/core/Timeline/Timeline.stories.js +289 -0
- package/dist/module/lib/Components/core/Timeline/Timeline.stories.js.map +1 -0
- package/dist/module/lib/Components/core/Timeline/Timeline.test.js +234 -0
- package/dist/module/lib/Components/core/Timeline/Timeline.test.js.map +1 -0
- package/dist/module/lib/Components/core/Timeline/index.js +5 -0
- package/dist/module/lib/Components/core/Timeline/index.js.map +1 -0
- package/dist/module/lib/Components/core/Timeline/types.js +4 -0
- package/dist/module/lib/Components/core/Timeline/types.js.map +1 -0
- package/dist/module/lib/Components/core/Toast/Toast.figma.js +39 -0
- package/dist/module/lib/Components/core/Toast/Toast.figma.js.map +1 -0
- package/dist/module/lib/Components/core/Toast/Toast.js +138 -0
- package/dist/module/lib/Components/core/Toast/Toast.js.map +1 -0
- package/dist/module/lib/Components/core/Toast/Toast.mdx +203 -0
- package/dist/module/lib/Components/core/Toast/Toast.stories.js +238 -0
- package/dist/module/lib/Components/core/Toast/Toast.stories.js.map +1 -0
- package/dist/module/lib/Components/core/Toast/Toast.test.js +203 -0
- package/dist/module/lib/Components/core/Toast/Toast.test.js.map +1 -0
- package/dist/module/lib/Components/core/Toast/Toaster.js +147 -0
- package/dist/module/lib/Components/core/Toast/Toaster.js.map +1 -0
- package/dist/module/lib/Components/core/Toast/Toaster.test.js +732 -0
- package/dist/module/lib/Components/core/Toast/Toaster.test.js.map +1 -0
- package/dist/module/lib/Components/core/Toast/hooks/useToastAccessibility.js +70 -0
- package/dist/module/lib/Components/core/Toast/hooks/useToastAccessibility.js.map +1 -0
- package/dist/module/lib/Components/core/Toast/hooks/useToastCollapse.js +33 -0
- package/dist/module/lib/Components/core/Toast/hooks/useToastCollapse.js.map +1 -0
- package/dist/module/lib/Components/core/Toast/hooks/useToastGesture.js +224 -0
- package/dist/module/lib/Components/core/Toast/hooks/useToastGesture.js.map +1 -0
- package/dist/module/lib/Components/core/Toast/hooks/useToastMotion.js +82 -0
- package/dist/module/lib/Components/core/Toast/hooks/useToastMotion.js.map +1 -0
- package/dist/module/lib/Components/core/Toast/hooks/useToastViewportStyles.js +21 -0
- package/dist/module/lib/Components/core/Toast/hooks/useToastViewportStyles.js.map +1 -0
- package/dist/module/lib/Components/core/Toast/index.js +7 -0
- package/dist/module/lib/Components/core/Toast/index.js.map +1 -0
- package/dist/module/lib/Components/core/Toast/types.js +4 -0
- package/dist/module/lib/Components/core/Toast/types.js.map +1 -0
- package/dist/module/lib/Components/core/index.js +2 -0
- package/dist/module/lib/Components/core/index.js.map +1 -1
- package/dist/typescript/src/lib/Components/core/CardButton/CardButton.d.ts +2 -0
- package/dist/typescript/src/lib/Components/core/CardButton/CardButton.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/core/Link/Link.d.ts +1 -1
- package/dist/typescript/src/lib/Components/core/Link/Link.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/core/Link/types.d.ts +1 -1
- package/dist/typescript/src/lib/Components/core/Link/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/core/Stepper/Stepper.d.ts +4 -3
- package/dist/typescript/src/lib/Components/core/Stepper/Stepper.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/core/Stepper/types.d.ts +12 -2
- package/dist/typescript/src/lib/Components/core/Stepper/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/core/Timeline/Timeline.d.ts +56 -0
- package/dist/typescript/src/lib/Components/core/Timeline/Timeline.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/Timeline/index.d.ts +3 -0
- package/dist/typescript/src/lib/Components/core/Timeline/index.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/Timeline/types.d.ts +109 -0
- package/dist/typescript/src/lib/Components/core/Timeline/types.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/Toast/Toast.d.ts +24 -0
- package/dist/typescript/src/lib/Components/core/Toast/Toast.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/Toast/Toaster.d.ts +35 -0
- package/dist/typescript/src/lib/Components/core/Toast/Toaster.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/Toast/hooks/useToastAccessibility.d.ts +17 -0
- package/dist/typescript/src/lib/Components/core/Toast/hooks/useToastAccessibility.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/Toast/hooks/useToastCollapse.d.ts +19 -0
- package/dist/typescript/src/lib/Components/core/Toast/hooks/useToastCollapse.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/Toast/hooks/useToastGesture.d.ts +14 -0
- package/dist/typescript/src/lib/Components/core/Toast/hooks/useToastGesture.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/Toast/hooks/useToastMotion.d.ts +15 -0
- package/dist/typescript/src/lib/Components/core/Toast/hooks/useToastMotion.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/Toast/hooks/useToastViewportStyles.d.ts +21 -0
- package/dist/typescript/src/lib/Components/core/Toast/hooks/useToastViewportStyles.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/Toast/index.d.ts +5 -0
- package/dist/typescript/src/lib/Components/core/Toast/index.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/Toast/types.d.ts +75 -0
- package/dist/typescript/src/lib/Components/core/Toast/types.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/index.d.ts +2 -0
- package/dist/typescript/src/lib/Components/core/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/lib/Components/core/CardButton/CardButton.mdx +4 -0
- package/src/lib/Components/core/CardButton/CardButton.stories.tsx +1 -0
- package/src/lib/Components/core/CardButton/CardButton.tsx +2 -0
- package/src/lib/Components/core/Link/Link.figma.tsx +1 -0
- package/src/lib/Components/core/Link/Link.mdx +3 -2
- package/src/lib/Components/core/Link/Link.stories.tsx +3 -2
- package/src/lib/Components/core/Link/Link.test.tsx +2 -0
- package/src/lib/Components/core/Link/Link.tsx +3 -1
- package/src/lib/Components/core/Link/types.ts +1 -1
- package/src/lib/Components/core/Stepper/Stepper.mdx +37 -16
- package/src/lib/Components/core/Stepper/Stepper.stories.tsx +50 -2
- package/src/lib/Components/core/Stepper/Stepper.test.tsx +29 -1
- package/src/lib/Components/core/Stepper/Stepper.tsx +73 -32
- package/src/lib/Components/core/Stepper/types.ts +12 -2
- package/src/lib/Components/core/Timeline/Timeline.figma.tsx +79 -0
- package/src/lib/Components/core/Timeline/Timeline.mdx +49 -0
- package/src/lib/Components/core/Timeline/Timeline.stories.tsx +250 -0
- package/src/lib/Components/core/Timeline/Timeline.test.tsx +275 -0
- package/src/lib/Components/core/Timeline/Timeline.tsx +576 -0
- package/src/lib/Components/core/Timeline/index.ts +2 -0
- package/src/lib/Components/core/Timeline/types.ts +124 -0
- package/src/lib/Components/core/Toast/Toast.figma.tsx +36 -0
- package/src/lib/Components/core/Toast/Toast.mdx +203 -0
- package/src/lib/Components/core/Toast/Toast.stories.tsx +260 -0
- package/src/lib/Components/core/Toast/Toast.test.tsx +181 -0
- package/src/lib/Components/core/Toast/Toast.tsx +163 -0
- package/src/lib/Components/core/Toast/Toaster.test.tsx +687 -0
- package/src/lib/Components/core/Toast/Toaster.tsx +157 -0
- package/src/lib/Components/core/Toast/hooks/useToastAccessibility.ts +82 -0
- package/src/lib/Components/core/Toast/hooks/useToastCollapse.ts +38 -0
- package/src/lib/Components/core/Toast/hooks/useToastGesture.ts +83 -0
- package/src/lib/Components/core/Toast/hooks/useToastMotion.ts +71 -0
- package/src/lib/Components/core/Toast/hooks/useToastViewportStyles.ts +45 -0
- package/src/lib/Components/core/Toast/index.ts +4 -0
- package/src/lib/Components/core/Toast/types.ts +94 -0
- package/src/lib/Components/core/index.ts +2 -0
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { StepperProps } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* A circular stepper component showing progress as current step out of total steps.
|
|
4
|
-
* Renders a track
|
|
4
|
+
* Renders a segmented track with progress and a center label.
|
|
5
5
|
*
|
|
6
6
|
* @see [Figma – Stepper](https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7/2.-Components-Library?node-id=11977-94&m=dev)
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
9
|
* <Stepper currentStep={1} totalSteps={4} />
|
|
10
|
-
* <Stepper currentStep={0} totalSteps={
|
|
10
|
+
* <Stepper currentStep={0} totalSteps={8} disabled /> // Empty progress, disabled style
|
|
11
|
+
* <Stepper currentStep={2} totalSteps={4} size="lg" />
|
|
11
12
|
*/
|
|
12
|
-
export declare const Stepper: ({ lx, currentStep, totalSteps, disabled: disabledProp, label, ref, ...props }: StepperProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const Stepper: ({ lx, appearance, size, currentStep, totalSteps, disabled: disabledProp, label, ref, ...props }: StepperProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
//# sourceMappingURL=Stepper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/Components/core/Stepper/Stepper.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/Components/core/Stepper/Stepper.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAmC5C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,OAAO,GAAI,iGAUrB,YAAY,4CAsKd,CAAC"}
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import type { StyledViewProps } from '../../../../styles';
|
|
2
2
|
export type StepperProps = {
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* The visual style of the stepper's segments.
|
|
5
|
+
* @default accent
|
|
6
|
+
*/
|
|
7
|
+
appearance?: 'accent' | 'success';
|
|
8
|
+
/**
|
|
9
|
+
* The overall dimensions of the stepper.
|
|
10
|
+
* @default md
|
|
11
|
+
*/
|
|
12
|
+
size?: 'md' | 'lg';
|
|
13
|
+
/**
|
|
14
|
+
* Current step number (1-based).
|
|
5
15
|
*/
|
|
6
16
|
currentStep: number;
|
|
7
17
|
/**
|
|
@@ -9,7 +19,7 @@ export type StepperProps = {
|
|
|
9
19
|
*/
|
|
10
20
|
totalSteps: number;
|
|
11
21
|
/**
|
|
12
|
-
* Whether the stepper is disabled. Changes the progress
|
|
22
|
+
* Whether the stepper is disabled. Changes the progress to a muted style.
|
|
13
23
|
* @default false
|
|
14
24
|
*/
|
|
15
25
|
disabled?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/Components/core/Stepper/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/Components/core/Stepper/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,MAAM,MAAM,YAAY,GAAG;IACzB;;;OAGG;IACH,UAAU,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAClC;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { TimelineItemBodyProps, TimelineItemCaptionProps, TimelineItemDescriptionProps, TimelineItemHeaderProps, TimelineItemLeadingProps, TimelineItemLeadingRowProps, TimelineItemProps, TimelineItemTitleProps, TimelineItemTrailingProps, TimelineProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Vertical timeline. Lays out its items and holds no state of its own.
|
|
4
|
+
*
|
|
5
|
+
* @see {@link https://ldls-react-native.vercel.app/?path=/docs/rnative-timeline--docs Storybook}
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* <Timeline>
|
|
9
|
+
* <TimelineItem>
|
|
10
|
+
* <TimelineItemHeader>
|
|
11
|
+
* <TimelineItemLeading>
|
|
12
|
+
* <TimelineItemTitle>Payment confirmed</TimelineItemTitle>
|
|
13
|
+
* </TimelineItemLeading>
|
|
14
|
+
* </TimelineItemHeader>
|
|
15
|
+
* </TimelineItem>
|
|
16
|
+
* </Timeline>
|
|
17
|
+
*/
|
|
18
|
+
export declare const Timeline: ({ ref, children, lx, style, ...props }: TimelineProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
/**
|
|
20
|
+
* One row of a timeline. Draws the indicator from `status` and the connector
|
|
21
|
+
* to the neighbouring items.
|
|
22
|
+
*/
|
|
23
|
+
export declare const TimelineItem: ({ ref, status, children, lx, style, ...props }: TimelineItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
/**
|
|
25
|
+
* Row beside the indicator. Holds the leading column and the trailing slot.
|
|
26
|
+
*/
|
|
27
|
+
export declare const TimelineItemHeader: ({ ref, children, lx, style, ...props }: TimelineItemHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
/**
|
|
29
|
+
* Caption, title, and description column.
|
|
30
|
+
*/
|
|
31
|
+
export declare const TimelineItemLeading: ({ ref, children, lx, style, ...props }: TimelineItemLeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
/**
|
|
33
|
+
* Horizontal row for a title or description beside a tag.
|
|
34
|
+
*/
|
|
35
|
+
export declare const TimelineItemLeadingRow: ({ ref, children, lx, style, ...props }: TimelineItemLeadingRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
/**
|
|
37
|
+
* Overline above the title.
|
|
38
|
+
*/
|
|
39
|
+
export declare const TimelineItemCaption: ({ ref, children, lx, style, ...props }: TimelineItemCaptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
/**
|
|
41
|
+
* Title. An `idle` item uses the muted tone.
|
|
42
|
+
*/
|
|
43
|
+
export declare const TimelineItemTitle: ({ ref, children, lx, style, ...props }: TimelineItemTitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
/**
|
|
45
|
+
* Description under the title.
|
|
46
|
+
*/
|
|
47
|
+
export declare const TimelineItemDescription: ({ ref, children, lx, style, ...props }: TimelineItemDescriptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
/**
|
|
49
|
+
* End-aligned slot in the header.
|
|
50
|
+
*/
|
|
51
|
+
export declare const TimelineItemTrailing: ({ ref, children, lx, style, ...props }: TimelineItemTrailingProps) => import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
/**
|
|
53
|
+
* Block under the header, indented past the indicator.
|
|
54
|
+
*/
|
|
55
|
+
export declare const TimelineItemBody: ({ ref, children, lx, style, ...props }: TimelineItemBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
//# sourceMappingURL=Timeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Timeline.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/Components/core/Timeline/Timeline.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EACV,qBAAqB,EACrB,wBAAwB,EACxB,4BAA4B,EAC5B,uBAAuB,EACvB,wBAAwB,EACxB,2BAA2B,EAC3B,iBAAiB,EAEjB,sBAAsB,EACtB,yBAAyB,EACzB,aAAa,EACd,MAAM,SAAS,CAAC;AAsQjB;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,QAAQ,GAAI,wCAMtB,aAAa,4CAwBf,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,gDAO1B,iBAAiB,4CAiBnB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,wCAMhC,uBAAuB,4CAkBzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,wCAMjC,wBAAwB,4CAa1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,GAAI,wCAMpC,2BAA2B,4CAa7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,wCAMjC,wBAAwB,4CAgB1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAAI,wCAM/B,sBAAsB,4CAoBxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAAI,wCAMrC,4BAA4B,4CAgB9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAAI,wCAMlC,yBAAyB,4CAa3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,wCAM9B,qBAAqB,4CAavB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/Components/core/Timeline/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { StyledTextProps, StyledViewProps } from '../../../../styles';
|
|
3
|
+
export type TimelineItemStatus = 'idle' | 'success' | 'error' | 'pending' | 'loading';
|
|
4
|
+
/**
|
|
5
|
+
* Props for the Timeline root.
|
|
6
|
+
*/
|
|
7
|
+
export type TimelineProps = {
|
|
8
|
+
/**
|
|
9
|
+
* The timeline items.
|
|
10
|
+
* @required
|
|
11
|
+
*/
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
} & Omit<StyledViewProps, 'children'>;
|
|
14
|
+
/**
|
|
15
|
+
* Props for one timeline item.
|
|
16
|
+
*/
|
|
17
|
+
export type TimelineItemProps = {
|
|
18
|
+
/**
|
|
19
|
+
* Indicator and title tone. Omit it for a neutral item.
|
|
20
|
+
* @default undefined
|
|
21
|
+
*/
|
|
22
|
+
status?: TimelineItemStatus;
|
|
23
|
+
/**
|
|
24
|
+
* Header and content of the item.
|
|
25
|
+
* @required
|
|
26
|
+
*/
|
|
27
|
+
children: ReactNode;
|
|
28
|
+
} & Omit<StyledViewProps, 'children'>;
|
|
29
|
+
/**
|
|
30
|
+
* Props for the row beside the indicator.
|
|
31
|
+
*/
|
|
32
|
+
export type TimelineItemHeaderProps = {
|
|
33
|
+
/**
|
|
34
|
+
* Leading and trailing parts.
|
|
35
|
+
* @required
|
|
36
|
+
*/
|
|
37
|
+
children: ReactNode;
|
|
38
|
+
} & Omit<StyledViewProps, 'children'>;
|
|
39
|
+
/**
|
|
40
|
+
* Props for the text column opposite the trailing slot.
|
|
41
|
+
*/
|
|
42
|
+
export type TimelineItemLeadingProps = {
|
|
43
|
+
/**
|
|
44
|
+
* Caption, title, and description.
|
|
45
|
+
* @required
|
|
46
|
+
*/
|
|
47
|
+
children: ReactNode;
|
|
48
|
+
} & Omit<StyledViewProps, 'children'>;
|
|
49
|
+
/**
|
|
50
|
+
* Props for a horizontal row inside the leading column.
|
|
51
|
+
*/
|
|
52
|
+
export type TimelineItemLeadingRowProps = {
|
|
53
|
+
/**
|
|
54
|
+
* A title or description beside an optional tag.
|
|
55
|
+
* @required
|
|
56
|
+
*/
|
|
57
|
+
children: ReactNode;
|
|
58
|
+
} & Omit<StyledViewProps, 'children'>;
|
|
59
|
+
/**
|
|
60
|
+
* Props for the overline above the title.
|
|
61
|
+
*/
|
|
62
|
+
export type TimelineItemCaptionProps = {
|
|
63
|
+
/**
|
|
64
|
+
* Overline text. A date is the common case.
|
|
65
|
+
* @required
|
|
66
|
+
*/
|
|
67
|
+
children: ReactNode;
|
|
68
|
+
} & Omit<StyledTextProps, 'children'>;
|
|
69
|
+
/**
|
|
70
|
+
* Props for the item title.
|
|
71
|
+
*/
|
|
72
|
+
export type TimelineItemTitleProps = {
|
|
73
|
+
/**
|
|
74
|
+
* Title text.
|
|
75
|
+
* @required
|
|
76
|
+
*/
|
|
77
|
+
children: ReactNode;
|
|
78
|
+
} & Omit<StyledTextProps, 'children'>;
|
|
79
|
+
/**
|
|
80
|
+
* Props for the description under the title.
|
|
81
|
+
*/
|
|
82
|
+
export type TimelineItemDescriptionProps = {
|
|
83
|
+
/**
|
|
84
|
+
* Description text.
|
|
85
|
+
* @required
|
|
86
|
+
*/
|
|
87
|
+
children: ReactNode;
|
|
88
|
+
} & Omit<StyledTextProps, 'children'>;
|
|
89
|
+
/**
|
|
90
|
+
* Props for the end-aligned header slot.
|
|
91
|
+
*/
|
|
92
|
+
export type TimelineItemTrailingProps = {
|
|
93
|
+
/**
|
|
94
|
+
* Amount, tag, or text. A string or number is wrapped so it can render.
|
|
95
|
+
* @required
|
|
96
|
+
*/
|
|
97
|
+
children: ReactNode;
|
|
98
|
+
} & Omit<StyledViewProps, 'children'>;
|
|
99
|
+
/**
|
|
100
|
+
* Props for the block under the header.
|
|
101
|
+
*/
|
|
102
|
+
export type TimelineItemBodyProps = {
|
|
103
|
+
/**
|
|
104
|
+
* Content indented past the indicator. A string or number is wrapped so it can render.
|
|
105
|
+
* @required
|
|
106
|
+
*/
|
|
107
|
+
children: ReactNode;
|
|
108
|
+
} & Omit<StyledViewProps, 'children'>;
|
|
109
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/Components/core/Timeline/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE3E,MAAM,MAAM,kBAAkB,GAC1B,MAAM,GACN,SAAS,GACT,OAAO,GACP,SAAS,GACT,SAAS,CAAC;AAEd;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;AAEtC;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;OAGG;IACH,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;AAEtC;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;AAEtC;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;AAEtC;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;AAEtC;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;AAEtC;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;AAEtC;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG;IACzC;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;AAEtC;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;AAEtC;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ToastProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* A single toast item: an inverted surface with a status icon or spinner, a
|
|
4
|
+
* title that wraps up to five lines, and an optional action inline beside
|
|
5
|
+
* the title. When the two cannot share a row, the action wraps onto its own
|
|
6
|
+
* row, under the title's left edge. Dismissal is a swipe gesture, owned by
|
|
7
|
+
* `Toaster` — this component never dismisses itself.
|
|
8
|
+
*
|
|
9
|
+
* This is the presentational piece. For the queue, timing and imperative API,
|
|
10
|
+
* use `Toaster` + `toast`.
|
|
11
|
+
*
|
|
12
|
+
* @see {@link https://ldls-react-native.vercel.app/?path=/docs/rnative-toast--docs Guidelines}
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* import { Toast } from '@ledgerhq/lumen-ui-rnative';
|
|
16
|
+
*
|
|
17
|
+
* <Toast appearance="success" title="Payment done" />
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* // Loading with an action
|
|
21
|
+
* <Toast loading title="Uploading…" action={{ label: 'Cancel', onAction: () => {} }} />
|
|
22
|
+
*/
|
|
23
|
+
export declare const Toast: ({ appearance, loading, title, action, style, ...props }: ToastProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
//# sourceMappingURL=Toast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/Components/core/Toast/Toast.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAmB,UAAU,EAAE,MAAM,SAAS,CAAC;AA2E3D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,KAAK,GAAI,yDAOnB,UAAU,4CA+CZ,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ToasterProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Subscribes to the module-level toast store and renders the queue viewport
|
|
4
|
+
* as an absolutely-positioned overlay. Mount it once, near the app root — it
|
|
5
|
+
* takes no children. `toast.*` from `@ledgerhq/lumen-utils-shared` works even
|
|
6
|
+
* before this mounts, or from outside the React tree entirely.
|
|
7
|
+
*
|
|
8
|
+
* Mount exactly one `<Toaster />` for the whole app. Every instance renders
|
|
9
|
+
* the full queue, so a second one duplicates every toast on screen — mounting
|
|
10
|
+
* more than one logs a console warning in development.
|
|
11
|
+
*
|
|
12
|
+
* Toasts are dismissed by swiping left or right; there is no close icon.
|
|
13
|
+
* Screen-reader users get the dismissal and the inline action as accessibility
|
|
14
|
+
* actions instead, and each toast is announced when it appears or changes.
|
|
15
|
+
* Touching a toast — a hold or an in-progress swipe — pauses its auto-dismiss
|
|
16
|
+
* timer until the finger is released.
|
|
17
|
+
* Requires `react-native-gesture-handler`'s `GestureHandlerRootView` at the
|
|
18
|
+
* app root.
|
|
19
|
+
*
|
|
20
|
+
* @see {@link https://ldls-react-native.vercel.app/?path=/docs/rnative-toast--docs Guidelines}
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* import { Toaster } from '@ledgerhq/lumen-ui-rnative';
|
|
24
|
+
*
|
|
25
|
+
* function App() {
|
|
26
|
+
* return (
|
|
27
|
+
* <>
|
|
28
|
+
* <Toaster position="bottom" maxItems={1} />
|
|
29
|
+
* <Screens />
|
|
30
|
+
* </>
|
|
31
|
+
* );
|
|
32
|
+
* }
|
|
33
|
+
*/
|
|
34
|
+
export declare const Toaster: ({ maxItems, position, insets, durations, }: ToasterProps) => import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
//# sourceMappingURL=Toaster.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toaster.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/Components/core/Toast/Toaster.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,YAAY,EAA4B,MAAM,SAAS,CAAC;AAgEtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,OAAO,GAAI,4CAKrB,YAAY,4CAqCd,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ViewProps } from 'react-native';
|
|
2
|
+
import type { ToastItem } from '../types';
|
|
3
|
+
type UseToastAccessibilityArgs = {
|
|
4
|
+
item: ToastItem;
|
|
5
|
+
exiting: boolean;
|
|
6
|
+
onDismiss: () => void;
|
|
7
|
+
};
|
|
8
|
+
type ToastAccessibilityProps = Pick<ViewProps, 'accessible' | 'accessibilityLabel' | 'accessibilityState' | 'accessibilityActions' | 'onAccessibilityAction' | 'onAccessibilityEscape'>;
|
|
9
|
+
/**
|
|
10
|
+
* Screen readers capture swipes for their own navigation, so the swipe-to-dismiss
|
|
11
|
+
* gesture is unreachable for them. The toast is exposed as a single element
|
|
12
|
+
* whose dismissal and inline action are custom accessibility actions instead
|
|
13
|
+
* (VoiceOver rotor, TalkBack actions menu, iOS two-finger scrub to escape).
|
|
14
|
+
*/
|
|
15
|
+
export declare const useToastAccessibility: ({ item, exiting, onDismiss, }: UseToastAccessibilityArgs) => ToastAccessibilityProps;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=useToastAccessibility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useToastAccessibility.d.ts","sourceRoot":"","sources":["../../../../../../../../src/lib/Components/core/Toast/hooks/useToastAccessibility.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,KAAK,yBAAyB,GAAG;IAC/B,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,KAAK,uBAAuB,GAAG,IAAI,CACjC,SAAS,EACP,YAAY,GACZ,oBAAoB,GACpB,oBAAoB,GACpB,sBAAsB,GACtB,uBAAuB,GACvB,uBAAuB,CAC1B,CAAC;AAKF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAAI,+BAInC,yBAAyB,KAAG,uBAyC9B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { LayoutChangeEvent } from 'react-native';
|
|
2
|
+
import type { ToastPosition } from '../types';
|
|
3
|
+
type UseToastCollapseArgs = {
|
|
4
|
+
position: ToastPosition;
|
|
5
|
+
exiting: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const useToastCollapse: ({ position, exiting, }: UseToastCollapseArgs) => {
|
|
8
|
+
collapseStyle: {
|
|
9
|
+
readonly width: "100%";
|
|
10
|
+
readonly justifyContent: "flex-start" | "flex-end";
|
|
11
|
+
readonly height: number | undefined;
|
|
12
|
+
readonly transitionProperty: "height";
|
|
13
|
+
readonly transitionDuration: 300;
|
|
14
|
+
readonly transitionTimingFunction: "ease-out";
|
|
15
|
+
};
|
|
16
|
+
handleLayout: (event: LayoutChangeEvent) => void;
|
|
17
|
+
};
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=useToastCollapse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useToastCollapse.d.ts","sourceRoot":"","sources":["../../../../../../../../src/lib/Components/core/Toast/hooks/useToastCollapse.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,KAAK,oBAAoB,GAAG;IAC1B,QAAQ,EAAE,aAAa,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,wBAG9B,oBAAoB;;;;;;;;;0BAGoB,iBAAiB;CAoB3D,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type PanGesture } from 'react-native-gesture-handler';
|
|
2
|
+
import { type SharedValue } from 'react-native-reanimated';
|
|
3
|
+
type UseToastGestureArgs = {
|
|
4
|
+
dismissible: boolean;
|
|
5
|
+
translateX: SharedValue<number>;
|
|
6
|
+
onHoldChange: (held: boolean) => void;
|
|
7
|
+
onSwipeDismiss: () => void;
|
|
8
|
+
};
|
|
9
|
+
type UseToastGestureReturn = {
|
|
10
|
+
gesture: PanGesture;
|
|
11
|
+
};
|
|
12
|
+
export declare const useToastGesture: ({ dismissible, translateX, onHoldChange, onSwipeDismiss, }: UseToastGestureArgs) => UseToastGestureReturn;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=useToastGesture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useToastGesture.d.ts","sourceRoot":"","sources":["../../../../../../../../src/lib/Components/core/Toast/hooks/useToastGesture.ts"],"names":[],"mappings":"AAEA,OAAO,EAAW,KAAK,UAAU,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAc,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAKvE,KAAK,mBAAmB,GAAG;IACzB,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAChC,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B,CAAC;AAEF,KAAK,qBAAqB,GAAG;IAC3B,OAAO,EAAE,UAAU,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,4DAK7B,mBAAmB,KAAG,qBA0DxB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useAnimatedStyle, type SharedValue } from 'react-native-reanimated';
|
|
2
|
+
import type { ToastPosition } from '../types';
|
|
3
|
+
type UseToastMotionArgs = {
|
|
4
|
+
position: ToastPosition;
|
|
5
|
+
queued: boolean;
|
|
6
|
+
exiting: boolean;
|
|
7
|
+
};
|
|
8
|
+
type UseToastMotionReturn = {
|
|
9
|
+
animatedStyle: ReturnType<typeof useAnimatedStyle>;
|
|
10
|
+
translateX: SharedValue<number>;
|
|
11
|
+
markDismissedViaSwipe: () => void;
|
|
12
|
+
};
|
|
13
|
+
export declare const useToastMotion: ({ position, queued, exiting, }: UseToastMotionArgs) => UseToastMotionReturn;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=useToastMotion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useToastMotion.d.ts","sourceRoot":"","sources":["../../../../../../../../src/lib/Components/core/Toast/hooks/useToastMotion.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAGhB,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,KAAK,kBAAkB,GAAG;IACxB,QAAQ,EAAE,aAAa,CAAC;IACxB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,KAAK,oBAAoB,GAAG;IAC1B,aAAa,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;IACnD,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAChC,qBAAqB,EAAE,MAAM,IAAI,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,gCAI5B,kBAAkB,KAAG,oBA4CvB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ToastInsets, ToastPosition } from '../types';
|
|
2
|
+
type UseToastViewportStylesArgs = {
|
|
3
|
+
position: ToastPosition;
|
|
4
|
+
safeAreaTop: number;
|
|
5
|
+
safeAreaBottom: number;
|
|
6
|
+
insets: ToastInsets;
|
|
7
|
+
};
|
|
8
|
+
export declare const useToastViewportStyles: ({ position, safeAreaTop, safeAreaBottom, insets, }: UseToastViewportStylesArgs) => {
|
|
9
|
+
root: {
|
|
10
|
+
position: "absolute";
|
|
11
|
+
left: number;
|
|
12
|
+
right: number;
|
|
13
|
+
zIndex: number;
|
|
14
|
+
alignItems: "center";
|
|
15
|
+
flexDirection: "column" | "column-reverse";
|
|
16
|
+
top: number | undefined;
|
|
17
|
+
bottom: number | undefined;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=useToastViewportStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useToastViewportStyles.d.ts","sourceRoot":"","sources":["../../../../../../../../src/lib/Components/core/Toast/hooks/useToastViewportStyles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE3D,KAAK,0BAA0B,GAAG;IAChC,QAAQ,EAAE,aAAa,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,WAAW,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,oDAKpC,0BAA0B;;;;;;;;;;;CA6B1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/Components/core/Toast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { ToastAction, ToastAppearance } from '@ledgerhq/lumen-utils-shared';
|
|
2
|
+
import type { StyledViewProps } from '../../../../styles';
|
|
3
|
+
export type { ToastAction, ToastAppearance, ToastController, ToastItem, ToastNotifyOptions, ToastPromiseOptions, ToastPromiseState, ToastUpdateOptions, } from '@ledgerhq/lumen-utils-shared';
|
|
4
|
+
/**
|
|
5
|
+
* Edge the queue is anchored to. Items enter from the same edge, and are
|
|
6
|
+
* dismissible by swiping left or right.
|
|
7
|
+
*/
|
|
8
|
+
export type ToastPosition = 'top' | 'bottom';
|
|
9
|
+
/**
|
|
10
|
+
* Extra space to clear beyond the safe-area inset, on each edge — e.g. the
|
|
11
|
+
* height of a custom tab bar. `top` and `bottom` apply only to the edge
|
|
12
|
+
* matching `position` — the other is ignored. All default to `0`; a fixed
|
|
13
|
+
* breathing-room gap is always added on top of `top`/`bottom` separately,
|
|
14
|
+
* so this only needs to describe the extra obstruction, not the full gap.
|
|
15
|
+
*/
|
|
16
|
+
export type ToastInsets = {
|
|
17
|
+
top?: number;
|
|
18
|
+
left?: number;
|
|
19
|
+
bottom?: number;
|
|
20
|
+
right?: number;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Props for the presentational `Toast` item.
|
|
24
|
+
*/
|
|
25
|
+
export type ToastProps = {
|
|
26
|
+
/**
|
|
27
|
+
* The status of the toast, driving the leading icon.
|
|
28
|
+
* @default info
|
|
29
|
+
*/
|
|
30
|
+
appearance?: ToastAppearance;
|
|
31
|
+
/**
|
|
32
|
+
* Replaces the leading status icon with a spinner.
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
loading?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* The main text. Wraps over up to five lines, then truncates.
|
|
38
|
+
* @required
|
|
39
|
+
*/
|
|
40
|
+
title: string;
|
|
41
|
+
/**
|
|
42
|
+
* Optional trailing action button. Pressing it does not dismiss the toast.
|
|
43
|
+
* It wraps onto its own row, aligned with the title, when it cannot share
|
|
44
|
+
* the title's row.
|
|
45
|
+
*/
|
|
46
|
+
action?: ToastAction;
|
|
47
|
+
} & StyledViewProps;
|
|
48
|
+
/**
|
|
49
|
+
* Props for `Toaster`.
|
|
50
|
+
*/
|
|
51
|
+
export type ToasterProps = {
|
|
52
|
+
/**
|
|
53
|
+
* Maximum number of toasts visible at once. Must be a positive integer.
|
|
54
|
+
* Extra items wait in a FIFO backlog and appear as visible slots free up.
|
|
55
|
+
* @default 1
|
|
56
|
+
*/
|
|
57
|
+
maxItems?: number;
|
|
58
|
+
/**
|
|
59
|
+
* The edge the queue is anchored to.
|
|
60
|
+
* @default bottom
|
|
61
|
+
*/
|
|
62
|
+
position?: ToastPosition;
|
|
63
|
+
/**
|
|
64
|
+
* Extra space to clear beyond the safe-area inset, on each edge — e.g.
|
|
65
|
+
* the height of a custom tab bar for `top`/`bottom`, or horizontal
|
|
66
|
+
* margins for the queue's width via `left`/`right`.
|
|
67
|
+
* @default {}
|
|
68
|
+
*/
|
|
69
|
+
insets?: ToastInsets;
|
|
70
|
+
/**
|
|
71
|
+
* Per-appearance duration overrides, layered over the Lumen status defaults.
|
|
72
|
+
*/
|
|
73
|
+
durations?: Partial<Record<ToastAppearance, number>>;
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/Components/core/Toast/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,eAAe,EAChB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAK1D,YAAY,EACV,WAAW,EACX,eAAe,EACf,eAAe,EACf,SAAS,EACT,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,8BAA8B,CAAC;AAEtC;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,CAAC;AAE7C;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB;;;OAGG;IACH,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,GAAG,eAAe,CAAC;AAEpB;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC;CACtD,CAAC"}
|
|
@@ -44,6 +44,8 @@ export * from './TextInput';
|
|
|
44
44
|
export * from './ThemeProvider';
|
|
45
45
|
export * from './Tile';
|
|
46
46
|
export * from './TileButton';
|
|
47
|
+
export * from './Timeline';
|
|
48
|
+
export * from './Toast';
|
|
47
49
|
export * from './Tooltip';
|
|
48
50
|
export * from './Trend';
|
|
49
51
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/lumen-ui-rnative",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.65",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"!**/*.tsbuildinfo"
|
|
50
50
|
],
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@ledgerhq/lumen-utils-shared": "0.1.
|
|
52
|
+
"@ledgerhq/lumen-utils-shared": "0.1.15",
|
|
53
53
|
"@types/d3-scale": "^4.0.9",
|
|
54
54
|
"@types/d3-shape": "^3.1.8",
|
|
55
55
|
"d3-scale": "^4.0.2",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"@types/react": "^19.0.0",
|
|
65
65
|
"@gorhom/bottom-sheet": "^5.0.0",
|
|
66
|
-
"@ledgerhq/lumen-design-core": "0.1.
|
|
66
|
+
"@ledgerhq/lumen-design-core": "0.1.31",
|
|
67
67
|
"react": "^19.0.0",
|
|
68
68
|
"react-native": "~0.81.6",
|
|
69
69
|
"react-native-gesture-handler": ">=2.0.0",
|
|
@@ -97,6 +97,8 @@ const useStyles = ({
|
|
|
97
97
|
*
|
|
98
98
|
* It supports different appearances. Takes only the necessary width based on content. The chevron can be hidden if needed.
|
|
99
99
|
*
|
|
100
|
+
* @deprecated Use Card instead.
|
|
101
|
+
*
|
|
100
102
|
* @see {@link https://ldls-react-native.vercel.app/?path=/docs/rnative-cardbutton--docs Guidelines}
|
|
101
103
|
*
|
|
102
104
|
* @warning The `lx` prop should only be used for layout adjustments like margins or positioning.
|
|
@@ -13,7 +13,7 @@ import { CustomTabs, Tab } from '../../../../../.storybook/components';
|
|
|
13
13
|
|
|
14
14
|
## Introduction
|
|
15
15
|
|
|
16
|
-
Links are essential navigation elements that direct users to internal screens or external resources. This React Native implementation provides
|
|
16
|
+
Links are essential navigation elements that direct users to internal screens or external resources. This React Native implementation provides appearances, optional underline decoration, and predefined sizing options. Links use React Native's Linking API to open URLs across mobile platforms.
|
|
17
17
|
|
|
18
18
|
> View in [Figma](https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7/2.-Components-Library?node-id=770-11743&p=f).
|
|
19
19
|
|
|
@@ -34,10 +34,11 @@ Links are essential navigation elements that direct users to internal screens or
|
|
|
34
34
|
|
|
35
35
|
### Appearance
|
|
36
36
|
|
|
37
|
-
There are
|
|
37
|
+
There are three link appearance variants:
|
|
38
38
|
|
|
39
39
|
- **base** (default): Standard link with base text color and pressed states
|
|
40
40
|
- **accent**: Interactive accent color for emphasis
|
|
41
|
+
- **gray**: Muted color for less important actions
|
|
41
42
|
|
|
42
43
|
<Canvas of={LinkStories.AppearanceShowcase} />
|
|
43
44
|
|