@adiraku/react-native-ui 0.1.14 → 0.1.15
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/commonjs/components/CheckBoxInput/CheckBoxInput.component.js +5 -1
- package/lib/commonjs/components/CheckBoxInput/CheckBoxInput.component.js.map +1 -1
- package/lib/commonjs/components/RadioInput/RadioInput.component.js +5 -1
- package/lib/commonjs/components/RadioInput/RadioInput.component.js.map +1 -1
- package/lib/commonjs/components/countdown/countdown.component.js +94 -0
- package/lib/commonjs/components/countdown/countdown.component.js.map +1 -0
- package/lib/commonjs/components/countdown/countdown.style.js +34 -0
- package/lib/commonjs/components/countdown/countdown.style.js.map +1 -0
- package/lib/commonjs/components/countdown/countdown.type.js +2 -0
- package/lib/commonjs/components/countdown/countdown.type.js.map +1 -0
- package/lib/commonjs/components/index.js +7 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/icons/index.js +14 -0
- package/lib/commonjs/icons/index.js.map +1 -1
- package/lib/commonjs/icons/navigations/IconArrowDiagonal.js +41 -0
- package/lib/commonjs/icons/navigations/IconArrowDiagonal.js.map +1 -0
- package/lib/commonjs/icons/navigations/IconClose.js +39 -0
- package/lib/commonjs/icons/navigations/IconClose.js.map +1 -0
- package/lib/module/components/CheckBoxInput/CheckBoxInput.component.js +5 -1
- package/lib/module/components/CheckBoxInput/CheckBoxInput.component.js.map +1 -1
- package/lib/module/components/RadioInput/RadioInput.component.js +5 -1
- package/lib/module/components/RadioInput/RadioInput.component.js.map +1 -1
- package/lib/module/components/countdown/countdown.component.js +86 -0
- package/lib/module/components/countdown/countdown.component.js.map +1 -0
- package/lib/module/components/countdown/countdown.style.js +27 -0
- package/lib/module/components/countdown/countdown.style.js.map +1 -0
- package/lib/module/components/countdown/countdown.type.js +2 -0
- package/lib/module/components/countdown/countdown.type.js.map +1 -0
- package/lib/module/components/index.js +1 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/icons/index.js +2 -0
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/icons/navigations/IconArrowDiagonal.js +32 -0
- package/lib/module/icons/navigations/IconArrowDiagonal.js.map +1 -0
- package/lib/module/icons/navigations/IconClose.js +30 -0
- package/lib/module/icons/navigations/IconClose.js.map +1 -0
- package/lib/typescript/components/CheckBoxInput/CheckBoxInput.component.d.ts.map +1 -1
- package/lib/typescript/components/RadioInput/RadioInput.component.d.ts.map +1 -1
- package/lib/typescript/components/countdown/countdown.component.d.ts +5 -0
- package/lib/typescript/components/countdown/countdown.component.d.ts.map +1 -0
- package/lib/typescript/components/countdown/countdown.style.d.ts +10 -0
- package/lib/typescript/components/countdown/countdown.style.d.ts.map +1 -0
- package/lib/typescript/components/countdown/countdown.type.d.ts +7 -0
- package/lib/typescript/components/countdown/countdown.type.d.ts.map +1 -0
- package/lib/typescript/components/index.d.ts +1 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/icons/index.d.ts +2 -0
- package/lib/typescript/icons/index.d.ts.map +1 -1
- package/lib/typescript/icons/navigations/IconArrowDiagonal.d.ts +4 -0
- package/lib/typescript/icons/navigations/IconArrowDiagonal.d.ts.map +1 -0
- package/lib/typescript/icons/navigations/IconClose.d.ts +4 -0
- package/lib/typescript/icons/navigations/IconClose.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/components/CheckBoxInput/CheckBoxInput.component.tsx +6 -1
- package/src/components/RadioInput/RadioInput.component.tsx +10 -1
- package/src/components/countdown/countdown.component.tsx +98 -0
- package/src/components/countdown/countdown.style.tsx +42 -0
- package/src/components/countdown/countdown.type.ts +6 -0
- package/src/components/index.ts +1 -0
- package/src/icons/index.ts +2 -0
- package/src/icons/navigations/IconArrowDiagonal.tsx +39 -0
- package/src/icons/navigations/IconClose.tsx +38 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { Typography } from '../typography/typography.component';
|
|
4
|
+
import { getStyle } from './countdown.style';
|
|
5
|
+
const Countdown = props => {
|
|
6
|
+
const {
|
|
7
|
+
targetDateTime
|
|
8
|
+
} = props;
|
|
9
|
+
const computedStyle = getStyle();
|
|
10
|
+
const [timeLeft, setTimeLeft] = React.useState(calculateTimeRemaining(targetDateTime));
|
|
11
|
+
React.useEffect(() => {
|
|
12
|
+
const timer = setInterval(() => {
|
|
13
|
+
setTimeLeft(calculateTimeRemaining(targetDateTime));
|
|
14
|
+
}, 1000);
|
|
15
|
+
return () => clearInterval(timer);
|
|
16
|
+
}, []);
|
|
17
|
+
const formatTime = time => {
|
|
18
|
+
if (time <= 0) {
|
|
19
|
+
return {
|
|
20
|
+
days: `0 hari`,
|
|
21
|
+
hours: appendZero(0),
|
|
22
|
+
minutes: appendZero(0),
|
|
23
|
+
seconds: appendZero(0)
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
const days = Math.floor(time / (1000 * 60 * 60 * 24));
|
|
27
|
+
const hours = appendZero(Math.floor(time / (1000 * 60 * 60) % 24));
|
|
28
|
+
const minutes = appendZero(Math.floor(time / 1000 / 60 % 60));
|
|
29
|
+
const seconds = appendZero(Math.floor(time / 1000 % 60));
|
|
30
|
+
return {
|
|
31
|
+
days: `${days} hari`,
|
|
32
|
+
hours,
|
|
33
|
+
minutes,
|
|
34
|
+
seconds
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
38
|
+
style: [computedStyle.container]
|
|
39
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
40
|
+
style: [computedStyle.textContainer]
|
|
41
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
42
|
+
variant: "overline",
|
|
43
|
+
style: [computedStyle.textLabel]
|
|
44
|
+
}, formatTime(timeLeft).days)), /*#__PURE__*/React.createElement(View, {
|
|
45
|
+
style: [computedStyle.dividerContainer]
|
|
46
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
47
|
+
variant: "overline"
|
|
48
|
+
}, ":")), /*#__PURE__*/React.createElement(View, {
|
|
49
|
+
style: [computedStyle.textContainer]
|
|
50
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
51
|
+
variant: "overline",
|
|
52
|
+
style: [computedStyle.textLabel]
|
|
53
|
+
}, formatTime(timeLeft).hours)), /*#__PURE__*/React.createElement(View, {
|
|
54
|
+
style: [computedStyle.dividerContainer]
|
|
55
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
56
|
+
variant: "overline"
|
|
57
|
+
}, ":")), /*#__PURE__*/React.createElement(View, {
|
|
58
|
+
style: [computedStyle.textContainer]
|
|
59
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
60
|
+
variant: "overline",
|
|
61
|
+
style: [computedStyle.textLabel]
|
|
62
|
+
}, formatTime(timeLeft).minutes)), /*#__PURE__*/React.createElement(View, {
|
|
63
|
+
style: [computedStyle.dividerContainer]
|
|
64
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
65
|
+
variant: "overline"
|
|
66
|
+
}, ":")), /*#__PURE__*/React.createElement(View, {
|
|
67
|
+
style: [computedStyle.textContainer]
|
|
68
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
69
|
+
variant: "overline",
|
|
70
|
+
style: [computedStyle.textLabel]
|
|
71
|
+
}, formatTime(timeLeft).seconds)));
|
|
72
|
+
};
|
|
73
|
+
const calculateTimeRemaining = targetDateTime => {
|
|
74
|
+
const currentTime = new Date().getTime();
|
|
75
|
+
const targetTime = new Date(targetDateTime).getTime();
|
|
76
|
+
const difference = targetTime - currentTime;
|
|
77
|
+
return Math.max(0, difference);
|
|
78
|
+
};
|
|
79
|
+
const appendZero = num => {
|
|
80
|
+
if (Number(num) < 10) {
|
|
81
|
+
return `0${0}`;
|
|
82
|
+
}
|
|
83
|
+
return num;
|
|
84
|
+
};
|
|
85
|
+
export { Countdown };
|
|
86
|
+
//# sourceMappingURL=countdown.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","Typography","getStyle","Countdown","props","targetDateTime","computedStyle","timeLeft","setTimeLeft","useState","calculateTimeRemaining","useEffect","timer","setInterval","clearInterval","formatTime","time","days","hours","appendZero","minutes","seconds","Math","floor","container","textContainer","textLabel","dividerContainer","currentTime","Date","getTime","targetTime","difference","max","num","Number"],"sourceRoot":"..\\..\\src","sources":["countdown.component.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,UAAU,QAAQ,oCAAoC;AAI/D,SAASC,QAAQ,QAAQ,mBAAmB;AAE5C,MAAMC,SAAkD,GAAIC,KAAK,IAAK;EACpE,MAAM;IAAEC;EAAe,CAAC,GAAGD,KAAK;EAEhC,MAAME,aAAa,GAAGJ,QAAQ,EAAE;EAEhC,MAAM,CAACK,QAAQ,EAAEC,WAAW,CAAC,GAAGT,KAAK,CAACU,QAAQ,CAC5CC,sBAAsB,CAACL,cAAc,CAAC,CACvC;EAEDN,KAAK,CAACY,SAAS,CAAC,MAAM;IACpB,MAAMC,KAAK,GAAGC,WAAW,CAAC,MAAM;MAC9BL,WAAW,CAACE,sBAAsB,CAACL,cAAc,CAAC,CAAC;IACrD,CAAC,EAAE,IAAI,CAAC;IAER,OAAO,MAAMS,aAAa,CAACF,KAAK,CAAC;EACnC,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMG,UAAU,GAAIC,IAAY,IAAK;IACnC,IAAIA,IAAI,IAAI,CAAC,EAAE;MACb,OAAO;QACLC,IAAI,EAAG,QAAO;QACdC,KAAK,EAAEC,UAAU,CAAC,CAAC,CAAC;QACpBC,OAAO,EAAED,UAAU,CAAC,CAAC,CAAC;QACtBE,OAAO,EAAEF,UAAU,CAAC,CAAC;MACvB,CAAC;IACH;IAEA,MAAMF,IAAI,GAAGK,IAAI,CAACC,KAAK,CAACP,IAAI,IAAI,IAAI,GAAG,EAAE,GAAG,EAAE,GAA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../../themes';
|
|
3
|
+
export const getStyle = () => {
|
|
4
|
+
const computedStyle = {};
|
|
5
|
+
computedStyle.container = {
|
|
6
|
+
flexDirection: 'row'
|
|
7
|
+
};
|
|
8
|
+
computedStyle.textLabel = {
|
|
9
|
+
color: Palettes.white[50]
|
|
10
|
+
};
|
|
11
|
+
computedStyle.textContainer = {
|
|
12
|
+
backgroundColor: Palettes.black[900],
|
|
13
|
+
justifyContent: 'center',
|
|
14
|
+
alignItems: 'center',
|
|
15
|
+
borderRadius: Radius[4],
|
|
16
|
+
paddingHorizontal: Spacing[4],
|
|
17
|
+
minWidth: 22,
|
|
18
|
+
height: 18
|
|
19
|
+
};
|
|
20
|
+
computedStyle.dividerContainer = {
|
|
21
|
+
justifyContent: 'center',
|
|
22
|
+
alignItems: 'center',
|
|
23
|
+
width: 8
|
|
24
|
+
};
|
|
25
|
+
return StyleSheet.create(computedStyle);
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=countdown.style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["StyleSheet","Palettes","Radius","Spacing","getStyle","computedStyle","container","flexDirection","textLabel","color","white","textContainer","backgroundColor","black","justifyContent","alignItems","borderRadius","paddingHorizontal","minWidth","height","dividerContainer","width","create"],"sourceRoot":"..\\..\\src","sources":["countdown.style.tsx"],"mappings":"AAAA,SAASA,UAAU,QAAQ,cAAc;AAEzC,SAASC,QAAQ,EAAEC,MAAM,EAAEC,OAAO,QAAQ,cAAc;AAWxD,OAAO,MAAMC,QAAQ,GAAG,MAAM;EAC5B,MAAMC,aAAiC,GAAG,CAAC,CAAC;EAE5CA,aAAa,CAACC,SAAS,GAAG;IACxBC,aAAa,EAAE;EACjB,CAAC;EAEDF,aAAa,CAACG,SAAS,GAAG;IACxBC,KAAK,EAAER,QAAQ,CAACS,KAAK,CAAC,EAAE;EAC1B,CAAC;EAEDL,aAAa,CAACM,aAAa,GAAG;IAC5BC,eAAe,EAAEX,QAAQ,CAACY,KAAK,CAAC,GAAG,CAAC;IACpCC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBC,YAAY,EAAEd,MAAM,CAAC,CAAC,CAAC;IACvBe,iBAAiB,EAAEd,OAAO,CAAC,CAAC,CAAC;IAC7Be,QAAQ,EAAE,EAAE;IACZC,MAAM,EAAE;EACV,CAAC;EAEDd,aAAa,CAACe,gBAAgB,GAAG;IAC/BN,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBM,KAAK,EAAE;EACT,CAAC;EAED,OAAOrB,UAAU,CAACsB,MAAM,CAACjB,aAAa,CAAC;AACzC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"..\\..\\src","sources":["countdown.type.ts"],"mappings":""}
|
|
@@ -21,4 +21,5 @@ export { Switch } from './switch/switch.component';
|
|
|
21
21
|
export { Dot } from './dot/dot.component';
|
|
22
22
|
export { InformationBox } from './information-box/information-box.component';
|
|
23
23
|
export { RoundedTab } from './rounded-tab/rounded-tab.component';
|
|
24
|
+
export { Countdown } from './countdown/countdown.component';
|
|
24
25
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Button","Label","BaseComponent","Typography","Coachmark","TextLink","SliderIndicator","TextInput","TextArea","StepperCounter","Divider","Tabs","RadioButton","BottomSheet","RadioInput","CheckBoxInput","Checkbox","Appbar","Snackbar","Switch","Dot","InformationBox","RoundedTab"],"sourceRoot":"..\\..\\src","sources":["index.ts"],"mappings":"AAAA,SAASA,MAAM,QAAQ,2BAA2B;AAClD,SAASC,KAAK,QAAQ,yBAAyB;AAC/C,SAASC,aAAa,QAAQ,uBAAuB;AACrD,SAASC,UAAU,QAAQ,mCAAmC;AAC9D,SAASC,SAAS,QAAQ,iCAAiC;AAC3D,SAASC,QAAQ,QAAQ,+BAA+B;AACxD,SAASC,eAAe,QAAQ,+CAA+C;AAC/E,SAASC,SAAS,QAAQ,iCAAiC;AAC3D,SAASC,QAAQ,QAAQ,+BAA+B;AACxD,SAASC,cAAc,QAAQ,2CAA2C;AAC1E,SAASC,OAAO,QAAQ,6BAA6B;AACrD,SAASC,IAAI,QAAQ,uBAAuB;AAC5C,SAASC,WAAW,QAAQ,qCAAqC;AACjE,SAASC,WAAW,QAAQ,qCAAqC;AACjE,SAASC,UAAU,QAAQ,mCAAmC;AAC9D,SAASC,aAAa,QAAQ,yCAAyC;AACvE,SAASC,QAAQ,QAAQ,+BAA+B;AACxD,SAASC,MAAM,QAAQ,2BAA2B;AAClD,SAASC,QAAQ,QAAQ,+BAA+B;AACxD,SAASC,MAAM,QAAQ,2BAA2B;AAClD,SAASC,GAAG,QAAQ,qBAAqB;AACzC,SAASC,cAAc,QAAQ,6CAA6C;AAC5E,SAASC,UAAU,QAAQ,qCAAqC"}
|
|
1
|
+
{"version":3,"names":["Button","Label","BaseComponent","Typography","Coachmark","TextLink","SliderIndicator","TextInput","TextArea","StepperCounter","Divider","Tabs","RadioButton","BottomSheet","RadioInput","CheckBoxInput","Checkbox","Appbar","Snackbar","Switch","Dot","InformationBox","RoundedTab","Countdown"],"sourceRoot":"..\\..\\src","sources":["index.ts"],"mappings":"AAAA,SAASA,MAAM,QAAQ,2BAA2B;AAClD,SAASC,KAAK,QAAQ,yBAAyB;AAC/C,SAASC,aAAa,QAAQ,uBAAuB;AACrD,SAASC,UAAU,QAAQ,mCAAmC;AAC9D,SAASC,SAAS,QAAQ,iCAAiC;AAC3D,SAASC,QAAQ,QAAQ,+BAA+B;AACxD,SAASC,eAAe,QAAQ,+CAA+C;AAC/E,SAASC,SAAS,QAAQ,iCAAiC;AAC3D,SAASC,QAAQ,QAAQ,+BAA+B;AACxD,SAASC,cAAc,QAAQ,2CAA2C;AAC1E,SAASC,OAAO,QAAQ,6BAA6B;AACrD,SAASC,IAAI,QAAQ,uBAAuB;AAC5C,SAASC,WAAW,QAAQ,qCAAqC;AACjE,SAASC,WAAW,QAAQ,qCAAqC;AACjE,SAASC,UAAU,QAAQ,mCAAmC;AAC9D,SAASC,aAAa,QAAQ,yCAAyC;AACvE,SAASC,QAAQ,QAAQ,+BAA+B;AACxD,SAASC,MAAM,QAAQ,2BAA2B;AAClD,SAASC,QAAQ,QAAQ,+BAA+B;AACxD,SAASC,MAAM,QAAQ,2BAA2B;AAClD,SAASC,GAAG,QAAQ,qBAAqB;AACzC,SAASC,cAAc,QAAQ,6CAA6C;AAC5E,SAASC,UAAU,QAAQ,qCAAqC;AAChE,SAASC,SAAS,QAAQ,iCAAiC"}
|
|
@@ -2,10 +2,12 @@ export { IconArrowLeft } from './navigations/IconArrowLeft';
|
|
|
2
2
|
export { IconArrowRight } from './navigations/IconArrowRight';
|
|
3
3
|
export { IconArrowUp } from './navigations/IconArrowUp';
|
|
4
4
|
export { IconArrowDown } from './navigations/IconArrowDown';
|
|
5
|
+
export { IconArrowDiagonal } from './navigations/IconArrowDiagonal';
|
|
5
6
|
export { IconChevronDown } from './navigations/IconChevronDown';
|
|
6
7
|
export { IconChevronUp } from './navigations/IconChevronUp';
|
|
7
8
|
export { IconChevronRight } from './navigations/IconChevronRight';
|
|
8
9
|
export { IconChevronLeft } from './navigations/IconChevronLeft';
|
|
10
|
+
export { IconClose } from './navigations/IconClose';
|
|
9
11
|
export { IconAddMinus } from './actions/IconAddMinus';
|
|
10
12
|
export { IconAddPlus } from './actions/IconAddPlus';
|
|
11
13
|
export { IconAddRemove } from './actions/IconAddRemove';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["IconArrowLeft","IconArrowRight","IconArrowUp","IconArrowDown","IconChevronDown","IconChevronUp","IconChevronRight","IconChevronLeft","IconAddMinus","IconAddPlus","IconAddRemove","IconHeartEmpty","IconHeartFilled","IconHeartOutline","IconPicture","IconPictureAdd","IconStarFilled","IconStarOutline","IconShoppingCart","IconSort","IconSearch","IconTrash","IconShare","IconSetting","IconChat","IconCamera","IconHelp","IconInfo","IconPerson","IconNotification","IconUpload","IconDownload","IconCopy","IconLike","IconEdit","IconFilter","IconCustomerService","IconAttach","IconMyLocation","IconHistory","IconGroup","IconOfficial","IconCalendar","IconProtection","IconVoucher","IconLocation","IconCreditCard","IconTick","IconPromo","IconCategory","IconMoney","IconFlash","IconLock","IconTime","IconTicket","IconCash","IconStore","IconContract","IconNavAdiraku","IconNavDocument","IconNavHome","IconNavPhone","IconNavProfile","IconCarPickup","IconCarMiniTruck","IconCarSportCar","IconCarSuperCar","IconCarWagon","IconCarMuv","IconCarVan","IconCarSuv","IconCarJeep","IconCarMinivan","IconCarHatchback","IconBikeCaferacer","IconBikeCooper","IconBikeCruiser","IconBikeDualsport","IconBikeMopad","IconBikeRoadster","IconBikeScooter","IconBikeScrambler","IconBikeSportbike","IconBikeSportstouring","IconBikeTouring","IconBikeTrialbike"],"sourceRoot":"..\\..\\src","sources":["index.ts"],"mappings":"AAAA,SAASA,aAAa,QAAQ,6BAA6B;AAC3D,SAASC,cAAc,QAAQ,8BAA8B;AAC7D,SAASC,WAAW,QAAQ,2BAA2B;AACvD,SAASC,aAAa,QAAQ,6BAA6B;AAC3D,SAASC,eAAe,QAAQ,+BAA+B;AAC/D,SAASC,aAAa,QAAQ,6BAA6B;AAC3D,SAASC,gBAAgB,QAAQ,gCAAgC;AACjE,SAASC,eAAe,QAAQ,+BAA+B;
|
|
1
|
+
{"version":3,"names":["IconArrowLeft","IconArrowRight","IconArrowUp","IconArrowDown","IconArrowDiagonal","IconChevronDown","IconChevronUp","IconChevronRight","IconChevronLeft","IconClose","IconAddMinus","IconAddPlus","IconAddRemove","IconHeartEmpty","IconHeartFilled","IconHeartOutline","IconPicture","IconPictureAdd","IconStarFilled","IconStarOutline","IconShoppingCart","IconSort","IconSearch","IconTrash","IconShare","IconSetting","IconChat","IconCamera","IconHelp","IconInfo","IconPerson","IconNotification","IconUpload","IconDownload","IconCopy","IconLike","IconEdit","IconFilter","IconCustomerService","IconAttach","IconMyLocation","IconHistory","IconGroup","IconOfficial","IconCalendar","IconProtection","IconVoucher","IconLocation","IconCreditCard","IconTick","IconPromo","IconCategory","IconMoney","IconFlash","IconLock","IconTime","IconTicket","IconCash","IconStore","IconContract","IconNavAdiraku","IconNavDocument","IconNavHome","IconNavPhone","IconNavProfile","IconCarPickup","IconCarMiniTruck","IconCarSportCar","IconCarSuperCar","IconCarWagon","IconCarMuv","IconCarVan","IconCarSuv","IconCarJeep","IconCarMinivan","IconCarHatchback","IconBikeCaferacer","IconBikeCooper","IconBikeCruiser","IconBikeDualsport","IconBikeMopad","IconBikeRoadster","IconBikeScooter","IconBikeScrambler","IconBikeSportbike","IconBikeSportstouring","IconBikeTouring","IconBikeTrialbike"],"sourceRoot":"..\\..\\src","sources":["index.ts"],"mappings":"AAAA,SAASA,aAAa,QAAQ,6BAA6B;AAC3D,SAASC,cAAc,QAAQ,8BAA8B;AAC7D,SAASC,WAAW,QAAQ,2BAA2B;AACvD,SAASC,aAAa,QAAQ,6BAA6B;AAC3D,SAASC,iBAAiB,QAAQ,iCAAiC;AACnE,SAASC,eAAe,QAAQ,+BAA+B;AAC/D,SAASC,aAAa,QAAQ,6BAA6B;AAC3D,SAASC,gBAAgB,QAAQ,gCAAgC;AACjE,SAASC,eAAe,QAAQ,+BAA+B;AAC/D,SAASC,SAAS,QAAQ,yBAAyB;AAEnD,SAASC,YAAY,QAAQ,wBAAwB;AACrD,SAASC,WAAW,QAAQ,uBAAuB;AACnD,SAASC,aAAa,QAAQ,yBAAyB;AACvD,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,eAAe,QAAQ,2BAA2B;AAC3D,SAASC,gBAAgB,QAAQ,4BAA4B;AAC7D,SAASC,WAAW,QAAQ,uBAAuB;AACnD,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,eAAe,QAAQ,2BAA2B;AAC3D,SAASC,gBAAgB,QAAQ,4BAA4B;AAC7D,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,S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Q,iBAAiB;AAC1C,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,SAASC,YAAY,QAAQ,qBAAqB;AAElD,SAASC,cAAc,QAAQ,uBAAuB;AACtD,SAASC,eAAe,QAAQ,wBAAwB;AACxD,SAASC,WAAW,QAAQ,oBAAoB;AAChD,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,cAAc,QAAQ,uBAAuB;AAEtD,SAASC,aAAa,QAAQ,0BAA0B;AACxD,SAASC,gBAAgB,QAAQ,6BAA6B;AAC9D,SAASC,eAAe,QAAQ,4BAA4B;AAC5D,SAASC,eAAe,QAAQ,4BAA4B;AAC5D,SAASC,YAAY,QAAQ,yBAAyB;AACtD,SAASC,UAAU,QAAQ,uBAAuB;AAClD,SAASC,UAAU,QAAQ,uBAAuB;AAClD,SAASC,UAAU,QAAQ,uBAAuB;AAClD,SAASC,WAAW,QAAQ,wBAAwB;AACpD,SAASC,cAAc,QAAQ,2BAA2B;AAC1D,SAASC,gBAAgB,QAAQ,6BAA6B;AAE9D,SAASC,iBAAiB,QAAQ,8BAA8B;AAChE,SAASC,cAAc,QAAQ,2BAA2B;AAC1D,SAASC,eAAe,QAAQ,4BAA4B;AAC5D,SAASC,iBAAiB,QAAQ,8BAA8B;AAChE,SAASC,aAAa,QAAQ,0BAA0B;AACxD,SAASC,gBAAgB,QAAQ,6BAA6B;AAC9D,SAASC,eAAe,QAAQ,4BAA4B;AAC5D,SAASC,iBAAiB,QAAQ,8BAA8B;AAChE,SAASC,iBAAiB,QAAQ,8BAA8B;AAChE,SAASC,qBAAqB,QAAQ,kCAAkC;AACxE,SAASC,eAAe,QAAQ,4BAA4B;AAC5D,SAASC,iBAAiB,QAAQ,8BAA8B"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import Svg, { ClipPath, Defs, G, Path } from 'react-native-svg';
|
|
4
|
+
import { Palettes } from '../../themes';
|
|
5
|
+
export const IconArrowDiagonal = props => {
|
|
6
|
+
const {
|
|
7
|
+
width = 24,
|
|
8
|
+
height = 24,
|
|
9
|
+
fill = Palettes.black[900],
|
|
10
|
+
...rest
|
|
11
|
+
} = props;
|
|
12
|
+
return /*#__PURE__*/React.createElement(Svg, _extends({
|
|
13
|
+
width: width,
|
|
14
|
+
height: height,
|
|
15
|
+
viewBox: "0 0 24 24",
|
|
16
|
+
fill: "none"
|
|
17
|
+
// xmlns="http://www.w3.org/2000/svg"
|
|
18
|
+
}, rest), /*#__PURE__*/React.createElement(G, {
|
|
19
|
+
clipPath: "url(#clip0_12_2167)"
|
|
20
|
+
}, /*#__PURE__*/React.createElement(Path, {
|
|
21
|
+
fillRule: "evenodd",
|
|
22
|
+
clipRule: "evenodd",
|
|
23
|
+
d: "M17.364 16.95a1 1 0 102 0V5.636a1 1 0 00-1-1H7.05a1 1 0 000 2h8.9L4.93 17.657a1 1 0 101.414 1.414l11.02-11.02.001 8.899z",
|
|
24
|
+
fill: fill
|
|
25
|
+
})), /*#__PURE__*/React.createElement(Defs, null, /*#__PURE__*/React.createElement(ClipPath, {
|
|
26
|
+
id: "clip0_12_2167"
|
|
27
|
+
}, /*#__PURE__*/React.createElement(Path, {
|
|
28
|
+
fill: "#fff",
|
|
29
|
+
d: "M0 0H24V24H0z"
|
|
30
|
+
}))));
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=IconArrowDiagonal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Svg","ClipPath","Defs","G","Path","Palettes","IconArrowDiagonal","props","width","height","fill","black","rest"],"sourceRoot":"..\\..\\src","sources":["IconArrowDiagonal.tsx"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,GAAG,IAAIC,QAAQ,EAAEC,IAAI,EAAEC,CAAC,EAAEC,IAAI,QAAQ,kBAAkB;AAC/D,SAASC,QAAQ,QAAQ,cAAc;AAIvC,OAAO,MAAMC,iBAAiB,GAAIC,KAAgB,IAAK;EACrD,MAAM;IACJC,KAAK,GAAG,EAAE;IACVC,MAAM,GAAG,EAAE;IACXC,IAAI,GAAGL,QAAQ,CAACM,KAAK,CAAC,GAAG,CAAC;IAC1B,GAAGC;EACL,CAAC,GAAGL,KAAK;EAET,oBACE,oBAAC,GAAG;IACF,KAAK,EAAEC,KAAM;IACb,MAAM,EAAEC,MAAO;IACf,OAAO,EAAC,WAAW;IACnB,IAAI,EAAC;IACL;EAAA,GACIG,IAAI,gBAER,oBAAC,CAAC;IAAC,QAAQ,EAAC;EAAqB,gBAC/B,oBAAC,IAAI;IACH,QAAQ,EAAC,SAAS;IAClB,QAAQ,EAAC,SAAS;IAClB,CAAC,EAAC,0HAA0H;IAC5H,IAAI,EAAEF;EAAK,EACX,CACA,eACJ,oBAAC,IAAI,qBACH,oBAAC,QAAQ;IAAC,EAAE,EAAC;EAAe,gBAC1B,oBAAC,IAAI;IAAC,IAAI,EAAC,MAAM;IAAC,CAAC,EAAC;EAAe,EAAG,CAC7B,CACN,CACH;AAEV,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import Svg, { Path } from 'react-native-svg';
|
|
4
|
+
import { Palettes } from '../../themes';
|
|
5
|
+
export const IconClose = props => {
|
|
6
|
+
const {
|
|
7
|
+
width = 24,
|
|
8
|
+
height = 24,
|
|
9
|
+
fill = Palettes.black[900],
|
|
10
|
+
...rest
|
|
11
|
+
} = props;
|
|
12
|
+
return /*#__PURE__*/React.createElement(Svg, _extends({
|
|
13
|
+
width: width,
|
|
14
|
+
height: height,
|
|
15
|
+
viewBox: "0 0 24 24",
|
|
16
|
+
fill: "none"
|
|
17
|
+
// xmlns="http://www.w3.org/2000/svg"
|
|
18
|
+
}, rest), /*#__PURE__*/React.createElement(Path, {
|
|
19
|
+
fillRule: "evenodd",
|
|
20
|
+
clipRule: "evenodd",
|
|
21
|
+
d: "M18.795 6.195a.7.7 0 00-.99-.99L12 11.01 6.195 5.205a.7.7 0 10-.99.99L11.01 12l-5.805 5.805a.7.7 0 00.99.99L12 12.99l5.805 5.805a.7.7 0 00.99-.99L12.99 12l5.805-5.805z",
|
|
22
|
+
fill: fill
|
|
23
|
+
}), /*#__PURE__*/React.createElement(Path, {
|
|
24
|
+
fillRule: "evenodd",
|
|
25
|
+
clipRule: "evenodd",
|
|
26
|
+
d: "M6.018 5.382a.45.45 0 00-.636.636l5.805 5.805a.25.25 0 010 .354l-5.805 5.805a.45.45 0 00.636.636l5.805-5.805a.25.25 0 01.354 0l5.805 5.805a.45.45 0 00.636-.636l-5.805-5.805a.25.25 0 010-.354l5.805-5.805a.45.45 0 00-.636-.636l-5.805 5.805a.25.25 0 01-.354 0L6.018 5.382zm-.99-.354a.95.95 0 011.344 0L12 10.656l5.628-5.628a.95.95 0 011.344 1.344L13.343 12l5.629 5.628a.95.95 0 01-1.344 1.344L12 13.343l-5.628 5.629a.95.95 0 01-1.344-1.344L10.656 12 5.028 6.372a.95.95 0 010-1.344z",
|
|
27
|
+
fill: fill
|
|
28
|
+
}));
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=IconClose.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Svg","Path","Palettes","IconClose","props","width","height","fill","black","rest"],"sourceRoot":"..\\..\\src","sources":["IconClose.tsx"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,GAAG,IAAIC,IAAI,QAAQ,kBAAkB;AAC5C,SAASC,QAAQ,QAAQ,cAAc;AAIvC,OAAO,MAAMC,SAAS,GAAIC,KAAgB,IAAK;EAC7C,MAAM;IACJC,KAAK,GAAG,EAAE;IACVC,MAAM,GAAG,EAAE;IACXC,IAAI,GAAGL,QAAQ,CAACM,KAAK,CAAC,GAAG,CAAC;IAC1B,GAAGC;EACL,CAAC,GAAGL,KAAK;EAET,oBACE,oBAAC,GAAG;IACF,KAAK,EAAEC,KAAM;IACb,MAAM,EAAEC,MAAO;IACf,OAAO,EAAC,WAAW;IACnB,IAAI,EAAC;IACL;EAAA,GACIG,IAAI,gBAER,oBAAC,IAAI;IACH,QAAQ,EAAC,SAAS;IAClB,QAAQ,EAAC,SAAS;IAClB,CAAC,EAAC,yKAAyK;IAC3K,IAAI,EAAEF;EAAK,EACX,eACF,oBAAC,IAAI;IACH,QAAQ,EAAC,SAAS;IAClB,QAAQ,EAAC,SAAS;IAClB,CAAC,EAAC,geAAge;IACle,IAAI,EAAEA;EAAK,EACX,CACE;AAEV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckBoxInput.component.d.ts","sourceRoot":"","sources":["../../../../src/components/CheckBoxInput/CheckBoxInput.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,OAAO,KAAK,EACV,kBAAkB,EAEnB,MAAM,sBAAsB,CAAC;AAM9B,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,
|
|
1
|
+
{"version":3,"file":"CheckBoxInput.component.d.ts","sourceRoot":"","sources":["../../../../src/components/CheckBoxInput/CheckBoxInput.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,OAAO,KAAK,EACV,kBAAkB,EAEnB,MAAM,sBAAsB,CAAC;AAM9B,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CA0L9D,CAAC;AAqCF,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioInput.component.d.ts","sourceRoot":"","sources":["../../../../src/components/RadioInput/RadioInput.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmB/B,OAAO,KAAK,EAAE,eAAe,EAAkB,MAAM,mBAAmB,CAAC;AAEzE,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,iBAAiB,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"RadioInput.component.d.ts","sourceRoot":"","sources":["../../../../src/components/RadioInput/RadioInput.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmB/B,OAAO,KAAK,EAAE,eAAe,EAAkB,MAAM,mBAAmB,CAAC;AAEzE,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAiKxD,CAAC;AAmCF,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"countdown.component.d.ts","sourceRoot":"","sources":["../../../../src/components/countdown/countdown.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIvD,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAsEtD,CAAC;AAmBF,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { TextStyle, ViewStyle } from 'react-native';
|
|
2
|
+
interface ComputedStyleProps {
|
|
3
|
+
container?: ViewStyle;
|
|
4
|
+
textLabel?: TextStyle;
|
|
5
|
+
textContainer?: ViewStyle;
|
|
6
|
+
dividerContainer?: ViewStyle;
|
|
7
|
+
}
|
|
8
|
+
export declare const getStyle: () => ComputedStyleProps;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=countdown.style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"countdown.style.d.ts","sourceRoot":"","sources":["../../../../src/components/countdown/countdown.style.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,UAAU,kBAAkB;IAC1B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,gBAAgB,CAAC,EAAE,SAAS,CAAC;CAC9B;AAED,eAAO,MAAM,QAAQ,0BA4BpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"countdown.type.d.ts","sourceRoot":"","sources":["../../../../src/components/countdown/countdown.type.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CACxC"}
|
|
@@ -21,6 +21,7 @@ export { Switch } from './switch/switch.component';
|
|
|
21
21
|
export { Dot } from './dot/dot.component';
|
|
22
22
|
export { InformationBox } from './information-box/information-box.component';
|
|
23
23
|
export { RoundedTab } from './rounded-tab/rounded-tab.component';
|
|
24
|
+
export { Countdown } from './countdown/countdown.component';
|
|
24
25
|
export type { ButtonProps } from './button/button.type';
|
|
25
26
|
export type { TextInputProps } from './TextInput/TextInput.type';
|
|
26
27
|
export type { SliderIndicatorProps } from './slider-indicator/slider-indicator.type';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,KAAK,EA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AAY,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,YAAY,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AACrF,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,YAAY,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACpE,YAAY,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,YAAY,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAChF,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -2,10 +2,12 @@ export { IconArrowLeft } from './navigations/IconArrowLeft';
|
|
|
2
2
|
export { IconArrowRight } from './navigations/IconArrowRight';
|
|
3
3
|
export { IconArrowUp } from './navigations/IconArrowUp';
|
|
4
4
|
export { IconArrowDown } from './navigations/IconArrowDown';
|
|
5
|
+
export { IconArrowDiagonal } from './navigations/IconArrowDiagonal';
|
|
5
6
|
export { IconChevronDown } from './navigations/IconChevronDown';
|
|
6
7
|
export { IconChevronUp } from './navigations/IconChevronUp';
|
|
7
8
|
export { IconChevronRight } from './navigations/IconChevronRight';
|
|
8
9
|
export { IconChevronLeft } from './navigations/IconChevronLeft';
|
|
10
|
+
export { IconClose } from './navigations/IconClose';
|
|
9
11
|
export { IconAddMinus } from './actions/IconAddMinus';
|
|
10
12
|
export { IconAddPlus } from './actions/IconAddPlus';
|
|
11
13
|
export { IconAddRemove } from './actions/IconAddRemove';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/icons/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,O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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconArrowDiagonal.d.ts","sourceRoot":"","sources":["../../../../src/icons/navigations/IconArrowDiagonal.tsx"],"names":[],"mappings":";AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,eAAO,MAAM,iBAAiB,UAAW,SAAS,gBAgCjD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconClose.d.ts","sourceRoot":"","sources":["../../../../src/icons/navigations/IconClose.tsx"],"names":[],"mappings":";AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,eAAO,MAAM,SAAS,UAAW,SAAS,gBA+BzC,CAAC"}
|
package/package.json
CHANGED
|
@@ -132,6 +132,11 @@ const CheckBoxInput: React.FunctionComponent<CheckboxInputProps> = (props) => {
|
|
|
132
132
|
bottomSheetref.current?.close();
|
|
133
133
|
};
|
|
134
134
|
|
|
135
|
+
const handleOnBottomSheetDismiss = () => {
|
|
136
|
+
setSelectedValue(value);
|
|
137
|
+
onInputDismiss();
|
|
138
|
+
};
|
|
139
|
+
|
|
135
140
|
const openBottomSheet = () => {
|
|
136
141
|
if (!disabled && editable) {
|
|
137
142
|
bottomSheetref.current?.open();
|
|
@@ -177,7 +182,7 @@ const CheckBoxInput: React.FunctionComponent<CheckboxInputProps> = (props) => {
|
|
|
177
182
|
</TouchableWithoutFeedback>
|
|
178
183
|
<BottomSheet
|
|
179
184
|
ref={bottomSheetref}
|
|
180
|
-
onDismiss={
|
|
185
|
+
onDismiss={handleOnBottomSheetDismiss}
|
|
181
186
|
{...bottomSheetOpt}
|
|
182
187
|
>
|
|
183
188
|
<FlatList
|
|
@@ -102,6 +102,11 @@ const RadioInput: React.FunctionComponent<RadioInputProps> = (props) => {
|
|
|
102
102
|
ref.current?.close();
|
|
103
103
|
};
|
|
104
104
|
|
|
105
|
+
const handleOnBottomSheetDismiss = () => {
|
|
106
|
+
onInputDismiss();
|
|
107
|
+
setSelectedValue(value);
|
|
108
|
+
};
|
|
109
|
+
|
|
105
110
|
const openBottomSheet = () => {
|
|
106
111
|
if (!disabled && editable) {
|
|
107
112
|
ref.current?.open();
|
|
@@ -145,7 +150,11 @@ const RadioInput: React.FunctionComponent<RadioInputProps> = (props) => {
|
|
|
145
150
|
) : null}
|
|
146
151
|
</View>
|
|
147
152
|
</TouchableWithoutFeedback>
|
|
148
|
-
<BottomSheet
|
|
153
|
+
<BottomSheet
|
|
154
|
+
onDismiss={handleOnBottomSheetDismiss}
|
|
155
|
+
ref={ref}
|
|
156
|
+
{...bottomSheetOpt}
|
|
157
|
+
>
|
|
149
158
|
<FlatList
|
|
150
159
|
data={data}
|
|
151
160
|
renderItem={(item) => (
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { Typography } from '../typography/typography.component';
|
|
4
|
+
|
|
5
|
+
import type { CountdownProps } from './countdown.type';
|
|
6
|
+
|
|
7
|
+
import { getStyle } from './countdown.style';
|
|
8
|
+
|
|
9
|
+
const Countdown: React.FunctionComponent<CountdownProps> = (props) => {
|
|
10
|
+
const { targetDateTime } = props;
|
|
11
|
+
|
|
12
|
+
const computedStyle = getStyle();
|
|
13
|
+
|
|
14
|
+
const [timeLeft, setTimeLeft] = React.useState(
|
|
15
|
+
calculateTimeRemaining(targetDateTime)
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
React.useEffect(() => {
|
|
19
|
+
const timer = setInterval(() => {
|
|
20
|
+
setTimeLeft(calculateTimeRemaining(targetDateTime));
|
|
21
|
+
}, 1000);
|
|
22
|
+
|
|
23
|
+
return () => clearInterval(timer);
|
|
24
|
+
}, []);
|
|
25
|
+
|
|
26
|
+
const formatTime = (time: number) => {
|
|
27
|
+
if (time <= 0) {
|
|
28
|
+
return {
|
|
29
|
+
days: `0 hari`,
|
|
30
|
+
hours: appendZero(0),
|
|
31
|
+
minutes: appendZero(0),
|
|
32
|
+
seconds: appendZero(0),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const days = Math.floor(time / (1000 * 60 * 60 * 24));
|
|
37
|
+
const hours = appendZero(Math.floor((time / (1000 * 60 * 60)) % 24));
|
|
38
|
+
const minutes = appendZero(Math.floor((time / 1000 / 60) % 60));
|
|
39
|
+
const seconds = appendZero(Math.floor((time / 1000) % 60));
|
|
40
|
+
|
|
41
|
+
return { days: `${days} hari`, hours, minutes, seconds };
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<View style={[computedStyle.container]}>
|
|
46
|
+
<View style={[computedStyle.textContainer]}>
|
|
47
|
+
<Typography variant="overline" style={[computedStyle.textLabel]}>
|
|
48
|
+
{formatTime(timeLeft).days}
|
|
49
|
+
</Typography>
|
|
50
|
+
</View>
|
|
51
|
+
|
|
52
|
+
<View style={[computedStyle.dividerContainer]}>
|
|
53
|
+
<Typography variant="overline">:</Typography>
|
|
54
|
+
</View>
|
|
55
|
+
|
|
56
|
+
<View style={[computedStyle.textContainer]}>
|
|
57
|
+
<Typography variant="overline" style={[computedStyle.textLabel]}>
|
|
58
|
+
{formatTime(timeLeft).hours}
|
|
59
|
+
</Typography>
|
|
60
|
+
</View>
|
|
61
|
+
<View style={[computedStyle.dividerContainer]}>
|
|
62
|
+
<Typography variant="overline">:</Typography>
|
|
63
|
+
</View>
|
|
64
|
+
<View style={[computedStyle.textContainer]}>
|
|
65
|
+
<Typography variant="overline" style={[computedStyle.textLabel]}>
|
|
66
|
+
{formatTime(timeLeft).minutes}
|
|
67
|
+
</Typography>
|
|
68
|
+
</View>
|
|
69
|
+
<View style={[computedStyle.dividerContainer]}>
|
|
70
|
+
<Typography variant="overline">:</Typography>
|
|
71
|
+
</View>
|
|
72
|
+
<View style={[computedStyle.textContainer]}>
|
|
73
|
+
<Typography variant="overline" style={[computedStyle.textLabel]}>
|
|
74
|
+
{formatTime(timeLeft).seconds}
|
|
75
|
+
</Typography>
|
|
76
|
+
</View>
|
|
77
|
+
</View>
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
const calculateTimeRemaining = (
|
|
82
|
+
targetDateTime: CountdownProps['targetDateTime']
|
|
83
|
+
): number => {
|
|
84
|
+
const currentTime = new Date().getTime();
|
|
85
|
+
const targetTime = new Date(targetDateTime).getTime();
|
|
86
|
+
const difference = targetTime - currentTime;
|
|
87
|
+
return Math.max(0, difference);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const appendZero = (num: string | number) => {
|
|
91
|
+
if (Number(num) < 10) {
|
|
92
|
+
return `0${0}`;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return num;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export { Countdown };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
|
|
3
|
+
import { Palettes, Radius, Spacing } from '../../themes';
|
|
4
|
+
|
|
5
|
+
import type { TextStyle, ViewStyle } from 'react-native';
|
|
6
|
+
|
|
7
|
+
interface ComputedStyleProps {
|
|
8
|
+
container?: ViewStyle;
|
|
9
|
+
textLabel?: TextStyle;
|
|
10
|
+
textContainer?: ViewStyle;
|
|
11
|
+
dividerContainer?: ViewStyle;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const getStyle = () => {
|
|
15
|
+
const computedStyle: ComputedStyleProps = {};
|
|
16
|
+
|
|
17
|
+
computedStyle.container = {
|
|
18
|
+
flexDirection: 'row',
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
computedStyle.textLabel = {
|
|
22
|
+
color: Palettes.white[50],
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
computedStyle.textContainer = {
|
|
26
|
+
backgroundColor: Palettes.black[900],
|
|
27
|
+
justifyContent: 'center',
|
|
28
|
+
alignItems: 'center',
|
|
29
|
+
borderRadius: Radius[4],
|
|
30
|
+
paddingHorizontal: Spacing[4],
|
|
31
|
+
minWidth: 22,
|
|
32
|
+
height: 18,
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
computedStyle.dividerContainer = {
|
|
36
|
+
justifyContent: 'center',
|
|
37
|
+
alignItems: 'center',
|
|
38
|
+
width: 8,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
return StyleSheet.create(computedStyle);
|
|
42
|
+
};
|
package/src/components/index.ts
CHANGED
|
@@ -21,6 +21,7 @@ export { Switch } from './switch/switch.component';
|
|
|
21
21
|
export { Dot } from './dot/dot.component';
|
|
22
22
|
export { InformationBox } from './information-box/information-box.component';
|
|
23
23
|
export { RoundedTab } from './rounded-tab/rounded-tab.component';
|
|
24
|
+
export { Countdown } from './countdown/countdown.component';
|
|
24
25
|
|
|
25
26
|
export type { ButtonProps } from './button/button.type';
|
|
26
27
|
export type { TextInputProps } from './TextInput/TextInput.type';
|
package/src/icons/index.ts
CHANGED
|
@@ -2,10 +2,12 @@ export { IconArrowLeft } from './navigations/IconArrowLeft';
|
|
|
2
2
|
export { IconArrowRight } from './navigations/IconArrowRight';
|
|
3
3
|
export { IconArrowUp } from './navigations/IconArrowUp';
|
|
4
4
|
export { IconArrowDown } from './navigations/IconArrowDown';
|
|
5
|
+
export { IconArrowDiagonal } from './navigations/IconArrowDiagonal';
|
|
5
6
|
export { IconChevronDown } from './navigations/IconChevronDown';
|
|
6
7
|
export { IconChevronUp } from './navigations/IconChevronUp';
|
|
7
8
|
export { IconChevronRight } from './navigations/IconChevronRight';
|
|
8
9
|
export { IconChevronLeft } from './navigations/IconChevronLeft';
|
|
10
|
+
export { IconClose } from './navigations/IconClose';
|
|
9
11
|
|
|
10
12
|
export { IconAddMinus } from './actions/IconAddMinus';
|
|
11
13
|
export { IconAddPlus } from './actions/IconAddPlus';
|