@herca/rn-kit 0.1.25 → 0.1.27

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 (131) hide show
  1. package/README.md +2 -1
  2. package/lib/module/Badge/Badge.js.map +1 -1
  3. package/lib/module/Badge/type.js +2 -0
  4. package/lib/module/BottomSheet/BottomSheet.js +4 -1
  5. package/lib/module/BottomSheet/BottomSheet.js.map +1 -1
  6. package/lib/module/Button/tests/Button.test.js +70 -0
  7. package/lib/module/Button/tests/Button.test.js.map +1 -0
  8. package/lib/module/Button/type.js +1 -1
  9. package/lib/module/DatePicker/TimePicker.js +84 -39
  10. package/lib/module/DatePicker/TimePicker.js.map +1 -1
  11. package/lib/module/Icon/Icon.js +27 -1
  12. package/lib/module/Icon/Icon.js.map +1 -1
  13. package/lib/module/Icon/README.md +42 -26
  14. package/lib/module/Icon/icons/AtSign.js +22 -0
  15. package/lib/module/Icon/icons/AtSign.js.map +1 -0
  16. package/lib/module/Icon/icons/Bold.js +25 -0
  17. package/lib/module/Icon/icons/Bold.js.map +1 -0
  18. package/lib/module/Icon/icons/BriefcaseOutline.js +22 -0
  19. package/lib/module/Icon/icons/BriefcaseOutline.js.map +1 -0
  20. package/lib/module/Icon/icons/Edit.js +22 -0
  21. package/lib/module/Icon/icons/Edit.js.map +1 -0
  22. package/lib/module/Icon/icons/GlobeEarth.js +22 -0
  23. package/lib/module/Icon/icons/GlobeEarth.js.map +1 -0
  24. package/lib/module/Icon/icons/Italic.js +25 -0
  25. package/lib/module/Icon/icons/Italic.js.map +1 -0
  26. package/lib/module/Icon/icons/LockFill.js +22 -0
  27. package/lib/module/Icon/icons/LockFill.js.map +1 -0
  28. package/lib/module/Icon/icons/LogoHercaHris.js +64 -0
  29. package/lib/module/Icon/icons/LogoHercaHris.js.map +1 -0
  30. package/lib/module/Icon/icons/QuestionCircleOutline.js +22 -0
  31. package/lib/module/Icon/icons/QuestionCircleOutline.js.map +1 -0
  32. package/lib/module/Icon/icons/Scanner.js +3 -3
  33. package/lib/module/Icon/icons/Scanner.js.map +1 -1
  34. package/lib/module/Icon/icons/Search.js +2 -2
  35. package/lib/module/Icon/icons/Search.js.map +1 -1
  36. package/lib/module/Icon/icons/ShieldFill.js +22 -0
  37. package/lib/module/Icon/icons/ShieldFill.js.map +1 -0
  38. package/lib/module/Icon/icons/UnderLine.js +25 -0
  39. package/lib/module/Icon/icons/UnderLine.js.map +1 -0
  40. package/lib/module/Icon/icons/Users.js +22 -0
  41. package/lib/module/Icon/icons/Users.js.map +1 -0
  42. package/lib/module/Icon/icons/WhatsappFill.js +22 -0
  43. package/lib/module/Icon/icons/WhatsappFill.js.map +1 -0
  44. package/lib/module/Input/Input.js +17 -14
  45. package/lib/module/Input/Input.js.map +1 -1
  46. package/lib/module/Input/InputOtp.js +31 -12
  47. package/lib/module/Input/InputOtp.js.map +1 -1
  48. package/lib/module/Input/README_INPUT_OTP.md +60 -0
  49. package/lib/module/TextEditor/TextEditor.js +206 -4
  50. package/lib/module/TextEditor/TextEditor.js.map +1 -1
  51. package/lib/module/index.js +0 -1
  52. package/lib/module/index.js.map +1 -1
  53. package/lib/typescript/src/Badge/Badge.d.ts.map +1 -1
  54. package/lib/typescript/src/Badge/type.d.ts +8 -0
  55. package/lib/typescript/src/Badge/type.d.ts.map +1 -1
  56. package/lib/typescript/src/Button/tests/Button.test.d.ts +2 -0
  57. package/lib/typescript/src/Button/tests/Button.test.d.ts.map +1 -0
  58. package/lib/typescript/src/DatePicker/TimePicker.d.ts.map +1 -1
  59. package/lib/typescript/src/Icon/Icon.d.ts.map +1 -1
  60. package/lib/typescript/src/Icon/icons/AtSign.d.ts +9 -0
  61. package/lib/typescript/src/Icon/icons/AtSign.d.ts.map +1 -0
  62. package/lib/typescript/src/Icon/icons/Bold.d.ts +9 -0
  63. package/lib/typescript/src/Icon/icons/Bold.d.ts.map +1 -0
  64. package/lib/typescript/src/Icon/icons/BriefcaseOutline.d.ts +9 -0
  65. package/lib/typescript/src/Icon/icons/BriefcaseOutline.d.ts.map +1 -0
  66. package/lib/typescript/src/Icon/icons/Edit.d.ts +9 -0
  67. package/lib/typescript/src/Icon/icons/Edit.d.ts.map +1 -0
  68. package/lib/typescript/src/Icon/icons/GlobeEarth.d.ts +9 -0
  69. package/lib/typescript/src/Icon/icons/GlobeEarth.d.ts.map +1 -0
  70. package/lib/typescript/src/Icon/icons/Italic.d.ts +9 -0
  71. package/lib/typescript/src/Icon/icons/Italic.d.ts.map +1 -0
  72. package/lib/typescript/src/Icon/icons/LockFill.d.ts +9 -0
  73. package/lib/typescript/src/Icon/icons/LockFill.d.ts.map +1 -0
  74. package/lib/typescript/src/Icon/icons/LogoHercaHris.d.ts +8 -0
  75. package/lib/typescript/src/Icon/icons/LogoHercaHris.d.ts.map +1 -0
  76. package/lib/typescript/src/Icon/icons/QuestionCircleOutline.d.ts +9 -0
  77. package/lib/typescript/src/Icon/icons/QuestionCircleOutline.d.ts.map +1 -0
  78. package/lib/typescript/src/Icon/icons/Scanner.d.ts.map +1 -1
  79. package/lib/typescript/src/Icon/icons/ShieldFill.d.ts +9 -0
  80. package/lib/typescript/src/Icon/icons/ShieldFill.d.ts.map +1 -0
  81. package/lib/typescript/src/Icon/icons/UnderLine.d.ts +9 -0
  82. package/lib/typescript/src/Icon/icons/UnderLine.d.ts.map +1 -0
  83. package/lib/typescript/src/Icon/icons/Users.d.ts +9 -0
  84. package/lib/typescript/src/Icon/icons/Users.d.ts.map +1 -0
  85. package/lib/typescript/src/Icon/icons/WhatsappFill.d.ts +9 -0
  86. package/lib/typescript/src/Icon/icons/WhatsappFill.d.ts.map +1 -0
  87. package/lib/typescript/src/Icon/type.d.ts +1 -1
  88. package/lib/typescript/src/Icon/type.d.ts.map +1 -1
  89. package/lib/typescript/src/Input/Input.d.ts.map +1 -1
  90. package/lib/typescript/src/Input/InputOtp.d.ts +1 -0
  91. package/lib/typescript/src/Input/InputOtp.d.ts.map +1 -1
  92. package/lib/typescript/src/Input/type.d.ts +1 -0
  93. package/lib/typescript/src/Input/type.d.ts.map +1 -1
  94. package/lib/typescript/src/TextEditor/TextEditor.d.ts +2 -1
  95. package/lib/typescript/src/TextEditor/TextEditor.d.ts.map +1 -1
  96. package/lib/typescript/src/TextEditor/types.d.ts +7 -0
  97. package/lib/typescript/src/TextEditor/types.d.ts.map +1 -1
  98. package/lib/typescript/src/index.d.ts +3 -1
  99. package/lib/typescript/src/index.d.ts.map +1 -1
  100. package/package.json +2 -2
  101. package/src/Badge/Badge.tsx +1 -10
  102. package/src/Badge/type.tsx +10 -0
  103. package/src/BottomSheet/BottomSheet.tsx +4 -1
  104. package/src/Button/tests/Button.test.tsx +49 -0
  105. package/src/Button/type.tsx +1 -1
  106. package/src/DatePicker/TimePicker.tsx +116 -52
  107. package/src/Icon/Icon.tsx +26 -0
  108. package/src/Icon/README.md +42 -26
  109. package/src/Icon/icons/AtSign.tsx +19 -0
  110. package/src/Icon/icons/Bold.tsx +22 -0
  111. package/src/Icon/icons/BriefcaseOutline.tsx +29 -0
  112. package/src/Icon/icons/Edit.tsx +23 -0
  113. package/src/Icon/icons/GlobeEarth.tsx +19 -0
  114. package/src/Icon/icons/Italic.tsx +22 -0
  115. package/src/Icon/icons/LockFill.tsx +19 -0
  116. package/src/Icon/icons/LogoHercaHris.tsx +71 -0
  117. package/src/Icon/icons/QuestionCircleOutline.tsx +23 -0
  118. package/src/Icon/icons/Scanner.tsx +2 -8
  119. package/src/Icon/icons/Search.tsx +2 -2
  120. package/src/Icon/icons/ShieldFill.tsx +19 -0
  121. package/src/Icon/icons/UnderLine.tsx +26 -0
  122. package/src/Icon/icons/Users.tsx +19 -0
  123. package/src/Icon/icons/WhatsappFill.tsx +23 -0
  124. package/src/Icon/type.tsx +14 -1
  125. package/src/Input/Input.tsx +22 -14
  126. package/src/Input/InputOtp.tsx +33 -9
  127. package/src/Input/README_INPUT_OTP.md +60 -0
  128. package/src/Input/type.tsx +1 -0
  129. package/src/TextEditor/TextEditor.tsx +222 -3
  130. package/src/TextEditor/types.tsx +7 -0
  131. package/src/index.tsx +8 -1
