@trilogy-ds/react 0.0.1-beta.29 → 0.0.1-beta.31
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/lib/components/autolayout/DefaultSpacingMatrix.js +0 -2
- package/lib/components/autolayout/DefaultSpacingMatrix.js.map +1 -1
- package/lib/components/breadcrumb/item/BreadcrumbItem.js +3 -2
- package/lib/components/breadcrumb/item/BreadcrumbItem.js.map +1 -1
- package/lib/components/breadcrumb/item/BreadcrumbItem.native.js +2 -2
- package/lib/components/breadcrumb/item/BreadcrumbItem.native.js.map +1 -1
- package/lib/components/button/Button.native.d.ts +1 -1
- package/lib/components/button/Button.native.js +11 -11
- package/lib/components/button/Button.native.js.map +1 -1
- package/lib/components/card/image/CardImage.js +1 -1
- package/lib/components/card/image/CardImage.js.map +1 -1
- package/lib/components/checkbox/Checkbox.native.js +4 -4
- package/lib/components/checkbox/Checkbox.native.js.map +1 -1
- package/lib/components/chips/Chips.native.js +10 -15
- package/lib/components/chips/Chips.native.js.map +1 -1
- package/lib/components/chips/list/index.d.ts +2 -0
- package/lib/components/chips/list/index.js +3 -0
- package/lib/components/chips/list/index.js.map +1 -0
- package/lib/components/countdown/Countdown.native.js +5 -7
- package/lib/components/countdown/Countdown.native.js.map +1 -1
- package/lib/components/enumsComponentsName.d.ts +0 -2
- package/lib/components/enumsComponentsName.js +0 -2
- package/lib/components/enumsComponentsName.js.map +1 -1
- package/lib/components/icon/IconEnum.d.ts +3 -1
- package/lib/components/icon/IconEnum.js +2 -0
- package/lib/components/icon/IconEnum.js.map +1 -1
- package/lib/components/index.d.ts +51 -52
- package/lib/components/index.js +51 -52
- package/lib/components/index.js.map +1 -1
- package/lib/components/list/item/ListItem.d.ts +6 -3
- package/lib/components/list/item/ListItem.js +25 -21
- package/lib/components/list/item/ListItem.js.map +1 -1
- package/lib/components/list/item/ListItem.native.d.ts +3 -3
- package/lib/components/list/item/ListItem.native.js +84 -44
- package/lib/components/list/item/ListItem.native.js.map +1 -1
- package/lib/components/list/item/ListItemProps.d.ts +7 -2
- package/lib/components/list/item/ListItemProps.js.map +1 -1
- package/lib/components/modal/Modal.native.d.ts +1 -1
- package/lib/components/modal/Modal.native.js +3 -3
- package/lib/components/modal/Modal.native.js.map +1 -1
- package/lib/components/pagination/Pagination.native.js +24 -41
- package/lib/components/pagination/Pagination.native.js.map +1 -1
- package/lib/components/price/Price.d.ts +2 -1
- package/lib/components/price/Price.js +24 -14
- package/lib/components/price/Price.js.map +1 -1
- package/lib/components/price/Price.native.d.ts +1 -1
- package/lib/components/price/Price.native.js +29 -4
- package/lib/components/price/Price.native.js.map +1 -1
- package/lib/components/price/PriceProps.d.ts +1 -0
- package/lib/components/radio/Radio.native.js +6 -6
- package/lib/components/radio/Radio.native.js.map +1 -1
- package/lib/components/stepper/step/StepperStep.native.js +33 -8
- package/lib/components/stepper/step/StepperStep.native.js.map +1 -1
- package/lib/components/sticker/Sticker.native.js +2 -1
- package/lib/components/sticker/Sticker.native.js.map +1 -1
- package/lib/components/table/Table.d.ts +1 -1
- package/lib/components/table/Table.js +2 -2
- package/lib/components/table/Table.js.map +1 -1
- package/lib/components/table/TableProps.d.ts +2 -1
- package/lib/components/tabs/item/TabsItem.native.js +13 -8
- package/lib/components/tabs/item/TabsItem.native.js.map +1 -1
- package/lib/components/textarea/Textarea.native.js +4 -6
- package/lib/components/textarea/Textarea.native.js.map +1 -1
- package/lib/objects/facets/Color.js +1 -1
- package/lib/objects/facets/Color.js.map +1 -1
- package/package.json +1 -1
- package/lib/components/notification/Notification.d.ts +0 -27
- package/lib/components/notification/Notification.js +0 -68
- package/lib/components/notification/Notification.js.map +0 -1
- package/lib/components/notification/Notification.native.d.ts +0 -25
- package/lib/components/notification/Notification.native.js +0 -175
- package/lib/components/notification/Notification.native.js.map +0 -1
- package/lib/components/notification/NotificationEnum.d.ts +0 -1
- package/lib/components/notification/NotificationEnum.js +0 -16
- package/lib/components/notification/NotificationEnum.js.map +0 -1
- package/lib/components/notification/NotificationProps.d.ts +0 -27
- package/lib/components/notification/NotificationProps.js +0 -2
- package/lib/components/notification/NotificationProps.js.map +0 -1
- package/lib/components/notification/deletable/DeletableNotification.d.ts +0 -11
- package/lib/components/notification/deletable/DeletableNotification.js +0 -15
- package/lib/components/notification/deletable/DeletableNotification.js.map +0 -1
- package/lib/components/notification/deletable/DeletableNotification.native.d.ts +0 -15
- package/lib/components/notification/deletable/DeletableNotification.native.js +0 -119
- package/lib/components/notification/deletable/DeletableNotification.native.js.map +0 -1
- package/lib/components/notification/deletable/DeletableNotificationProps.d.ts +0 -13
- package/lib/components/notification/deletable/DeletableNotificationProps.js +0 -2
- package/lib/components/notification/deletable/DeletableNotificationProps.js.map +0 -1
- package/lib/components/notification/deletable/index.d.ts +0 -2
- package/lib/components/notification/deletable/index.js +0 -3
- package/lib/components/notification/deletable/index.js.map +0 -1
- package/lib/components/notification/index.d.ts +0 -2
- package/lib/components/notification/index.js +0 -3
- package/lib/components/notification/index.js.map +0 -1
|
@@ -1,52 +1,51 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
22
|
-
export * from
|
|
23
|
-
export * from
|
|
24
|
-
export * from
|
|
25
|
-
export * from
|
|
26
|
-
export * from
|
|
27
|
-
export * from
|
|
28
|
-
export * from
|
|
29
|
-
export * from
|
|
30
|
-
export * from
|
|
31
|
-
export * from
|
|
32
|
-
export * from
|
|
33
|
-
export * from
|
|
34
|
-
export * from
|
|
35
|
-
export * from
|
|
36
|
-
export * from
|
|
37
|
-
export * from
|
|
38
|
-
export * from
|
|
39
|
-
export * from
|
|
40
|
-
export * from
|
|
41
|
-
export * from
|
|
42
|
-
export * from
|
|
43
|
-
export * from
|
|
44
|
-
export * from
|
|
45
|
-
export * from
|
|
46
|
-
export * from
|
|
47
|
-
export * from
|
|
48
|
-
export * from
|
|
49
|
-
export * from
|
|
50
|
-
export * from
|
|
51
|
-
export * from
|
|
52
|
-
export * from "./range";
|
|
1
|
+
export * from './accordion';
|
|
2
|
+
export * from './alert';
|
|
3
|
+
export * from './autocomplete';
|
|
4
|
+
export * from './autolayout';
|
|
5
|
+
export * from './badge';
|
|
6
|
+
export * from './box';
|
|
7
|
+
export * from './breadcrumb';
|
|
8
|
+
export * from './button';
|
|
9
|
+
export * from './card';
|
|
10
|
+
export * from './checkbox';
|
|
11
|
+
export * from './chips';
|
|
12
|
+
export * from './columns';
|
|
13
|
+
export * from './container';
|
|
14
|
+
export * from './countdown';
|
|
15
|
+
export * from './divider';
|
|
16
|
+
export * from './dropdown';
|
|
17
|
+
export * from './fab';
|
|
18
|
+
export * from './hero';
|
|
19
|
+
export * from './icon';
|
|
20
|
+
export * from './image';
|
|
21
|
+
export * from './input';
|
|
22
|
+
export * from './link';
|
|
23
|
+
export * from './list';
|
|
24
|
+
export * from './modal';
|
|
25
|
+
export * from './otp';
|
|
26
|
+
export * from './pagination';
|
|
27
|
+
export * from './popover';
|
|
28
|
+
export * from './price';
|
|
29
|
+
export * from './product-tour';
|
|
30
|
+
export * from './progress';
|
|
31
|
+
export * from './radio';
|
|
32
|
+
export * from './range';
|
|
33
|
+
export * from './rows';
|
|
34
|
+
export * from './scroll-view';
|
|
35
|
+
export * from './section';
|
|
36
|
+
export * from './segment-control';
|
|
37
|
+
export * from './select';
|
|
38
|
+
export * from './selector';
|
|
39
|
+
export * from './spacer';
|
|
40
|
+
export * from './stepper';
|
|
41
|
+
export * from './sticker';
|
|
42
|
+
export * from './switch';
|
|
43
|
+
export * from './table';
|
|
44
|
+
export * from './tabs';
|
|
45
|
+
export * from './tag';
|
|
46
|
+
export * from './text';
|
|
47
|
+
export * from './textarea';
|
|
48
|
+
export * from './timeline';
|
|
49
|
+
export * from './title';
|
|
50
|
+
export * from './toaster';
|
|
51
|
+
export * from './view';
|
package/lib/components/index.js
CHANGED
|
@@ -1,54 +1,53 @@
|
|
|
1
1
|
// Components exports
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
22
|
-
export * from
|
|
23
|
-
export * from
|
|
24
|
-
export * from
|
|
25
|
-
export * from
|
|
26
|
-
export * from
|
|
27
|
-
export * from
|
|
28
|
-
export * from
|
|
29
|
-
export * from
|
|
30
|
-
export * from
|
|
31
|
-
export * from
|
|
32
|
-
export * from
|
|
33
|
-
export * from
|
|
34
|
-
export * from
|
|
35
|
-
export * from
|
|
36
|
-
export * from
|
|
37
|
-
export * from
|
|
38
|
-
export * from
|
|
39
|
-
export * from
|
|
40
|
-
export * from
|
|
41
|
-
export * from
|
|
42
|
-
export * from
|
|
43
|
-
export * from
|
|
44
|
-
export * from
|
|
45
|
-
export * from
|
|
46
|
-
export * from
|
|
47
|
-
export * from
|
|
48
|
-
export * from
|
|
49
|
-
export * from
|
|
50
|
-
export * from
|
|
51
|
-
export * from
|
|
52
|
-
export * from
|
|
53
|
-
export * from "./range";
|
|
2
|
+
export * from './accordion';
|
|
3
|
+
export * from './alert';
|
|
4
|
+
export * from './autocomplete';
|
|
5
|
+
export * from './autolayout';
|
|
6
|
+
export * from './badge';
|
|
7
|
+
export * from './box';
|
|
8
|
+
export * from './breadcrumb';
|
|
9
|
+
export * from './button';
|
|
10
|
+
export * from './card';
|
|
11
|
+
export * from './checkbox';
|
|
12
|
+
export * from './chips';
|
|
13
|
+
export * from './columns';
|
|
14
|
+
export * from './container';
|
|
15
|
+
export * from './countdown';
|
|
16
|
+
export * from './divider';
|
|
17
|
+
export * from './dropdown';
|
|
18
|
+
export * from './fab';
|
|
19
|
+
export * from './hero';
|
|
20
|
+
export * from './icon';
|
|
21
|
+
export * from './image';
|
|
22
|
+
export * from './input';
|
|
23
|
+
export * from './link';
|
|
24
|
+
export * from './list';
|
|
25
|
+
export * from './modal';
|
|
26
|
+
export * from './otp';
|
|
27
|
+
export * from './pagination';
|
|
28
|
+
export * from './popover';
|
|
29
|
+
export * from './price';
|
|
30
|
+
export * from './product-tour';
|
|
31
|
+
export * from './progress';
|
|
32
|
+
export * from './radio';
|
|
33
|
+
export * from './range';
|
|
34
|
+
export * from './rows';
|
|
35
|
+
export * from './scroll-view';
|
|
36
|
+
export * from './section';
|
|
37
|
+
export * from './segment-control';
|
|
38
|
+
export * from './select';
|
|
39
|
+
export * from './selector';
|
|
40
|
+
export * from './spacer';
|
|
41
|
+
export * from './stepper';
|
|
42
|
+
export * from './sticker';
|
|
43
|
+
export * from './switch';
|
|
44
|
+
export * from './table';
|
|
45
|
+
export * from './tabs';
|
|
46
|
+
export * from './tag';
|
|
47
|
+
export * from './text';
|
|
48
|
+
export * from './textarea';
|
|
49
|
+
export * from './timeline';
|
|
50
|
+
export * from './title';
|
|
51
|
+
export * from './toaster';
|
|
52
|
+
export * from './view';
|
|
54
53
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../components/index.ts"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,cAAc,aAAa,CAAA;AAC3B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","s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AAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,QAAQ,CAAA"}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ListItemProps } from
|
|
2
|
+
import { ListItemProps } from './ListItemProps';
|
|
3
3
|
/**
|
|
4
4
|
* ListItem Component
|
|
5
5
|
* @param className {string} Additionnal CSS Classes
|
|
6
6
|
* @param children {React.ReactNode}
|
|
7
|
-
* @param customIcon {IconName} Icon name
|
|
7
|
+
* @param customIcon {IconName | React.ReactNode } Icon name | children
|
|
8
8
|
* @param status {ListIconStatus} Status success|error
|
|
9
9
|
* @param title {string} List item title
|
|
10
10
|
* @param description {string} List item description
|
|
11
|
+
* @param action {React.ReactNode} children
|
|
12
|
+
* @param divider {boolean} Display divider
|
|
13
|
+
* @param deletable {boolean}
|
|
11
14
|
*/
|
|
12
|
-
declare const ListItem: ({ className, children, customIcon, status, title, description, testId, }: ListItemProps) => JSX.Element;
|
|
15
|
+
declare const ListItem: ({ className, children, customIcon, status, title, description, testId, action, divider, deletable, }: ListItemProps) => JSX.Element;
|
|
13
16
|
export default ListItem;
|
|
@@ -1,34 +1,38 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import clsx from 'clsx';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useTrilogyContext } from '../../../context';
|
|
4
|
+
import { hashClass } from '../../../helpers';
|
|
5
|
+
import { TrilogyColor, getColorClassName } from '../../../objects';
|
|
6
|
+
import { has, is } from '../../../services';
|
|
7
|
+
import { Divider } from '../../divider';
|
|
8
|
+
import { Icon, IconSize } from '../../icon';
|
|
8
9
|
/**
|
|
9
10
|
* ListItem Component
|
|
10
11
|
* @param className {string} Additionnal CSS Classes
|
|
11
12
|
* @param children {React.ReactNode}
|
|
12
|
-
* @param customIcon {IconName} Icon name
|
|
13
|
+
* @param customIcon {IconName | React.ReactNode } Icon name | children
|
|
13
14
|
* @param status {ListIconStatus} Status success|error
|
|
14
15
|
* @param title {string} List item title
|
|
15
16
|
* @param description {string} List item description
|
|
17
|
+
* @param action {React.ReactNode} children
|
|
18
|
+
* @param divider {boolean} Display divider
|
|
19
|
+
* @param deletable {boolean}
|
|
16
20
|
*/
|
|
17
|
-
const ListItem = ({ className, children, customIcon, status, title, description, testId, }) => {
|
|
21
|
+
const ListItem = ({ className, children, customIcon, status, title, description, testId, action, divider, deletable, }) => {
|
|
18
22
|
const { styled } = useTrilogyContext();
|
|
19
23
|
const classes = clsx(is(getColorClassName(status ? TrilogyColor[status] : TrilogyColor.BACKGROUND)), className);
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
React.createElement(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
return (React.createElement("li", { className: hashClass(styled, clsx(classes, action && has('action'))), "data-testid": testId },
|
|
25
|
+
React.createElement("div", { className: hashClass(styled, clsx('list-item_content')) },
|
|
26
|
+
customIcon && typeof customIcon === 'string' && (React.createElement("div", { className: hashClass(styled, clsx('list-item_content_puce')) },
|
|
27
|
+
React.createElement(Icon, { className: classes, name: deletable ? 'tri-trash' : customIcon, size: IconSize.SMALL }))),
|
|
28
|
+
customIcon && typeof customIcon !== 'string' && (React.createElement("div", { className: hashClass(styled, clsx('list-item_content_puce')) }, customIcon)),
|
|
29
|
+
React.createElement("div", null,
|
|
30
|
+
(title || description) && (React.createElement(React.Fragment, null,
|
|
31
|
+
title && React.createElement("b", null, title),
|
|
32
|
+
children || (description && React.createElement("p", null, children || description)))),
|
|
33
|
+
!title && !description && React.createElement("div", null, children))),
|
|
34
|
+
action && React.createElement("div", { className: hashClass(styled, clsx('list-item_action')) }, action),
|
|
35
|
+
divider && React.createElement(Divider, null)));
|
|
32
36
|
};
|
|
33
37
|
export default ListItem;
|
|
34
38
|
//# sourceMappingURL=ListItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.js","sourceRoot":"","sources":["../../../../components/list/item/ListItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,
|
|
1
|
+
{"version":3,"file":"ListItem.js","sourceRoot":"","sources":["../../../../components/list/item/ListItem.tsx"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAClE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,IAAI,EAAY,QAAQ,EAAE,MAAM,YAAY,CAAA;AAGrD;;;;;;;;;;;GAWG;AACH,MAAM,QAAQ,GAAG,CAAC,EAChB,SAAS,EACT,QAAQ,EACR,UAAU,EACV,MAAM,EACN,KAAK,EACL,WAAW,EACX,MAAM,EACN,MAAM,EACN,OAAO,EACP,SAAS,GACK,EAAe,EAAE;IAC/B,MAAM,EAAE,MAAM,EAAE,GAAG,iBAAiB,EAAE,CAAA;IACtC,MAAM,OAAO,GAAG,IAAI,CAClB,EAAE,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,EAC9E,SAAS,CACV,CAAA;IAED,OAAO,CACL,4BAAI,SAAS,EAAE,SAAS,CAAC,MAAM,EAA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ListItemProps } from './ListItemProps';
|
|
4
4
|
declare const ListItem: {
|
|
5
|
-
({ children, customIcon, status, title, description, }: ListItemProps): JSX.Element;
|
|
5
|
+
({ children, customIcon, status, title, description, divider, action, deletable, }: ListItemProps): JSX.Element;
|
|
6
6
|
displayName: ComponentName;
|
|
7
7
|
};
|
|
8
8
|
export default ListItem;
|
|
@@ -1,65 +1,105 @@
|
|
|
1
|
-
import React, { useMemo } from
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { ComponentName } from
|
|
7
|
-
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { Animated, View as ReactView, StyleSheet, View } from 'react-native';
|
|
3
|
+
import Swipeable from 'react-native-gesture-handler/Swipeable';
|
|
4
|
+
import { TrilogyColor, getColorStyle } from '../../../objects';
|
|
5
|
+
import { Divider } from '../../divider';
|
|
6
|
+
import { ComponentName } from '../../enumsComponentsName';
|
|
7
|
+
import { Icon, IconColor } from '../../icon';
|
|
8
|
+
import { Text, TextLevels } from '../../text';
|
|
9
|
+
import { Title, TitleLevels } from '../../title';
|
|
10
|
+
const ListItem = ({ children, customIcon, status, title, description, divider, action, deletable, }) => {
|
|
8
11
|
const styles = StyleSheet.create({
|
|
9
12
|
item: {
|
|
10
13
|
marginBottom: 4,
|
|
11
|
-
flexDirection:
|
|
12
|
-
alignItems:
|
|
13
|
-
position:
|
|
14
|
-
},
|
|
15
|
-
puce: {
|
|
16
|
-
fontWeight: "bold",
|
|
17
|
-
position: "absolute",
|
|
18
|
-
fontSize: 18,
|
|
19
|
-
top: -3.5,
|
|
14
|
+
flexDirection: 'row',
|
|
15
|
+
alignItems: 'center',
|
|
16
|
+
position: 'relative',
|
|
20
17
|
},
|
|
21
18
|
text: {
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
icon: {
|
|
25
|
-
marginLeft: -4,
|
|
19
|
+
paddingHorizontal: customIcon ? 16 : undefined,
|
|
26
20
|
},
|
|
27
21
|
title: {
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
paddingHorizontal: customIcon ? 16 : undefined,
|
|
23
|
+
marginBottom: children ? 8 : undefined,
|
|
24
|
+
},
|
|
25
|
+
container: {
|
|
26
|
+
flexDirection: 'row',
|
|
27
|
+
alignItems: 'center',
|
|
28
|
+
position: 'relative',
|
|
29
|
+
paddingVertical: 8,
|
|
30
|
+
backgroundColor: getColorStyle(TrilogyColor.BACKGROUND),
|
|
31
|
+
},
|
|
32
|
+
content: {
|
|
33
|
+
flexDirection: 'row',
|
|
34
|
+
alignItems: 'center',
|
|
35
|
+
position: 'relative',
|
|
36
|
+
paddingVertical: 8,
|
|
37
|
+
width: action ? '85%' : undefined,
|
|
30
38
|
},
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
39
|
+
badge: {
|
|
40
|
+
alignSelf: 'center',
|
|
41
|
+
width: 10,
|
|
42
|
+
height: 10,
|
|
43
|
+
marginRight: 8,
|
|
44
|
+
backgroundColor: getColorStyle(TrilogyColor.ERROR),
|
|
45
|
+
borderRadius: 30,
|
|
46
|
+
},
|
|
47
|
+
swipeInfo: {
|
|
48
|
+
backgroundColor: getColorStyle(TrilogyColor.NEUTRAL_LIGHT),
|
|
49
|
+
width: 2,
|
|
50
|
+
height: 20,
|
|
51
|
+
borderRadius: 6,
|
|
52
|
+
},
|
|
53
|
+
rightAction: {
|
|
54
|
+
justifyContent: 'center',
|
|
55
|
+
flex: 1,
|
|
56
|
+
alignItems: 'flex-end',
|
|
57
|
+
paddingLeft: 16,
|
|
58
|
+
paddingRight: 4,
|
|
35
59
|
},
|
|
36
60
|
});
|
|
37
61
|
const getComponent = useMemo(() => {
|
|
38
|
-
if (typeof children ===
|
|
62
|
+
if (typeof children === 'object')
|
|
39
63
|
return React.createElement(View, { style: styles.text }, children);
|
|
40
|
-
if (typeof children ===
|
|
64
|
+
if (typeof children === 'undefined' && description) {
|
|
41
65
|
return (React.createElement(Text, { style: styles.text, level: TextLevels.ONE }, description));
|
|
42
66
|
}
|
|
43
|
-
if ([
|
|
67
|
+
if (['string', 'number'].includes(typeof children)) {
|
|
44
68
|
return (React.createElement(Text, { style: styles.text, level: TextLevels.ONE }, children));
|
|
45
69
|
}
|
|
46
70
|
}, [children, description]);
|
|
47
|
-
|
|
48
|
-
return (React.createElement(View, { style: styles.
|
|
49
|
-
React.createElement(ReactView, { style: styles.
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
React.createElement(
|
|
58
|
-
|
|
71
|
+
const content = useMemo(() => {
|
|
72
|
+
return (React.createElement(View, { style: styles.container },
|
|
73
|
+
React.createElement(ReactView, { style: styles.content },
|
|
74
|
+
customIcon && typeof customIcon === 'string' && (React.createElement(ReactView, null,
|
|
75
|
+
React.createElement(Icon, { size: 'small', name: customIcon, color: status || IconColor.MAIN }))),
|
|
76
|
+
customIcon && typeof customIcon !== 'string' && React.createElement(ReactView, null, customIcon),
|
|
77
|
+
React.createElement(ReactView, null,
|
|
78
|
+
title && (React.createElement(Title, { style: styles.title, level: TitleLevels.SIX }, title)),
|
|
79
|
+
getComponent)),
|
|
80
|
+
action && deletable && (React.createElement(ReactView, { style: { flexDirection: 'row', marginLeft: 'auto' } },
|
|
81
|
+
React.createElement(View, { style: styles.badge }),
|
|
82
|
+
React.createElement(View, { style: styles.swipeInfo }))),
|
|
83
|
+
action && !deletable && (React.createElement(ReactView, { style: { marginLeft: 'auto' } },
|
|
84
|
+
React.createElement(View, null, action)))));
|
|
85
|
+
}, [customIcon, status, title, getComponent, action, deletable]);
|
|
86
|
+
if (action && deletable) {
|
|
87
|
+
const RightActions = (_, dragX) => {
|
|
88
|
+
const scale = dragX.interpolate({
|
|
89
|
+
inputRange: [-100, 0],
|
|
90
|
+
outputRange: [1.5, 0.9],
|
|
91
|
+
extrapolate: 'clamp',
|
|
92
|
+
});
|
|
93
|
+
return (React.createElement(View, null,
|
|
94
|
+
React.createElement(Animated.View, { style: [styles.rightAction, { transform: [{ scale }] }] }, action)));
|
|
95
|
+
};
|
|
96
|
+
return (React.createElement(React.Fragment, null,
|
|
97
|
+
React.createElement(Swipeable, { renderRightActions: RightActions }, content),
|
|
98
|
+
divider && React.createElement(Divider, null)));
|
|
59
99
|
}
|
|
60
|
-
return (React.createElement(
|
|
61
|
-
|
|
62
|
-
|
|
100
|
+
return (React.createElement(React.Fragment, null,
|
|
101
|
+
content,
|
|
102
|
+
divider && React.createElement(Divider, null)));
|
|
63
103
|
};
|
|
64
104
|
ListItem.displayName = ComponentName.ListItem;
|
|
65
105
|
export default ListItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.native.js","sourceRoot":"","sources":["../../../../components/list/item/ListItem.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ListItem.native.js","sourceRoot":"","sources":["../../../../components/list/item/ListItem.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAAE,QAAQ,EAAE,IAAI,IAAI,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC5E,OAAO,SAAS,MAAM,wCAAwC,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAY,MAAM,YAAY,CAAA;AACtD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,aA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,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,IACnE,MAAM,CACO,CACX,CACR,CAAA;QACH,CAAC,CAAA;QAED,OAAO,CACL;YACE,oBAAC,SAAS,IAAC,kBAAkB,EAAE,YAAY,IAAG,OAAO,CAAa;YACjE,OAAO,IAAI,oBAAC,OAAO,OAAG,CACtB,CACJ,CAAA;KACF;IAED,OAAO,CACL;QACG,OAAO;QACP,OAAO,IAAI,oBAAC,OAAO,OAAG,CACtB,CACJ,CAAA;AACH,CAAC,CAAA;AAED,QAAQ,CAAC,WAAW,GAAG,aAAa,CAAC,QAAQ,CAAA;AAE7C,eAAe,QAAQ,CAAA"}
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
* ListItem Interface
|
|
3
3
|
*/
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
|
-
import {
|
|
5
|
+
import { Animated } from 'react-native';
|
|
6
6
|
import { Accessibility } from '../../../objects';
|
|
7
|
+
import { IconName, IconNameValues } from '../../icon';
|
|
7
8
|
export declare enum ListIconStatus {
|
|
8
9
|
SUCCESS = "SUCCESS",
|
|
9
10
|
ERROR = "ERROR"
|
|
@@ -12,8 +13,12 @@ export type ListIconStatusValues = `${ListIconStatus}`;
|
|
|
12
13
|
export interface ListItemProps extends Accessibility {
|
|
13
14
|
children?: ReactNode;
|
|
14
15
|
className?: string;
|
|
15
|
-
customIcon?: IconName | IconNameValues;
|
|
16
|
+
customIcon?: IconName | IconNameValues | ReactNode;
|
|
16
17
|
status?: ListIconStatus | ListIconStatusValues;
|
|
17
18
|
title?: string;
|
|
18
19
|
description?: string;
|
|
20
|
+
action?: ReactNode;
|
|
21
|
+
divider?: boolean;
|
|
22
|
+
deletable?: ReactNode;
|
|
19
23
|
}
|
|
24
|
+
export type AnimatedInterpolationProps = Animated.AnimatedInterpolation<number | string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemProps.js","sourceRoot":"","sources":["../../../../components/list/item/ListItemProps.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ListItemProps.js","sourceRoot":"","sources":["../../../../components/list/item/ListItemProps.ts"],"names":[],"mappings":"AAQA,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,qCAAmB,CAAA;IACnB,iCAAe,CAAA;AACjB,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB"}
|
|
@@ -14,7 +14,7 @@ import { ComponentName } from "../enumsComponentsName";
|
|
|
14
14
|
* @param onClose {Function} Additionnal close custom function
|
|
15
15
|
* @param onOpen {Function} Additionnal open custom function
|
|
16
16
|
* @param closeIcon {boolean} Display close icon for Modal
|
|
17
|
-
* @param bottom {boolean} Open modal from bottom
|
|
17
|
+
* @param bottom {boolean} Default true : Open modal from bottom
|
|
18
18
|
* @param ctaContent {string} Content cta
|
|
19
19
|
* @param children {React.ReactNode}
|
|
20
20
|
* @param fullwidth {boolean} Fullwidth Modal
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState } from "react";
|
|
2
|
-
import { Animated, Dimensions, ScrollView, StyleSheet, TouchableOpacity
|
|
2
|
+
import { Animated, Dimensions, ScrollView, StyleSheet, TouchableOpacity } from "react-native";
|
|
3
3
|
import NativeModal from "react-native-modal";
|
|
4
4
|
import { Text } from "../text";
|
|
5
5
|
import { Button, ButtonVariant } from "../button";
|
|
@@ -22,14 +22,14 @@ import ModalFooter from "./footer/ModalFooter";
|
|
|
22
22
|
* @param onClose {Function} Additionnal close custom function
|
|
23
23
|
* @param onOpen {Function} Additionnal open custom function
|
|
24
24
|
* @param closeIcon {boolean} Display close icon for Modal
|
|
25
|
-
* @param bottom {boolean} Open modal from bottom
|
|
25
|
+
* @param bottom {boolean} Default true : Open modal from bottom
|
|
26
26
|
* @param ctaContent {string} Content cta
|
|
27
27
|
* @param children {React.ReactNode}
|
|
28
28
|
* @param fullwidth {boolean} Fullwidth Modal
|
|
29
29
|
* @param onModalHide {Function} Callback on Hide
|
|
30
30
|
* @param swipable {boolean} Swipable Native Modal
|
|
31
31
|
*/
|
|
32
|
-
const Modal = ({ children, active = false, title, content, iconName, iconColor, triggerContent, ctaContent, ctaOnClick, ctaCancelOnClick, onClose, onOpen, closeIcon, bottom, fullwidth, onModalHide, swipable = true, ...others }) => {
|
|
32
|
+
const Modal = ({ children, active = false, title, content, iconName, iconColor, triggerContent, ctaContent, ctaOnClick, ctaCancelOnClick, onClose, onOpen, closeIcon, bottom = true, fullwidth, onModalHide, swipable = true, ...others }) => {
|
|
33
33
|
const styles = StyleSheet.create({
|
|
34
34
|
centeredView: {
|
|
35
35
|
justifyContent: bottom ? "flex-end" : "center",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.native.js","sourceRoot":"","sources":["../../../components/modal/Modal.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC1D,OAAO,
|
|
1
|
+
{"version":3,"file":"Modal.native.js","sourceRoot":"","sources":["../../../components/modal/Modal.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC1D,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAyB,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAC,MAAM,cAAc,CAAA;AACnH,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAE5C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;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