@rahmatsaputra-my-id/react-js-library 0.0.30 → 0.0.60

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.
Files changed (24) hide show
  1. package/dist/components/CheckBox/CheckBox.component.d.ts +4 -0
  2. package/dist/components/CheckBox/CheckBox.styles.d.ts +5 -0
  3. package/dist/components/CheckBox/CheckBox.types.d.ts +5 -0
  4. package/dist/components/CheckBox/index.d.ts +2 -0
  5. package/dist/components/CornerBadge/CornerBadge.component.d.ts +4 -0
  6. package/dist/components/CornerBadge/CornerBadge.styles.d.ts +32 -0
  7. package/dist/components/CornerBadge/CornerBadge.types.d.ts +4 -0
  8. package/dist/components/CornerBadge/index.d.ts +2 -0
  9. package/dist/components/DocumentUploader/DocumentUploader.component.d.ts +3 -0
  10. package/dist/components/DocumentUploader/DocumentUploader.component.styles.d.ts +95 -0
  11. package/dist/components/DocumentUploader/DocumentUploader.types.d.ts +24 -0
  12. package/dist/components/DocumentUploader/index.d.ts +2 -0
  13. package/dist/components/DocumentUploader/translation.id.d.ts +3 -0
  14. package/dist/components/DocumentUploader/translation.us.d.ts +3 -0
  15. package/dist/components/RadioButton/RadioButton.component.d.ts +4 -0
  16. package/dist/components/RadioButton/RadioButton.styles.d.ts +32 -0
  17. package/dist/components/RadioButton/RadioButton.types.d.ts +19 -0
  18. package/dist/components/RadioButton/SingleRadioButton.component.d.ts +4 -0
  19. package/dist/components/RadioButton/index.d.ts +2 -0
  20. package/dist/components/Switch/Switch.component.d.ts +3 -0
  21. package/dist/components/Switch/Switch.styles.d.ts +29 -0
  22. package/dist/components/Switch/Switch.types.d.ts +11 -0
  23. package/dist/components/Switch/index.d.ts +2 -0
  24. package/package.json +1 -1
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { CheckboxProps } from './CheckBox.types';
3
+ declare const Checkbox: React.FC<CheckboxProps>;
4
+ export default Checkbox;
@@ -0,0 +1,5 @@
1
+ import { CSSProperties } from 'react';
2
+ export declare const styles: {
3
+ label: CSSProperties;
4
+ input: CSSProperties;
5
+ };
@@ -0,0 +1,5 @@
1
+ export interface CheckboxProps {
2
+ checked?: boolean;
3
+ disabled?: boolean;
4
+ handleOnChecked?: (checked: boolean) => void;
5
+ }
@@ -0,0 +1,2 @@
1
+ export { default as CheckBox } from './CheckBox.component';
2
+ export * from './CheckBox.types';
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { CornerBadgeProps } from './CornerBadge.types';
3
+ declare const CornerBadge: React.FC<CornerBadgeProps>;
4
+ export default CornerBadge;
@@ -0,0 +1,32 @@
1
+ export declare const styles: {
2
+ badgeContainer: {
3
+ position: string;
4
+ zIndex: number;
5
+ pointerEvents: string;
6
+ };
7
+ ribbon: {
8
+ position: string;
9
+ top: number;
10
+ left: number;
11
+ width: string;
12
+ height: string;
13
+ overflow: string;
14
+ };
15
+ text: {
16
+ position: string;
17
+ left: number;
18
+ top: number;
19
+ transform: string;
20
+ background: string;
21
+ color: "#FFFFFF" | undefined;
22
+ paddingLeft: number;
23
+ paddingRight: number;
24
+ paddingTop: number;
25
+ paddingBottom: number;
26
+ fontWeight: string;
27
+ fontSize: number;
28
+ boxShadow: string;
29
+ borderTopRightRadius: string;
30
+ borderBottomLeftRadius: string;
31
+ };
32
+ };
@@ -0,0 +1,4 @@
1
+ export interface CornerBadgeProps {
2
+ text?: string;
3
+ visible?: boolean;
4
+ }
@@ -0,0 +1,2 @@
1
+ export { default as CornerBadge } from './CornerBadge.component';
2
+ export * from './CornerBadge.types';
@@ -0,0 +1,3 @@
1
+ import { DocumentUploaderProps } from './DocumentUploader.types';
2
+ declare const DocumentUploader: ({ allowedExtensions, maxUpload, maxSizeMB, lang, maxData, onChangeFiles, listErrorMessage, successMessage, }: DocumentUploaderProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default DocumentUploader;
@@ -0,0 +1,95 @@
1
+ export declare const styles: {
2
+ readonly wrapper: {
3
+ readonly width: "100%";
4
+ readonly display: "flex";
5
+ readonly flexDirection: "column";
6
+ };
7
+ readonly uploadBox: {
8
+ readonly border: "1px solid #d1d5db";
9
+ readonly borderRadius: "12px";
10
+ readonly backgroundColor: "#f9fafb";
11
+ readonly textAlign: "center";
12
+ readonly paddingBottom: 20;
13
+ };
14
+ readonly cloudIcon: {
15
+ readonly fontSize: "48px";
16
+ readonly color: "#9ca3af";
17
+ };
18
+ readonly title: {
19
+ readonly color: "#4b5563";
20
+ readonly marginTop: "8px";
21
+ readonly fontSize: "16px";
22
+ };
23
+ readonly subtitle: {
24
+ readonly color: "#9ca3af";
25
+ readonly fontSize: "14px";
26
+ readonly marginTop: "4px";
27
+ };
28
+ readonly noteContainer: {
29
+ readonly alignItems: "center";
30
+ };
31
+ readonly note: {
32
+ readonly color: "#9ca3af";
33
+ readonly marginBottom: 4;
34
+ };
35
+ readonly button: {
36
+ readonly marginTop: "24px";
37
+ readonly color: "white";
38
+ readonly padding: "12px 24px";
39
+ readonly borderRadius: "8px";
40
+ readonly fontSize: 14;
41
+ readonly fontWeight: 500;
42
+ readonly border: "none";
43
+ readonly display: "inline-block";
44
+ };
45
+ readonly hiddenInput: {
46
+ readonly display: "none";
47
+ };
48
+ readonly error: {
49
+ readonly marginTop: "16px";
50
+ readonly color: "#ef4444";
51
+ readonly fontSize: "14px";
52
+ readonly paddingLeft: 32;
53
+ readonly paddingRight: 32;
54
+ };
55
+ readonly success: {
56
+ readonly marginTop: "16px";
57
+ readonly color: "#229403ff";
58
+ readonly fontSize: "14px";
59
+ readonly paddingLeft: 32;
60
+ readonly paddingRight: 32;
61
+ };
62
+ readonly fileListBox: {
63
+ readonly border: "1px solid #d1d5db";
64
+ readonly borderRadius: "12px";
65
+ readonly paddingLeft: 16;
66
+ readonly paddingRight: 16;
67
+ readonly backgroundColor: "white";
68
+ readonly marginTop: 20;
69
+ };
70
+ readonly fileListHeader: {
71
+ readonly fontSize: "16px";
72
+ readonly color: "#374151";
73
+ readonly fontWeight: 600;
74
+ readonly marginBottom: 10;
75
+ };
76
+ readonly fileRow: {
77
+ readonly display: "flex";
78
+ readonly justifyContent: "space-between";
79
+ readonly alignItems: "center";
80
+ readonly marginBottom: 8;
81
+ };
82
+ readonly fileName: {
83
+ readonly color: "#16a34a";
84
+ readonly fontSize: "14px";
85
+ };
86
+ readonly removeButton: {
87
+ readonly backgroundColor: "#ef4444";
88
+ readonly color: "white";
89
+ readonly border: "none";
90
+ readonly padding: "6px 12px";
91
+ readonly borderRadius: "6px";
92
+ readonly fontSize: "12px";
93
+ readonly cursor: "pointer";
94
+ };
95
+ };
@@ -0,0 +1,24 @@
1
+ export interface DocumentUploaderProps {
2
+ allowedExtensions?: string[];
3
+ maxUpload?: number;
4
+ maxSizeMB?: number;
5
+ lang?: 'id' | 'us';
6
+ maxData?: number;
7
+ onChangeFiles?: (files: File[]) => void;
8
+ listErrorMessage?: string[] | false;
9
+ successMessage?: string | false;
10
+ }
11
+ export interface DocumentUploaderTranslation {
12
+ allowedFormat: (formats: string) => string;
13
+ errorInvalidFormat: (formats: string) => string;
14
+ errorMaxSize: (size: number) => string;
15
+ errorMaxUpload: (max: number) => string;
16
+ maxData: (max: number) => string;
17
+ maxSize: (size: number) => string;
18
+ maxUpload: (max: number) => string;
19
+ pickFile: string;
20
+ remove: string;
21
+ selectFileTitle: string;
22
+ uploadingFiles: (count: number, max: number) => string;
23
+ maximumLimit: string;
24
+ }
@@ -0,0 +1,2 @@
1
+ export { default as DocumentUploader } from './DocumentUploader.component';
2
+ export * from './DocumentUploader.types';
@@ -0,0 +1,3 @@
1
+ import { DocumentUploaderTranslation } from "./DocumentUploader.types";
2
+ declare const translationID: DocumentUploaderTranslation;
3
+ export default translationID;
@@ -0,0 +1,3 @@
1
+ import { DocumentUploaderTranslation } from "./DocumentUploader.types";
2
+ declare const translationUS: DocumentUploaderTranslation;
3
+ export default translationUS;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { RadioButtonProps } from './RadioButton.types';
3
+ declare const RadioButton: React.FC<RadioButtonProps>;
4
+ export default RadioButton;
@@ -0,0 +1,32 @@
1
+ export declare const styles: {
2
+ label: {
3
+ marginBottom: number;
4
+ };
5
+ singleRadioContainer: {
6
+ display: string;
7
+ marginBottom: string;
8
+ flexDirection: string;
9
+ };
10
+ outterBullet: {
11
+ width: number;
12
+ height: number;
13
+ borderRadius: number;
14
+ justifyContent: string;
15
+ alignItems: string;
16
+ backgroundColor: "#FFFFFF" | undefined;
17
+ marginRight: number;
18
+ border: string;
19
+ };
20
+ innerBulletActive: {
21
+ width: number;
22
+ height: number;
23
+ borderRadius: number;
24
+ backgroundColor: "#1A1A1A" | undefined;
25
+ };
26
+ innerBulletNotActive: {
27
+ width: number;
28
+ height: number;
29
+ borderRadius: number;
30
+ backgroundColor: "#FFFFFF" | undefined;
31
+ };
32
+ };
@@ -0,0 +1,19 @@
1
+ /// <reference types="react" />
2
+ export interface SingleRadioButtonProps {
3
+ value: string | number;
4
+ selectedOption: string | number;
5
+ handleChange: (value: string | number) => void;
6
+ children: React.ReactNode;
7
+ }
8
+ export interface RadioButtonProps {
9
+ label: string;
10
+ options: Array<{
11
+ [key: string]: any;
12
+ }>;
13
+ selectedValue: string | number;
14
+ onSelect?: (value: string | number) => void;
15
+ keyField?: string;
16
+ valueField?: string;
17
+ styleContainer?: React.CSSProperties;
18
+ renderItem?: (item: any) => React.ReactNode;
19
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { SingleRadioButtonProps } from './RadioButton.types';
3
+ declare const SingleRadioButton: React.FC<SingleRadioButtonProps>;
4
+ export { SingleRadioButton };
@@ -0,0 +1,2 @@
1
+ export { default as RadioButton } from './RadioButton.component';
2
+ export * from './RadioButton.types';
@@ -0,0 +1,3 @@
1
+ import { SwitchProps } from './Switch.types';
2
+ declare const Switch: ({ label, checked, onChange, style, labelOn, labelOff, isShowLabelToogle, withBorder, }: SwitchProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default Switch;
@@ -0,0 +1,29 @@
1
+ export declare const styles: {
2
+ containerWithBorder: {
3
+ display: string;
4
+ alignItems: string;
5
+ justifyContent: string;
6
+ marginTop: number;
7
+ marginBottom: number;
8
+ backgroundColor: "#FFFFFF" | undefined;
9
+ padding: number;
10
+ borderRadius: number;
11
+ border: string;
12
+ };
13
+ container: {
14
+ display: string;
15
+ alignItems: string;
16
+ justifyContent: string;
17
+ marginTop: number;
18
+ marginBottom: number;
19
+ };
20
+ toogleContainer: {
21
+ display: string;
22
+ flexDirection: "row";
23
+ alignItems: string;
24
+ };
25
+ toogleText: {
26
+ fontSize: string;
27
+ marginLeft: number;
28
+ };
29
+ };
@@ -0,0 +1,11 @@
1
+ import { CSSProperties } from 'react';
2
+ export interface SwitchProps {
3
+ label?: string;
4
+ checked?: boolean;
5
+ onChange: (checked: boolean) => void;
6
+ style?: CSSProperties;
7
+ labelOn?: string;
8
+ labelOff?: string;
9
+ isShowLabelToogle?: boolean;
10
+ withBorder?: boolean;
11
+ }
@@ -0,0 +1,2 @@
1
+ export { default as Switch } from './Switch.component';
2
+ export * from './Switch.types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rahmatsaputra-my-id/react-js-library",
3
- "version": "0.0.30",
3
+ "version": "0.0.60",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.es.js",
6
6
  "private": false,