@@ -1,5 +1,5 @@
1
- import React, { useRef } from 'react';
2
- import { View, TextInput, StyleSheet } from 'react-native';
1
+ import React, { useRef, useState } from 'react';
2
+ import { StyleSheet, TextInput, View } from 'react-native';
3
3
  import Color from '../Color/Color';
4
4
  import LabelForm from '../LabelForm/LabelForm';
5
5
  import Typography from '../Typography/Typography';
@@ -10,6 +10,7 @@ type InputOtpProps = {
10
10
  label?: string;
11
11
  hint?: string;
12
12
  hasError?: boolean;
13
+ inputCenter?: boolean;
13
14
  };
14
15
 
15
16
  const InputOtp: React.FC<InputOtpProps> = ({
@@ -18,9 +19,15 @@ const InputOtp: React.FC<InputOtpProps> = ({
18
19
  label,
19
20
  hint,
20
21
  hasError,
22
+ inputCenter = false,
21
23
  }) => {
22
24
  const inputs = useRef<Array<TextInput | null>>([]);
23
25
  const values = useRef<string[]>(Array(length).fill(''));
26
+ const [useFlexGrow, setUseFlexGrow] = useState<boolean>(false);
27
+
28
+ const containerWidth = useRef(0);
29
+ const itemWidth = 48;
30
+ const itemGap = 10;
24
31
 
25
32
  const handleChange = (text: string, index: number) => {
26
33
  values.current[index] = text;
@@ -44,7 +51,18 @@ const InputOtp: React.FC<InputOtpProps> = ({
44
51
  return (
45
52
  <View style={styles.gap4}>
46
53
  {label ? <LabelForm title={label} /> : null}
47
- <View style={styles.container}>
54
+ <View
55
+ style={[
56
+ styles.container,
57
+ { justifyContent: inputCenter ? 'center' : 'flex-start' },
58
+ ]}
59
+ onLayout={(e) => {
60
+ // cek apakah lebar container itu cukup untuk menampilkan semua input
61
+ containerWidth.current = e.nativeEvent.layout.width;
62
+ const totalNeededWidth = length * itemWidth + (length - 1) * itemGap;
63
+ setUseFlexGrow(totalNeededWidth > containerWidth.current);
64
+ }}
65
+ >
48
66
  {Array(length)
49
67
  .fill(0)
50
68
  .map((_, i) => (
@@ -52,19 +70,26 @@ const InputOtp: React.FC<InputOtpProps> = ({
52
70
  key={i}
53
71
  style={[
54
72
  styles.input,
55
- { borderColor: hasError ? Color.danger[500] : Color.gray[200] },
73
+ // eslint-disable-next-line react-native/no-inline-styles
74
+ {
75
+ borderColor: hasError ? Color.danger[500] : Color.gray[200],
76
+ width: useFlexGrow ? undefined : itemWidth, //jika cukup gunakan 48px
77
+ flexGrow: useFlexGrow ? 1 : 0, //jika tidak cukup, flexgrow 0
78
+ },
56
79
  ]}
57
80
  keyboardType="number-pad"
58
81
  maxLength={1}
59
82
  onChangeText={(text) => handleChange(text, i)}
60
83
  onKeyPress={(e) => handleKeyPress(e, i)}
61
- ref={(ref) => void (inputs.current[i] = ref)}
84
+ ref={(ref) => {
85
+ inputs.current[i] = ref;
86
+ }}
62
87
  />
63
88
  ))}
64
89
  </View>
65
90
 
66
91
  {hint ? (
67
- <Typography color={hasError ? Color.danger[500] : ''} variant="t2">
92
+ <Typography color={hasError ? Color.danger[500] : ''} variant="t3">
68
93
  {hint}
69
94
  </Typography>
70
95
  ) : null}
@@ -81,16 +106,15 @@ const styles = StyleSheet.create({
81
106
  container: {
82
107
  flexDirection: 'row',
83
108
  gap: 10,
84
- justifyContent: 'space-between',
85
109
  },
86
110
  input: {
87
- width: 48,
111
+ flexGrow: 1,
88
112
  height: 48,
89
113
  borderWidth: 1,
90
114
  borderRadius: 8,
91
115
  textAlign: 'center',
92
116
  color: Color.base.black100,
93
117
  fontSize: 12,
94
- fontWeight: 'medium',
118
+ fontWeight: 500,
95
119
  },
96
120
  });
@@ -0,0 +1,60 @@
1
+ # InputOtp Component
2
+
3
+ `InputOtp` adalah komponen React Native untuk input kode OTP (One-Time Password) dengan tampilan kotak-kotak input terpisah. Komponen ini responsif dan otomatis menyesuaikan ukuran input berdasarkan lebar container agar tampil rapi di berbagai ukuran layar.
4
+
5
+ ---
6
+
7
+ ## Fitur
8
+
9
+ - Menampilkan sejumlah input kotak sesuai panjang OTP (`length`).
10
+ - Input numeric 1 karakter per kotak.
11
+ - Fokus otomatis berpindah ke kotak berikutnya saat input.
12
+ - Fokus kembali ke kotak sebelumnya saat tekan backspace pada kotak kosong.
13
+ - Responsif: menggunakan lebar statis jika cukup ruang, atau `flexGrow` jika ruang terbatas.
14
+ - Label dan hint opsional.
15
+ - Warna border berubah saat error (`hasError`).
16
+
17
+ ---
18
+
19
+ ## Instalasi
20
+
21
+ Salin file `InputOtp.tsx` ke proyek React Native Anda dan import sesuai kebutuhan.
22
+
23
+ ---
24
+
25
+ ## Props
26
+
27
+ | Nama | Tipe | Default | Deskripsi |
28
+ | ------------- | ----------------------- | ------- | ---------------------------------------------------------------------------------------- |
29
+ | `length` | `number` | 6 | Jumlah kotak input OTP yang ingin ditampilkan |
30
+ | `onChange` | `(otp: string) => void` | - | Callback saat isi OTP berubah, menerima OTP lengkap sebagai string |
31
+ | `label` | `string` | - | Label yang tampil di atas kotak input |
32
+ | `hint` | `string` | - | Pesan kecil di bawah input (misal instruksi atau error) |
33
+ | `hasError` | `boolean` | false | Jika `true`, border input berubah warna merah (indikasi error) |
34
+ | `inputCenter` | `boolean` | false | Jika `true`, maka seluruh input field akan memposisikan diri ke tengah secara horizontal |
35
+
36
+ ---
37
+
38
+ ## Contoh Penggunaan
39
+
40
+ ```tsx
41
+ import React, { useState } from 'react';
42
+ import { View } from 'react-native';
43
+ import InputOtp from './InputOtp';
44
+
45
+ export default function OtpVerificationScreen() {
46
+ const [otp, setOtp] = useState('');
47
+
48
+ return (
49
+ <View style={{ padding: 16 }}>
50
+ <InputOtp
51
+ length={6}
52
+ label="Masukkan Kode OTP"
53
+ hint="Kode akan dikirim via SMS"
54
+ hasError={otp.length < 6}
55
+ onChange={setOtp}
56
+ />
57
+ </View>
58
+ );
59
+ }
60
+ ```
@@ -12,6 +12,7 @@ export interface InputProps extends TextInputProps {
12
12
  onPressIconRight?: (val?: GestureResponderEvent) => void;
13
13
  onChangeText?: (val: string) => void;
14
14
  secureTextEntry?: boolean;
15
+ iconRightColor?: string;
15
16
  }
16
17
 
17
18
  export interface TextAreaProps extends InputProps {
@@ -1,5 +1,224 @@
1
- import { View } from 'react-native';
1
+ import { useRef, useState, useEffect } from 'react';
2
+ import {
3
+ View,
4
+ StyleSheet,
5
+ Platform,
6
+ KeyboardAvoidingView,
7
+ TouchableOpacity,
8
+ Keyboard,
9
+ type KeyboardEvent,
10
+ } from 'react-native';
11
+ import { WebView } from 'react-native-webview';
12
+ import Color from '../Color/Color';
13
+ import type { TextEditorType } from './types';
14
+ import LabelForm from '../LabelForm/LabelForm';
15
+ import Typography from '../Typography/Typography';
16
+ import Icon from '../Icon';
2
17
 
3
- export default function TextEditor() {
4
- return <View></View>;
18
+ export default function TextEditor({
19
+ label,
20
+ hasError,
21
+ hint,
22
+ onChange,
23
+ height = 300,
24
+ }: TextEditorType) {
25
+ const [keyboardHeight, setKeyboardHeight] = useState(0);
26
+ const [showToolbar, setShowToolbar] = useState<boolean>(false);
27
+ const webviewRef = useRef<WebView>(null);
28
+ const handleOnChange = (data: string) => {
29
+ onChange?.(data);
30
+ };
31
+
32
+ const htmlEditor = `
33
+ <html>
34
+ <head>
35
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
36
+ <style>
37
+ *,
38
+ *::before,
39
+ *::after {
40
+ box-sizing: border-box;
41
+ }
42
+ html, body {
43
+ margin: 0;
44
+ padding: 0;
45
+ width: 99.9%;
46
+ height: 100%;
47
+ overflow-x: hidden;
48
+ }
49
+ #editor {
50
+ min-height: ${height};
51
+ width: 100%;
52
+ max-width: 100%;
53
+ padding: 12px;
54
+ font-size: 12px;
55
+ border: 1px solid ${Color.gray[200]};
56
+ border-radius: 6px;
57
+ outline: none;
58
+ transition: border 0.2s;
59
+ overflow-wrap: break-word;
60
+ font-weight: 500;
61
+ word-wrap: break-word;
62
+ word-break: break-word;
63
+ }
64
+ #editor.focused {
65
+ border-color: ${Color.gray[200]}
66
+ }
67
+ </style>
68
+ </head>
69
+ <body>
70
+ <div id="editor" contenteditable="true">Tulis sesuatu di sini...</div>
71
+ <script>
72
+ const editor = document.getElementById("editor");
73
+
74
+ editor.addEventListener("focus", () => {
75
+ editor.classList.add("focused");
76
+ });
77
+
78
+ editor.addEventListener("blur", () => {
79
+ editor.classList.remove("focused");
80
+ });
81
+ const handleMessage = (command) => {
82
+ if (command === 'getContent') {
83
+ window.ReactNativeWebView.postMessage(editor.innerHTML);
84
+ } else {
85
+ editor.focus();
86
+ document.execCommand(command, false, '');
87
+ }
88
+ };
89
+
90
+ // ini untuk Android
91
+ document.addEventListener("message", (event) => {
92
+ handleMessage(event.data);
93
+ });
94
+
95
+ // ini untuk iOS
96
+ window.addEventListener("message", (event) => {
97
+ handleMessage(event.data);
98
+ });
99
+ </script>
100
+ </body>
101
+ </html>
102
+ `;
103
+
104
+ const formatText = (command: string) => {
105
+ if (webviewRef.current) {
106
+ if (Platform.OS === 'ios') {
107
+ webviewRef.current.injectJavaScript(`
108
+ document.execCommand('${command}', false, '');
109
+ true; //di ios harus biar berfunsi boldnya
110
+ `);
111
+ } else {
112
+ webviewRef.current.postMessage(command);
113
+ }
114
+ }
115
+ };
116
+
117
+ useEffect(() => {
118
+ const showSub = Keyboard.addListener(
119
+ 'keyboardDidShow',
120
+ (e: KeyboardEvent) => {
121
+ if (Platform.OS === 'ios')
122
+ setKeyboardHeight(e.endCoordinates.height - 35);
123
+ setShowToolbar(true);
124
+ }
125
+ );
126
+ const hideSub = Keyboard.addListener('keyboardDidHide', () => {
127
+ if (Platform.OS === 'ios') setKeyboardHeight(0);
128
+ setShowToolbar(false);
129
+ });
130
+
131
+ return () => {
132
+ showSub.remove();
133
+ hideSub.remove();
134
+ };
135
+ }, []);
136
+
137
+ return (
138
+ <View style={styles.container}>
139
+ {label ? <LabelForm title={label} /> : null}
140
+ <KeyboardAvoidingView
141
+ style={(styles.editorWrapper, [{ minHeight: height }])}
142
+ behavior={Platform.OS === 'ios' ? 'padding' : undefined}
143
+ >
144
+ <WebView
145
+ ref={webviewRef}
146
+ originWhitelist={['*']}
147
+ source={{ html: htmlEditor }}
148
+ onMessage={(event) => {
149
+ handleOnChange(event.nativeEvent.data);
150
+ }}
151
+ style={styles.webview}
152
+ javaScriptEnabled={true}
153
+ domStorageEnabled={true}
154
+ mixedContentMode="always"
155
+ allowUniversalAccessFromFileURLs={true}
156
+ allowFileAccess={true}
157
+ />
158
+ </KeyboardAvoidingView>
159
+
160
+ {hint ? (
161
+ <Typography
162
+ color={hasError ? Color.danger[500] : Color.gray[700]}
163
+ variant="t3"
164
+ weight="medium"
165
+ >
166
+ {hint}
167
+ </Typography>
168
+ ) : null}
169
+
170
+ {showToolbar ? (
171
+ <View style={[styles.toolbar, { bottom: keyboardHeight }]}>
172
+ <TouchableOpacity
173
+ onPress={() => formatText('bold')}
174
+ style={styles.toolButton}
175
+ >
176
+ <Icon name="Bold" />
177
+ </TouchableOpacity>
178
+ <TouchableOpacity
179
+ onPress={() => formatText('italic')}
180
+ style={styles.toolButton}
181
+ >
182
+ <Icon name="Italic" />
183
+ </TouchableOpacity>
184
+ <TouchableOpacity
185
+ onPress={() => formatText('underline')}
186
+ style={styles.toolButton}
187
+ >
188
+ <Icon name="UnderLine" />
189
+ </TouchableOpacity>
190
+ </View>
191
+ ) : null}
192
+ </View>
193
+ );
5
194
  }
195
+
196
+ const styles = StyleSheet.create({
197
+ container: {
198
+ backgroundColor: '#fff',
199
+ gap: 4,
200
+ position: 'relative',
201
+ },
202
+ editorWrapper: { flex: 1 },
203
+ toolbar: {
204
+ flexDirection: 'row',
205
+ borderTopWidth: 1,
206
+ borderColor: Color.gray[200],
207
+ paddingVertical: 8,
208
+ paddingHorizontal: 10,
209
+ position: 'absolute',
210
+ bottom: 0,
211
+ left: 0,
212
+ width: '100%',
213
+ alignItems: 'center',
214
+ },
215
+ toolButton: {
216
+ padding: 8,
217
+ marginHorizontal: 4,
218
+ borderRadius: 6,
219
+ },
220
+ toolText: {
221
+ fontWeight: 'bold',
222
+ },
223
+ webview: { flex: 1 },
224
+ });
@@ -0,0 +1,7 @@
1
+ export interface TextEditorType {
2
+ label?: string;
3
+ hint?: string;
4
+ hasError?: boolean;
5
+ onChange?: (data: string) => void;
6
+ height?: number;
7
+ }
package/src/index.tsx CHANGED
@@ -9,6 +9,7 @@ export { default as AccordionItem } from './Accordion/AccordionItem';
9
9
  export type { AccordionRenderHeaderProps } from './Accordion/type';
10
10
  export { default as Button } from './Button/Button';
11
11
  export { default as Color } from './Color/Color';
12
+ export type { ColorVariantType } from './Color/type';
12
13
  export { default as Typography } from './Typography/Typography';
13
14
  export type {
14
15
  fontSizeMap,
@@ -42,9 +43,9 @@ export { default as InputOtp } from './Input/InputOtp';
42
43
  export { default as Switch } from './Input/Switch';
43
44
  export { default as CheckBox } from './CheckBox/CheckBox';
44
45
  export { default as CheckBoxList } from './CheckBox/CheckBoxList';
45
- export { default as CounterButton } from './CounterButton/CounterButton';
46
46
  export { default as RadioButton } from './RadioButton/RadioButton';
47
47
  export { default as Icon } from './Icon/Icon';
48
+ export type { IconNameProps } from './Icon/type';
48
49
  export { default as Modal } from './Modal/Modal';
49
50
  export { default as Label } from './Label/Label';
50
51
  export { default as List } from './List/List';
@@ -53,6 +54,12 @@ export { default as Loading } from './Loading/Loading';
53
54
  export { default as Avatar } from './Avatar/Avatar';
54
55
  export { default as AvatarGroup } from './Avatar/AvatarGroup';
55
56
  export { default as Badge } from './Badge/Badge';
57
+ export type {
58
+ Variant as BadgeVariant,
59
+ Size as BadgeSize,
60
+ HexColor as BadgeColor,
61
+ SizeStyle as BadgeSizeStyle,
62
+ } from './Badge/type';
56
63
  export { default as Alert } from './Alert/Alert';
57
64
  export { default as Timeline } from './Timeline/Timeline';
58
65
  export { default as TimelineItem } from './Timeline/TimelineItem';