@trilogy-ds/react 0.0.1-beta.28 → 0.0.1-beta.30
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/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,7 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useState } from "react";
|
|
2
|
-
import { StyleSheet, TouchableOpacity, View } from "react-native";
|
|
2
|
+
import { Animated, StyleSheet, TouchableOpacity, View } from "react-native";
|
|
3
3
|
import { getColorStyle, TrilogyColor } from "../../../objects/facets/Color";
|
|
4
|
-
import { TypographyBold } from "../../../objects";
|
|
5
4
|
import { ComponentName } from "../../enumsComponentsName";
|
|
6
5
|
import { Icon } from "../../icon";
|
|
7
6
|
import { Text, TextLevels } from "../../text";
|
|
@@ -16,6 +15,9 @@ const TabsItem = ({ active, children, onClick, tabIndex, iconName, inverted, dis
|
|
|
16
15
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
17
16
|
const [activeItem, setActiveItem] = useState(active || false);
|
|
18
17
|
const [isPressIn, setInPressIn] = useState(false);
|
|
18
|
+
const animatedBorderStyle = {
|
|
19
|
+
borderBottomWidth: active && 2 || 0,
|
|
20
|
+
};
|
|
19
21
|
const getIconColor = React.useMemo(() => {
|
|
20
22
|
if (inverted) {
|
|
21
23
|
if (disabled)
|
|
@@ -34,7 +36,6 @@ const TabsItem = ({ active, children, onClick, tabIndex, iconName, inverted, dis
|
|
|
34
36
|
if (inverted) {
|
|
35
37
|
if (active)
|
|
36
38
|
return getColorStyle(TrilogyColor.BACKGROUND);
|
|
37
|
-
return getColorStyle(TrilogyColor.FONT, 1);
|
|
38
39
|
}
|
|
39
40
|
if (active)
|
|
40
41
|
return getColorStyle(TrilogyColor.MAIN);
|
|
@@ -47,14 +48,19 @@ const TabsItem = ({ active, children, onClick, tabIndex, iconName, inverted, dis
|
|
|
47
48
|
paddingVertical: 6,
|
|
48
49
|
paddingHorizontal: 14,
|
|
49
50
|
position: "relative",
|
|
50
|
-
borderBottomWidth: 2,
|
|
51
51
|
height: iconName ? 60 : 44,
|
|
52
|
-
borderBottomColor: getBorderColor,
|
|
53
52
|
},
|
|
54
53
|
text: {
|
|
55
54
|
color: getColorStyle(getIconColor),
|
|
56
55
|
textAlign: "center",
|
|
57
56
|
},
|
|
57
|
+
border: {
|
|
58
|
+
position: "absolute",
|
|
59
|
+
bottom: 0,
|
|
60
|
+
left: 0,
|
|
61
|
+
right: 0,
|
|
62
|
+
borderBottomColor: getBorderColor,
|
|
63
|
+
},
|
|
58
64
|
});
|
|
59
65
|
useEffect(() => {
|
|
60
66
|
setActiveItem(active || false);
|
|
@@ -70,9 +76,8 @@ const TabsItem = ({ active, children, onClick, tabIndex, iconName, inverted, dis
|
|
|
70
76
|
iconName && (React.createElement(View, null,
|
|
71
77
|
React.createElement(Icon, { color: getIconColor, size: 'small', name: iconName }))),
|
|
72
78
|
children &&
|
|
73
|
-
(typeof children.valueOf() === "string" ? (React.createElement(Text, {
|
|
74
|
-
|
|
75
|
-
: TypographyBold.TEXT_WEIGHT_NORMAL, style: styles.text, level: TextLevels.TWO }, String(children))) : (children))));
|
|
79
|
+
(typeof children.valueOf() === "string" ? (React.createElement(Text, { style: styles.text, level: TextLevels.TWO }, String(children))) : (children)),
|
|
80
|
+
React.createElement(Animated.View, { style: [styles.border, animatedBorderStyle] })));
|
|
76
81
|
};
|
|
77
82
|
TabsItem.displayName = ComponentName.TabsItem;
|
|
78
83
|
export default TabsItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabsItem.native.js","sourceRoot":"","sources":["../../../../components/tabs/item/TabsItem.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"TabsItem.native.js","sourceRoot":"","sources":["../../../../components/tabs/item/TabsItem.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAA;AAChD,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAE,gBAAgB,EAAE,IAAI,EAAC,MAAM,cAAc,CAAA;AAEzE,OAAO,EAAC,aAAa,EAAE,YAAY,EAAC,MAAM,+BAA+B,CAAA;AACzE,OAAO,EAAC,aAAa,EAAC,MAAM,2BAA2B,CAAA;AACvD,OAAO,EAAC,IAAI,EAAC,MAAM,YAAY,CAAA;AAC/B,OAAO,EAAC,IAAI,EAAE,UAAU,EAAC,MAAM,YAAY,CAAA;AAE3C;;;;;;GAMG;AACH,MAAM,QAAQ,GAAG,CAAC,EACE,MAAM,EACN,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,GAAG,MAAM,EACK,EAAe,EAAE;IACjD,6DAA6D;IAC7D,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAU,MAAM,IAAI,KAAK,CAAC,CAAA;IACtE,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC,CAAA;IAE1D,MAAM,mBAAmB,GAAG;QAC1B,iBAAiB,EAAE,MAAM,IAAI,CAAC,IAAI,CAAC;KACpC,CAAA;IAED,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EA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,7 +28,6 @@ const Textarea = ({ defaultValue, name, onChange, disabled, help, placeholder, k
|
|
|
28
28
|
ref) => {
|
|
29
29
|
const [_value, setValue] = useState(value || "");
|
|
30
30
|
const [isFocus, setIsFocus] = useState(false);
|
|
31
|
-
const [height, setHeight] = useState(customHeight);
|
|
32
31
|
const [displayDynamicLabel, setDisplayDynamicLabel] = useState(false);
|
|
33
32
|
const textareaColor = isFocus
|
|
34
33
|
? getColorStyle(TrilogyColor.MAIN)
|
|
@@ -52,7 +51,7 @@ ref) => {
|
|
|
52
51
|
(status && status === "error" && getAlertStyle(AlertState.ERROR)) ||
|
|
53
52
|
(status && status === "default" && textareaColor) ||
|
|
54
53
|
textareaColor,
|
|
55
|
-
height,
|
|
54
|
+
height: customHeight,
|
|
56
55
|
justifyContent: "flex-start",
|
|
57
56
|
paddingLeft: iconName ? 48 : 16,
|
|
58
57
|
paddingRight: maxLength ? 48 : 16,
|
|
@@ -108,7 +107,7 @@ ref) => {
|
|
|
108
107
|
});
|
|
109
108
|
return (React.createElement(View, null,
|
|
110
109
|
!dynamicPlaceholder && (React.createElement(Text, { style: { color: getColorStyle(TrilogyColor.MAIN) } }, label)),
|
|
111
|
-
iconName && (React.createElement(Icon, { style: styles.leftIcon, name: iconName, size:
|
|
110
|
+
iconName && (React.createElement(Icon, { style: styles.leftIcon, name: iconName, size: "small" })),
|
|
112
111
|
React.createElement(TextInput, { maxLength: maxLength, value: _value, defaultValue: defaultValue, editable: !disabled, multiline: true, keyboardAppearance: keyboardStyle || InputKeyboardAppearance.DEFAULT, autoCapitalize: autoCapitalize || InputAutoCapitalize.NONE, autoCorrect: autoCorrect || false, textContentType: textContentType || InputTextContentType.NONE, keyboardType: keyboardType || InputKeyboardType.DEFAULT, onChangeText: (text) => {
|
|
113
112
|
setDisplayDynamicLabel(text.length > 0);
|
|
114
113
|
setValue(text);
|
|
@@ -118,10 +117,9 @@ ref) => {
|
|
|
118
117
|
textareaValue: text,
|
|
119
118
|
});
|
|
120
119
|
}
|
|
121
|
-
}, placeholder: placeholder, style: styles.textarea, onFocus: () => setIsFocus(true), onBlur: () => setIsFocus(false), ...others, ref: ref
|
|
122
|
-
setHeight(event.nativeEvent.contentSize.height + 33) }),
|
|
120
|
+
}, placeholder: placeholder, style: styles.textarea, onFocus: () => setIsFocus(true), onBlur: () => setIsFocus(false), ...others, ref: ref }),
|
|
123
121
|
statusIconName && (React.createElement(Text, { style: styles.rightIcon },
|
|
124
|
-
React.createElement(Icon, { name: statusIconName, size:
|
|
122
|
+
React.createElement(Icon, { name: statusIconName, size: "small", color: status && status.toUpperCase() }))),
|
|
125
123
|
displayDynamicLabel && dynamicPlaceholder && (React.createElement(Text, { style: styles.dynamicLabel }, label)),
|
|
126
124
|
maxLength && (React.createElement(Text, { style: styles.counter }, _value ? `${_value === null || _value === void 0 ? void 0 : _value.length} / ${maxLength}` : `0 / ${maxLength}`)),
|
|
127
125
|
help && React.createElement(Text, { style: styles.help }, help)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.native.js","sourceRoot":"","sources":["../../../components/textarea/Textarea.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Textarea.native.js","sourceRoot":"","sources":["../../../components/textarea/Textarea.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACrE,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAEzE,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAC,aAAa,EAAE,YAAY,EAAC,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAC,UAAU,EAAE,aAAa,EAAC,MAAM,4BAA4B,C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AAI,CACjB,oBAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS;YAC3B,oBAAC,IAAI,IACH,IAAI,EAAE,cAAc,EACpB,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,MAAM,IAAK,MAAM,CAAC,WAAW,EAAgB,GACpD,CACG,CACR;QAEA,mBAAmB,IAAI,kBAAkB,IAAI,CAC5C,oBAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,YAAY,IAAG,KAAK,CAAQ,CACjD;QACA,SAAS,IAAI,CACZ,oBAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,OAAO,IACxB,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,MAAM,SAAS,EAAE,CAAC,CAAC,CAAC,OAAO,SAAS,EAAE,CAC5D,CACR;QACA,IAAI,IAAI,oBAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,IAAG,IAAI,CAAQ,CAC3C,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,QAAQ,CAAC,WAAW,GAAG,aAAa,CAAC,QAAQ,CAAC;AAE9C,eAAe,UAAU,CAAC,QAAQ,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { NotificationProps } from "./NotificationProps";
|
|
3
|
-
/**
|
|
4
|
-
* Notification Component
|
|
5
|
-
* @param hasIcon {boolean} Display icon, default true
|
|
6
|
-
* @param iconName {IconName} Custom icon
|
|
7
|
-
* @param title {string} Notification title content
|
|
8
|
-
* @param description {string|ReactNode} Notification description content
|
|
9
|
-
* @param alert {AlertState} Alert Variant (INFO|SUCCESS|WARNING|ERROR)
|
|
10
|
-
* @param buttonClick {ClickEvent} Click event for button
|
|
11
|
-
* @param buttonContent {string} Button content
|
|
12
|
-
* @param arrow {boolean} Notification with right arrow on right side (Uses only if not button content)
|
|
13
|
-
* @param info (boolean) Small info notification use it without button and arrow
|
|
14
|
-
* @param onClick {Function} onClick Event for all notification
|
|
15
|
-
* @param children {React.ReactNode}
|
|
16
|
-
* @param closable {Function} onClick Event on cross icon
|
|
17
|
-
* * - -------------------------- WEB PROPERTIES -------------------------------
|
|
18
|
-
* @param banner {boolean} Banner notification
|
|
19
|
-
* @param className {string} Additionnal CSS Classes
|
|
20
|
-
* @param iconClassname {string} Additionnal Icon CSS
|
|
21
|
-
* @param buttonMarkup {ButtonMarkup} Custom markup for button
|
|
22
|
-
* * - -------------------------- NATIVE PROPERTIES -------------------------------
|
|
23
|
-
* @param deletable {Function} onClick Event on delete icon or slide over ()
|
|
24
|
-
* @param unread {boolean} only with notification deletable if notification is unread
|
|
25
|
-
*/
|
|
26
|
-
declare const Notification: ({ className, hasIcon, iconClassname, iconName, title, description, alert, buttonContent, buttonClick, buttonMarkup, arrow, info, banner, onClick, closable, testId, ...others }: NotificationProps) => JSX.Element;
|
|
27
|
-
export default Notification;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { AlertState, getAlertClassName, getAlertIconName, } from "../../objects/facets/Alert";
|
|
3
|
-
import { has, is } from "../../services/classify";
|
|
4
|
-
import { Button } from "../button";
|
|
5
|
-
import { Icon, IconName, IconSize } from "../icon";
|
|
6
|
-
import { Text } from "../text";
|
|
7
|
-
import { Title, TitleLevels } from "../title";
|
|
8
|
-
import { hashClass } from "../../helpers";
|
|
9
|
-
import clsx from "clsx";
|
|
10
|
-
import { useTrilogyContext } from "../../context";
|
|
11
|
-
/**
|
|
12
|
-
* Notification Component
|
|
13
|
-
* @param hasIcon {boolean} Display icon, default true
|
|
14
|
-
* @param iconName {IconName} Custom icon
|
|
15
|
-
* @param title {string} Notification title content
|
|
16
|
-
* @param description {string|ReactNode} Notification description content
|
|
17
|
-
* @param alert {AlertState} Alert Variant (INFO|SUCCESS|WARNING|ERROR)
|
|
18
|
-
* @param buttonClick {ClickEvent} Click event for button
|
|
19
|
-
* @param buttonContent {string} Button content
|
|
20
|
-
* @param arrow {boolean} Notification with right arrow on right side (Uses only if not button content)
|
|
21
|
-
* @param info (boolean) Small info notification use it without button and arrow
|
|
22
|
-
* @param onClick {Function} onClick Event for all notification
|
|
23
|
-
* @param children {React.ReactNode}
|
|
24
|
-
* @param closable {Function} onClick Event on cross icon
|
|
25
|
-
* * - -------------------------- WEB PROPERTIES -------------------------------
|
|
26
|
-
* @param banner {boolean} Banner notification
|
|
27
|
-
* @param className {string} Additionnal CSS Classes
|
|
28
|
-
* @param iconClassname {string} Additionnal Icon CSS
|
|
29
|
-
* @param buttonMarkup {ButtonMarkup} Custom markup for button
|
|
30
|
-
* * - -------------------------- NATIVE PROPERTIES -------------------------------
|
|
31
|
-
* @param deletable {Function} onClick Event on delete icon or slide over ()
|
|
32
|
-
* @param unread {boolean} only with notification deletable if notification is unread
|
|
33
|
-
*/
|
|
34
|
-
const Notification = ({ className, hasIcon = true, iconClassname, iconName, title, description, alert, buttonContent, buttonClick, buttonMarkup, arrow, info, banner, onClick, closable, testId, ...others }) => {
|
|
35
|
-
const { styled } = useTrilogyContext();
|
|
36
|
-
const classes = hashClass(styled, clsx("notification", has("body"), !buttonContent && !arrow && info != null && is("small"), banner &&
|
|
37
|
-
!buttonContent &&
|
|
38
|
-
!arrow &&
|
|
39
|
-
!info && [is("banner"), !description && has("description")], description && has("description"), !!alert &&
|
|
40
|
-
(!info || (alert !== AlertState.INFO && info)) &&
|
|
41
|
-
is(getAlertClassName(alert)), className));
|
|
42
|
-
const _iconNotif = React.useMemo(() => {
|
|
43
|
-
var _a;
|
|
44
|
-
if (iconName != null)
|
|
45
|
-
return iconName;
|
|
46
|
-
else if (info)
|
|
47
|
-
return (_a = getAlertIconName(alert)) !== null && _a !== void 0 ? _a : IconName.INFOS_CIRCLE;
|
|
48
|
-
else
|
|
49
|
-
return IconName.BELL;
|
|
50
|
-
}, [iconName, info, alert]);
|
|
51
|
-
return (React.createElement("div", { "data-testid": testId, onClick: (e) => {
|
|
52
|
-
// eslint-disable-next-line no-unused-expressions
|
|
53
|
-
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
54
|
-
e.stopPropagation();
|
|
55
|
-
}, className: classes, ...others },
|
|
56
|
-
hasIcon && React.createElement(Icon, { className: iconClassname, name: _iconNotif }),
|
|
57
|
-
React.createElement("div", { className: hashClass(styled, clsx("body")) },
|
|
58
|
-
title && typeof title.valueOf() === "string" ? (React.createElement(Title, { level: TitleLevels.THREE }, title)) : (title),
|
|
59
|
-
description && typeof description.valueOf() === "string" ? (React.createElement(Text, null, description)) : (description)),
|
|
60
|
-
buttonContent && !arrow && (React.createElement("div", { className: hashClass(styled, clsx("call-to-action")) },
|
|
61
|
-
React.createElement(Button, { variant: "PRIMARY", markup: buttonMarkup, onClick: buttonClick }, buttonContent))),
|
|
62
|
-
arrow && !buttonContent && (React.createElement("div", { onClick: buttonClick, className: hashClass(styled, clsx("call-to-action")) },
|
|
63
|
-
React.createElement(Icon, { name: IconName.ARROW_RIGHT, size: IconSize.SMALL }))),
|
|
64
|
-
closable && !buttonContent && (React.createElement("div", { "data-testid": `${testId}_close_button`, role: "button", onClick: closable, className: hashClass(styled, clsx("call-to-action")) },
|
|
65
|
-
React.createElement(Icon, { name: IconName.TIMES, size: IconSize.SMALL })))));
|
|
66
|
-
};
|
|
67
|
-
export default Notification;
|
|
68
|
-
//# sourceMappingURL=Notification.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Notification.js","sourceRoot":"","sources":["../../../components/notification/Notification.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,gBAAgB,GAAG,MAAM,4BAA4B,CAAA;AAC7F,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,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SAAS,EAClB,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,WAAW,IAEnB,aAAa,CACP,CACL,CACP;QACA,KAAK,IAAI,CAAC,aAAa,IAAI,CAC1B,6BACE,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;YAEpD,oBAAC,IAAI,IAAC,IAAI,EAAE,QAAQ,CAAC,WAAW,EAAE,IAAI,EAAE,QAAQ,CAAC,KAAK,GAAI,CACtD,CACP;QACA,QAAQ,IAAI,CAAC,aAAa,IAAI,CAC7B,4CACe,GAAG,MAAM,eAAe,EACrC,IAAI,EAAE,QAAQ,EACd,OAAO,EAAE,QAAQ,EACjB,SAAS,EAAE,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;YAEpD,oBAAC,IAAI,IAAC,IAAI,EAAE,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAC,KAAK,GAAI,CAChD,CACP,CACG,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,YAAY,CAAA"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { NotificationProps } from "./NotificationProps";
|
|
3
|
-
import { ComponentName } from "../enumsComponentsName";
|
|
4
|
-
/**
|
|
5
|
-
* Notification Component
|
|
6
|
-
* @param hasIcon {boolean} Display icon, default true
|
|
7
|
-
* @param iconName {IconName} Custom icon
|
|
8
|
-
* @param title {string} Notification title content
|
|
9
|
-
* @param description {string|ReactNode} Notification description content
|
|
10
|
-
* @param alert {AlertState} Alert Variant (INFO|SUCCESS|WARNING|ERROR)
|
|
11
|
-
* @param buttonClick {ClickEvent} Click event for button
|
|
12
|
-
* @param buttonContent {string} Button content
|
|
13
|
-
* @param arrow {boolean} Notification with right arrow on right side (Uses only if not button content)
|
|
14
|
-
* @param infoinfo (boolean) Small info notification use it without button and arrow
|
|
15
|
-
* @param onClick {Function} onClick Event for all notification
|
|
16
|
-
* @param children {React.ReactNode}
|
|
17
|
-
* @param closable {Function} onClick Event on cross icon
|
|
18
|
-
* @param deletable {Function | boolean} onClick Event on delete icon or slide over (), pass true if you want deletable style without swipe
|
|
19
|
-
* @param read {boolean} only with notification deletable if notification is unread
|
|
20
|
-
*/
|
|
21
|
-
declare const Notification: {
|
|
22
|
-
({ hasIcon, iconName, title, description, alert, buttonContent, buttonClick, arrow, info, onClick, closable, deletable, read, ...others }: NotificationProps): JSX.Element;
|
|
23
|
-
displayName: ComponentName;
|
|
24
|
-
};
|
|
25
|
-
export default Notification;
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { StyleSheet, TouchableOpacity } from "react-native";
|
|
3
|
-
import { Columns, ColumnsItem } from "../columns";
|
|
4
|
-
import { Button } from "../button";
|
|
5
|
-
import { View } from "../view";
|
|
6
|
-
import { Text, TextLevels } from "../text";
|
|
7
|
-
import { IconName } from "../icon/IconNameEnum";
|
|
8
|
-
import { AlertState, getAlertIconName } from "../../objects/facets/Alert";
|
|
9
|
-
import { getColorStyle, TrilogyColor } from "../../objects/facets/Color";
|
|
10
|
-
import { getInfoColorStyle } from "./NotificationEnum";
|
|
11
|
-
import DeletableNotification from "./deletable";
|
|
12
|
-
import { Icon, IconSize } from "../icon";
|
|
13
|
-
import { TypographyBold } from "../../objects";
|
|
14
|
-
import { ComponentName } from "../enumsComponentsName";
|
|
15
|
-
/**
|
|
16
|
-
* Notification Component
|
|
17
|
-
* @param hasIcon {boolean} Display icon, default true
|
|
18
|
-
* @param iconName {IconName} Custom icon
|
|
19
|
-
* @param title {string} Notification title content
|
|
20
|
-
* @param description {string|ReactNode} Notification description content
|
|
21
|
-
* @param alert {AlertState} Alert Variant (INFO|SUCCESS|WARNING|ERROR)
|
|
22
|
-
* @param buttonClick {ClickEvent} Click event for button
|
|
23
|
-
* @param buttonContent {string} Button content
|
|
24
|
-
* @param arrow {boolean} Notification with right arrow on right side (Uses only if not button content)
|
|
25
|
-
* @param infoinfo (boolean) Small info notification use it without button and arrow
|
|
26
|
-
* @param onClick {Function} onClick Event for all notification
|
|
27
|
-
* @param children {React.ReactNode}
|
|
28
|
-
* @param closable {Function} onClick Event on cross icon
|
|
29
|
-
* @param deletable {Function | boolean} onClick Event on delete icon or slide over (), pass true if you want deletable style without swipe
|
|
30
|
-
* @param read {boolean} only with notification deletable if notification is unread
|
|
31
|
-
*/
|
|
32
|
-
const Notification = ({ hasIcon = true, iconName, title, description, alert, buttonContent, buttonClick, arrow, info, onClick, closable, deletable, read, ...others }) => {
|
|
33
|
-
const backgroundColor = getColorStyle(TrilogyColor.BACKGROUND);
|
|
34
|
-
const defaultIconSize = IconSize.SMALL;
|
|
35
|
-
/*
|
|
36
|
-
const fontColor = getAlertStyle(alert) || getColorStyle(TrilogyColor.MAIN)
|
|
37
|
-
*/
|
|
38
|
-
const infoColor = getInfoColorStyle(alert) || getInfoColorStyle(AlertState.INFO);
|
|
39
|
-
const infoFontColor = TrilogyColor.MAIN;
|
|
40
|
-
const styles = StyleSheet.create({
|
|
41
|
-
container: {
|
|
42
|
-
width: "100%",
|
|
43
|
-
paddingTop: 16,
|
|
44
|
-
paddingBottom: 16,
|
|
45
|
-
backgroundColor: backgroundColor,
|
|
46
|
-
paddingLeft: 16,
|
|
47
|
-
paddingRight: 16,
|
|
48
|
-
alignItems: "center",
|
|
49
|
-
justifyContent: "center",
|
|
50
|
-
borderRadius: 6,
|
|
51
|
-
shadowColor: "#000",
|
|
52
|
-
shadowOffset: {
|
|
53
|
-
width: 0,
|
|
54
|
-
height: 1,
|
|
55
|
-
},
|
|
56
|
-
shadowOpacity: 0.33,
|
|
57
|
-
shadowRadius: 2.22,
|
|
58
|
-
elevation: 1,
|
|
59
|
-
},
|
|
60
|
-
notification: {
|
|
61
|
-
paddingTop: (description && 4) || 0,
|
|
62
|
-
paddingLeft: 16,
|
|
63
|
-
paddingRight: 16,
|
|
64
|
-
alignItems: "center",
|
|
65
|
-
justifyContent: "center",
|
|
66
|
-
},
|
|
67
|
-
shadow: {},
|
|
68
|
-
icon: {
|
|
69
|
-
justifyContent: "center",
|
|
70
|
-
alignItems: "center",
|
|
71
|
-
position: (arrow && "absolute") || "relative",
|
|
72
|
-
},
|
|
73
|
-
description: {
|
|
74
|
-
justifyContent: "center",
|
|
75
|
-
alignItems: "center",
|
|
76
|
-
paddingTop: 4,
|
|
77
|
-
color: getColorStyle(TrilogyColor.MAIN),
|
|
78
|
-
textAlignVertical: "center",
|
|
79
|
-
},
|
|
80
|
-
buttonContainer: {
|
|
81
|
-
width: "100%",
|
|
82
|
-
paddingTop: 17,
|
|
83
|
-
paddingBottom: 17,
|
|
84
|
-
backgroundColor: backgroundColor,
|
|
85
|
-
paddingLeft: 12,
|
|
86
|
-
paddingRight: 12,
|
|
87
|
-
alignItems: "center",
|
|
88
|
-
justifyContent: "center",
|
|
89
|
-
textAlignVertical: "center",
|
|
90
|
-
},
|
|
91
|
-
button: {
|
|
92
|
-
justifyContent: "center",
|
|
93
|
-
alignItems: "center",
|
|
94
|
-
},
|
|
95
|
-
info: {
|
|
96
|
-
width: "100%",
|
|
97
|
-
paddingTop: 10,
|
|
98
|
-
paddingBottom: 10,
|
|
99
|
-
backgroundColor: infoColor,
|
|
100
|
-
borderRadius: 6,
|
|
101
|
-
alignItems: "baseline",
|
|
102
|
-
paddingLeft: 12,
|
|
103
|
-
paddingRight: 12,
|
|
104
|
-
},
|
|
105
|
-
});
|
|
106
|
-
let notificationView;
|
|
107
|
-
if (info && title) {
|
|
108
|
-
notificationView = (
|
|
109
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
110
|
-
React.createElement(View, { style: [styles.info, others.style] },
|
|
111
|
-
React.createElement(Columns, null,
|
|
112
|
-
hasIcon && (React.createElement(ColumnsItem, { size: 1 },
|
|
113
|
-
React.createElement(Icon, { style: styles.icon, name: iconName ? iconName : getAlertIconName(alert) }))),
|
|
114
|
-
closable ? (React.createElement(React.Fragment, null,
|
|
115
|
-
React.createElement(ColumnsItem, { size: hasIcon ? 10 : 11 },
|
|
116
|
-
React.createElement(Text, { typo: TypographyBold.TEXT_WEIGHT_SEMIBOLD, level: TextLevels.ONE }, title)),
|
|
117
|
-
React.createElement(ColumnsItem, { size: 1 },
|
|
118
|
-
React.createElement(TouchableOpacity, { onPress: closable, activeOpacity: 0.85 },
|
|
119
|
-
React.createElement(Icon, { style: styles.icon, name: IconName.TIMES, size: defaultIconSize, color: infoFontColor }))))) : (React.createElement(ColumnsItem, { size: hasIcon ? 11 : 12 },
|
|
120
|
-
React.createElement(Text, { typo: TypographyBold.TEXT_WEIGHT_SEMIBOLD, level: TextLevels.ONE }, title)))),
|
|
121
|
-
description && (React.createElement(Columns, null,
|
|
122
|
-
hasIcon && React.createElement(ColumnsItem, { size: 1 }),
|
|
123
|
-
React.createElement(ColumnsItem, { size: hasIcon ? 11 : 12 }, typeof description.valueOf() === "string" ? (React.createElement(Text, { level: TextLevels.TWO, style: styles.description }, description)) : (description))))));
|
|
124
|
-
}
|
|
125
|
-
else if (description && !title && info) {
|
|
126
|
-
return (
|
|
127
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
128
|
-
React.createElement(View, { style: [styles.info, others.style] },
|
|
129
|
-
React.createElement(View, { style: { width: "90%" } }, typeof description.valueOf() === "string" ? (React.createElement(Text, { level: TextLevels.TWO, style: styles.description }, description)) : (description))));
|
|
130
|
-
}
|
|
131
|
-
else if (arrow && title) {
|
|
132
|
-
notificationView = (React.createElement(View, { style: [styles.buttonContainer, styles.container], ...others },
|
|
133
|
-
React.createElement(View, { style: [styles.notification] },
|
|
134
|
-
React.createElement(Columns, null,
|
|
135
|
-
hasIcon && (React.createElement(ColumnsItem, { verticalCenter: true, size: 1 },
|
|
136
|
-
React.createElement(Icon, { style: styles.icon, name: iconName !== null && iconName !== void 0 ? iconName : IconName.BELL, size: defaultIconSize }))),
|
|
137
|
-
title && (React.createElement(ColumnsItem, { verticalCenter: true, size: hasIcon ? 10 : 11 },
|
|
138
|
-
React.createElement(Text, { level: TextLevels.ONE }, title))),
|
|
139
|
-
arrow && (React.createElement(ColumnsItem, { verticalCenter: true, size: 1 },
|
|
140
|
-
React.createElement(Icon, { onClick: (e) => buttonClick && buttonClick(e), style: styles.icon, name: IconName.ARROW_RIGHT, size: defaultIconSize })))))));
|
|
141
|
-
}
|
|
142
|
-
else if (buttonContent && title) {
|
|
143
|
-
notificationView = (React.createElement(View, { style: [styles.buttonContainer, styles.container], ...others },
|
|
144
|
-
React.createElement(View, { style: [styles.notification] },
|
|
145
|
-
React.createElement(Columns, null,
|
|
146
|
-
hasIcon && (React.createElement(ColumnsItem, { verticalCenter: true, size: 1 },
|
|
147
|
-
React.createElement(Icon, { style: styles.icon, name: iconName !== null && iconName !== void 0 ? iconName : IconName.BELL, size: defaultIconSize }))),
|
|
148
|
-
title && (React.createElement(ColumnsItem, { verticalCenter: true, size: hasIcon ? 5 : 6 },
|
|
149
|
-
React.createElement(Text, { level: TextLevels.ONE }, title))),
|
|
150
|
-
buttonContent && (React.createElement(ColumnsItem, { size: 3 },
|
|
151
|
-
React.createElement(View, { style: styles.button },
|
|
152
|
-
React.createElement(Button, { onClick: buttonClick, variant: "PRIMARY" }, buttonContent))))))));
|
|
153
|
-
}
|
|
154
|
-
else if (deletable) {
|
|
155
|
-
notificationView = (React.createElement(DeletableNotification, { title: title && title, iconName: iconName, deletable: deletable, read: read }));
|
|
156
|
-
}
|
|
157
|
-
else {
|
|
158
|
-
notificationView = (React.createElement(View, { style: [styles.container, styles.shadow], ...others },
|
|
159
|
-
React.createElement(View, { style: [styles.notification, styles.shadow] },
|
|
160
|
-
React.createElement(Columns, null,
|
|
161
|
-
hasIcon && (React.createElement(ColumnsItem, { size: 1 },
|
|
162
|
-
React.createElement(Icon, { style: styles.icon, name: iconName !== null && iconName !== void 0 ? iconName : IconName.BELL, size: defaultIconSize }))),
|
|
163
|
-
title && (React.createElement(ColumnsItem, { size: hasIcon ? 9 : 10 },
|
|
164
|
-
React.createElement(Text, { level: TextLevels.ONE }, title)))),
|
|
165
|
-
description && (React.createElement(Columns, null,
|
|
166
|
-
hasIcon && React.createElement(ColumnsItem, { size: 1 }),
|
|
167
|
-
React.createElement(ColumnsItem, { size: hasIcon ? 9 : 10 },
|
|
168
|
-
React.createElement(Text, { level: TextLevels.TWO, style: styles.description }, description)))))));
|
|
169
|
-
}
|
|
170
|
-
return onClick ? (React.createElement(View, { style: styles.shadow },
|
|
171
|
-
React.createElement(TouchableOpacity, { onPress: onClick, activeOpacity: 0.85 }, notificationView))) : (notificationView);
|
|
172
|
-
};
|
|
173
|
-
Notification.displayName = ComponentName.Notification;
|
|
174
|
-
export default Notification;
|
|
175
|
-
//# sourceMappingURL=Notification.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Notification.native.js","sourceRoot":"","sources":["../../../components/notification/Notification.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AACzE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,qBAAqB,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,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AAG,EAAE,KAAK,EAAE,MAAM,CAAC,WAAW,IACnD,WAAW,CACP,CACK,CACN,CACX,CACI,CACF,CACR,CAAA;KACF;IAED,OAAO,OAAO,CAAC,CAAC,CAAC,CACf,oBAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,MAAM;QACxB,oBAAC,gBAAgB,IAAC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,IACpD,gBAAgB,CACA,CACd,CACR,CAAC,CAAC,CAAC,CACF,gBAAgB,CACjB,CAAA;AACH,CAAC,CAAA;AAED,YAAY,CAAC,WAAW,GAAG,aAAa,CAAC,YAAY,CAAA;AAErD,eAAe,YAAY,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getInfoColorStyle: (InfoColor?: string) => string;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { getColorStyle } from "../../objects/facets";
|
|
2
|
-
export const getInfoColorStyle = (InfoColor) => {
|
|
3
|
-
switch (InfoColor) {
|
|
4
|
-
case "SUCCESS":
|
|
5
|
-
return getColorStyle("SUCCESS", 1);
|
|
6
|
-
case "INFO":
|
|
7
|
-
return getColorStyle("INFO", 1);
|
|
8
|
-
case "WARNING":
|
|
9
|
-
return getColorStyle("WARNING", 1);
|
|
10
|
-
case "ERROR":
|
|
11
|
-
return getColorStyle("ERROR", 1);
|
|
12
|
-
default:
|
|
13
|
-
return "";
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=NotificationEnum.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationEnum.js","sourceRoot":"","sources":["../../../components/notification/NotificationEnum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEpD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,SAAkB,EAAU,EAAE;IAC9D,QAAQ,SAAS,EAAE;QACjB,KAAK,SAAS;YACZ,OAAO,aAAa,CAAC,SAAS,EAAE,CAAC,CAAC,CAAA;QACpC,KAAK,MAAM;YACT,OAAO,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;QACjC,KAAK,SAAS;YACZ,OAAO,aAAa,CAAC,SAAS,EAAE,CAAC,CAAC,CAAA;QACpC,KAAK,OAAO;YACV,OAAO,aAAa,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA;QAClC;YACE,OAAO,EAAE,CAAA;KACZ;AACH,CAAC,CAAA"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Clickable } from './../../objects/facets/Clickable';
|
|
3
|
-
import { ClickEvent } from '../../events/OnClickEvent';
|
|
4
|
-
import { Accessibility, AlertProps } from '../../objects/facets';
|
|
5
|
-
import { ButtonMarkup, ButtonMarkupValues } from '../button';
|
|
6
|
-
import { IconName, IconNameValues } from '../icon/IconNameEnum';
|
|
7
|
-
/**
|
|
8
|
-
* Notification Interface
|
|
9
|
-
*/
|
|
10
|
-
export interface NotificationProps extends AlertProps, Clickable, Accessibility {
|
|
11
|
-
children?: React.ReactNode;
|
|
12
|
-
hasIcon?: boolean;
|
|
13
|
-
iconName?: IconName | IconNameValues;
|
|
14
|
-
title?: string | React.ReactNode;
|
|
15
|
-
description?: string | React.ReactNode;
|
|
16
|
-
info?: boolean;
|
|
17
|
-
deletable?: ClickEvent | boolean;
|
|
18
|
-
read?: boolean;
|
|
19
|
-
buttonContent?: string;
|
|
20
|
-
buttonClick?: ClickEvent;
|
|
21
|
-
arrow?: boolean;
|
|
22
|
-
banner?: boolean;
|
|
23
|
-
className?: string;
|
|
24
|
-
iconClassname?: string;
|
|
25
|
-
buttonMarkup?: ButtonMarkup | ButtonMarkupValues;
|
|
26
|
-
closable?: ClickEvent;
|
|
27
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationProps.js","sourceRoot":"","sources":["../../../components/notification/NotificationProps.ts"],"names":[],"mappings":""}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { DeletableNotificationProps } from "./DeletableNotificationProps";
|
|
3
|
-
/**
|
|
4
|
-
* Deletable Notification
|
|
5
|
-
* @param iconName {IconName} Icon Name Type
|
|
6
|
-
* @param title {string} Deletable notification title
|
|
7
|
-
* @param deletable {ClickEvent} Click event
|
|
8
|
-
* @param read {boolean} If notification has been read
|
|
9
|
-
*/
|
|
10
|
-
declare const DeletableNotification: ({ iconName, title, deletable, read, }: DeletableNotificationProps) => JSX.Element;
|
|
11
|
-
export default DeletableNotification;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
/**
|
|
4
|
-
* Deletable Notification
|
|
5
|
-
* @param iconName {IconName} Icon Name Type
|
|
6
|
-
* @param title {string} Deletable notification title
|
|
7
|
-
* @param deletable {ClickEvent} Click event
|
|
8
|
-
* @param read {boolean} If notification has been read
|
|
9
|
-
*/
|
|
10
|
-
const DeletableNotification = ({ iconName, title, deletable, read, }) => {
|
|
11
|
-
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
12
|
-
return React.createElement(React.Fragment, null);
|
|
13
|
-
};
|
|
14
|
-
export default DeletableNotification;
|
|
15
|
-
//# sourceMappingURL=DeletableNotification.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DeletableNotification.js","sourceRoot":"","sources":["../../../../components/notification/deletable/DeletableNotification.tsx"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B;;;;;;GAMG;AACH,MAAM,qBAAqB,GAAG,CAAC,EAC7B,QAAQ,EACR,KAAK,EACL,SAAS,EACT,IAAI,GACuB,EAAe,EAAE;IAC5C,yDAAyD;IACzD,OAAO,yCAAK,CAAA;AACd,CAAC,CAAA;AAED,eAAe,qBAAqB,CAAA"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { DeletableNotificationProps } from "./DeletableNotificationProps";
|
|
3
|
-
import { ComponentName } from "../../enumsComponentsName";
|
|
4
|
-
/**
|
|
5
|
-
* Deletable Notification
|
|
6
|
-
* @param iconName {IconName} Icon Name Type
|
|
7
|
-
* @param title {string} Deletable notification title
|
|
8
|
-
* @param deletable {ClickEvent | boolean} Click event, pass true if you want deletable style without swipe
|
|
9
|
-
* @param read {boolean} If notification has been read
|
|
10
|
-
*/
|
|
11
|
-
declare const DeletableNotification: {
|
|
12
|
-
({ iconName, title, deletable, read, }: DeletableNotificationProps): JSX.Element;
|
|
13
|
-
displayName: ComponentName;
|
|
14
|
-
};
|
|
15
|
-
export default DeletableNotification;
|