@ledgerhq/lumen-ui-rnative 0.1.33 → 0.1.35
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 +17 -7
- package/dist/module/lib/Animations/Pulse/Pulse.js.map +1 -1
- package/dist/module/lib/Components/BaseTag/BaseTag.js +122 -0
- package/dist/module/lib/Components/BaseTag/BaseTag.js.map +1 -0
- package/dist/module/lib/Components/BaseTag/BaseTag.test.js +144 -0
- package/dist/module/lib/Components/BaseTag/BaseTag.test.js.map +1 -0
- package/dist/module/lib/Components/BaseTag/index.js +5 -0
- package/dist/module/lib/Components/BaseTag/index.js.map +1 -0
- package/dist/module/lib/Components/BaseTag/types.js +4 -0
- package/dist/module/lib/Components/BaseTag/types.js.map +1 -0
- 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/ListItem/ListItem.js.map +1 -1
- package/dist/module/lib/Components/MediaImage/MediaImage.js +10 -2
- package/dist/module/lib/Components/MediaImage/MediaImage.js.map +1 -1
- package/dist/module/lib/Components/MediaTag/MediaTag.js +39 -0
- package/dist/module/lib/Components/MediaTag/MediaTag.js.map +1 -0
- package/dist/module/lib/Components/MediaTag/MediaTag.mdx +161 -0
- package/dist/module/lib/Components/MediaTag/MediaTag.stories.js +122 -0
- package/dist/module/lib/Components/MediaTag/MediaTag.stories.js.map +1 -0
- package/dist/module/lib/Components/MediaTag/MediaTag.test.js +30 -0
- package/dist/module/lib/Components/MediaTag/MediaTag.test.js.map +1 -0
- package/dist/module/lib/Components/MediaTag/index.js +5 -0
- package/dist/module/lib/Components/MediaTag/index.js.map +1 -0
- package/dist/module/lib/Components/MediaTag/types.js +4 -0
- package/dist/module/lib/Components/MediaTag/types.js.map +1 -0
- 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/Tag/Tag.js +10 -95
- package/dist/module/lib/Components/Tag/Tag.js.map +1 -1
- package/dist/module/lib/Components/Tag/Tag.mdx +1 -79
- package/dist/module/lib/Components/Tag/Tag.stories.js +8 -1
- package/dist/module/lib/Components/Tag/Tag.stories.js.map +1 -1
- package/dist/module/lib/Components/Tag/Tag.test.js +69 -0
- package/dist/module/lib/Components/Tag/Tag.test.js.map +1 -0
- 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/BaseTag/BaseTag.d.ts +3 -0
- package/dist/typescript/src/lib/Components/BaseTag/BaseTag.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/BaseTag/index.d.ts +3 -0
- package/dist/typescript/src/lib/Components/BaseTag/index.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/BaseTag/types.d.ts +10 -0
- package/dist/typescript/src/lib/Components/BaseTag/types.d.ts.map +1 -0
- 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/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/MediaTag/MediaTag.d.ts +26 -0
- package/dist/typescript/src/lib/Components/MediaTag/MediaTag.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/MediaTag/index.d.ts +3 -0
- package/dist/typescript/src/lib/Components/MediaTag/index.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/MediaTag/types.d.ts +10 -0
- package/dist/typescript/src/lib/Components/MediaTag/types.d.ts.map +1 -0
- 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/Tag/Tag.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Tag/Tag.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Tag/types.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Tag/types.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 +34 -29
- package/src/lib/Animations/Pulse/types.ts +2 -1
- package/src/lib/Components/BaseTag/BaseTag.test.tsx +137 -0
- package/src/lib/Components/BaseTag/BaseTag.tsx +152 -0
- package/src/lib/Components/BaseTag/index.ts +2 -0
- package/src/lib/Components/BaseTag/types.ts +11 -0
- 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/ListItem/ListItem.tsx +3 -3
- package/src/lib/Components/MediaImage/MediaImage.tsx +10 -2
- package/src/lib/Components/MediaTag/MediaTag.mdx +161 -0
- package/src/lib/Components/MediaTag/MediaTag.stories.tsx +112 -0
- package/src/lib/Components/MediaTag/MediaTag.test.tsx +27 -0
- package/src/lib/Components/MediaTag/MediaTag.tsx +36 -0
- package/src/lib/Components/MediaTag/index.ts +2 -0
- package/src/lib/Components/MediaTag/types.ts +10 -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/Tag/Tag.mdx +1 -79
- package/src/lib/Components/Tag/Tag.stories.tsx +3 -0
- package/src/lib/Components/Tag/Tag.test.tsx +51 -0
- package/src/lib/Components/Tag/Tag.tsx +12 -119
- package/src/lib/Components/Tag/types.ts +2 -1
- 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":"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,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OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,YAAY,EAAE,0BAA0B,EAAE,CAAC;AAE3C,MAAM,MAAM,sBAAsB,GAAG;IACnC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;;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,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AAI,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"}
|
|
@@ -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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,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":"
|
|
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"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { MediaTagProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* A compact label used to categorize, classify, or highlight information with a required media element (image, crypto icon, etc.).
|
|
4
|
+
*
|
|
5
|
+
* The appearance determines the color scheme used.
|
|
6
|
+
*
|
|
7
|
+
* @see {@link https://ldls.vercel.app/?path=/docs/communication-mediatag-overview--docs Storybook}
|
|
8
|
+
* @see {@link https://ldls.vercel.app/?path=/docs/communication-mediatag-implementation--docs#dos-and-donts Guidelines}
|
|
9
|
+
*
|
|
10
|
+
* @warning The `lx` prop should only be used for layout adjustments like margins or positioning.
|
|
11
|
+
* Do not use it to modify the tag's core appearance (colors, padding, etc). Use the `appearance` prop instead.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* import { MediaTag, MediaImage } from '@ledgerhq/lumen-ui-rnative';
|
|
15
|
+
*
|
|
16
|
+
* // MediaTag with image
|
|
17
|
+
* <MediaTag
|
|
18
|
+
* label='Ethereum'
|
|
19
|
+
* leadingContent={<MediaImage src='https://crypto-icons.ledger.com/ETH.png' alt='Ethereum' size={16} shape='square' />}
|
|
20
|
+
* />
|
|
21
|
+
*
|
|
22
|
+
* // Small MediaTag
|
|
23
|
+
* <MediaTag label='Bitcoin' size='sm' leadingContent={myIcon} />
|
|
24
|
+
*/
|
|
25
|
+
export declare const MediaTag: ({ leadingContent, ...props }: MediaTagProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
//# sourceMappingURL=MediaTag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MediaTag.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/MediaTag/MediaTag.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,QAAQ,GAAI,8BAA8B,aAAa,4CASnE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/MediaTag/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { TagProps } from '../Tag';
|
|
3
|
+
export type MediaTagProps = Omit<TagProps, 'icon'> & {
|
|
4
|
+
/**
|
|
5
|
+
* The media element rendered before the label (e.g. an image or a crypto icon).
|
|
6
|
+
* Should be sized to match the tag's `size`: 16px for `md`, 12px for `sm`.
|
|
7
|
+
*/
|
|
8
|
+
leadingContent: ReactNode;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/MediaTag/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAEvC,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,GAAG;IACnD;;;OAGG;IACH,cAAc,EAAE,SAAS,CAAC;CAC3B,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;;;;OA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C,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EAAE,SAAS,CAAC;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"}
|
|
@@ -26,5 +26,5 @@ import type { TagProps } from './types';
|
|
|
26
26
|
* // Small tag
|
|
27
27
|
* <Tag label="Small" size="sm" />
|
|
28
28
|
*/
|
|
29
|
-
export declare const Tag: ({
|
|
29
|
+
export declare const Tag: ({ icon, size, ...props }: TagProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
30
|
//# sourceMappingURL=Tag.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Tag/Tag.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Tag/Tag.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AASxC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,GAAG,GAAI,0BAAiC,QAAQ,4CAiB5D,CAAC"}
|
|
@@ -5,7 +5,7 @@ export type TagProps = {
|
|
|
5
5
|
/**
|
|
6
6
|
* The appearance of the tag.
|
|
7
7
|
*/
|
|
8
|
-
appearance?: 'base' | 'gray' | 'accent' | 'accent-subtle' | 'success' | 'error' | 'warning';
|
|
8
|
+
appearance?: 'base' | 'gray' | 'accent' | 'accent-subtle' | 'success' | 'error' | 'warning' | 'white';
|
|
9
9
|
/**
|
|
10
10
|
* The icon of the tag.
|
|
11
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Tag/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,MAAM,QAAQ,GAAG;IACrB;;OAEG;IACH,UAAU,CAAC,EACP,MAAM,GACN,MAAM,GACN,QAAQ,GACR,eAAe,GACf,SAAS,GACT,OAAO,GACP,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Tag/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,e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c,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,43 @@ 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
|
-
() => ({
|
|
44
|
+
const animatedStyle = useAnimatedStyle(() => ({
|
|
47
45
|
opacity: sv.value,
|
|
48
|
-
})
|
|
49
|
-
[sv],
|
|
50
|
-
);
|
|
46
|
+
}));
|
|
51
47
|
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
return (
|
|
49
|
+
<Animated.View
|
|
50
|
+
{...props}
|
|
51
|
+
collapsable={false}
|
|
52
|
+
style={[resolvedLxStyle, animatedStyle]}
|
|
53
|
+
>
|
|
54
|
+
{children}
|
|
55
|
+
</Animated.View>
|
|
56
|
+
);
|
|
57
|
+
},
|
|
58
|
+
);
|
|
54
59
|
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;
|