@ledgerhq/lumen-ui-rnative 0.1.34 → 0.1.36
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/index.js +1 -0
- package/dist/module/index.js.map +1 -1
- package/dist/module/lib/Animations/Pulse/Pulse.js +16 -6
- package/dist/module/lib/Animations/Pulse/Pulse.js.map +1 -1
- package/dist/module/lib/Components/BottomSheet/BottomSheet.js +12 -7
- package/dist/module/lib/Components/BottomSheet/BottomSheet.js.map +1 -1
- package/dist/module/lib/Components/BottomSheet/BottomSheet.stories.js +220 -1
- package/dist/module/lib/Components/BottomSheet/BottomSheet.stories.js.map +1 -1
- package/dist/module/lib/Components/BottomSheet/BottomSheet.test.js +73 -0
- package/dist/module/lib/Components/BottomSheet/BottomSheet.test.js.map +1 -1
- package/dist/module/lib/Components/BottomSheet/BottomSheetHeader.js +1 -1
- package/dist/module/lib/Components/BottomSheet/BottomSheetHeader.js.map +1 -1
- package/dist/module/lib/Components/BottomSheet/CustomHandle.js +15 -2
- package/dist/module/lib/Components/BottomSheet/CustomHandle.js.map +1 -1
- package/dist/module/lib/Components/Card/Card.js.map +1 -1
- package/dist/module/lib/Components/DescriptionItem/DescriptionItem.js +184 -0
- package/dist/module/lib/Components/DescriptionItem/DescriptionItem.js.map +1 -0
- package/dist/module/lib/Components/DescriptionItem/DescriptionItem.mdx +139 -0
- package/dist/module/lib/Components/DescriptionItem/DescriptionItem.stories.js +258 -0
- package/dist/module/lib/Components/DescriptionItem/DescriptionItem.stories.js.map +1 -0
- package/dist/module/lib/Components/DescriptionItem/DescriptionItem.test.js +94 -0
- package/dist/module/lib/Components/DescriptionItem/DescriptionItem.test.js.map +1 -0
- package/dist/module/lib/Components/DescriptionItem/index.js +5 -0
- package/dist/module/lib/Components/DescriptionItem/index.js.map +1 -0
- package/dist/module/lib/Components/DescriptionItem/types.js +4 -0
- package/dist/module/lib/Components/DescriptionItem/types.js.map +1 -0
- package/dist/module/lib/Components/ListItem/ListItem.js.map +1 -1
- package/dist/module/lib/Components/MediaImage/MediaImage.js +5 -1
- package/dist/module/lib/Components/MediaImage/MediaImage.js.map +1 -1
- package/dist/module/lib/Components/NavBar/CoinCapsule.js +1 -0
- package/dist/module/lib/Components/NavBar/CoinCapsule.js.map +1 -1
- package/dist/module/lib/Components/OptionList/OptionList.js +45 -4
- package/dist/module/lib/Components/OptionList/OptionList.js.map +1 -1
- package/dist/module/lib/Components/OptionList/OptionList.mdx +19 -0
- package/dist/module/lib/Components/OptionList/OptionList.stories.js +254 -1
- package/dist/module/lib/Components/OptionList/OptionList.stories.js.map +1 -1
- package/dist/module/lib/Components/OptionList/OptionList.test.js +136 -1
- package/dist/module/lib/Components/OptionList/OptionList.test.js.map +1 -1
- package/dist/module/lib/Components/OptionList/useOptionList/useOptionListItems.js +39 -13
- package/dist/module/lib/Components/OptionList/useOptionList/useOptionListItems.js.map +1 -1
- package/dist/module/lib/Components/OptionList/useOptionList/useOptionListItems.test.js +117 -2
- package/dist/module/lib/Components/OptionList/useOptionList/useOptionListItems.test.js.map +1 -1
- package/dist/module/lib/Components/PageIndicator/PageIndicator.test.js.map +1 -1
- package/dist/module/lib/Components/Skeleton/Skeleton.js +10 -3
- package/dist/module/lib/Components/Skeleton/Skeleton.js.map +1 -1
- package/dist/module/lib/Components/TabBar/TabBar.js +7 -6
- package/dist/module/lib/Components/TabBar/TabBar.js.map +1 -1
- package/dist/module/lib/Components/index.js +1 -0
- package/dist/module/lib/Components/index.js.map +1 -1
- package/dist/module/styles/lx/resolveStyle.js.map +1 -1
- package/dist/typescript/src/index.d.ts +1 -0
- package/dist/typescript/src/index.d.ts.map +1 -1
- package/dist/typescript/src/lib/Animations/Pulse/Pulse.d.ts +1 -1
- package/dist/typescript/src/lib/Animations/Pulse/Pulse.d.ts.map +1 -1
- package/dist/typescript/src/lib/Animations/Pulse/types.d.ts +2 -1
- package/dist/typescript/src/lib/Animations/Pulse/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/BottomSheet/BottomSheet.d.ts +1 -1
- package/dist/typescript/src/lib/Components/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/BottomSheet/CustomHandle.d.ts +5 -2
- package/dist/typescript/src/lib/Components/BottomSheet/CustomHandle.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/BottomSheet/types.d.ts +16 -3
- package/dist/typescript/src/lib/Components/BottomSheet/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Card/Card.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/DescriptionItem/DescriptionItem.d.ts +42 -0
- package/dist/typescript/src/lib/Components/DescriptionItem/DescriptionItem.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/DescriptionItem/index.d.ts +3 -0
- package/dist/typescript/src/lib/Components/DescriptionItem/index.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/DescriptionItem/types.d.ts +39 -0
- package/dist/typescript/src/lib/Components/DescriptionItem/types.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/ListItem/ListItem.d.ts +3 -3
- package/dist/typescript/src/lib/Components/ListItem/ListItem.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/MediaImage/MediaImage.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/OptionList/OptionList.d.ts +3 -2
- package/dist/typescript/src/lib/Components/OptionList/OptionList.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/OptionList/types.d.ts +42 -5
- package/dist/typescript/src/lib/Components/OptionList/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/OptionList/useOptionList/useOptionListItems.d.ts +9 -1
- package/dist/typescript/src/lib/Components/OptionList/useOptionList/useOptionListItems.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/TabBar/TabBar.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/index.d.ts +1 -0
- package/dist/typescript/src/lib/Components/index.d.ts.map +1 -1
- package/dist/typescript/src/lib/types/index.d.ts +3 -3
- package/dist/typescript/src/lib/types/index.d.ts.map +1 -1
- package/dist/typescript/src/styles/lx/resolveStyle.d.ts +3 -3
- package/dist/typescript/src/styles/lx/resolveStyle.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/lib/Animations/Pulse/Pulse.tsx +38 -30
- package/src/lib/Animations/Pulse/types.ts +2 -1
- package/src/lib/Components/BottomSheet/BottomSheet.stories.tsx +174 -1
- package/src/lib/Components/BottomSheet/BottomSheet.test.tsx +59 -0
- package/src/lib/Components/BottomSheet/BottomSheet.tsx +19 -7
- package/src/lib/Components/BottomSheet/BottomSheetHeader.tsx +1 -1
- package/src/lib/Components/BottomSheet/CustomHandle.tsx +26 -5
- package/src/lib/Components/BottomSheet/types.ts +24 -3
- package/src/lib/Components/Card/Card.tsx +3 -3
- package/src/lib/Components/DescriptionItem/DescriptionItem.mdx +139 -0
- package/src/lib/Components/DescriptionItem/DescriptionItem.stories.tsx +234 -0
- package/src/lib/Components/DescriptionItem/DescriptionItem.test.tsx +112 -0
- package/src/lib/Components/DescriptionItem/DescriptionItem.tsx +224 -0
- package/src/lib/Components/DescriptionItem/index.ts +2 -0
- package/src/lib/Components/DescriptionItem/types.ts +44 -0
- package/src/lib/Components/ListItem/ListItem.tsx +3 -3
- package/src/lib/Components/MediaImage/MediaImage.tsx +5 -1
- package/src/lib/Components/NavBar/CoinCapsule.tsx +1 -0
- package/src/lib/Components/OptionList/OptionList.mdx +19 -0
- package/src/lib/Components/OptionList/OptionList.stories.tsx +254 -0
- package/src/lib/Components/OptionList/OptionList.test.tsx +143 -0
- package/src/lib/Components/OptionList/OptionList.tsx +49 -3
- package/src/lib/Components/OptionList/types.ts +46 -5
- package/src/lib/Components/OptionList/useOptionList/useOptionListItems.test.ts +124 -2
- package/src/lib/Components/OptionList/useOptionList/useOptionListItems.ts +53 -10
- package/src/lib/Components/PageIndicator/PageIndicator.test.tsx +2 -1
- package/src/lib/Components/Skeleton/Skeleton.tsx +9 -5
- package/src/lib/Components/TabBar/TabBar.tsx +3 -2
- package/src/lib/Components/index.ts +1 -0
- package/src/lib/types/index.ts +3 -3
- package/src/styles/lx/resolveStyle.ts +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAiDhD,QAAA,MAA4B,qBAAqB;;;yJAG9C,CAAC;AAEJ,eAAO,MAAM,WAAW,GAAI,+UAuBzB,gBAAgB,4CA4HlB,CAAC;AAEF,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { BottomSheetVariables } from '@gorhom/bottom-sheet/lib/typescript/types';
|
|
2
|
-
import type { Ref } from 'react';
|
|
2
|
+
import type { ComponentRef, Ref } from 'react';
|
|
3
3
|
import { View } from 'react-native';
|
|
4
4
|
export declare const CustomHandle: ({ ref, ...props }: BottomSheetVariables & {
|
|
5
|
-
ref?: Ref<
|
|
5
|
+
ref?: Ref<ComponentRef<typeof View>>;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const HiddenHandle: ({ ref, ...props }: BottomSheetVariables & {
|
|
8
|
+
ref?: Ref<ComponentRef<typeof View>>;
|
|
6
9
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
10
|
//# sourceMappingURL=CustomHandle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomHandle.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/BottomSheet/CustomHandle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACtF,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CustomHandle.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/BottomSheet/CustomHandle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACtF,OAAO,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAyBpC,eAAO,MAAM,YAAY,GAAI,mBAG1B,oBAAoB,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,OAAO,IAAI,CAAC,CAAC,CAAA;CAAE,4CAajE,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,mBAG1B,oBAAoB,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,OAAO,IAAI,CAAC,CAAC,CAAA;CAAE,4CAWjE,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { BottomSheetModal as GorhomBottomSheetModal, BottomSheetView as GorhomBottomSheetView, BottomSheetFlatList as GorhomBottomSheetFlatList, BottomSheetSectionList as GorhomBottomSheetSectionList, BottomSheetScrollView as GorhomBottomSheetScrollView, BottomSheetVirtualizedList as GorhomBottomSheetVirtualizedList } from '@gorhom/bottom-sheet';
|
|
1
|
+
import type { BottomSheetModal as GorhomBottomSheetModal, BottomSheetView as GorhomBottomSheetView, BottomSheetFlatList as GorhomBottomSheetFlatList, BottomSheetSectionList as GorhomBottomSheetSectionList, BottomSheetScrollView as GorhomBottomSheetScrollView, BottomSheetVirtualizedList as GorhomBottomSheetVirtualizedList, BottomSheetBackgroundProps } from '@gorhom/bottom-sheet';
|
|
2
2
|
import type { Density } from '@ledgerhq/lumen-utils-shared';
|
|
3
|
-
import type { PropsWithChildren, ReactNode, Ref } from 'react';
|
|
3
|
+
import type { ComponentRef, FC, PropsWithChildren, ReactNode, Ref } from 'react';
|
|
4
4
|
import type { StyledViewProps } from '../../../styles';
|
|
5
5
|
export type BottomSheetProps = PropsWithChildren & {
|
|
6
6
|
/**
|
|
7
7
|
* Ref to the bottom sheet component.
|
|
8
8
|
*/
|
|
9
|
-
ref?: Ref<
|
|
9
|
+
ref?: Ref<ComponentRef<typeof GorhomBottomSheetModal>>;
|
|
10
10
|
/**
|
|
11
11
|
* Used to locate this view in end-to-end tests.
|
|
12
12
|
*/
|
|
@@ -111,7 +111,20 @@ export type BottomSheetProps = PropsWithChildren & {
|
|
|
111
111
|
* @default true
|
|
112
112
|
*/
|
|
113
113
|
enableBlurKeyboardOnGesture?: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Custom background component rendered behind the sheet content and handle.
|
|
116
|
+
* Use to render gradients or other effects that should span the full sheet area,
|
|
117
|
+
* including the handle strip. When provided, the default sheet background is removed.
|
|
118
|
+
* @default undefined
|
|
119
|
+
*/
|
|
120
|
+
backgroundComponent?: FC<BottomSheetBackgroundProps> | null;
|
|
121
|
+
/**
|
|
122
|
+
* If true, the drag handle (grabber) at the top of the sheet is hidden.
|
|
123
|
+
* @default false
|
|
124
|
+
*/
|
|
125
|
+
hideHandle?: boolean;
|
|
114
126
|
};
|
|
127
|
+
export type { BottomSheetBackgroundProps };
|
|
115
128
|
export type BottomSheetHeaderProps = {
|
|
116
129
|
/**
|
|
117
130
|
* The density of the header.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/BottomSheet/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,IAAI,sBAAsB,EAC1C,eAAe,IAAI,qBAAqB,EACxC,mBAAmB,IAAI,yBAAyB,EAChD,sBAAsB,IAAI,4BAA4B,EACtD,qBAAqB,IAAI,2BAA2B,EACpD,0BAA0B,IAAI,gCAAgC,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/BottomSheet/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,IAAI,sBAAsB,EAC1C,eAAe,IAAI,qBAAqB,EACxC,mBAAmB,IAAI,yBAAyB,EAChD,sBAAsB,IAAI,4BAA4B,EACtD,qBAAqB,IAAI,2BAA2B,EACpD,0BAA0B,IAAI,gCAAgC,EAC9D,0BAA0B,EAC3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,KAAK,EACV,YAAY,EACZ,EAAE,EACF,iBAAiB,EACjB,SAAS,EACT,GAAG,EACJ,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,GAAG;IACjD;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,OAAO,sBAAsB,CAAC,CAAC,CAAC;IACvD;;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,I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ACxB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;AAEtC,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/E,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAC/C,OAAO,yBAAyB,CACjC,CAAC,CAAC,CAAC,CAAC;AACL,MAAM,MAAM,2BAA2B,GAAG,UAAU,CAClD,OAAO,4BAA4B,CACpC,CAAC,CAAC,CAAC,CAAC;AACL,MAAM,MAAM,0BAA0B,GAAG,UAAU,CACjD,OAAO,2BAA2B,CACnC,CAAC,CAAC,CAAC,CAAC;AACL,MAAM,MAAM,+BAA+B,GAAG,UAAU,CACtD,OAAO,gCAAgC,CACxC,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Card/Card.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Card/Card.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAA2B,GAAG,EAAE,MAAM,OAAO,CAAC;AAG1D,OAAO,EAAc,IAAI,EAAE,MAAM,cAAc,CAAC;AAWhD,OAAO,KAAK,EAEV,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,CA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escriptionItemTrailingProps, DescriptionItemValueProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* A compound component for displaying a key-value description row.
|
|
4
|
+
* Composed with DescriptionItemLeading / DescriptionItemLabel (key side)
|
|
5
|
+
* and DescriptionItemTrailing / DescriptionItemValue (value side).
|
|
6
|
+
*
|
|
7
|
+
* @see {@link https://ldls.vercel.app/?path=/docs/containment-descriptionitem--docs Storybook}
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* <DescriptionItem size="md">
|
|
11
|
+
* <DescriptionItemLeading>
|
|
12
|
+
* <DescriptionItemLabel>Fees</DescriptionItemLabel>
|
|
13
|
+
* </DescriptionItemLeading>
|
|
14
|
+
* <DescriptionItemTrailing>
|
|
15
|
+
* <DescriptionItemValue>0.001 BTC</DescriptionItemValue>
|
|
16
|
+
* </DescriptionItemTrailing>
|
|
17
|
+
* </DescriptionItem>
|
|
18
|
+
*/
|
|
19
|
+
export declare const DescriptionItem: ({ children, lx, style, size, ...props }: DescriptionItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
* Layout container for the leading (left) side of the description item.
|
|
22
|
+
* Contains DescriptionItemLabel and an optional info icon sibling.
|
|
23
|
+
*/
|
|
24
|
+
export declare const DescriptionItemLeading: ({ children, lx, style, ...props }: DescriptionItemLeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
/**
|
|
26
|
+
* Typography-bearing label for the leading side.
|
|
27
|
+
* Reads size from DescriptionItemSizeContext to apply the correct typography
|
|
28
|
+
* based on the size of the parent `DescriptionItem`.
|
|
29
|
+
*/
|
|
30
|
+
export declare const DescriptionItemLabel: ({ children, lx, style, numberOfLines, ellipsizeMode, ...props }: DescriptionItemLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
/**
|
|
32
|
+
* Layout container for the trailing (right) side of the description item.
|
|
33
|
+
* Accepts DescriptionItemValue, Tag, Link, or any custom content.
|
|
34
|
+
*/
|
|
35
|
+
export declare const DescriptionItemTrailing: ({ children, lx, style, ...props }: DescriptionItemTrailingProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
/**
|
|
37
|
+
* Typography-bearing value for the trailing side.
|
|
38
|
+
* Reads size from DescriptionItemSizeContext to apply the correct typography
|
|
39
|
+
* based on the size of the parent `DescriptionItem`.
|
|
40
|
+
*/
|
|
41
|
+
export declare const DescriptionItemValue: ({ children, lx, style, numberOfLines, ellipsizeMode, ...props }: DescriptionItemValueProps) => import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
//# sourceMappingURL=DescriptionItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DescriptionItem.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/DescriptionItem/DescriptionItem.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,yBAAyB,EACzB,2BAA2B,EAC3B,oBAAoB,EAEpB,4BAA4B,EAC5B,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AAWjB;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,eAAe,GAAI,yCAM7B,oBAAoB,4CAoBtB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GAAI,mCAKpC,2BAA2B,4CAmB7B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,iEAOlC,yBAAyB,4CAgC3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,GAAI,mCAKrC,4BAA4B,4CAuB9B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,iEAOlC,yBAAyB,4CAkC3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/DescriptionItem/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { StyledTextProps, StyledViewProps } from '../../../styles';
|
|
3
|
+
export type DescriptionItemSize = 'sm' | 'md';
|
|
4
|
+
export type DescriptionItemProps = {
|
|
5
|
+
/**
|
|
6
|
+
* The content of the description item (DescriptionItemLeading, DescriptionItemTrailing).
|
|
7
|
+
*/
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* The size of the description item.
|
|
11
|
+
* @default 'md'
|
|
12
|
+
*/
|
|
13
|
+
size?: DescriptionItemSize;
|
|
14
|
+
} & Omit<StyledViewProps, 'children'>;
|
|
15
|
+
export type DescriptionItemLeadingProps = {
|
|
16
|
+
/**
|
|
17
|
+
* The leading content (DescriptionItemLabel + optional info icon sibling).
|
|
18
|
+
*/
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
} & Omit<StyledViewProps, 'children'>;
|
|
21
|
+
export type DescriptionItemLabelProps = {
|
|
22
|
+
/**
|
|
23
|
+
* The label text or custom content.
|
|
24
|
+
*/
|
|
25
|
+
children: ReactNode;
|
|
26
|
+
} & Omit<StyledTextProps, 'children'>;
|
|
27
|
+
export type DescriptionItemTrailingProps = {
|
|
28
|
+
/**
|
|
29
|
+
* The trailing content (DescriptionItemValue, Tag, Link, etc.).
|
|
30
|
+
*/
|
|
31
|
+
children: ReactNode;
|
|
32
|
+
} & Omit<StyledViewProps, 'children'>;
|
|
33
|
+
export type DescriptionItemValueProps = {
|
|
34
|
+
/**
|
|
35
|
+
* The value text or custom content.
|
|
36
|
+
*/
|
|
37
|
+
children: ReactNode;
|
|
38
|
+
} & Omit<StyledTextProps, 'children'>;
|
|
39
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/DescriptionItem/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAExE,MAAM,MAAM,mBAAmB,GAAG,IAAI,GAAG,IAAI,CAAC;AAE9C,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,mBAAmB,CAAC;CAC5B,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;AAEtC,MAAM,MAAM,2BAA2B,GAAG;IACxC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;AAEtC,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;AAEtC,MAAM,MAAM,4BAA4B,GAAG;IACzC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;AAEtC,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentRef, Ref } from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
3
|
import { Text } from '../Utility';
|
|
4
4
|
import type { ListItemContentProps, ListItemContentRowProps, ListItemDescriptionProps, ListItemLeadingProps, ListItemProps, ListItemTitleProps, ListItemTrailingProps } from './types';
|
|
@@ -62,14 +62,14 @@ export declare const ListItemContentRow: ({ children, lx, style, ref, ...props }
|
|
|
62
62
|
* The main title of the list item.
|
|
63
63
|
*/
|
|
64
64
|
export declare const ListItemTitle: ({ children, lx, style, ref, ...props }: ListItemTitleProps & {
|
|
65
|
-
ref?: Ref<
|
|
65
|
+
ref?: Ref<ComponentRef<typeof Text>>;
|
|
66
66
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
67
67
|
/**
|
|
68
68
|
* Optional description text below the title.
|
|
69
69
|
* Automatically applies disabled styling when the parent ListItem is disabled.
|
|
70
70
|
*/
|
|
71
71
|
export declare const ListItemDescription: ({ children, lx, style, ref, ...props }: ListItemDescriptionProps & {
|
|
72
|
-
ref?: Ref<
|
|
72
|
+
ref?: Ref<ComponentRef<typeof Text>>;
|
|
73
73
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
74
74
|
/**
|
|
75
75
|
* Container for the trailing (right) content of the list item.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/ListItem/ListItem.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/ListItem/ListItem.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAa,GAAG,EAAE,MAAM,OAAO,CAAC;AAE1D,OAAO,EAAc,IAAI,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAkB,IAAI,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,KAAK,EACV,oBAAoB,EACpB,uBAAuB,EACvB,wBAAwB,EACxB,oBAAoB,EACpB,aAAa,EACb,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAoCjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,eAAO,MAAM,QAAQ,GAAI,+FAUtB,aAAa,4CA+Cf,CAAC;AAsBF;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,wCAM7B,oBAAoB,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;CAAE,4CAwB5C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,wCAM7B,oBAAoB,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;CAAE,4CA4B5C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAAI,wCAMhC,uBAAuB,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;CAAE,4CAuB/C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,wCAM3B,kBAAkB,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,OAAO,IAAI,CAAC,CAAC,CAAA;CAAE,4CAsC/D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAAI,wCAMjC,wBAAwB,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,OAAO,IAAI,CAAC,CAAC,CAAA;CAAE,4CAsCrE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,wCAM9B,qBAAqB,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;CAAE,4CAuB7C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaImage.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/MediaImage/MediaImage.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAmB,MAAM,SAAS,CAAC;AAgBhF,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAUtD,CAAC;
|
|
1
|
+
{"version":3,"file":"MediaImage.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/MediaImage/MediaImage.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAmB,MAAM,SAAS,CAAC;AAgBhF,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAUtD,CAAC;AA6CF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,UAAU,GAAI,wEAWxB,eAAe,4CA0CjB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { MetaShape, OptionListProps, OptionListContentProps, OptionListItemProps, OptionListItemLeadingProps, OptionListItemTextProps, OptionListItemDescriptionProps, OptionListItemContentProps, OptionListItemContentRowProps, OptionListEmptyStateProps, OptionListTriggerProps } from './types';
|
|
2
|
-
export declare const OptionList: <TMeta extends MetaShape = MetaShape>({ items, value, defaultValue, onValueChange, disabled: disabledProp, children, }: OptionListProps<TMeta>) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import type { MetaShape, OptionListProps, OptionListContentProps, OptionListItemProps, OptionListItemLeadingProps, OptionListItemTextProps, OptionListItemDescriptionProps, OptionListItemContentProps, OptionListItemContentRowProps, OptionListEmptyStateProps, OptionListSearchProps, OptionListTriggerProps } from './types';
|
|
2
|
+
export declare const OptionList: <TMeta extends MetaShape = MetaShape>({ items, value, defaultValue, onValueChange, disabled: disabledProp, filter, filteredItems, searchValue, defaultSearchValue, onSearchValueChange, children, }: OptionListProps<TMeta>) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export declare const OptionListContent: <TMeta extends MetaShape = MetaShape>({ renderItem, lx, style, ref, ...props }: OptionListContentProps<TMeta>) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export declare const OptionListItem: ({ value, disabled: disabledProp, children, lx, style, ref, ...props }: OptionListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export declare const OptionListItemText: ({ children, lx, style, ref, ...props }: OptionListItemTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,6 +7,7 @@ export declare const OptionListItemDescription: ({ children, lx, style, ref, ...
|
|
|
7
7
|
export declare const OptionListItemContent: ({ children, lx, style, ref, ...props }: OptionListItemContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export declare const OptionListItemContentRow: ({ children, lx, style, ref, ...props }: OptionListItemContentRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export declare const OptionListItemLeading: ({ children, lx, style, ref, ...props }: OptionListItemLeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const OptionListSearch: ({ ref, ...props }: OptionListSearchProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export declare const OptionListEmptyState: ({ title, description, lx, style, ref, ...props }: OptionListEmptyStateProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
11
12
|
export declare const OptionListTrigger: ({ label, onPress, disabled: disabledProp, children, lx, style, ref, ...props }: OptionListTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
//# sourceMappingURL=OptionList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OptionList.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/OptionList/OptionList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OptionList.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/OptionList/OptionList.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,SAAS,EAGT,eAAe,EACf,sBAAsB,EACtB,mBAAmB,EACnB,0BAA0B,EAC1B,uBAAuB,EACvB,8BAA8B,EAC9B,0BAA0B,EAC1B,6BAA6B,EAC7B,yBAAyB,EACzB,qBAAqB,EACrB,sBAAsB,EAEvB,MAAM,SAAS,CAAC;AAMjB,eAAO,MAAM,UAAU,GAAI,KAAK,SAAS,SAAS,GAAG,SAAS,EAAE,+JAY7D,eAAe,CAAC,KAAK,CAAC,4CA8CxB,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,KAAK,SAAS,SAAS,GAAG,SAAS,EAAE,0CAMpE,sBAAsB,CAAC,KAAK,CAAC,4CAkC/B,CAAC;AA4BF,eAAO,MAAM,cAAc,GAAI,uEAQ5B,mBAAmB,4CA+BrB,CAAC;AAyBF,eAAO,MAAM,kBAAkB,GAAI,wCAMhC,uBAAuB,4CA6BzB,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,wCAMvC,8BAA8B,4CA6BhC,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,wCAMnC,0BAA0B,4CAsB5B,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,wCAMtC,6BAA6B,4CAuB/B,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,wCAMnC,0BAA0B,4CAsB5B,CAAC;AAeF,eAAO,MAAM,gBAAgB,GAAI,mBAAmB,qBAAqB,4CAiBxE,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,kDAOlC,yBAAyB,mDA4C3B,CAAC;AA6DF,eAAO,MAAM,iBAAiB,GAAI,gFAS/B,sBAAsB,4CAgCxB,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { StyledPressableProps, StyledTextProps, StyledViewProps } from '../../../styles';
|
|
3
|
+
import type { SearchInputProps } from '../SearchInput';
|
|
3
4
|
export type MetaShape = Record<string, unknown>;
|
|
4
5
|
export type OptionListItemData<TMeta extends MetaShape = MetaShape> = {
|
|
5
6
|
/** Unique string identifier for this item, used for selection tracking. */
|
|
@@ -30,6 +31,8 @@ export type OptionListContextValue = {
|
|
|
30
31
|
isGrouped: boolean;
|
|
31
32
|
groups: OptionListItemGroup[];
|
|
32
33
|
flatItems: OptionListItemData[];
|
|
34
|
+
resolvedSearchValue: string;
|
|
35
|
+
handleSearchValueChange: (value: string) => void;
|
|
33
36
|
};
|
|
34
37
|
/** Internal type -- consumers never construct this directly. */
|
|
35
38
|
export type OptionListItemGroup<TMeta extends MetaShape = MetaShape> = {
|
|
@@ -37,16 +40,49 @@ export type OptionListItemGroup<TMeta extends MetaShape = MetaShape> = {
|
|
|
37
40
|
items: OptionListItemData<TMeta>[];
|
|
38
41
|
};
|
|
39
42
|
export type OptionListProps<TMeta extends MetaShape = MetaShape> = {
|
|
40
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* Flat array of items.
|
|
45
|
+
* Use the `group` field on each item for automatic grouping.
|
|
46
|
+
*/
|
|
41
47
|
items: OptionListItemData<TMeta>[];
|
|
42
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* The controlled selected value.
|
|
50
|
+
*/
|
|
43
51
|
value?: string | null;
|
|
44
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* The default selected value (uncontrolled)
|
|
54
|
+
*/
|
|
45
55
|
defaultValue?: string | null;
|
|
46
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* Called when the selected value changes.
|
|
58
|
+
*/
|
|
47
59
|
onValueChange?: (value: string | null) => void;
|
|
48
|
-
/**
|
|
60
|
+
/**
|
|
61
|
+
* When true, prevents interaction with the entire list.
|
|
62
|
+
*/
|
|
49
63
|
disabled?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Custom item/query matcher.
|
|
66
|
+
* Defaults to case-insensitive label match; `null` disables filtering.
|
|
67
|
+
*/
|
|
68
|
+
filter?: null | ((item: OptionListItemData<TMeta>, query: string) => boolean);
|
|
69
|
+
/**
|
|
70
|
+
* Pre-filtered items for async/remote search.
|
|
71
|
+
* Bypasses internal filtering.
|
|
72
|
+
*/
|
|
73
|
+
filteredItems?: OptionListItemData<TMeta>[];
|
|
74
|
+
/**
|
|
75
|
+
* Controlled search input value.
|
|
76
|
+
*/
|
|
77
|
+
searchValue?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Initial uncontrolled search value.
|
|
80
|
+
*/
|
|
81
|
+
defaultSearchValue?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Fired when search input changes.
|
|
84
|
+
*/
|
|
85
|
+
onSearchValueChange?: (value: string) => void;
|
|
50
86
|
children: ReactNode;
|
|
51
87
|
};
|
|
52
88
|
export type OptionListContentProps<TMeta extends MetaShape = MetaShape> = {
|
|
@@ -84,6 +120,7 @@ export type OptionListEmptyStateProps = {
|
|
|
84
120
|
/** Optional secondary text displayed below the title. */
|
|
85
121
|
description?: string;
|
|
86
122
|
} & Omit<StyledViewProps, 'children'>;
|
|
123
|
+
export type OptionListSearchProps = Omit<SearchInputProps, 'value' | 'onChangeText' | 'defaultValue'>;
|
|
87
124
|
export type OptionListTriggerProps = {
|
|
88
125
|
/** Floating label shown above the selected value. */
|
|
89
126
|
label?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/OptionList/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EACV,oBAAoB,EACpB,eAAe,EACf,eAAe,EAChB,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/OptionList/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EACV,oBAAoB,EACpB,eAAe,EACf,eAAe,EAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEhD,MAAM,MAAM,kBAAkB,CAAC,KAAK,SAAS,SAAS,GAAG,SAAS,IAAI;IACpE,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,I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;CACrB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;AAEtC,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;AAEtC,MAAM,MAAM,yBAAyB,GAAG;IACtC,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;AAEtC,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACtC,gBAAgB,EAChB,OAAO,GAAG,cAAc,GAAG,cAAc,CAC1C,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,gFAAgF;IAChF,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,IAAI,CAAC,oBAAoB,EAAE,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC,CAAC"}
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import type { MetaShape, OptionListItemData, OptionListItemGroup } from '../types';
|
|
2
|
+
export declare const defaultLabelFilter: (item: OptionListItemData, query: string) => boolean;
|
|
2
3
|
type UseOptionListItemsParams<TMeta extends MetaShape = MetaShape> = {
|
|
3
4
|
items: OptionListItemData<TMeta>[];
|
|
5
|
+
filter?: null | ((item: OptionListItemData<TMeta>, query: string) => boolean);
|
|
6
|
+
filteredItems?: OptionListItemData<TMeta>[];
|
|
7
|
+
searchValue?: string;
|
|
8
|
+
defaultSearchValue?: string;
|
|
9
|
+
onSearchValueChange?: (value: string) => void;
|
|
4
10
|
};
|
|
5
11
|
type UseOptionListItemsResult<TMeta extends MetaShape = MetaShape> = {
|
|
6
12
|
isGrouped: boolean;
|
|
7
13
|
groups: OptionListItemGroup<TMeta>[];
|
|
8
14
|
flatItems: OptionListItemData<TMeta>[];
|
|
15
|
+
resolvedSearchValue: string;
|
|
16
|
+
handleSearchValueChange: (val: string) => void;
|
|
9
17
|
};
|
|
10
|
-
export declare const useOptionListItems: <TMeta extends MetaShape = MetaShape>({ items, }: UseOptionListItemsParams<TMeta>) => UseOptionListItemsResult<TMeta>;
|
|
18
|
+
export declare const useOptionListItems: <TMeta extends MetaShape = MetaShape>({ items, filter, filteredItems, searchValue: searchValueProp, defaultSearchValue, onSearchValueChange, }: UseOptionListItemsParams<TMeta>) => UseOptionListItemsResult<TMeta>;
|
|
11
19
|
export {};
|
|
12
20
|
//# sourceMappingURL=useOptionListItems.d.ts.map
|
package/dist/typescript/src/lib/Components/OptionList/useOptionList/useOptionListItems.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOptionListItems.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/Components/OptionList/useOptionList/useOptionListItems.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useOptionListItems.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/Components/OptionList/useOptionList/useOptionListItems.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,SAAS,EACT,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,UAAU,CAAC;AAqBlB,eAAO,MAAM,kBAAkB,GAC7B,MAAM,kBAAkB,EACxB,OAAO,MAAM,KACZ,OAAiE,CAAC;AAErE,KAAK,wBAAwB,CAAC,KAAK,SAAS,SAAS,GAAG,SAAS,IAAI;IACnE,KAAK,EAAE,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC;IACnC,MAAM,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,kBAAkB,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;IAC9E,aAAa,CAAC,EAAE,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/C,CAAC;AAEF,KAAK,wBAAwB,CAAC,KAAK,SAAS,SAAS,GAAG,SAAS,IAAI;IACnE,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,mBAAmB,CAAC,KAAK,CAAC,EAAE,CAAC;IACrC,SAAS,EAAE,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC;IACvC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,uBAAuB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAChD,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,KAAK,SAAS,SAAS,GAAG,SAAS,EAAE,0GAOrE,wBAAwB,CAAC,KAAK,CAAC,KAAG,wBAAwB,CAAC,KAAK,CAmClE,CAAC"}
|
|
@@ -13,6 +13,6 @@ import type { SkeletonProps } from './types';
|
|
|
13
13
|
* // Tile variant
|
|
14
14
|
* <Skeleton component='tile' />
|
|
15
15
|
*/
|
|
16
|
-
declare const Skeleton: ({ lx, component, ...props }: SkeletonProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare const Skeleton: ({ lx, component, style, ...props }: SkeletonProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
export { Skeleton };
|
|
18
18
|
//# sourceMappingURL=Skeleton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Skeleton/Skeleton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAgG7C;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,QAAQ,GAAI,
|
|
1
|
+
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Skeleton/Skeleton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAgG7C;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,QAAQ,GAAI,oCAAoC,aAAa,4CAsBlE,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabBar.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/TabBar/TabBar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TabBar.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/TabBar/TabBar.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE5D,eAAO,MAAM,cAAc,KAAK,CAAC;AA+IjC,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,KAAK,EACL,IAAI,EACJ,UAAU,EACV,KAAK,EACL,GAAG,KAAK,EACT,EAAE,eAAe,2CAmDjB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,MAAM,CAAC,EACrB,MAAM,EACN,UAAU,EACV,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,WAAW,2CA2Cb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7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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,QAAQ,CAAC;AACvB,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,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,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;AACxB,cAAc,WAAW,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { ElementType, ComponentPropsWithRef,
|
|
1
|
+
import type { ElementType, ComponentPropsWithRef, ComponentRef } from 'react';
|
|
2
2
|
import type { Pressable, View } from 'react-native';
|
|
3
3
|
type ComponentPropsWithAsChild<T extends ElementType<any>> = ComponentPropsWithRef<T> & {
|
|
4
4
|
asChild?: boolean;
|
|
5
5
|
};
|
|
6
6
|
type SlottableViewProps = ComponentPropsWithAsChild<typeof View>;
|
|
7
|
-
type ViewRef =
|
|
8
|
-
type PressableRef =
|
|
7
|
+
type ViewRef = ComponentRef<typeof View>;
|
|
8
|
+
type PressableRef = ComponentRef<typeof Pressable>;
|
|
9
9
|
type SlottablePressableProps = ComponentPropsWithAsChild<typeof Pressable> & {
|
|
10
10
|
/**
|
|
11
11
|
* Platform: WEB ONLY
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpD,KAAK,yBAAyB,CAAC,CAAC,SAAS,WAAW,CAAC,GAAG,CAAC,IACvD,qBAAqB,CAAC,CAAC,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEnD,KAAK,kBAAkB,GAAG,yBAAyB,CAAC,OAAO,IAAI,CAAC,CAAC;AACjE,KAAK,OAAO,GAAG,YAAY,CAAC,OAAO,IAAI,CAAC,CAAC;AACzC,KAAK,YAAY,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,CAAC;AAEnD,KAAK,uBAAuB,GAAG,yBAAyB,CAAC,OAAO,SAAS,CAAC,GAAG;IAC3E;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,aAAa,KAAK,IAAI,CAAC;IACxC;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,aAAa,KAAK,IAAI,CAAC;CACvC,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,UAAU,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;CAC/B,CAAC;AAEF,YAAY,EACV,cAAc,EACd,YAAY,EACZ,uBAAuB,EACvB,kBAAkB,EAClB,OAAO,GACR,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
2
2
|
import type { LumenTextStyle, LumenViewStyle } from '../types';
|
|
3
3
|
/**
|
|
4
4
|
* Transform lx props to StyleSheet style object for View
|
|
5
5
|
*/
|
|
6
|
-
export declare const useResolveViewStyle: (lx: LumenViewStyle, bareStyle?: ViewStyle) => ViewStyle;
|
|
6
|
+
export declare const useResolveViewStyle: (lx: LumenViewStyle, bareStyle?: StyleProp<ViewStyle>) => ViewStyle;
|
|
7
7
|
/**
|
|
8
8
|
* Transform lx props to StyleSheet style object for Text
|
|
9
9
|
*/
|
|
10
|
-
export declare const useResolveTextStyle: (lx: LumenTextStyle, bareStyle?: TextStyle) => TextStyle;
|
|
10
|
+
export declare const useResolveTextStyle: (lx: LumenTextStyle, bareStyle?: StyleProp<TextStyle>) => TextStyle;
|
|
11
11
|
//# sourceMappingURL=resolveStyle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveStyle.d.ts","sourceRoot":"","sources":["../../../../../src/styles/lx/resolveStyle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resolveStyle.d.ts","sourceRoot":"","sources":["../../../../../src/styles/lx/resolveStyle.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpE,OAAO,KAAK,EAEV,cAAc,EACd,cAAc,EACf,MAAM,UAAU,CAAC;AAoClB;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAC9B,IAAI,cAAc,EAClB,YAAY,SAAS,CAAC,SAAS,CAAC,KAC/B,SAIF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAC9B,IAAI,cAAc,EAClB,YAAY,SAAS,CAAC,SAAS,CAAC,KAC/B,SAIF,CAAC"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -4,9 +4,9 @@ import Animated, {
|
|
|
4
4
|
useAnimatedStyle,
|
|
5
5
|
useSharedValue,
|
|
6
6
|
withRepeat,
|
|
7
|
-
withSequence,
|
|
8
7
|
withTiming,
|
|
9
8
|
} from 'react-native-reanimated';
|
|
9
|
+
import { useResolveViewStyle } from '../../../styles';
|
|
10
10
|
import type { TimingTokens } from '../types';
|
|
11
11
|
import { useTimingConfig } from '../useTimingConfig';
|
|
12
12
|
import type { PulseProps } from './types';
|
|
@@ -17,38 +17,46 @@ const TIMING_DEFAULTS: TimingTokens = {
|
|
|
17
17
|
duration: 1000,
|
|
18
18
|
easing: 'linear',
|
|
19
19
|
};
|
|
20
|
-
export const Pulse = memo(
|
|
21
|
-
|
|
20
|
+
export const Pulse = memo(
|
|
21
|
+
({ children, timing, animate, style, lx = {}, ...props }: PulseProps) => {
|
|
22
|
+
const sv = useSharedValue<number>(1);
|
|
23
|
+
const resolvedLxStyle = useResolveViewStyle(lx, style);
|
|
22
24
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
const timingConfig = useTimingConfig({
|
|
26
|
+
duration: timing?.duration ?? TIMING_DEFAULTS.duration,
|
|
27
|
+
easing: timing?.easing ?? TIMING_DEFAULTS.easing,
|
|
28
|
+
});
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
-1,
|
|
36
|
-
);
|
|
37
|
-
} else {
|
|
38
|
-
cancelAnimation(sv);
|
|
39
|
-
sv.value = withTiming(1, timingConfig);
|
|
40
|
-
}
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
if (animate) {
|
|
32
|
+
sv.value = withRepeat(withTiming(MIN_OPACITY, timingConfig), -1, true);
|
|
33
|
+
} else {
|
|
34
|
+
cancelAnimation(sv);
|
|
35
|
+
sv.value = withTiming(1, timingConfig);
|
|
36
|
+
}
|
|
41
37
|
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
return () => {
|
|
39
|
+
cancelAnimation(sv);
|
|
40
|
+
sv.value = 1;
|
|
41
|
+
};
|
|
42
|
+
}, [sv, animate, timingConfig]);
|
|
44
43
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
const animatedStyle = useAnimatedStyle(
|
|
45
|
+
() => ({
|
|
46
|
+
opacity: sv.value,
|
|
47
|
+
}),
|
|
48
|
+
[sv],
|
|
49
|
+
);
|
|
51
50
|
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
return (
|
|
52
|
+
<Animated.View
|
|
53
|
+
{...props}
|
|
54
|
+
collapsable={false}
|
|
55
|
+
style={[resolvedLxStyle, animatedStyle]}
|
|
56
|
+
>
|
|
57
|
+
{children}
|
|
58
|
+
</Animated.View>
|
|
59
|
+
);
|
|
60
|
+
},
|
|
61
|
+
);
|
|
54
62
|
Pulse.displayName = 'Pulse';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
import type { StyledViewProps } from '../../../styles';
|
|
2
3
|
import type { TimingTokens } from '../types';
|
|
3
4
|
|
|
4
5
|
export type PulseProps = {
|
|
@@ -15,4 +16,4 @@ export type PulseProps = {
|
|
|
15
16
|
* Whether the pulse animation should play
|
|
16
17
|
*/
|
|
17
18
|
animate?: boolean;
|
|
18
|
-
};
|
|
19
|
+
} & StyledViewProps;
|