@trilogy-ds/react 0.0.1-beta-77 → 0.0.1-beta-80
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/accordion/item/AccordionItem.native.js +4 -4
- package/lib/components/accordion/item/AccordionItem.native.js.map +1 -1
- package/lib/components/alert/Alert.js +1 -1
- package/lib/components/alert/Alert.js.map +1 -1
- package/lib/components/alert/Alert.native.js +6 -8
- package/lib/components/alert/Alert.native.js.map +1 -1
- package/lib/components/autolayout/AutoLayout.native.js +1 -1
- package/lib/components/autolayout/AutoLayout.native.js.map +1 -1
- package/lib/components/autolayout/DefaultSpacingMatrix.js +31 -74
- package/lib/components/autolayout/DefaultSpacingMatrix.js.map +1 -1
- package/lib/components/badge/Badge.d.ts +2 -2
- package/lib/components/badge/Badge.js +5 -6
- package/lib/components/badge/Badge.js.map +1 -1
- package/lib/components/badge/Badge.native.d.ts +2 -2
- package/lib/components/badge/Badge.native.js +5 -6
- package/lib/components/badge/Badge.native.js.map +1 -1
- package/lib/components/badge/BadgeEnum.d.ts +0 -5
- package/lib/components/badge/BadgeEnum.js +0 -5
- package/lib/components/badge/BadgeEnum.js.map +1 -1
- package/lib/components/badge/BadgeProps.d.ts +1 -2
- package/lib/components/badge/BadgePropsDefaults.js +4 -6
- package/lib/components/box/Box.native.js +5 -6
- package/lib/components/box/Box.native.js.map +1 -1
- package/lib/components/box/BoxPropsDefaults.js +28 -41
- package/lib/components/box/content/BoxContent.native.js +2 -4
- package/lib/components/box/content/BoxContent.native.js.map +1 -1
- package/lib/components/box/content/BoxContentPropsDefaults.js +14 -21
- package/lib/components/box/footer/BoxFooterPropsDefaults.js +14 -20
- package/lib/components/box/header/BoxHeaderPropsDefaults.js +14 -20
- package/lib/components/button/Button.native.js +13 -13
- package/lib/components/button/Button.native.js.map +1 -1
- package/lib/components/button/list/ButtonList.native.js +4 -4
- package/lib/components/button/list/ButtonList.native.js.map +1 -1
- package/lib/components/card/Card.native.js +6 -7
- package/lib/components/card/Card.native.js.map +1 -1
- package/lib/components/card/CardPropsDefaults.js +14 -21
- package/lib/components/card/content/CardContent.native.js +3 -3
- package/lib/components/card/content/CardContentPropsDefaults.js +16 -22
- package/lib/components/card/image/CardImage.native.js +10 -8
- package/lib/components/card/image/CardImage.native.js.map +1 -1
- package/lib/components/checkbox/Checkbox.native.js +8 -8
- package/lib/components/checkbox/Checkbox.native.js.map +1 -1
- package/lib/components/chips/Chips.native.js +4 -4
- package/lib/components/chips/Chips.native.js.map +1 -1
- package/lib/components/container/Container.native.js +4 -4
- package/lib/components/container/Container.native.js.map +1 -1
- package/lib/components/container/ContainerPropsDefaults.js +14 -21
- package/lib/components/countdown/Countdown.native.js +2 -2
- package/lib/components/countdown/Countdown.native.js.map +1 -1
- package/lib/components/divider/Divider.native.js +3 -3
- package/lib/components/divider/Divider.native.js.map +1 -1
- package/lib/components/divider/DividerPropsDefaults.js +42 -60
- package/lib/components/hero/Hero.native.js +6 -6
- package/lib/components/hero/Hero.native.js.map +1 -1
- package/lib/components/hero/HeroPropsDefaults.js +14 -21
- package/lib/components/icon/Icon.js +1 -1
- package/lib/components/icon/Icon.js.map +1 -1
- package/lib/components/icon/Icon.native.js +1 -1
- package/lib/components/icon/IconPropsDefaults.js +17 -23
- package/lib/components/icon/circle/CircleIconPropsDefaults.js +17 -23
- package/lib/components/icon/text/TextIconPropsDefaults.js +3 -3
- package/lib/components/input/Input.native.js +11 -11
- package/lib/components/input/Input.native.js.map +1 -1
- package/lib/components/input/autocomplete/menu/AutoCompleteMenu.native.js +1 -1
- package/lib/components/input/autocomplete/menu/AutoCompleteMenu.native.js.map +1 -1
- package/lib/components/input/gauge/InputGauge.native.js +1 -1
- package/lib/components/input/gauge/InputGauge.native.js.map +1 -1
- package/lib/components/input/gauge/hook/useGauge.js +1 -1
- package/lib/components/link/Link.native.js +10 -9
- package/lib/components/link/Link.native.js.map +1 -1
- package/lib/components/link/LinkPropsDefaults.js +4 -4
- package/lib/components/list/item/ListItem.native.js +1 -1
- package/lib/components/otp/Otp.js.map +1 -1
- package/lib/components/otp/Otp.native.js +2 -2
- package/lib/components/otp/Otp.native.js.map +1 -1
- package/lib/components/price/Price.d.ts +3 -3
- package/lib/components/price/Price.js +27 -8
- package/lib/components/price/Price.js.map +1 -1
- package/lib/components/price/Price.native.d.ts +2 -2
- package/lib/components/price/Price.native.js +128 -87
- package/lib/components/price/Price.native.js.map +1 -1
- package/lib/components/price/PriceEnum.d.ts +8 -8
- package/lib/components/price/PriceEnum.js +7 -7
- package/lib/components/price/PriceEnum.js.map +1 -1
- package/lib/components/price/PriceProps.d.ts +2 -2
- package/lib/components/price/PricePropsDefaults.js +5 -13
- package/lib/components/progress/Progress.native.js +3 -3
- package/lib/components/progress/Progress.native.js.map +1 -1
- package/lib/components/progress/radial/ProgressRadial.js +1 -1
- package/lib/components/progress/radial/ProgressRadial.js.map +1 -1
- package/lib/components/progress/radial/ProgressRadial.native.js +5 -7
- package/lib/components/progress/radial/ProgressRadial.native.js.map +1 -1
- package/lib/components/progress/radial/item/ProgressRadialItemPropsDefaults.js +7 -10
- package/lib/components/radio/Radio.native.js +12 -11
- package/lib/components/radio/Radio.native.js.map +1 -1
- package/lib/components/radio/list/RadioList.native.js +4 -4
- package/lib/components/radio/list/RadioList.native.js.map +1 -1
- package/lib/components/range/Range.js +1 -1
- package/lib/components/range/Range.js.map +1 -1
- package/lib/components/rows/Rows.native.js.map +1 -1
- package/lib/components/scroll-view/ScrollViewPropsDefaults.js +14 -20
- package/lib/components/section/Section.js.map +1 -1
- package/lib/components/section/Section.native.js +2 -2
- package/lib/components/section/Section.native.js.map +1 -1
- package/lib/components/section/SectionPropsDefaults.js +14 -21
- package/lib/components/segment-control/SegmentControl.native.js +1 -1
- package/lib/components/segment-control/SegmentControl.native.js.map +1 -1
- package/lib/components/segment-control/item/SegmentControlItem.native.js +2 -2
- package/lib/components/segment-control/item/SegmentControlItem.native.js.map +1 -1
- package/lib/components/select/option/SelectOption.native.js +1 -1
- package/lib/components/select/option/SelectOption.native.js.map +1 -1
- package/lib/components/selector/item/SelectorItem.native.js +1 -1
- package/lib/components/selector/item/SelectorItem.native.js.map +1 -1
- package/lib/components/spacer/Spacer.d.ts +1 -1
- package/lib/components/spacer/Spacer.js +1 -1
- package/lib/components/spacer/Spacer.native.d.ts +1 -2
- package/lib/components/spacer/Spacer.native.js +1 -2
- package/lib/components/spacer/Spacer.native.js.map +1 -1
- package/lib/components/spacer/SpacerEnum.d.ts +11 -6
- package/lib/components/spacer/SpacerEnum.js +11 -7
- package/lib/components/spacer/SpacerEnum.js.map +1 -1
- package/lib/components/spacer/SpacerPropsDefaults.js +21 -6
- package/lib/components/stepper/Stepper.native.js +1 -2
- package/lib/components/stepper/Stepper.native.js.map +1 -1
- package/lib/components/stepper/step/StepperStep.native.js +1 -1
- package/lib/components/stepper/step/StepperStep.native.js.map +1 -1
- package/lib/components/switch/Switch.native.js +3 -4
- package/lib/components/switch/Switch.native.js.map +1 -1
- package/lib/components/table/Table.native.js +1 -1
- package/lib/components/table/Table.native.js.map +1 -1
- package/lib/components/table/body/TableBodyPropsDefaults.js +28 -40
- package/lib/components/table/head/TableHeadPropsDefaults.js +28 -40
- package/lib/components/table/td/TableTd.native.js +2 -2
- package/lib/components/table/td/TableTd.native.js.map +1 -1
- package/lib/components/table/th/TableTh.native.js +2 -2
- package/lib/components/table/th/TableTh.native.js.map +1 -1
- package/lib/components/table/tr/TableTr.native.js +1 -1
- package/lib/components/table/tr/TableTr.native.js.map +1 -1
- package/lib/components/table/tr/TableTrPropsWebDefaults.js +14 -20
- package/lib/components/tabs/TabsPropsDefaults.js +2 -2
- package/lib/components/tabs/item/TabsItem.native.js +1 -1
- package/lib/components/tag/Tag.native.js +3 -2
- package/lib/components/tag/Tag.native.js.map +1 -1
- package/lib/components/text/Text.native.js +9 -8
- package/lib/components/text/Text.native.js.map +1 -1
- package/lib/components/text/TextEnum.d.ts +5 -5
- package/lib/components/text/TextEnum.js +4 -4
- package/lib/components/text/TextEnum.js.map +1 -1
- package/lib/components/text/TextPropsDefaults.js +4 -8
- package/lib/components/textarea/Textarea.native.js +11 -11
- package/lib/components/textarea/Textarea.native.js.map +1 -1
- package/lib/components/timeline/content/TimelineContent.native.js +1 -1
- package/lib/components/timeline/marker/TimelineMarker.native.js +5 -5
- package/lib/components/timeline/marker/TimelineMarker.native.js.map +1 -1
- package/lib/components/title/Title.native.js +10 -9
- package/lib/components/title/Title.native.js.map +1 -1
- package/lib/components/title/TitleEnum.d.ts +7 -7
- package/lib/components/title/TitleEnum.js +6 -6
- package/lib/components/title/TitleEnum.js.map +1 -1
- package/lib/components/title/TitlePropsDefaults.js +6 -12
- package/lib/components/view/ViewPropsDefaults.js +14 -21
- package/lib/objects/Typography/TypographyColor.js +18 -18
- package/lib/objects/Typography/TypographyColor.js.map +1 -1
- package/lib/objects/atoms/Background.d.ts +2 -17
- package/lib/objects/atoms/Background.js +1 -17
- package/lib/objects/atoms/Background.js.map +1 -1
- package/lib/objects/facets/Color.d.ts +8 -11
- package/lib/objects/facets/Color.js +29 -32
- package/lib/objects/facets/Color.js.map +1 -1
- package/lib/objects/facets/Status.d.ts +29 -2
- package/lib/objects/facets/Status.js +14 -14
- package/lib/objects/facets/Status.js.map +1 -1
- package/lib/objects/facets/Variant.js +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/lib/components/toaster/Toaster.d.ts +0 -11
- package/lib/components/toaster/Toaster.js +0 -93
- package/lib/components/toaster/Toaster.js.map +0 -1
- package/lib/components/toaster/Toaster.native.d.ts +0 -15
- package/lib/components/toaster/Toaster.native.js +0 -93
- package/lib/components/toaster/Toaster.native.js.map +0 -1
- package/lib/components/toaster/ToasterEnum.d.ts +0 -1
- package/lib/components/toaster/ToasterEnum.js +0 -16
- package/lib/components/toaster/ToasterEnum.js.map +0 -1
- package/lib/components/toaster/ToasterProps.d.ts +0 -27
- package/lib/components/toaster/ToasterProps.js +0 -6
- package/lib/components/toaster/ToasterProps.js.map +0 -1
- package/lib/components/toaster/ToasterPropsDefaults.js +0 -227
- package/lib/components/toaster/context/ToastConfigDefaults.js +0 -24
- package/lib/components/toaster/context/ToastPropsDefaults.js +0 -129
- package/lib/components/toaster/context/ToasterContext.d.ts +0 -7
- package/lib/components/toaster/context/ToasterContext.js +0 -8
- package/lib/components/toaster/context/ToasterContext.js.map +0 -1
- package/lib/components/toaster/context/ToasterContextProps.d.ts +0 -27
- package/lib/components/toaster/context/ToasterContextProps.js +0 -2
- package/lib/components/toaster/context/ToasterContextProps.js.map +0 -1
- package/lib/components/toaster/context/index.d.ts +0 -2
- package/lib/components/toaster/context/index.js +0 -3
- package/lib/components/toaster/context/index.js.map +0 -1
- package/lib/components/toaster/index.d.ts +0 -3
- package/lib/components/toaster/index.js +0 -4
- package/lib/components/toaster/index.js.map +0 -1
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { StyleSheet, TouchableOpacity } from "react-native";
|
|
3
|
-
import LibToast from "react-native-toast-message";
|
|
4
|
-
import { ToasterPosition } from "./ToasterProps";
|
|
5
|
-
import { View } from "../../components/view";
|
|
6
|
-
import { Title } from "../../components/title";
|
|
7
|
-
import { Text, TextLevels } from "../../components/text";
|
|
8
|
-
import { Icon, IconName, IconSize } from "../../components/icon";
|
|
9
|
-
import { Columns, ColumnsItem } from "../../components/columns";
|
|
10
|
-
import { getStatusStyle, getColorStyle, TrilogyColor, } from "../../objects";
|
|
11
|
-
import { Spacer, SpacerSize } from "../../components/spacer";
|
|
12
|
-
import ToasterContext from "./context";
|
|
13
|
-
import { ComponentName } from "../../components/enumsComponentsName";
|
|
14
|
-
/**
|
|
15
|
-
* Function call by context for showing toast
|
|
16
|
-
* @param params {ToasterShowContext}
|
|
17
|
-
*/
|
|
18
|
-
const showToast = (params) => {
|
|
19
|
-
const { position, duration, offset, title, description, onClick, closable, onHide, iconName, status, } = params;
|
|
20
|
-
LibToast.show({
|
|
21
|
-
type: "tomatoToast",
|
|
22
|
-
position: position || ToasterPosition.BOTTOM,
|
|
23
|
-
bottomOffset: offset || 10,
|
|
24
|
-
topOffset: offset || 10,
|
|
25
|
-
visibilityTime: duration || 5000,
|
|
26
|
-
onHide,
|
|
27
|
-
props: { title, description, closable, iconName, status, onClick },
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* Ui of the toast
|
|
32
|
-
* @param title {string} Notification title content
|
|
33
|
-
* @param description {string|ReactNode} Notification description content
|
|
34
|
-
* @param iconName {IconName} Custom icon
|
|
35
|
-
* @param status {StatusState} Status Variant (INFO|SUCCESS|WARNING|ERROR)
|
|
36
|
-
* @param onClick {Function} onClick Event for all notification
|
|
37
|
-
* @param closable {Function} onClick Event on cross icon
|
|
38
|
-
*/
|
|
39
|
-
const Toaster = ({ props }) => {
|
|
40
|
-
const { title, description, iconName, status, closable, onClick } = props;
|
|
41
|
-
const color = getStatusStyle(status) || getColorStyle(TrilogyColor.MAIN);
|
|
42
|
-
const backgroundColor = getColorStyle(status, 1);
|
|
43
|
-
const styles = StyleSheet.create({
|
|
44
|
-
toaster: {
|
|
45
|
-
padding: 24,
|
|
46
|
-
},
|
|
47
|
-
toasterContainer: {
|
|
48
|
-
borderWidth: 1,
|
|
49
|
-
borderColor: color,
|
|
50
|
-
backgroundColor: backgroundColor,
|
|
51
|
-
padding: 14,
|
|
52
|
-
borderRadius: 6,
|
|
53
|
-
},
|
|
54
|
-
icon: {
|
|
55
|
-
fontSize: 16,
|
|
56
|
-
color: color,
|
|
57
|
-
marginTop: 1.5,
|
|
58
|
-
},
|
|
59
|
-
});
|
|
60
|
-
return (React.createElement(View, { style: styles.toaster },
|
|
61
|
-
React.createElement(TouchableOpacity, { style: styles.toasterContainer, onPress: onClick },
|
|
62
|
-
React.createElement(Columns, null,
|
|
63
|
-
React.createElement(ColumnsItem, { size: 1 }, iconName && React.createElement(Icon, { style: styles.icon, name: iconName })),
|
|
64
|
-
React.createElement(ColumnsItem, null,
|
|
65
|
-
title && React.createElement(Title, null, title),
|
|
66
|
-
description && (React.createElement(React.Fragment, null,
|
|
67
|
-
React.createElement(Spacer, { size: SpacerSize.SMALL }),
|
|
68
|
-
React.createElement(Text, { level: TextLevels.THREE }, description)))),
|
|
69
|
-
closable && (React.createElement(ColumnsItem, { size: 1 },
|
|
70
|
-
React.createElement(TouchableOpacity, { onPress: (e) => {
|
|
71
|
-
LibToast.hide();
|
|
72
|
-
closable(e);
|
|
73
|
-
} },
|
|
74
|
-
React.createElement(Icon, { name: IconName.TIMES, size: IconSize.SMALL }))))))));
|
|
75
|
-
};
|
|
76
|
-
/**
|
|
77
|
-
* Toaster provider
|
|
78
|
-
* @param children {React.ReactNode} Custom Toast Content
|
|
79
|
-
* @param duration {number} Duration in MS (Default: 5000)
|
|
80
|
-
* @param offset {number} Offset position margin (Default: 10 dp)
|
|
81
|
-
* @param others
|
|
82
|
-
*/
|
|
83
|
-
const ToasterProvider = ({ children }) => {
|
|
84
|
-
const toastConfig = {
|
|
85
|
-
tomatoToast: Toaster,
|
|
86
|
-
};
|
|
87
|
-
return (React.createElement(ToasterContext.Provider, { value: { show: showToast, hide: LibToast.hide } },
|
|
88
|
-
children,
|
|
89
|
-
React.createElement(LibToast, { config: toastConfig })));
|
|
90
|
-
};
|
|
91
|
-
ToasterProvider.displayName = ComponentName.ToasterProvider;
|
|
92
|
-
export default ToasterProvider;
|
|
93
|
-
//# sourceMappingURL=Toaster.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Toaster.native.js","sourceRoot":"","sources":["../../../components/toaster/Toaster.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC3D,OAAO,QAAQ,MAAM,4BAA4B,CAAA;AACjD,OAAO,EAAE,eAAe,EAAgB,MAAM,gBAAgB,CA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,gBAAgB,IACf,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;4BACb,QAAQ,CAAC,IAAI,EAAE,CAAA;4BACf,QAAQ,CAAC,CAAC,CAAC,CAAA;wBACb,CAAC;wBAED,oBAAC,IAAI,IAAC,IAAI,EAAE,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAC,KAAK,GAAI,CACnC,CACP,CACf,CACO,CACO,CACd,CACR,CAAA;AACH,CAAC,CAAA;AAED;;;;;;GAMG;AACH,MAAM,eAAe,GAAG,CAAC,EAAE,QAAQ,EAAgB,EAAe,EAAE;IAClE,MAAM,WAAW,GAAG;QAClB,WAAW,EAAE,OAAO;KACrB,CAAA;IAED,OAAO,CACL,oBAAC,cAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE;QACrE,QAAQ;QACT,oBAAC,QAAQ,IAAC,MAAM,EAAE,WAAW,GAAI,CACT,CAC3B,CAAA;AACH,CAAC,CAAA;AAED,eAAe,CAAC,WAAW,GAAG,aAAa,CAAC,eAAe,CAAA;AAE3D,eAAe,eAAe,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=ToasterEnum.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ToasterEnum.js","sourceRoot":"","sources":["../../../components/toaster/ToasterEnum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEhD,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, StatusProps, Accessibility } from '../../objects';
|
|
3
|
-
import { ClickEvent } from '../../events/OnClickEvent';
|
|
4
|
-
import { IconName, IconNameValues } from '../../components/icon';
|
|
5
|
-
export declare enum ToasterPosition {
|
|
6
|
-
TOP = "top",
|
|
7
|
-
BOTTOM = "bottom"
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Notification Interface
|
|
11
|
-
*/
|
|
12
|
-
export interface ToasterProps extends StatusProps, Clickable, Accessibility {
|
|
13
|
-
children?: React.ReactNode;
|
|
14
|
-
className?: string;
|
|
15
|
-
toasterChildren?: React.ReactNode;
|
|
16
|
-
iconName?: IconName | IconNameValues;
|
|
17
|
-
title?: string | React.ReactNode;
|
|
18
|
-
description?: string | React.ReactNode;
|
|
19
|
-
deletable?: ClickEvent | boolean;
|
|
20
|
-
closable?: ClickEvent;
|
|
21
|
-
position?: ToasterPosition;
|
|
22
|
-
duration?: number;
|
|
23
|
-
offset?: number;
|
|
24
|
-
display?: boolean;
|
|
25
|
-
onShow?: () => void;
|
|
26
|
-
onHide?: () => void;
|
|
27
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ToasterProps.js","sourceRoot":"","sources":["../../../components/toaster/ToasterProps.ts"],"names":[],"mappings":"AAIA,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,8BAAW,CAAA;IACX,oCAAiB,CAAA;AACnB,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B"}
|
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
"children": {
|
|
3
|
-
"type": "react",
|
|
4
|
-
"values": [
|
|
5
|
-
"undefined",
|
|
6
|
-
"null",
|
|
7
|
-
"string",
|
|
8
|
-
"number",
|
|
9
|
-
"false",
|
|
10
|
-
"true",
|
|
11
|
-
"JSXElementConstructor<any>>",
|
|
12
|
-
"ReactNode>",
|
|
13
|
-
"ReactPortal"
|
|
14
|
-
]
|
|
15
|
-
},
|
|
16
|
-
"className": {
|
|
17
|
-
"type": "string",
|
|
18
|
-
"values": [
|
|
19
|
-
"undefined",
|
|
20
|
-
"string"
|
|
21
|
-
]
|
|
22
|
-
},
|
|
23
|
-
"toasterChildren": {
|
|
24
|
-
"type": "react",
|
|
25
|
-
"values": [
|
|
26
|
-
"undefined",
|
|
27
|
-
"null",
|
|
28
|
-
"string",
|
|
29
|
-
"number",
|
|
30
|
-
"false",
|
|
31
|
-
"true",
|
|
32
|
-
"JSXElementConstructor<any>>",
|
|
33
|
-
"ReactNode>",
|
|
34
|
-
"ReactPortal"
|
|
35
|
-
]
|
|
36
|
-
},
|
|
37
|
-
"iconName": {
|
|
38
|
-
"type": "enum",
|
|
39
|
-
"values": [
|
|
40
|
-
"undefined",
|
|
41
|
-
"tri-alert",
|
|
42
|
-
"tri-arrow-down",
|
|
43
|
-
"tri-arrow-left",
|
|
44
|
-
"tri-arrow-right",
|
|
45
|
-
"tri-arrow-up",
|
|
46
|
-
"tri-bell",
|
|
47
|
-
"tri-check-circle",
|
|
48
|
-
"tri-check",
|
|
49
|
-
"tri-exclamation-circle",
|
|
50
|
-
"tri-eye-slash",
|
|
51
|
-
"tri-eye",
|
|
52
|
-
"tri-infos-circle",
|
|
53
|
-
"tri-search",
|
|
54
|
-
"tri-times",
|
|
55
|
-
"tri-trash",
|
|
56
|
-
"tri-picto-faciliti",
|
|
57
|
-
"tri-picto-handicapzero",
|
|
58
|
-
"tri-picto-la-fibre",
|
|
59
|
-
"tri-picto-payment-americanexpress",
|
|
60
|
-
"tri-picto-payment-cb",
|
|
61
|
-
"tri-picto-payment-mastercard",
|
|
62
|
-
"tri-picto-payment-paypal",
|
|
63
|
-
"tri-picto-payment-visa",
|
|
64
|
-
"tri-alert",
|
|
65
|
-
"tri-arrow-down",
|
|
66
|
-
"tri-arrow-left",
|
|
67
|
-
"tri-arrow-right",
|
|
68
|
-
"tri-arrow-up",
|
|
69
|
-
"tri-bell",
|
|
70
|
-
"tri-check-circle",
|
|
71
|
-
"tri-check",
|
|
72
|
-
"tri-exclamation-circle",
|
|
73
|
-
"tri-eye-slash",
|
|
74
|
-
"tri-eye",
|
|
75
|
-
"tri-infos-circle",
|
|
76
|
-
"tri-search",
|
|
77
|
-
"tri-times",
|
|
78
|
-
"tri-trash",
|
|
79
|
-
"tri-picto-faciliti",
|
|
80
|
-
"tri-picto-handicapzero",
|
|
81
|
-
"tri-picto-la-fibre",
|
|
82
|
-
"tri-picto-payment-americanexpress",
|
|
83
|
-
"tri-picto-payment-cb",
|
|
84
|
-
"tri-picto-payment-mastercard",
|
|
85
|
-
"tri-picto-payment-paypal",
|
|
86
|
-
"tri-picto-payment-visa"
|
|
87
|
-
]
|
|
88
|
-
},
|
|
89
|
-
"title": {
|
|
90
|
-
"type": "react",
|
|
91
|
-
"values": [
|
|
92
|
-
"undefined",
|
|
93
|
-
"null",
|
|
94
|
-
"string",
|
|
95
|
-
"number",
|
|
96
|
-
"false",
|
|
97
|
-
"true",
|
|
98
|
-
"JSXElementConstructor<any>>",
|
|
99
|
-
"ReactNode>",
|
|
100
|
-
"ReactPortal"
|
|
101
|
-
]
|
|
102
|
-
},
|
|
103
|
-
"description": {
|
|
104
|
-
"type": "react",
|
|
105
|
-
"values": [
|
|
106
|
-
"undefined",
|
|
107
|
-
"null",
|
|
108
|
-
"string",
|
|
109
|
-
"number",
|
|
110
|
-
"false",
|
|
111
|
-
"true",
|
|
112
|
-
"JSXElementConstructor<any>>",
|
|
113
|
-
"ReactNode>",
|
|
114
|
-
"ReactPortal"
|
|
115
|
-
]
|
|
116
|
-
},
|
|
117
|
-
"deletable": {
|
|
118
|
-
"type": "boolean",
|
|
119
|
-
"values": [
|
|
120
|
-
"undefined",
|
|
121
|
-
"false",
|
|
122
|
-
"true",
|
|
123
|
-
"ClickEvent"
|
|
124
|
-
]
|
|
125
|
-
},
|
|
126
|
-
"closable": {
|
|
127
|
-
"type": "function",
|
|
128
|
-
"values": [
|
|
129
|
-
"undefined",
|
|
130
|
-
"ClickEvent"
|
|
131
|
-
]
|
|
132
|
-
},
|
|
133
|
-
"position": {
|
|
134
|
-
"type": "enum",
|
|
135
|
-
"values": [
|
|
136
|
-
"undefined",
|
|
137
|
-
"top",
|
|
138
|
-
"bottom"
|
|
139
|
-
]
|
|
140
|
-
},
|
|
141
|
-
"duration": {
|
|
142
|
-
"type": "string",
|
|
143
|
-
"values": [
|
|
144
|
-
"undefined",
|
|
145
|
-
"number"
|
|
146
|
-
]
|
|
147
|
-
},
|
|
148
|
-
"offset": {
|
|
149
|
-
"type": "string",
|
|
150
|
-
"values": [
|
|
151
|
-
"undefined",
|
|
152
|
-
"number"
|
|
153
|
-
]
|
|
154
|
-
},
|
|
155
|
-
"display": {
|
|
156
|
-
"type": "boolean",
|
|
157
|
-
"values": [
|
|
158
|
-
"undefined",
|
|
159
|
-
"false",
|
|
160
|
-
"true"
|
|
161
|
-
]
|
|
162
|
-
},
|
|
163
|
-
"onShow": {
|
|
164
|
-
"type": "function",
|
|
165
|
-
"values": [
|
|
166
|
-
"undefined",
|
|
167
|
-
"() => void"
|
|
168
|
-
]
|
|
169
|
-
},
|
|
170
|
-
"onHide": {
|
|
171
|
-
"type": "function",
|
|
172
|
-
"values": [
|
|
173
|
-
"undefined",
|
|
174
|
-
"() => void"
|
|
175
|
-
]
|
|
176
|
-
},
|
|
177
|
-
"status": {
|
|
178
|
-
"type": "enum",
|
|
179
|
-
"values": [
|
|
180
|
-
"undefined",
|
|
181
|
-
"SUCCESS",
|
|
182
|
-
"INFO",
|
|
183
|
-
"WARNING",
|
|
184
|
-
"ERROR",
|
|
185
|
-
"SUCCESS",
|
|
186
|
-
"INFO",
|
|
187
|
-
"WARNING",
|
|
188
|
-
"ERROR"
|
|
189
|
-
]
|
|
190
|
-
},
|
|
191
|
-
"id": {
|
|
192
|
-
"type": "string",
|
|
193
|
-
"values": [
|
|
194
|
-
"undefined",
|
|
195
|
-
"string"
|
|
196
|
-
]
|
|
197
|
-
},
|
|
198
|
-
"onClick": {
|
|
199
|
-
"type": "function",
|
|
200
|
-
"values": [
|
|
201
|
-
"undefined",
|
|
202
|
-
"ClickEvent"
|
|
203
|
-
]
|
|
204
|
-
},
|
|
205
|
-
"testId": {
|
|
206
|
-
"type": "string",
|
|
207
|
-
"values": [
|
|
208
|
-
"undefined",
|
|
209
|
-
"string"
|
|
210
|
-
]
|
|
211
|
-
},
|
|
212
|
-
"accessibilityLabel": {
|
|
213
|
-
"type": "string",
|
|
214
|
-
"values": [
|
|
215
|
-
"undefined",
|
|
216
|
-
"string"
|
|
217
|
-
]
|
|
218
|
-
},
|
|
219
|
-
"accessibilityActivate": {
|
|
220
|
-
"type": "boolean",
|
|
221
|
-
"values": [
|
|
222
|
-
"undefined",
|
|
223
|
-
"false",
|
|
224
|
-
"true"
|
|
225
|
-
]
|
|
226
|
-
}
|
|
227
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
"position": {
|
|
3
|
-
"type": "enum",
|
|
4
|
-
"values": [
|
|
5
|
-
"undefined",
|
|
6
|
-
"top",
|
|
7
|
-
"bottom"
|
|
8
|
-
]
|
|
9
|
-
},
|
|
10
|
-
"duration": {
|
|
11
|
-
"type": "string",
|
|
12
|
-
"values": [
|
|
13
|
-
"undefined",
|
|
14
|
-
"number"
|
|
15
|
-
]
|
|
16
|
-
},
|
|
17
|
-
"offset": {
|
|
18
|
-
"type": "string",
|
|
19
|
-
"values": [
|
|
20
|
-
"undefined",
|
|
21
|
-
"number"
|
|
22
|
-
]
|
|
23
|
-
}
|
|
24
|
-
};
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
"title": {
|
|
3
|
-
"type": "string",
|
|
4
|
-
"values": []
|
|
5
|
-
},
|
|
6
|
-
"description": {
|
|
7
|
-
"type": "string",
|
|
8
|
-
"values": [
|
|
9
|
-
"undefined",
|
|
10
|
-
"string"
|
|
11
|
-
]
|
|
12
|
-
},
|
|
13
|
-
"iconName": {
|
|
14
|
-
"type": "enum",
|
|
15
|
-
"values": [
|
|
16
|
-
"undefined",
|
|
17
|
-
"tri-alert",
|
|
18
|
-
"tri-arrow-down",
|
|
19
|
-
"tri-arrow-left",
|
|
20
|
-
"tri-arrow-right",
|
|
21
|
-
"tri-arrow-up",
|
|
22
|
-
"tri-bell",
|
|
23
|
-
"tri-check-circle",
|
|
24
|
-
"tri-check",
|
|
25
|
-
"tri-exclamation-circle",
|
|
26
|
-
"tri-eye-slash",
|
|
27
|
-
"tri-eye",
|
|
28
|
-
"tri-infos-circle",
|
|
29
|
-
"tri-search",
|
|
30
|
-
"tri-times",
|
|
31
|
-
"tri-trash",
|
|
32
|
-
"tri-picto-faciliti",
|
|
33
|
-
"tri-picto-handicapzero",
|
|
34
|
-
"tri-picto-la-fibre",
|
|
35
|
-
"tri-picto-payment-americanexpress",
|
|
36
|
-
"tri-picto-payment-cb",
|
|
37
|
-
"tri-picto-payment-mastercard",
|
|
38
|
-
"tri-picto-payment-paypal",
|
|
39
|
-
"tri-picto-payment-visa",
|
|
40
|
-
"tri-alert",
|
|
41
|
-
"tri-arrow-down",
|
|
42
|
-
"tri-arrow-left",
|
|
43
|
-
"tri-arrow-right",
|
|
44
|
-
"tri-arrow-up",
|
|
45
|
-
"tri-bell",
|
|
46
|
-
"tri-check-circle",
|
|
47
|
-
"tri-check",
|
|
48
|
-
"tri-exclamation-circle",
|
|
49
|
-
"tri-eye-slash",
|
|
50
|
-
"tri-eye",
|
|
51
|
-
"tri-infos-circle",
|
|
52
|
-
"tri-search",
|
|
53
|
-
"tri-times",
|
|
54
|
-
"tri-trash",
|
|
55
|
-
"tri-picto-faciliti",
|
|
56
|
-
"tri-picto-handicapzero",
|
|
57
|
-
"tri-picto-la-fibre",
|
|
58
|
-
"tri-picto-payment-americanexpress",
|
|
59
|
-
"tri-picto-payment-cb",
|
|
60
|
-
"tri-picto-payment-mastercard",
|
|
61
|
-
"tri-picto-payment-paypal",
|
|
62
|
-
"tri-picto-payment-visa"
|
|
63
|
-
]
|
|
64
|
-
},
|
|
65
|
-
"onClick": {
|
|
66
|
-
"type": "function",
|
|
67
|
-
"values": [
|
|
68
|
-
"undefined",
|
|
69
|
-
"() => void"
|
|
70
|
-
]
|
|
71
|
-
},
|
|
72
|
-
"closable": {
|
|
73
|
-
"type": "function",
|
|
74
|
-
"values": [
|
|
75
|
-
"undefined",
|
|
76
|
-
"() => void"
|
|
77
|
-
]
|
|
78
|
-
},
|
|
79
|
-
"onHide": {
|
|
80
|
-
"type": "function",
|
|
81
|
-
"values": [
|
|
82
|
-
"undefined",
|
|
83
|
-
"() => void"
|
|
84
|
-
]
|
|
85
|
-
},
|
|
86
|
-
"status": {
|
|
87
|
-
"type": "enum",
|
|
88
|
-
"values": [
|
|
89
|
-
"undefined",
|
|
90
|
-
"SUCCESS",
|
|
91
|
-
"INFO",
|
|
92
|
-
"WARNING",
|
|
93
|
-
"ERROR",
|
|
94
|
-
"SUCCESS",
|
|
95
|
-
"INFO",
|
|
96
|
-
"WARNING",
|
|
97
|
-
"ERROR"
|
|
98
|
-
]
|
|
99
|
-
},
|
|
100
|
-
"id": {
|
|
101
|
-
"type": "string",
|
|
102
|
-
"values": [
|
|
103
|
-
"undefined",
|
|
104
|
-
"string"
|
|
105
|
-
]
|
|
106
|
-
},
|
|
107
|
-
"testId": {
|
|
108
|
-
"type": "string",
|
|
109
|
-
"values": [
|
|
110
|
-
"undefined",
|
|
111
|
-
"string"
|
|
112
|
-
]
|
|
113
|
-
},
|
|
114
|
-
"accessibilityLabel": {
|
|
115
|
-
"type": "string",
|
|
116
|
-
"values": [
|
|
117
|
-
"undefined",
|
|
118
|
-
"string"
|
|
119
|
-
]
|
|
120
|
-
},
|
|
121
|
-
"accessibilityActivate": {
|
|
122
|
-
"type": "boolean",
|
|
123
|
-
"values": [
|
|
124
|
-
"undefined",
|
|
125
|
-
"false",
|
|
126
|
-
"true"
|
|
127
|
-
]
|
|
128
|
-
}
|
|
129
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ToasterContext.js","sourceRoot":"","sources":["../../../../components/toaster/context/ToasterContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,CAAC,CAAA;AAEvB,MAAM,cAAc,GAAG,KAAK,CAAC,aAAa,CAGvC;IACD,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,OAAO;CACd,CAAC,CAAA;AAEF,eAAe,cAAc,CAAA"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Accessibility, StatusProps } from '../../../objects';
|
|
2
|
-
import { IconName, IconNameValues } from '../../../components/icon';
|
|
3
|
-
import { ToasterPosition } from '../../../components/toaster/ToasterProps';
|
|
4
|
-
/**
|
|
5
|
-
* @param title {string} Notification title content
|
|
6
|
-
* @param description {string|ReactNode} Notification description content
|
|
7
|
-
* @param iconName {IconName} Custom icon
|
|
8
|
-
* @param alert {StatusState} Alert Variant (INFO|SUCCESS|WARNING|ERROR)
|
|
9
|
-
* @param onClick {Function} onClick Event for all notification
|
|
10
|
-
* @param closable {Function} onClick Event on cross icon
|
|
11
|
-
* @param onHide {Function} onClick Event on hide
|
|
12
|
-
*/
|
|
13
|
-
export interface ToastProps extends StatusProps, Accessibility {
|
|
14
|
-
title: string;
|
|
15
|
-
description?: string;
|
|
16
|
-
iconName?: IconName | IconNameValues;
|
|
17
|
-
onClick?: () => void;
|
|
18
|
-
closable?: () => void;
|
|
19
|
-
onHide?: () => void;
|
|
20
|
-
}
|
|
21
|
-
interface ToastConfig {
|
|
22
|
-
position?: ToasterPosition;
|
|
23
|
-
duration?: number;
|
|
24
|
-
offset?: number;
|
|
25
|
-
}
|
|
26
|
-
export type ToasterShowContext = (params: ToastConfig & ToastProps) => void;
|
|
27
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ToasterContextProps.js","sourceRoot":"","sources":["../../../../components/toaster/context/ToasterContextProps.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../components/toaster/context/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kBAAkB,CAAA;AAE7C,eAAe,cAAc,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../components/toaster/index.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,WAAW,CAAA;AACvC,OAAO,cAAc,MAAM,WAAW,CAAA;AAEtC,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,CAAA"}
|