@adiraku/react-native-ui 0.1.16 → 0.2.0
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/README.md +38 -59
- package/lib/commonjs/components/CheckBoxInput/CheckBoxInput.component.js +19 -10
- package/lib/commonjs/components/CheckBoxInput/CheckBoxInput.component.js.map +1 -1
- package/lib/commonjs/components/RadioInput/RadioInput.component.js +19 -10
- package/lib/commonjs/components/RadioInput/RadioInput.component.js.map +1 -1
- package/lib/commonjs/components/Snackbar/Snackbar.component.js +49 -1
- package/lib/commonjs/components/Snackbar/Snackbar.component.js.map +1 -1
- package/lib/commonjs/components/Snackbar/Snakbar.style.js +4 -0
- package/lib/commonjs/components/Snackbar/Snakbar.style.js.map +1 -1
- package/lib/commonjs/components/TextInput/TextInput.component.js +3 -7
- package/lib/commonjs/components/TextInput/TextInput.component.js.map +1 -1
- package/lib/commonjs/components/button/button.component.js +8 -3
- package/lib/commonjs/components/button/button.component.js.map +1 -1
- package/lib/commonjs/components/countdown/countdown.component.js +45 -47
- package/lib/commonjs/components/countdown/countdown.component.js.map +1 -1
- package/lib/commonjs/components/countdown/countdown.style.js +2 -1
- package/lib/commonjs/components/countdown/countdown.style.js.map +1 -1
- package/lib/commonjs/components/index.js +6 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/module/components/CheckBoxInput/CheckBoxInput.component.js +19 -10
- package/lib/module/components/CheckBoxInput/CheckBoxInput.component.js.map +1 -1
- package/lib/module/components/RadioInput/RadioInput.component.js +19 -10
- package/lib/module/components/RadioInput/RadioInput.component.js.map +1 -1
- package/lib/module/components/Snackbar/Snackbar.component.js +48 -2
- package/lib/module/components/Snackbar/Snackbar.component.js.map +1 -1
- package/lib/module/components/Snackbar/Snakbar.style.js +4 -0
- package/lib/module/components/Snackbar/Snakbar.style.js.map +1 -1
- package/lib/module/components/TextInput/TextInput.component.js +3 -7
- package/lib/module/components/TextInput/TextInput.component.js.map +1 -1
- package/lib/module/components/button/button.component.js +8 -3
- package/lib/module/components/button/button.component.js.map +1 -1
- package/lib/module/components/countdown/countdown.component.js +45 -47
- package/lib/module/components/countdown/countdown.component.js.map +1 -1
- package/lib/module/components/countdown/countdown.style.js +2 -1
- package/lib/module/components/countdown/countdown.style.js.map +1 -1
- package/lib/module/components/index.js +1 -1
- package/lib/module/components/index.js.map +1 -1
- package/lib/typescript/components/CheckBoxInput/CheckBoxInput.component.d.ts.map +1 -1
- package/lib/typescript/components/CheckBoxInput/CheckBoxInput.type.d.ts +9 -0
- package/lib/typescript/components/CheckBoxInput/CheckBoxInput.type.d.ts.map +1 -1
- package/lib/typescript/components/RadioInput/RadioInput.component.d.ts.map +1 -1
- package/lib/typescript/components/RadioInput/RadioInput.type.d.ts +9 -0
- package/lib/typescript/components/RadioInput/RadioInput.type.d.ts.map +1 -1
- package/lib/typescript/components/Snackbar/Snackbar.component.d.ts +10 -3
- package/lib/typescript/components/Snackbar/Snackbar.component.d.ts.map +1 -1
- package/lib/typescript/components/Snackbar/Snakbar.style.d.ts +1 -0
- package/lib/typescript/components/Snackbar/Snakbar.style.d.ts.map +1 -1
- package/lib/typescript/components/TextInput/TextInput.component.d.ts.map +1 -1
- package/lib/typescript/components/button/button.component.d.ts.map +1 -1
- package/lib/typescript/components/countdown/countdown.component.d.ts.map +1 -1
- package/lib/typescript/components/countdown/countdown.style.d.ts.map +1 -1
- package/lib/typescript/components/countdown/countdown.type.d.ts +5 -0
- package/lib/typescript/components/countdown/countdown.type.d.ts.map +1 -1
- package/lib/typescript/components/index.d.ts +1 -1
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/package.json +5 -3
- package/src/components/CheckBoxInput/CheckBoxInput.component.tsx +22 -16
- package/src/components/CheckBoxInput/CheckBoxInput.type.ts +12 -0
- package/src/components/RadioInput/RadioInput.component.tsx +26 -17
- package/src/components/RadioInput/RadioInput.type.ts +12 -0
- package/src/components/Snackbar/Snackbar.component.tsx +53 -2
- package/src/components/Snackbar/Snakbar.style.tsx +6 -0
- package/src/components/TextInput/TextInput.component.tsx +3 -7
- package/src/components/button/button.component.tsx +8 -3
- package/src/components/countdown/countdown.component.tsx +44 -43
- package/src/components/countdown/countdown.style.tsx +1 -0
- package/src/components/countdown/countdown.type.ts +6 -0
- package/src/components/index.ts +1 -1
|
@@ -33,10 +33,19 @@ export interface RadioInputProps {
|
|
|
33
33
|
saveInputLabel: string;
|
|
34
34
|
bottomSheetOpt: Omit<BottomSheetProps, 'visibility' | 'onDismiss'>;
|
|
35
35
|
onInputDismiss?: () => void;
|
|
36
|
+
customRadioInput?: (props: RadioItemPropsComponent) => any;
|
|
37
|
+
customItemSeparator?: any;
|
|
36
38
|
}
|
|
37
39
|
export declare type RadioItemProps = {
|
|
38
40
|
label: string;
|
|
39
41
|
value: string;
|
|
40
42
|
disabled?: boolean;
|
|
41
43
|
};
|
|
44
|
+
export declare type RadioItemPropsComponent = {
|
|
45
|
+
data: {
|
|
46
|
+
item: RadioItemProps;
|
|
47
|
+
};
|
|
48
|
+
selectedValue?: RadioItemProps;
|
|
49
|
+
onItemPress?: (value: RadioItemProps) => void;
|
|
50
|
+
};
|
|
42
51
|
//# sourceMappingURL=RadioInput.type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioInput.type.d.ts","sourceRoot":"","sources":["../../../../src/components/RadioInput/RadioInput.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB,KAAK,CAAC,EAAE,cAAc,CAAC;IAEvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,IAAI,CAAC,EAAE,cAAc,EAAE,CAAC;IAExB,WAAW,CAAC,EAAE,CAAC,aAAa,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IAEvD,cAAc,EAAE,MAAM,CAAC;IAEvB,cAAc,EAAE,IAAI,CAAC,gBAAgB,EAAE,YAAY,GAAG,WAAW,CAAC,CAAC;IAEnE,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"RadioInput.type.d.ts","sourceRoot":"","sources":["../../../../src/components/RadioInput/RadioInput.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB,KAAK,CAAC,EAAE,cAAc,CAAC;IAEvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,IAAI,CAAC,EAAE,cAAc,EAAE,CAAC;IAExB,WAAW,CAAC,EAAE,CAAC,aAAa,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IAEvD,cAAc,EAAE,MAAM,CAAC;IAEvB,cAAc,EAAE,IAAI,CAAC,gBAAgB,EAAE,YAAY,GAAG,WAAW,CAAC,CAAC;IAEnE,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAE5B,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,uBAAuB,KAAK,GAAG,CAAC;IAE3D,mBAAmB,CAAC,EAAE,GAAG,CAAC;CAC3B;AAED,oBAAY,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,oBAAY,uBAAuB,GAAG;IACpC,IAAI,EAAE;QACJ,IAAI,EAAE,cAAc,CAAC;KACtB,CAAC;IACF,aAAa,CAAC,EAAE,cAAc,CAAC;IAC/B,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;CAC/C,CAAC"}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import
|
|
3
|
-
declare
|
|
4
|
-
|
|
2
|
+
import { ToastProps, ToastShowParams, ToastHideParams } from 'react-native-toast-message';
|
|
3
|
+
declare function SnackbarComponent(props: ToastProps): JSX.Element;
|
|
4
|
+
declare const Snackbar: {
|
|
5
|
+
show: (params: Omit<ToastShowParams, 'props' | 'text1' | 'text2' | 'type'> & {
|
|
6
|
+
message: string;
|
|
7
|
+
action?: React.ReactNode;
|
|
8
|
+
}) => void;
|
|
9
|
+
hide: (params: ToastHideParams) => void;
|
|
10
|
+
};
|
|
11
|
+
export { Snackbar, SnackbarComponent };
|
|
5
12
|
//# sourceMappingURL=Snackbar.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Snackbar.component.d.ts","sourceRoot":"","sources":["../../../../src/components/Snackbar/Snackbar.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Snackbar.component.d.ts","sourceRoot":"","sources":["../../../../src/components/Snackbar/Snackbar.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAgB,EACd,UAAU,EACV,eAAe,EACf,eAAe,EAChB,MAAM,4BAA4B,CAAC;AA0BpC,iBAAS,iBAAiB,CAAC,KAAK,EAAE,UAAU,eAuB3C;AAED,QAAA,MAAM,QAAQ;mBAEF,KAAK,eAAe,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC,GAAG;QACpE,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,SAAS,CAAC;KAC1B;mBAWY,eAAe;CAG/B,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Snakbar.style.d.ts","sourceRoot":"","sources":["../../../../src/components/Snackbar/Snakbar.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,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,aAAa,CAAC,EAAE,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"Snakbar.style.d.ts","sourceRoot":"","sources":["../../../../src/components/Snackbar/Snakbar.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,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,aAAa,CAAC,EAAE,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,QAAQ,0BA2BpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.component.d.ts","sourceRoot":"","sources":["../../../../src/components/TextInput/TextInput.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AASvD,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,
|
|
1
|
+
{"version":3,"file":"TextInput.component.d.ts","sourceRoot":"","sources":["../../../../src/components/TextInput/TextInput.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AASvD,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CA2GtD,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.component.d.ts","sourceRoot":"","sources":["../../../../src/components/button/button.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"button.component.d.ts","sourceRoot":"","sources":["../../../../src/components/button/button.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAmCjC,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -1 +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,
|
|
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,CAuEtD,CAAC;AAmBF,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1 +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,
|
|
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,0BA6BpB,CAAC"}
|
|
@@ -3,5 +3,10 @@ export interface CountdownProps {
|
|
|
3
3
|
* The target time in Date format, ex: 'YYYY-MM-DD hh:mm:ss'
|
|
4
4
|
*/
|
|
5
5
|
targetDateTime: string | number | Date;
|
|
6
|
+
formats?: {
|
|
7
|
+
type: 'd' | 'h' | 'm' | 's';
|
|
8
|
+
trailingString?: string;
|
|
9
|
+
leadingString?: string;
|
|
10
|
+
}[];
|
|
6
11
|
}
|
|
7
12
|
//# sourceMappingURL=countdown.type.d.ts.map
|
|
@@ -1 +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;
|
|
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;IAEvC,OAAO,CAAC,EAAE;QACR,IAAI,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;QAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,EAAE,CAAC;CACL"}
|
|
@@ -16,7 +16,7 @@ export { RadioInput } from './RadioInput/RadioInput.component';
|
|
|
16
16
|
export { CheckBoxInput } from './CheckBoxInput/CheckBoxInput.component';
|
|
17
17
|
export { Checkbox } from './Checkbox/Checkbox.component';
|
|
18
18
|
export { Appbar } from './Appbar/Appbar.component';
|
|
19
|
-
export { Snackbar } from './Snackbar/Snackbar.component';
|
|
19
|
+
export { Snackbar, SnackbarComponent } from './Snackbar/Snackbar.component';
|
|
20
20
|
export { Switch } from './switch/switch.component';
|
|
21
21
|
export { Dot } from './dot/dot.component';
|
|
22
22
|
export { InformationBox } from './information-box/information-box.component';
|
|
@@ -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,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,+CAA+C,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;
|
|
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,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,+CAA+C,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,YAAY,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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adiraku/react-native-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "test",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"test": "jest",
|
|
31
31
|
"typecheck": "tsc --noEmit",
|
|
32
32
|
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
33
|
+
"lint-fix": "eslint \"**/*.{js,ts,tsx}\" --fix",
|
|
33
34
|
"prepack": "bob build",
|
|
34
35
|
"release": "release-it",
|
|
35
36
|
"example": "yarn --cwd example",
|
|
@@ -67,11 +68,11 @@
|
|
|
67
68
|
"react": "18.2.0",
|
|
68
69
|
"react-native": "0.71.1",
|
|
69
70
|
"react-native-builder-bob": "^0.20.0",
|
|
71
|
+
"react-native-svg": "^13.9.0",
|
|
70
72
|
"react-native-svg-web": "^1.0.9",
|
|
71
73
|
"react-native-web": "^0.19.4",
|
|
72
74
|
"release-it": "^15.0.0",
|
|
73
|
-
"typescript": "4.5.2"
|
|
74
|
-
"react-native-svg": "^13.9.0"
|
|
75
|
+
"typescript": "4.5.2"
|
|
75
76
|
},
|
|
76
77
|
"resolutions": {
|
|
77
78
|
"@types/react": "17.0.21"
|
|
@@ -125,5 +126,6 @@
|
|
|
125
126
|
]
|
|
126
127
|
},
|
|
127
128
|
"dependencies": {
|
|
129
|
+
"react-native-toast-message": "^2.1.6"
|
|
128
130
|
}
|
|
129
131
|
}
|
|
@@ -18,6 +18,7 @@ import { Divider } from '../Divider/Divider.component';
|
|
|
18
18
|
import type {
|
|
19
19
|
CheckboxInputProps,
|
|
20
20
|
CheckboxItemProps,
|
|
21
|
+
CheckboxItemPropsComponent,
|
|
21
22
|
} from './CheckBoxInput.type';
|
|
22
23
|
import { Checkbox } from '../Checkbox/Checkbox.component';
|
|
23
24
|
|
|
@@ -42,6 +43,8 @@ const CheckBoxInput: React.FunctionComponent<CheckboxInputProps> = (props) => {
|
|
|
42
43
|
bottomSheetOpt,
|
|
43
44
|
selectionLimit,
|
|
44
45
|
onInputDismiss = () => {},
|
|
46
|
+
customCheckboxInput,
|
|
47
|
+
customItemSeparator = <Divider />,
|
|
45
48
|
} = props;
|
|
46
49
|
|
|
47
50
|
const [labelWidth, setLabelWidth] = React.useState(0);
|
|
@@ -187,17 +190,26 @@ const CheckBoxInput: React.FunctionComponent<CheckboxInputProps> = (props) => {
|
|
|
187
190
|
>
|
|
188
191
|
<FlatList
|
|
189
192
|
data={data}
|
|
190
|
-
renderItem={(item) =>
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
193
|
+
renderItem={(item) => {
|
|
194
|
+
if (customCheckboxInput) {
|
|
195
|
+
return customCheckboxInput({
|
|
196
|
+
data: item,
|
|
197
|
+
selectedValue: selectedValue,
|
|
198
|
+
onItemPress: onCheckboxItemPress,
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
return (
|
|
203
|
+
<CheckboxItem
|
|
204
|
+
data={item}
|
|
205
|
+
selectedValue={selectedValue}
|
|
206
|
+
onItemPress={onCheckboxItemPress}
|
|
207
|
+
/>
|
|
208
|
+
);
|
|
209
|
+
}}
|
|
197
210
|
// eslint-disable-next-line react-native/no-inline-styles
|
|
198
211
|
contentContainerStyle={{ padding: 16 }}
|
|
199
|
-
|
|
200
|
-
ItemSeparatorComponent={() => <Divider />}
|
|
212
|
+
ItemSeparatorComponent={() => customItemSeparator}
|
|
201
213
|
/>
|
|
202
214
|
{/* eslint-disable-next-line react-native/no-inline-styles */}
|
|
203
215
|
<View style={{ padding: 16, backgroundColor: 'transparent' }}>
|
|
@@ -216,13 +228,7 @@ function CheckboxItem({
|
|
|
216
228
|
data,
|
|
217
229
|
selectedValue,
|
|
218
230
|
onItemPress = () => {},
|
|
219
|
-
}: {
|
|
220
|
-
data: {
|
|
221
|
-
item: CheckboxItemProps;
|
|
222
|
-
};
|
|
223
|
-
selectedValue?: CheckboxItemProps[];
|
|
224
|
-
onItemPress?: (value: CheckboxItemProps) => void;
|
|
225
|
-
}) {
|
|
231
|
+
}: CheckboxItemPropsComponent) {
|
|
226
232
|
const { item } = data;
|
|
227
233
|
const computedStyle = getStyle({} as CheckboxInputProps);
|
|
228
234
|
|
|
@@ -47,6 +47,10 @@ export interface CheckboxInputProps {
|
|
|
47
47
|
selectionLimit?: number;
|
|
48
48
|
|
|
49
49
|
onInputDismiss?: () => void;
|
|
50
|
+
|
|
51
|
+
customCheckboxInput?: (props: CheckboxItemPropsComponent) => any;
|
|
52
|
+
|
|
53
|
+
customItemSeparator?: any;
|
|
50
54
|
}
|
|
51
55
|
|
|
52
56
|
export type CheckboxItemProps = {
|
|
@@ -54,3 +58,11 @@ export type CheckboxItemProps = {
|
|
|
54
58
|
value: string;
|
|
55
59
|
disabled?: boolean;
|
|
56
60
|
};
|
|
61
|
+
|
|
62
|
+
export type CheckboxItemPropsComponent = {
|
|
63
|
+
data: {
|
|
64
|
+
item: CheckboxItemProps;
|
|
65
|
+
};
|
|
66
|
+
selectedValue?: CheckboxItemProps[];
|
|
67
|
+
onItemPress?: (value: CheckboxItemProps) => void;
|
|
68
|
+
};
|
|
@@ -17,7 +17,11 @@ import { RadioButton } from '../RadioButton/RadioButton.component';
|
|
|
17
17
|
import { Divider } from '../Divider/Divider.component';
|
|
18
18
|
|
|
19
19
|
import type { LayoutChangeEvent } from 'react-native';
|
|
20
|
-
import type {
|
|
20
|
+
import type {
|
|
21
|
+
RadioInputProps,
|
|
22
|
+
RadioItemProps,
|
|
23
|
+
RadioItemPropsComponent,
|
|
24
|
+
} from './RadioInput.type';
|
|
21
25
|
|
|
22
26
|
const RadioInput: React.FunctionComponent<RadioInputProps> = (props) => {
|
|
23
27
|
const {
|
|
@@ -36,6 +40,8 @@ const RadioInput: React.FunctionComponent<RadioInputProps> = (props) => {
|
|
|
36
40
|
saveInputLabel,
|
|
37
41
|
bottomSheetOpt,
|
|
38
42
|
onInputDismiss = () => {},
|
|
43
|
+
customRadioInput,
|
|
44
|
+
customItemSeparator = <Divider />,
|
|
39
45
|
} = props;
|
|
40
46
|
|
|
41
47
|
const [labelWidth, setLabelWidth] = React.useState(0);
|
|
@@ -157,17 +163,26 @@ const RadioInput: React.FunctionComponent<RadioInputProps> = (props) => {
|
|
|
157
163
|
>
|
|
158
164
|
<FlatList
|
|
159
165
|
data={data}
|
|
160
|
-
renderItem={(item) =>
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
166
|
+
renderItem={(item) => {
|
|
167
|
+
if (customRadioInput) {
|
|
168
|
+
return customRadioInput({
|
|
169
|
+
data: item,
|
|
170
|
+
selectedValue: selectedValue,
|
|
171
|
+
onItemPress: onRadioItemPress,
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
return (
|
|
176
|
+
<RadioItem
|
|
177
|
+
data={item}
|
|
178
|
+
selectedValue={selectedValue}
|
|
179
|
+
onItemPress={onRadioItemPress}
|
|
180
|
+
/>
|
|
181
|
+
);
|
|
182
|
+
}}
|
|
167
183
|
// eslint-disable-next-line react-native/no-inline-styles
|
|
168
184
|
contentContainerStyle={{ padding: 16 }}
|
|
169
|
-
|
|
170
|
-
ItemSeparatorComponent={() => <Divider />}
|
|
185
|
+
ItemSeparatorComponent={() => customItemSeparator}
|
|
171
186
|
/>
|
|
172
187
|
{/* eslint-disable-next-line react-native/no-inline-styles */}
|
|
173
188
|
<View style={{ padding: 16, backgroundColor: 'transparent' }}>
|
|
@@ -186,13 +201,7 @@ function RadioItem({
|
|
|
186
201
|
data,
|
|
187
202
|
selectedValue,
|
|
188
203
|
onItemPress = () => {},
|
|
189
|
-
}: {
|
|
190
|
-
data: {
|
|
191
|
-
item: RadioItemProps;
|
|
192
|
-
};
|
|
193
|
-
selectedValue?: RadioItemProps;
|
|
194
|
-
onItemPress?: (value: RadioItemProps) => void;
|
|
195
|
-
}) {
|
|
204
|
+
}: RadioItemPropsComponent) {
|
|
196
205
|
const { item } = data;
|
|
197
206
|
const computedStyle = getStyle({} as RadioInputProps);
|
|
198
207
|
|
|
@@ -45,6 +45,10 @@ export interface RadioInputProps {
|
|
|
45
45
|
bottomSheetOpt: Omit<BottomSheetProps, 'visibility' | 'onDismiss'>;
|
|
46
46
|
|
|
47
47
|
onInputDismiss?: () => void;
|
|
48
|
+
|
|
49
|
+
customRadioInput?: (props: RadioItemPropsComponent) => any;
|
|
50
|
+
|
|
51
|
+
customItemSeparator?: any;
|
|
48
52
|
}
|
|
49
53
|
|
|
50
54
|
export type RadioItemProps = {
|
|
@@ -52,3 +56,11 @@ export type RadioItemProps = {
|
|
|
52
56
|
value: string;
|
|
53
57
|
disabled?: boolean;
|
|
54
58
|
};
|
|
59
|
+
|
|
60
|
+
export type RadioItemPropsComponent = {
|
|
61
|
+
data: {
|
|
62
|
+
item: RadioItemProps;
|
|
63
|
+
};
|
|
64
|
+
selectedValue?: RadioItemProps;
|
|
65
|
+
onItemPress?: (value: RadioItemProps) => void;
|
|
66
|
+
};
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
|
+
import RNToast, {
|
|
4
|
+
ToastProps,
|
|
5
|
+
ToastShowParams,
|
|
6
|
+
ToastHideParams,
|
|
7
|
+
} from 'react-native-toast-message';
|
|
3
8
|
|
|
4
9
|
import { Typography } from '../typography/typography.component';
|
|
5
10
|
import { getStyle } from './Snakbar.style';
|
|
6
11
|
|
|
7
12
|
import type { SnackbarProps } from './Snackbar.type';
|
|
8
13
|
|
|
9
|
-
const
|
|
14
|
+
const SnackbarUI: React.FunctionComponent<SnackbarProps> = (props) => {
|
|
10
15
|
const { message = '', action = null, containerStyle } = props;
|
|
11
16
|
|
|
12
17
|
const computedStyle = getStyle();
|
|
@@ -25,4 +30,50 @@ const Snackbar: React.FunctionComponent<SnackbarProps> = (props) => {
|
|
|
25
30
|
);
|
|
26
31
|
};
|
|
27
32
|
|
|
28
|
-
|
|
33
|
+
function SnackbarComponent(props: ToastProps) {
|
|
34
|
+
const computedStyle = getStyle();
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<RNToast
|
|
38
|
+
{...props}
|
|
39
|
+
config={{
|
|
40
|
+
...props.config,
|
|
41
|
+
// eslint-disable-next-line react/no-unstable-nested-components
|
|
42
|
+
aleph_toast: ({ props: toastProps }: { props: SnackbarProps }) => {
|
|
43
|
+
const { message, action } = toastProps;
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<View style={[computedStyle.snackbarWrapper]}>
|
|
47
|
+
<SnackbarUI message={message} action={action} />
|
|
48
|
+
</View>
|
|
49
|
+
);
|
|
50
|
+
},
|
|
51
|
+
}}
|
|
52
|
+
type="aleph_toast"
|
|
53
|
+
position="bottom"
|
|
54
|
+
/>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const Snackbar = {
|
|
59
|
+
show: (
|
|
60
|
+
params: Omit<ToastShowParams, 'props' | 'text1' | 'text2' | 'type'> & {
|
|
61
|
+
message: string;
|
|
62
|
+
action?: React.ReactNode;
|
|
63
|
+
}
|
|
64
|
+
) => {
|
|
65
|
+
const { message = '', action } = params;
|
|
66
|
+
RNToast.show({
|
|
67
|
+
...params,
|
|
68
|
+
props: {
|
|
69
|
+
message,
|
|
70
|
+
action,
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
},
|
|
74
|
+
hide: (params: ToastHideParams) => {
|
|
75
|
+
RNToast.hide(params);
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export { Snackbar, SnackbarComponent };
|
|
@@ -6,6 +6,7 @@ import type { ViewStyle, TextStyle } from 'react-native';
|
|
|
6
6
|
|
|
7
7
|
interface ComputedStyleProps {
|
|
8
8
|
container?: ViewStyle;
|
|
9
|
+
snackbarWrapper?: ViewStyle;
|
|
9
10
|
message?: TextStyle;
|
|
10
11
|
actionWrapper?: ViewStyle;
|
|
11
12
|
}
|
|
@@ -23,6 +24,11 @@ export const getStyle = () => {
|
|
|
23
24
|
...Shadow['shadow-elevation-1'],
|
|
24
25
|
};
|
|
25
26
|
|
|
27
|
+
computedStyle.snackbarWrapper = {
|
|
28
|
+
width: '100%',
|
|
29
|
+
paddingHorizontal: Spacing[16],
|
|
30
|
+
};
|
|
31
|
+
|
|
26
32
|
computedStyle.message = {
|
|
27
33
|
flex: 1,
|
|
28
34
|
};
|
|
@@ -50,27 +50,23 @@ const TextInput: React.FunctionComponent<TextInputProps> = (props) => {
|
|
|
50
50
|
}).start();
|
|
51
51
|
|
|
52
52
|
React.useEffect(() => {
|
|
53
|
-
if (value) {
|
|
53
|
+
if (focused || !!value) {
|
|
54
54
|
animate(1);
|
|
55
55
|
} else {
|
|
56
56
|
animate(0);
|
|
57
57
|
}
|
|
58
|
-
}, [value]);
|
|
58
|
+
}, [value, focused]);
|
|
59
59
|
|
|
60
60
|
const handleOnFocus = (
|
|
61
61
|
event: NativeSyntheticEvent<TextInputFocusEventData>
|
|
62
62
|
) => {
|
|
63
|
-
animate(1);
|
|
64
63
|
setFocused(true);
|
|
65
64
|
onBlur(event);
|
|
66
65
|
};
|
|
67
66
|
const handleOnBlur = (
|
|
68
67
|
event: NativeSyntheticEvent<TextInputFocusEventData>
|
|
69
68
|
) => {
|
|
70
|
-
|
|
71
|
-
animate(0);
|
|
72
|
-
onFocus(event);
|
|
73
|
-
}
|
|
69
|
+
onFocus(event);
|
|
74
70
|
setFocused(false);
|
|
75
71
|
};
|
|
76
72
|
|
|
@@ -12,20 +12,25 @@ const Button: React.FC<ButtonProps> = (props) => {
|
|
|
12
12
|
onPress = () => {},
|
|
13
13
|
variant = 'primary',
|
|
14
14
|
label = 'Default',
|
|
15
|
-
size = '
|
|
15
|
+
size = 'small',
|
|
16
16
|
containerStyles,
|
|
17
17
|
textStyles,
|
|
18
18
|
...rest
|
|
19
19
|
} = props;
|
|
20
20
|
|
|
21
|
-
const computedStyle = getStyle(
|
|
21
|
+
const computedStyle = getStyle({
|
|
22
|
+
...props,
|
|
23
|
+
variant,
|
|
24
|
+
label,
|
|
25
|
+
size,
|
|
26
|
+
});
|
|
22
27
|
|
|
23
28
|
return (
|
|
24
29
|
<TouchableHighlight
|
|
25
30
|
onPress={onPress}
|
|
26
31
|
style={[computedStyle.container, containerStyles]}
|
|
27
32
|
underlayColor={
|
|
28
|
-
variant
|
|
33
|
+
variant !== 'primary' ? Palettes.blue[50] : Palettes.black[800]
|
|
29
34
|
}
|
|
30
35
|
{...rest}
|
|
31
36
|
>
|
|
@@ -7,7 +7,15 @@ import type { CountdownProps } from './countdown.type';
|
|
|
7
7
|
import { getStyle } from './countdown.style';
|
|
8
8
|
|
|
9
9
|
const Countdown: React.FunctionComponent<CountdownProps> = (props) => {
|
|
10
|
-
const {
|
|
10
|
+
const {
|
|
11
|
+
targetDateTime,
|
|
12
|
+
formats = [
|
|
13
|
+
{ type: 'd', trailingString: ' hari' },
|
|
14
|
+
{ type: 'h' },
|
|
15
|
+
{ type: 'm' },
|
|
16
|
+
{ type: 's' },
|
|
17
|
+
],
|
|
18
|
+
} = props;
|
|
11
19
|
|
|
12
20
|
const computedStyle = getStyle();
|
|
13
21
|
|
|
@@ -21,59 +29,52 @@ const Countdown: React.FunctionComponent<CountdownProps> = (props) => {
|
|
|
21
29
|
}, 1000);
|
|
22
30
|
|
|
23
31
|
return () => clearInterval(timer);
|
|
24
|
-
}, []);
|
|
32
|
+
}, [targetDateTime]);
|
|
25
33
|
|
|
26
34
|
const formatTime = (time: number) => {
|
|
27
35
|
if (time <= 0) {
|
|
28
36
|
return {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
37
|
+
d: appendZero(0),
|
|
38
|
+
h: appendZero(0),
|
|
39
|
+
m: appendZero(0),
|
|
40
|
+
s: appendZero(0),
|
|
33
41
|
};
|
|
34
42
|
}
|
|
35
43
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
44
|
+
time /= 1000;
|
|
45
|
+
let day = Math.floor(time / (24 * 3600));
|
|
46
|
+
let remainingSeconds = time % (24 * 3600);
|
|
47
|
+
let hour = Math.floor(remainingSeconds / 3600);
|
|
48
|
+
remainingSeconds %= 3600;
|
|
49
|
+
let minute = Math.floor(remainingSeconds / 60);
|
|
50
|
+
let second = remainingSeconds % 60;
|
|
51
|
+
|
|
52
|
+
return {
|
|
53
|
+
d: Math.floor(day),
|
|
54
|
+
h: Math.floor(hour),
|
|
55
|
+
m: Math.floor(minute),
|
|
56
|
+
s: Math.floor(second),
|
|
57
|
+
};
|
|
42
58
|
};
|
|
43
59
|
|
|
44
60
|
return (
|
|
45
61
|
<View style={[computedStyle.container]}>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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>
|
|
62
|
+
{formats.map(({ type, leadingString = '', trailingString = '' }, idx) => {
|
|
63
|
+
return (
|
|
64
|
+
<>
|
|
65
|
+
<View style={[computedStyle.textContainer]}>
|
|
66
|
+
<Typography variant="overline" style={[computedStyle.textLabel]}>
|
|
67
|
+
{leadingString + formatTime(timeLeft)?.[type] + trailingString}
|
|
68
|
+
</Typography>
|
|
69
|
+
</View>
|
|
70
|
+
{idx !== formats.length - 1 ? (
|
|
71
|
+
<View style={[computedStyle.dividerContainer]}>
|
|
72
|
+
<Typography variant="overline">:</Typography>
|
|
73
|
+
</View>
|
|
74
|
+
) : null}
|
|
75
|
+
</>
|
|
76
|
+
);
|
|
77
|
+
})}
|
|
77
78
|
</View>
|
|
78
79
|
);
|
|
79
80
|
};
|
package/src/components/index.ts
CHANGED
|
@@ -16,7 +16,7 @@ export { RadioInput } from './RadioInput/RadioInput.component';
|
|
|
16
16
|
export { CheckBoxInput } from './CheckBoxInput/CheckBoxInput.component';
|
|
17
17
|
export { Checkbox } from './Checkbox/Checkbox.component';
|
|
18
18
|
export { Appbar } from './Appbar/Appbar.component';
|
|
19
|
-
export { Snackbar } from './Snackbar/Snackbar.component';
|
|
19
|
+
export { Snackbar, SnackbarComponent } from './Snackbar/Snackbar.component';
|
|
20
20
|
export { Switch } from './switch/switch.component';
|
|
21
21
|
export { Dot } from './dot/dot.component';
|
|
22
22
|
export { InformationBox } from './information-box/information-box.component';
|