spotlibs-components 0.1.9 → 0.1.11
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/dist/{chunk-J3F77MZN.mjs → chunk-F6KSEYVB.mjs} +4 -35
- package/dist/chunk-F6KSEYVB.mjs.map +1 -0
- package/dist/chunk-UFE7HFT2.mjs +60 -0
- package/dist/chunk-UFE7HFT2.mjs.map +1 -0
- package/dist/chunk-YOSPWY5K.mjs +36 -0
- package/dist/chunk-YOSPWY5K.mjs.map +1 -0
- package/dist/{atoms → components/atoms}/icons/index.mjs +2 -1
- package/dist/components/index.d.mts +449 -0
- package/dist/components/index.mjs +7241 -0
- package/dist/components/index.mjs.map +1 -0
- package/dist/components/mui/index.d.mts +23 -0
- package/dist/components/mui/index.mjs +27 -0
- package/dist/components/mui/index.mjs.map +1 -0
- package/dist/components/types.d.mts +4 -0
- package/dist/{types-qsnVqq6_.d.mts → types-BkrxwBFm.d.mts} +443 -292
- package/dist/utils/index.d.mts +186 -0
- package/dist/utils/index.mjs +477 -0
- package/dist/utils/index.mjs.map +1 -0
- package/package.json +17 -2
- package/src/utils/admin-kuota-nasional/constant.js +95 -0
- package/src/utils/asset.js +10 -0
- package/src/utils/booleanUtils.js +19 -0
- package/src/utils/briguna-digital/constant.js +12 -0
- package/src/utils/compress.js +24 -0
- package/src/utils/compressImage.js +20 -0
- package/src/utils/constants.js +20 -0
- package/src/utils/cookies.js +102 -0
- package/src/utils/crypto.js +104 -0
- package/src/utils/decodeString.js +17 -0
- package/src/utils/disableFormElements.js +19 -0
- package/src/utils/excelUtils.js +60 -0
- package/src/utils/exception.js +86 -0
- package/src/utils/formatString.js +151 -0
- package/src/utils/formatters/account.js +98 -0
- package/src/utils/formatters/currency.js +125 -0
- package/src/utils/formatters/date.js +219 -0
- package/src/utils/formatters/index.js +47 -0
- package/src/utils/formatters/string.js +114 -0
- package/src/utils/generateImportExcel.js +546 -0
- package/src/utils/generateTimestamp.js +4 -0
- package/src/utils/handleApiError.js +17 -0
- package/src/utils/index.js +92 -0
- package/src/utils/json.js +55 -0
- package/src/utils/localStorage.js +8 -0
- package/src/utils/logger.js +46 -0
- package/src/utils/schema/globalSchema.js +10 -0
- package/src/utils/signature.js +75 -0
- package/src/utils/specifics/korporasi/prakarsaKorporasiUtils.js +87 -0
- package/src/utils/specifics/mikro/validationMaintenanceAgunanUtils.js +214 -0
- package/src/utils/static-data/korporasi/prakarsa/analisa-risiko-kredit-nasabah/analisa-kinerja-keuangan/listStaticData.js +290 -0
- package/src/utils/static-data/korporasi/prakarsa/appendix/proyeksi-laporan-arus-kas/listStaticData.js +7 -0
- package/src/utils/static-data/korporasi/prakarsa/appendix/proyeksi-laporan-keuangan/listStaticData.js +75 -0
- package/src/utils/static-data/korporasi/prakarsa/appendix/total-exposure-group/listStaticData.js +7 -0
- package/src/utils/static-data/korporasi/prakarsa/create/listStaticData.js +21 -0
- package/src/utils/static-data/korporasi/prakarsa/generals/listExcelConfigData.js +11 -0
- package/src/utils/static-data/korporasi/prakarsa/pengajuan-fasilitas-kredit/fasilitas-kredit/listStaticData.js +69 -0
- package/src/utils/static-data/korporasi-internasional/eksternal/listStaticData.js +193 -0
- package/src/utils/static-data/korporasi-internasional/master/listStaticData.js +24 -0
- package/src/utils/static-data/korporasi-internasional/uji-kepatuhan/listStaticData.js +250 -0
- package/src/utils/status.js +160 -0
- package/src/utils/store/adminKuotaNasional.js +7 -0
- package/src/utils/store/authStore.js +13 -0
- package/src/utils/store/bankGaransiStore.js +10 -0
- package/src/utils/store/korporasi/approval/interface/interfaceStore.js +10 -0
- package/src/utils/store/korporasi/general/generalKorporasiStore.js +13 -0
- package/src/utils/store/korporasi/loan-disbursement/loanDisbursementStore.js +77 -0
- package/src/utils/store/korporasi/prakarsa/fasilitas-kredit/fasilitasKreditStore.js +141 -0
- package/src/utils/store/migrasi-mandiri/migrasiMandiriStore.js +53 -0
- package/src/utils/store/monitoring-konsumer/monitoring-leads-KPP/monitoring-leads-kpp-internal.js +34 -0
- package/src/utils/store/prakarsaBankGaransiStore.js +21 -0
- package/src/utils/store/prognosa-crr/settingPrognosaROStore.js +9 -0
- package/src/utils/store/prognosaRMStore.js +30 -0
- package/src/utils/store/restrukStore.js +26 -0
- package/src/utils/store/verificationAccessLink.js +11 -0
- package/src/utils/store/warkat-bg-wholesale/warkatBgWholesaleStore.js +22 -0
- package/src/utils/stringUtils.js +226 -0
- package/src/utils/tipeBank.js +14 -0
- package/dist/chunk-J3F77MZN.mjs.map +0 -1
- package/dist/index.css +0 -32
- package/dist/index.css.map +0 -1
- package/dist/index.d.mts +0 -1726
- package/dist/index.mjs +0 -18584
- package/dist/index.mjs.map +0 -1
- package/dist/types.d.mts +0 -4
- /package/dist/{atoms → components/atoms}/icons/index.d.mts +0 -0
- /package/dist/{atoms → components/atoms}/icons/index.mjs.map +0 -0
- /package/dist/{types.mjs → components/types.mjs} +0 -0
- /package/dist/{types.mjs.map → components/types.mjs.map} +0 -0
|
@@ -4,21 +4,28 @@ import { SxProps } from '@mui/material/styles';
|
|
|
4
4
|
import { Control, RegisterOptions } from 'react-hook-form';
|
|
5
5
|
|
|
6
6
|
interface BaseAlertProps {
|
|
7
|
-
variant
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
/** Alert color variant */
|
|
8
|
+
variant?: "default" | "error" | "info" | "success" | "warning";
|
|
9
|
+
/** MUI Alert variant type */
|
|
10
|
+
type?: "standard" | "filled" | "outlined";
|
|
11
|
+
/** Alert title */
|
|
12
|
+
title?: string;
|
|
13
|
+
/** Alert content */
|
|
10
14
|
children?: React.ReactNode;
|
|
11
|
-
icon
|
|
15
|
+
/** Icon element or component. If not provided, no icon is shown. */
|
|
16
|
+
icon?: React.ReactNode | React.ComponentType<any>;
|
|
17
|
+
/** Custom background color override */
|
|
12
18
|
color?: string;
|
|
13
|
-
sx
|
|
19
|
+
/** MUI sx overrides */
|
|
20
|
+
sx?: SxProps;
|
|
21
|
+
/** Close handler. If provided, close button is shown. */
|
|
14
22
|
onClose?: () => void;
|
|
15
|
-
|
|
23
|
+
/** sx overrides for children wrapper */
|
|
24
|
+
childrenSx?: SxProps;
|
|
16
25
|
[key: string]: any;
|
|
17
26
|
}
|
|
18
27
|
|
|
19
|
-
declare function BaseAlert(
|
|
20
|
-
props: BaseAlertProps,
|
|
21
|
-
): React.ReactElement | null;
|
|
28
|
+
declare function BaseAlert(props: BaseAlertProps): React.ReactElement;
|
|
22
29
|
|
|
23
30
|
interface PrimitiveColorType {
|
|
24
31
|
color_overlay: string;
|
|
@@ -118,14 +125,23 @@ interface DerivedColorType {
|
|
|
118
125
|
color_bg_surface: string;
|
|
119
126
|
color_bg_inverse: string;
|
|
120
127
|
color_bg_disabled: string;
|
|
128
|
+
|
|
129
|
+
color_bg_brand_primary_strong: string;
|
|
121
130
|
color_bg_brand_primary: string;
|
|
122
131
|
color_bg_brand_primary_subtle: string;
|
|
132
|
+
color_bg_brand_secondary_strong: string;
|
|
123
133
|
color_bg_brand_secondary: string;
|
|
124
134
|
color_bg_brand_secondary_subtle: string;
|
|
135
|
+
|
|
136
|
+
color_bg_success_strong: string;
|
|
125
137
|
color_bg_success: string;
|
|
126
138
|
color_bg_success_subtle: string;
|
|
139
|
+
|
|
140
|
+
color_bg_danger_strong: string;
|
|
127
141
|
color_bg_danger: string;
|
|
128
142
|
color_bg_danger_subtle: string;
|
|
143
|
+
|
|
144
|
+
color_bg_warning_strong: string;
|
|
129
145
|
color_bg_warning: string;
|
|
130
146
|
color_bg_warning_subtle: string;
|
|
131
147
|
|
|
@@ -165,30 +181,53 @@ interface DerivedColorType {
|
|
|
165
181
|
|
|
166
182
|
declare const DerivedColor: DerivedColorType;
|
|
167
183
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
184
|
+
type TypographyVariant =
|
|
185
|
+
| "h1"
|
|
186
|
+
| "h2"
|
|
187
|
+
| "h3"
|
|
188
|
+
| "h4"
|
|
189
|
+
| "h5"
|
|
190
|
+
| "h6"
|
|
191
|
+
| "header1_regular"
|
|
192
|
+
| "header1_semibold"
|
|
193
|
+
| "header1_bold"
|
|
194
|
+
| "header2_regular"
|
|
195
|
+
| "header2_semibold"
|
|
196
|
+
| "header2_bold"
|
|
197
|
+
| "body1_regular"
|
|
198
|
+
| "body2_regular"
|
|
199
|
+
| "caption_regular";
|
|
200
|
+
|
|
201
|
+
type TypographyColor =
|
|
202
|
+
| "default"
|
|
203
|
+
| "subtle"
|
|
204
|
+
| "disabled"
|
|
205
|
+
| "placeholder"
|
|
206
|
+
| "inverse"
|
|
207
|
+
| "primary"
|
|
208
|
+
| "secondary"
|
|
209
|
+
| "success"
|
|
210
|
+
| "danger"
|
|
211
|
+
| "warning";
|
|
212
|
+
|
|
213
|
+
interface VariantStyleEntry {
|
|
214
|
+
fontSize: string;
|
|
215
|
+
fontWeight: number;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
declare const VariantStyles: Record<TypographyVariant, VariantStyleEntry>;
|
|
219
|
+
|
|
220
|
+
interface TypographyProps {
|
|
221
|
+
/** Format: "variant.color" e.g. "body1_regular.default" */
|
|
222
|
+
variant?: `${TypographyVariant}.${TypographyColor}` | TypographyVariant;
|
|
223
|
+
/** Content */
|
|
224
|
+
children?: React.ReactNode;
|
|
225
|
+
/** MUI sx overrides */
|
|
226
|
+
sx?: SxProps;
|
|
227
|
+
[key: string]: any;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
declare function BaseTypography(props: TypographyProps): React.ReactElement | null;
|
|
192
231
|
|
|
193
232
|
declare const SpacingToken: {
|
|
194
233
|
spacing0: string;
|
|
@@ -204,7 +243,7 @@ declare const SpacingToken: {
|
|
|
204
243
|
spacing10: string;
|
|
205
244
|
};
|
|
206
245
|
|
|
207
|
-
declare const CONTENT_SPACING_TOKENS: {
|
|
246
|
+
declare const CONTENT_SPACING_TOKENS: {
|
|
208
247
|
spacing_1: {
|
|
209
248
|
mobile: string;
|
|
210
249
|
tablet: string;
|
|
@@ -219,41 +258,41 @@ declare const CONTENT_SPACING_TOKENS: {
|
|
|
219
258
|
mobile: string;
|
|
220
259
|
tablet: string;
|
|
221
260
|
web: string;
|
|
222
|
-
};
|
|
223
|
-
};
|
|
224
|
-
|
|
225
|
-
interface ResponsiveSpacingValue {
|
|
226
|
-
mobile?: string;
|
|
227
|
-
tablet?: string;
|
|
228
|
-
web?: string;
|
|
229
|
-
[key: string]: string | undefined;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
type SpacingSizeValue = keyof typeof SpacingToken | string | number;
|
|
233
|
-
|
|
234
|
-
type ContentSpacingSizeValue =
|
|
235
|
-
| keyof typeof CONTENT_SPACING_TOKENS
|
|
236
|
-
| ResponsiveSpacingValue;
|
|
237
|
-
|
|
238
|
-
interface SpacingProps {
|
|
239
|
-
size?: SpacingSizeValue;
|
|
240
|
-
axis?: "vertical" | "horizontal";
|
|
241
|
-
as?: React.ElementType;
|
|
242
|
-
className?: string;
|
|
243
|
-
style?: React.CSSProperties;
|
|
244
|
-
children?: React.ReactNode;
|
|
245
|
-
[key: string]: unknown;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
interface ContentSpacingProps {
|
|
249
|
-
size?: ContentSpacingSizeValue;
|
|
250
|
-
breakpoint?: "mobile" | "tablet" | "web";
|
|
251
|
-
as?: React.ElementType;
|
|
252
|
-
className?: string;
|
|
253
|
-
style?: React.CSSProperties;
|
|
254
|
-
children?: React.ReactNode;
|
|
255
|
-
[key: string]: unknown;
|
|
256
|
-
}
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
interface ResponsiveSpacingValue {
|
|
265
|
+
mobile?: string;
|
|
266
|
+
tablet?: string;
|
|
267
|
+
web?: string;
|
|
268
|
+
[key: string]: string | undefined;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
type SpacingSizeValue = keyof typeof SpacingToken | string | number;
|
|
272
|
+
|
|
273
|
+
type ContentSpacingSizeValue =
|
|
274
|
+
| keyof typeof CONTENT_SPACING_TOKENS
|
|
275
|
+
| ResponsiveSpacingValue;
|
|
276
|
+
|
|
277
|
+
interface SpacingProps {
|
|
278
|
+
size?: SpacingSizeValue;
|
|
279
|
+
axis?: "vertical" | "horizontal";
|
|
280
|
+
as?: React.ElementType;
|
|
281
|
+
className?: string;
|
|
282
|
+
style?: React.CSSProperties;
|
|
283
|
+
children?: React.ReactNode;
|
|
284
|
+
[key: string]: unknown;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
interface ContentSpacingProps {
|
|
288
|
+
size?: ContentSpacingSizeValue;
|
|
289
|
+
breakpoint?: "mobile" | "tablet" | "web";
|
|
290
|
+
as?: React.ElementType;
|
|
291
|
+
className?: string;
|
|
292
|
+
style?: React.CSSProperties;
|
|
293
|
+
children?: React.ReactNode;
|
|
294
|
+
[key: string]: unknown;
|
|
295
|
+
}
|
|
257
296
|
|
|
258
297
|
declare const Spacing: React.FC<SpacingProps>;
|
|
259
298
|
|
|
@@ -279,12 +318,10 @@ type ShadowLevel = keyof ShadowMap;
|
|
|
279
318
|
interface ShadowTokenProps {
|
|
280
319
|
/** Elevation level */
|
|
281
320
|
level?: ShadowLevel;
|
|
282
|
-
/** HTML element or component to render */
|
|
283
|
-
as?: React.ElementType;
|
|
284
|
-
/** Inline style overrides */
|
|
285
|
-
style?: React.CSSProperties;
|
|
286
321
|
/** Content */
|
|
287
322
|
children?: React.ReactNode;
|
|
323
|
+
/** MUI sx overrides */
|
|
324
|
+
sx?: SxProps;
|
|
288
325
|
[key: string]: any;
|
|
289
326
|
}
|
|
290
327
|
|
|
@@ -301,17 +338,15 @@ interface RadiusMap {
|
|
|
301
338
|
|
|
302
339
|
declare const Radius: RadiusMap;
|
|
303
340
|
|
|
304
|
-
type
|
|
341
|
+
type RadiusLevel = keyof RadiusMap;
|
|
305
342
|
|
|
306
343
|
interface RadiusTokenProps {
|
|
307
|
-
/** Radius
|
|
308
|
-
radius?:
|
|
309
|
-
/** HTML element or component to render */
|
|
310
|
-
as?: React.ElementType;
|
|
311
|
-
/** Inline style overrides */
|
|
312
|
-
style?: React.CSSProperties;
|
|
344
|
+
/** Radius level */
|
|
345
|
+
radius?: RadiusLevel;
|
|
313
346
|
/** Content */
|
|
314
347
|
children?: React.ReactNode;
|
|
348
|
+
/** MUI sx overrides */
|
|
349
|
+
sx?: SxProps;
|
|
315
350
|
[key: string]: any;
|
|
316
351
|
}
|
|
317
352
|
|
|
@@ -324,14 +359,20 @@ interface BaseButtonProps {
|
|
|
324
359
|
children?: React.ReactNode;
|
|
325
360
|
/** Visual style variant */
|
|
326
361
|
variant?: "fill" | "outline" | "text" | "fab" | "ellipse-fill" | "ellipse-outline";
|
|
327
|
-
/**
|
|
328
|
-
color?:
|
|
362
|
+
/** Semantic color preset */
|
|
363
|
+
color?: "primary" | "secondary" | "success" | "warning" | "danger";
|
|
364
|
+
/** Custom color key from PrimitiveColor. Overrides `color` prop when set. */
|
|
365
|
+
customColor?: keyof typeof PrimitiveColor | null;
|
|
329
366
|
/** Button size */
|
|
330
367
|
size?: "large" | "small";
|
|
331
368
|
/** Disabled state */
|
|
332
369
|
disabled?: boolean;
|
|
333
370
|
/** Icon element rendered before children */
|
|
334
|
-
|
|
371
|
+
startIcon?: React.ReactNode;
|
|
372
|
+
/** Icon element rendered after children */
|
|
373
|
+
endIcon?: React.ReactNode;
|
|
374
|
+
/** Button width */
|
|
375
|
+
width?: string;
|
|
335
376
|
/** MUI sx overrides */
|
|
336
377
|
sx?: SxProps;
|
|
337
378
|
[key: string]: any;
|
|
@@ -339,62 +380,36 @@ interface BaseButtonProps {
|
|
|
339
380
|
|
|
340
381
|
declare function BaseButton(props: BaseButtonProps): React.ReactElement;
|
|
341
382
|
|
|
342
|
-
interface
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
383
|
+
interface BaseSkeletonProps {
|
|
384
|
+
/**
|
|
385
|
+
* Skeleton shape variant.
|
|
386
|
+
* - `text` — single line of text placeholder
|
|
387
|
+
* - `rectangular` — rectangle block placeholder
|
|
388
|
+
* - `rounded` — rectangle with border-radius
|
|
389
|
+
* - `circular` — circle placeholder (avatar, icon)
|
|
390
|
+
*/
|
|
391
|
+
variant?: "text" | "rectangular" | "rounded" | "circular";
|
|
392
|
+
/**
|
|
393
|
+
* Animation type.
|
|
394
|
+
* - `pulse` — fading animation (default)
|
|
395
|
+
* - `wave` — wave sweep animation
|
|
396
|
+
* - `none` — no animation (static)
|
|
397
|
+
*/
|
|
398
|
+
animation?: "pulse" | "wave" | "none";
|
|
399
|
+
/** Width of the skeleton. Accepts number (px) or string (e.g. "100%", "200px") */
|
|
400
|
+
width?: number | string;
|
|
401
|
+
/** Height of the skeleton. Accepts number (px) or string (e.g. "40px", "1.2em") */
|
|
402
|
+
height?: number | string;
|
|
403
|
+
/** Number of skeleton lines to render. If > 1, renders stacked skeletons. */
|
|
404
|
+
count?: number;
|
|
405
|
+
/** Gap between stacked skeletons when count > 1. Default is SpacingToken.spacing2 */
|
|
406
|
+
gap?: string | number;
|
|
354
407
|
/** MUI sx overrides */
|
|
355
408
|
sx?: SxProps;
|
|
356
|
-
/** Icon displayed in the card */
|
|
357
|
-
icon?: React.ReactNode;
|
|
358
|
-
/** Label text */
|
|
359
|
-
label?: string;
|
|
360
|
-
/** Title text */
|
|
361
|
-
title?: string;
|
|
362
|
-
/** Subtitle text */
|
|
363
|
-
subtitle?: string;
|
|
364
|
-
/** Data items for summary card type */
|
|
365
|
-
dataList?: BaseCardDataItem[];
|
|
366
|
-
/** Last update date string */
|
|
367
|
-
updateDate?: string;
|
|
368
|
-
/** Bold the count icon */
|
|
369
|
-
boldCountIcon?: boolean;
|
|
370
|
-
/** Bold the count value */
|
|
371
|
-
boldCount?: boolean;
|
|
372
|
-
/** Bold the title */
|
|
373
|
-
boldTitle?: boolean;
|
|
374
|
-
/** Bold the update text */
|
|
375
|
-
boldUpdate?: boolean;
|
|
376
|
-
/** Custom icon element for the header */
|
|
377
|
-
iconHeader?: React.ReactElement;
|
|
378
|
-
/** Card background color */
|
|
379
|
-
backgroundColor?: string;
|
|
380
|
-
/** Title color */
|
|
381
|
-
colorTitlte?: string;
|
|
382
|
-
/** Nominal/count color */
|
|
383
|
-
colorNominal?: string;
|
|
384
|
-
/** Show/hide icon */
|
|
385
|
-
displayIcon?: boolean;
|
|
386
|
-
/** Number format type */
|
|
387
|
-
formatNumber?: "currency" | "nominal" | string;
|
|
388
|
-
/** Count text color */
|
|
389
|
-
colorCount?: string;
|
|
390
|
-
/** Header background color */
|
|
391
|
-
headerBackgroundColor?: string;
|
|
392
|
-
/** Enable collapse toggle */
|
|
393
|
-
isCollapsible?: boolean;
|
|
394
409
|
[key: string]: any;
|
|
395
410
|
}
|
|
396
411
|
|
|
397
|
-
declare function
|
|
412
|
+
declare function BaseSkeleton(props: BaseSkeletonProps): React.ReactElement;
|
|
398
413
|
|
|
399
414
|
interface BaseSwitchProps {
|
|
400
415
|
/** Current switch state */
|
|
@@ -411,62 +426,142 @@ interface BaseSwitchProps {
|
|
|
411
426
|
|
|
412
427
|
declare function BaseSwitch(props: BaseSwitchProps): React.ReactElement;
|
|
413
428
|
|
|
414
|
-
interface
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
429
|
+
interface BaseCardProps {
|
|
430
|
+
/** Card variant type */
|
|
431
|
+
variant?: "default" | "with-header" | "with-header-footer";
|
|
432
|
+
/** Card body content */
|
|
433
|
+
children?: React.ReactNode;
|
|
434
|
+
/** Header background color preset */
|
|
435
|
+
color?: "primary" | "secondary" | "success" | "warning" | "danger";
|
|
436
|
+
/** Header title text */
|
|
437
|
+
title?: string;
|
|
438
|
+
/** Header subtitle text */
|
|
439
|
+
subtitle?: string;
|
|
440
|
+
/** Bold the title */
|
|
441
|
+
boldTitle?: boolean;
|
|
442
|
+
/** Bold the subtitle */
|
|
443
|
+
boldSubtitle?: boolean;
|
|
444
|
+
/** Show/hide subtitle */
|
|
445
|
+
showSubtitle?: boolean;
|
|
446
|
+
/** Enable collapse/expand on header click */
|
|
447
|
+
isCollapsible?: boolean;
|
|
448
|
+
/** Icon element before title in header */
|
|
449
|
+
startIcon?: React.ReactNode;
|
|
450
|
+
/** Icon element after title in header */
|
|
451
|
+
endIcon?: React.ReactNode;
|
|
452
|
+
/** Show/hide startIcon */
|
|
453
|
+
showStartIcon?: boolean;
|
|
454
|
+
/** Show/hide endIcon */
|
|
455
|
+
showEndIcon?: boolean;
|
|
456
|
+
/** Footer content (only for with-header-footer variant) */
|
|
457
|
+
footer?: React.ReactNode;
|
|
458
|
+
/** Enable watermark overlay on content area */
|
|
459
|
+
isWatermark?: boolean;
|
|
460
|
+
/** Watermark text (e.g. "000000 / Nama Lengkap") */
|
|
461
|
+
watermarkText?: string;
|
|
462
|
+
/** MUI sx overrides */
|
|
463
|
+
sx?: SxProps;
|
|
464
|
+
[key: string]: any;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
declare function BaseCard(props: BaseCardProps): React.ReactElement;
|
|
442
468
|
|
|
443
|
-
|
|
444
|
-
|
|
|
445
|
-
|
|
|
469
|
+
interface BaseSnackbarPosition {
|
|
470
|
+
vertical: "top" | "bottom";
|
|
471
|
+
horizontal: "left" | "center" | "right";
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
interface BaseSnackbarProps {
|
|
475
|
+
/** Whether the snackbar is open */
|
|
476
|
+
open?: boolean;
|
|
477
|
+
/** Close handler */
|
|
478
|
+
onClose?: (event?: React.SyntheticEvent | Event, reason?: string) => void;
|
|
479
|
+
/** Snackbar message content */
|
|
480
|
+
message?: string;
|
|
481
|
+
/** Color variant */
|
|
482
|
+
variant?: "success" | "error" | "info" | "warning" | "default";
|
|
483
|
+
/** Auto hide duration in milliseconds */
|
|
484
|
+
duration?: number;
|
|
485
|
+
/** Anchor origin position */
|
|
486
|
+
position?: BaseSnackbarPosition;
|
|
487
|
+
/** Icon element or component. If not provided, no icon is shown. */
|
|
488
|
+
icon?: React.ReactNode | React.ComponentType<any>;
|
|
489
|
+
/** MUI sx overrides */
|
|
490
|
+
sx?: SxProps;
|
|
491
|
+
[key: string]: any;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
declare function BaseSnackbar(props: BaseSnackbarProps): React.ReactElement;
|
|
446
495
|
|
|
447
|
-
|
|
448
|
-
|
|
496
|
+
interface BaseCheckboxOption {
|
|
497
|
+
/** Label yang ditampilkan */
|
|
498
|
+
label: React.ReactNode;
|
|
499
|
+
/** Nilai opsi */
|
|
500
|
+
value: string;
|
|
501
|
+
/** Nonaktifkan opsi ini */
|
|
502
|
+
disabled?: boolean;
|
|
503
|
+
[key: string]: any;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
interface BaseCheckboxSharedProps {
|
|
507
|
+
/** Daftar opsi checkbox (untuk mode group) */
|
|
508
|
+
options: BaseCheckboxOption[];
|
|
509
|
+
/** Label untuk mode single checkbox */
|
|
510
|
+
label?: React.ReactNode;
|
|
511
|
+
/** Nonaktifkan semua checkbox */
|
|
512
|
+
disabled?: boolean;
|
|
513
|
+
/** Posisi label relatif terhadap checkbox */
|
|
514
|
+
labelPlacement?: "top" | "bottom" | "start" | "end";
|
|
515
|
+
/** Tampilkan checkbox secara horizontal */
|
|
516
|
+
isHorizontal?: boolean;
|
|
517
|
+
/** Custom styles via MUI sx prop */
|
|
518
|
+
sx?: SxProps;
|
|
519
|
+
[key: string]: any;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
interface BaseCheckboxSingleProps extends Omit<BaseCheckboxSharedProps, "options"> {
|
|
523
|
+
options?: undefined;
|
|
524
|
+
/** Nilai checked untuk single checkbox */
|
|
525
|
+
checked?: boolean;
|
|
526
|
+
/** Callback ketika nilai berubah (single mode) */
|
|
527
|
+
onChange?: (checked: boolean, event?: React.ChangeEvent<HTMLInputElement>) => void;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
interface BaseCheckboxGroupProps extends BaseCheckboxSharedProps {
|
|
531
|
+
options: BaseCheckboxOption[];
|
|
532
|
+
/** Array nilai yang dipilih (group mode) */
|
|
533
|
+
checked?: string[];
|
|
534
|
+
/** Callback ketika nilai berubah (group mode) */
|
|
535
|
+
onChange?: (newValue: string[]) => void;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
type BaseCheckboxProps =
|
|
539
|
+
| BaseCheckboxSingleProps
|
|
540
|
+
| BaseCheckboxGroupProps;
|
|
541
|
+
|
|
542
|
+
declare function BaseCheckbox(
|
|
543
|
+
props: BaseCheckboxProps,
|
|
449
544
|
): React.ReactElement | null;
|
|
450
545
|
|
|
451
|
-
type BaseDatatableAlign =
|
|
452
|
-
| "left"
|
|
453
|
-
| "center"
|
|
454
|
-
| "right"
|
|
455
|
-
| "justify"
|
|
456
|
-
| "inherit"
|
|
457
|
-
| (string & {});
|
|
458
|
-
|
|
459
|
-
interface BaseDatatableColumn<T = Record<string, any>> {
|
|
460
|
-
id?: string;
|
|
461
|
-
key?: string;
|
|
462
|
-
field?: string;
|
|
463
|
-
sortField?: string;
|
|
464
|
-
label?: ReactNode;
|
|
465
|
-
header?: ReactNode;
|
|
466
|
-
accessorKey?: string;
|
|
467
|
-
accessorFn?: (row: T) => any;
|
|
468
|
-
align?: BaseDatatableAlign;
|
|
469
|
-
headerAlign?: BaseDatatableAlign;
|
|
546
|
+
type BaseDatatableAlign =
|
|
547
|
+
| "left"
|
|
548
|
+
| "center"
|
|
549
|
+
| "right"
|
|
550
|
+
| "justify"
|
|
551
|
+
| "inherit"
|
|
552
|
+
| (string & {});
|
|
553
|
+
|
|
554
|
+
interface BaseDatatableColumn<T = Record<string, any>> {
|
|
555
|
+
id?: string;
|
|
556
|
+
key?: string;
|
|
557
|
+
field?: string;
|
|
558
|
+
sortField?: string;
|
|
559
|
+
label?: ReactNode;
|
|
560
|
+
header?: ReactNode;
|
|
561
|
+
accessorKey?: string;
|
|
562
|
+
accessorFn?: (row: T) => any;
|
|
563
|
+
align?: BaseDatatableAlign;
|
|
564
|
+
headerAlign?: BaseDatatableAlign;
|
|
470
565
|
width?: number;
|
|
471
566
|
minWidth?: number;
|
|
472
567
|
sticky?: "left" | "right";
|
|
@@ -485,11 +580,11 @@ interface BaseDatatableColumn<T = Record<string, any>> {
|
|
|
485
580
|
}) => ReactNode;
|
|
486
581
|
}
|
|
487
582
|
|
|
488
|
-
interface BaseDatatableHeaderCell {
|
|
489
|
-
id?: string;
|
|
490
|
-
key?: string;
|
|
491
|
-
label: ReactNode;
|
|
492
|
-
align?: BaseDatatableAlign;
|
|
583
|
+
interface BaseDatatableHeaderCell {
|
|
584
|
+
id?: string;
|
|
585
|
+
key?: string;
|
|
586
|
+
label: ReactNode;
|
|
587
|
+
align?: BaseDatatableAlign;
|
|
493
588
|
colSpan?: number;
|
|
494
589
|
rowSpan?: number;
|
|
495
590
|
colspan?: number;
|
|
@@ -520,12 +615,12 @@ interface BaseDatatableSortState {
|
|
|
520
615
|
direction: "asc" | "desc";
|
|
521
616
|
}
|
|
522
617
|
|
|
523
|
-
interface BaseDatatableSortPayload {
|
|
524
|
-
orderBy: string;
|
|
525
|
-
order: "asc" | "desc";
|
|
526
|
-
page: number;
|
|
527
|
-
rowsPerPage: number;
|
|
528
|
-
}
|
|
618
|
+
interface BaseDatatableSortPayload {
|
|
619
|
+
orderBy: string;
|
|
620
|
+
order: "asc" | "desc";
|
|
621
|
+
page: number;
|
|
622
|
+
rowsPerPage: number;
|
|
623
|
+
}
|
|
529
624
|
|
|
530
625
|
interface BaseDatatableLayout {
|
|
531
626
|
stickyHeader?: boolean;
|
|
@@ -591,14 +686,14 @@ interface BaseDatatableProps<T = Record<string, any>> {
|
|
|
591
686
|
layout?: BaseDatatableLayout;
|
|
592
687
|
selection?: BaseDatatableSelection<T>;
|
|
593
688
|
pagination?: BaseDatatablePagination;
|
|
594
|
-
renderRow?: (context: BaseDatatableRenderRowContext<T>) => ReactNode;
|
|
595
|
-
onRowClick?: (row: T, rowIndex: number) => void;
|
|
596
|
-
getRowId?: (row: T, rowIndex: number) => string | number;
|
|
597
|
-
emptyState?: ReactNode;
|
|
598
|
-
loading?: boolean;
|
|
599
|
-
loadingText?: ReactNode;
|
|
600
|
-
rowHover?: boolean;
|
|
601
|
-
activeRowId?: string | number | null;
|
|
689
|
+
renderRow?: (context: BaseDatatableRenderRowContext<T>) => ReactNode;
|
|
690
|
+
onRowClick?: (row: T, rowIndex: number) => void;
|
|
691
|
+
getRowId?: (row: T, rowIndex: number) => string | number;
|
|
692
|
+
emptyState?: ReactNode;
|
|
693
|
+
loading?: boolean;
|
|
694
|
+
loadingText?: ReactNode;
|
|
695
|
+
rowHover?: boolean;
|
|
696
|
+
activeRowId?: string | number | null;
|
|
602
697
|
containerSx?: SxProps;
|
|
603
698
|
tableSx?: SxProps;
|
|
604
699
|
}
|
|
@@ -608,33 +703,38 @@ declare function BaseDatatable<T = Record<string, any>>(
|
|
|
608
703
|
): ReactNode;
|
|
609
704
|
|
|
610
705
|
interface BaseDatePickerProps {
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
name
|
|
614
|
-
|
|
615
|
-
|
|
706
|
+
/** Picker mode */
|
|
707
|
+
type?: "single" | "day" | "datetime" | "range" | "month" | "year" | "time";
|
|
708
|
+
/** Field name for React Hook Form */
|
|
709
|
+
name: string;
|
|
710
|
+
/** Control object from react-hook-form */
|
|
711
|
+
control: any;
|
|
712
|
+
/** Default selected value */
|
|
616
713
|
defaultValue?: any;
|
|
617
|
-
|
|
618
|
-
title?:
|
|
619
|
-
subtitle
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
titleClassName?: string;
|
|
623
|
-
subtitleClassName?: string;
|
|
624
|
-
|
|
714
|
+
/** Label title above input */
|
|
715
|
+
title?: string;
|
|
716
|
+
/** Optional subtitle */
|
|
717
|
+
subtitle?: string;
|
|
718
|
+
/** Input placeholder text */
|
|
625
719
|
placeholder?: string;
|
|
626
|
-
|
|
627
|
-
minDate?:
|
|
628
|
-
|
|
629
|
-
|
|
720
|
+
/** Minimum selectable date */
|
|
721
|
+
minDate?: Date | string;
|
|
722
|
+
/** Maximum selectable date */
|
|
723
|
+
maxDate?: Date | string;
|
|
724
|
+
/** Disable picker interaction */
|
|
630
725
|
isDisabled?: boolean;
|
|
726
|
+
/** Allow user to clear selected value */
|
|
631
727
|
clearable?: boolean;
|
|
728
|
+
/** Allow manual input editing (range only) */
|
|
632
729
|
editableDateInputs?: boolean;
|
|
633
|
-
|
|
730
|
+
/** Display format for value */
|
|
634
731
|
format?: string;
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
732
|
+
/** How the calendar popup is triggered */
|
|
733
|
+
openBy?: "field" | "icon" | "both";
|
|
734
|
+
/** MUI sx overrides for the wrapper */
|
|
735
|
+
sx?: SxProps;
|
|
736
|
+
/** Custom onChange handler */
|
|
737
|
+
onChange?: (value: any) => void;
|
|
638
738
|
[key: string]: any;
|
|
639
739
|
}
|
|
640
740
|
|
|
@@ -642,26 +742,50 @@ declare function BaseDatePicker(
|
|
|
642
742
|
props: BaseDatePickerProps,
|
|
643
743
|
): React.ReactElement | null;
|
|
644
744
|
|
|
745
|
+
interface DropdownOption {
|
|
746
|
+
label: string;
|
|
747
|
+
value: string;
|
|
748
|
+
disabled?: boolean;
|
|
749
|
+
[key: string]: any;
|
|
750
|
+
}
|
|
751
|
+
|
|
645
752
|
interface BaseDropdownProps {
|
|
646
|
-
name
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
753
|
+
/** Field name for react-hook-form */
|
|
754
|
+
name: string;
|
|
755
|
+
/** Control object from react-hook-form */
|
|
756
|
+
control: any;
|
|
757
|
+
/** Static options list */
|
|
758
|
+
options?: DropdownOption[];
|
|
759
|
+
/** Async options loader function */
|
|
760
|
+
loadOptions?: (inputValue: string) => Promise<DropdownOption[]>;
|
|
761
|
+
/** Enable multi select mode */
|
|
650
762
|
isMulti?: boolean;
|
|
763
|
+
/** Enable search input */
|
|
651
764
|
isSearchable?: boolean;
|
|
765
|
+
/** Show selected values as chips (multi only) */
|
|
652
766
|
showChip?: boolean;
|
|
767
|
+
/** Show Select All checkbox (multi only) */
|
|
653
768
|
showSelectAll?: boolean;
|
|
654
|
-
title
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
769
|
+
/** Label title */
|
|
770
|
+
title?: string;
|
|
771
|
+
/** Subtitle text */
|
|
772
|
+
subtitle?: string;
|
|
773
|
+
/** Default selected value */
|
|
659
774
|
defaultValue?: any;
|
|
775
|
+
/** Disable dropdown */
|
|
660
776
|
isDisabled?: boolean;
|
|
777
|
+
/** Allow clearing value */
|
|
661
778
|
isClearable?: boolean;
|
|
779
|
+
/** Limit max height with scroll */
|
|
662
780
|
preventOverflow?: boolean;
|
|
781
|
+
/** Colors for multi-value tags */
|
|
663
782
|
optionColors?: string[];
|
|
783
|
+
/** Dropdown variant */
|
|
664
784
|
variant?: "select" | "checkbox";
|
|
785
|
+
/** MUI sx overrides for wrapper */
|
|
786
|
+
sx?: SxProps;
|
|
787
|
+
/** Custom onChange handler */
|
|
788
|
+
onChange?: (value: any) => void;
|
|
665
789
|
[key: string]: any;
|
|
666
790
|
}
|
|
667
791
|
|
|
@@ -670,33 +794,46 @@ declare function BaseDropdown(
|
|
|
670
794
|
): React.ReactElement;
|
|
671
795
|
|
|
672
796
|
interface BaseDropzoneSettings {
|
|
673
|
-
|
|
797
|
+
/** Ekstensi file yang diizinkan (format react-dropzone accept) */
|
|
798
|
+
allowedExtensions?: Record<string, string[]>;
|
|
799
|
+
/** Ukuran maksimal file dalam MB */
|
|
674
800
|
maxSize?: number;
|
|
801
|
+
/** Jumlah maksimal file yang dapat diupload */
|
|
675
802
|
maxFiles?: number;
|
|
803
|
+
/** Tampilkan preview gambar */
|
|
676
804
|
isImagePreview?: boolean;
|
|
805
|
+
/** Tipe tampilan preview */
|
|
677
806
|
previewType?: "grid" | "list";
|
|
678
807
|
}
|
|
679
808
|
|
|
680
809
|
interface BaseDropzoneLabels {
|
|
810
|
+
/** Label judul di atas dropzone */
|
|
681
811
|
title?: React.ReactNode;
|
|
812
|
+
/** Teks utama di dalam area dropzone */
|
|
682
813
|
dropzoneTitle?: string;
|
|
814
|
+
/** Label pada tombol pilih file */
|
|
683
815
|
titleButton?: string;
|
|
816
|
+
/** Teks keterangan format file yang diizinkan */
|
|
684
817
|
allowedFileLabel?: string;
|
|
685
818
|
}
|
|
686
819
|
|
|
687
820
|
interface BaseDropzoneCallbacks {
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
821
|
+
/** Callback ketika file berhasil diupload */
|
|
822
|
+
uploadFile?: (files: Array<{ source: string; originName: string; type: string; size: number }>) => void;
|
|
823
|
+
/** Callback ketika file dihapus */
|
|
824
|
+
removeFile?: (fileName: string) => void;
|
|
825
|
+
/** Pesan error kustom dari luar komponen */
|
|
826
|
+
customError?: string | null;
|
|
691
827
|
}
|
|
692
828
|
|
|
693
829
|
interface BaseDropzoneProps {
|
|
830
|
+
/** Upload otomatis setelah file dipilih */
|
|
694
831
|
autoUpload?: boolean;
|
|
695
|
-
|
|
832
|
+
/** Pengaturan dropzone */
|
|
696
833
|
settings?: BaseDropzoneSettings;
|
|
697
|
-
|
|
834
|
+
/** Label-label yang ditampilkan */
|
|
698
835
|
labels?: BaseDropzoneLabels;
|
|
699
|
-
|
|
836
|
+
/** Callback functions */
|
|
700
837
|
callbacks?: BaseDropzoneCallbacks;
|
|
701
838
|
}
|
|
702
839
|
|
|
@@ -707,38 +844,35 @@ declare function BaseDropzone(
|
|
|
707
844
|
interface BaseRadioOption {
|
|
708
845
|
label: React.ReactNode;
|
|
709
846
|
value: any;
|
|
710
|
-
|
|
847
|
+
isDisabled?: boolean;
|
|
711
848
|
[key: string]: any;
|
|
712
849
|
}
|
|
713
850
|
|
|
714
851
|
interface BaseRadioButtonProps {
|
|
852
|
+
/** Nama field untuk react-hook-form */
|
|
715
853
|
name?: string;
|
|
854
|
+
/** Control dari useForm() */
|
|
716
855
|
control?: any;
|
|
856
|
+
/** Nilai awal yang dipilih */
|
|
717
857
|
defaultValue?: any;
|
|
718
|
-
|
|
858
|
+
/** Label di atas radio group */
|
|
719
859
|
label?: React.ReactNode;
|
|
860
|
+
/** Daftar opsi radio */
|
|
720
861
|
options?: BaseRadioOption[];
|
|
721
|
-
|
|
722
|
-
/* ================= TYPOGRAPHY ================= */
|
|
862
|
+
/** Variant typography untuk label */
|
|
723
863
|
labelVariant?: string;
|
|
864
|
+
/** Variant typography untuk pesan error */
|
|
724
865
|
errorVariant?: string;
|
|
725
|
-
|
|
726
|
-
/* ================= LAYOUT ================= */
|
|
866
|
+
/** Orientasi layout radio group */
|
|
727
867
|
orientation?: "vertical" | "horizontal";
|
|
728
|
-
|
|
729
|
-
/* ================= COLOR TOKEN ================= */
|
|
868
|
+
/** Token warna untuk radio yang dipilih */
|
|
730
869
|
radioColorToken?: string;
|
|
731
|
-
|
|
732
|
-
/* ================= STATE ================= */
|
|
870
|
+
/** Nonaktifkan semua opsi */
|
|
733
871
|
isDisabled?: boolean;
|
|
734
|
-
|
|
735
|
-
/* ================= CLASS ================= */
|
|
736
|
-
className?: string;
|
|
737
|
-
titleClassName?: string;
|
|
738
|
-
fieldClassName?: string;
|
|
739
|
-
|
|
740
|
-
/* ================= ERROR ================= */
|
|
872
|
+
/** Gunakan error state helper untuk nested field names */
|
|
741
873
|
useErrorStateHelper?: boolean;
|
|
874
|
+
/** Custom styles via MUI sx prop */
|
|
875
|
+
sx?: SxProps;
|
|
742
876
|
|
|
743
877
|
[key: string]: any;
|
|
744
878
|
}
|
|
@@ -774,42 +908,59 @@ interface BaseStepperProps {
|
|
|
774
908
|
orientation?: "horizontal" | "vertical";
|
|
775
909
|
/** Stepper visual variant */
|
|
776
910
|
variant?: "simple" | "dashboard";
|
|
911
|
+
/** MUI sx overrides for wrapper */
|
|
912
|
+
sx?: SxProps;
|
|
777
913
|
}
|
|
778
914
|
|
|
779
915
|
declare function BaseStepper(props: BaseStepperProps): React.ReactElement;
|
|
780
916
|
|
|
781
917
|
interface BaseTextFieldProps {
|
|
782
|
-
name
|
|
783
|
-
|
|
784
|
-
|
|
918
|
+
/** Field name for react-hook-form binding */
|
|
919
|
+
name: string;
|
|
920
|
+
/** Control object from react-hook-form */
|
|
921
|
+
control: any;
|
|
922
|
+
/** Default value for the field */
|
|
785
923
|
defaultValue?: any;
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
924
|
+
/** Label title displayed above the input */
|
|
925
|
+
title?: string;
|
|
926
|
+
/** Maximum character length */
|
|
789
927
|
maxLength?: number;
|
|
928
|
+
/** Show "Maksimal X Karakter" helper text */
|
|
790
929
|
showLength?: boolean;
|
|
791
|
-
|
|
930
|
+
/** Show character counter (e.g. 5/20) */
|
|
931
|
+
showCountHelper?: boolean;
|
|
932
|
+
/** Only allow numeric input (0-9) */
|
|
792
933
|
isNumericOnly?: boolean;
|
|
934
|
+
/** Only allow alphanumeric input (a-z, A-Z, 0-9) */
|
|
793
935
|
isAlphaNumericOnly?: boolean;
|
|
936
|
+
/** Only allow alphabetic input (a-z, A-Z) */
|
|
794
937
|
isAlphaOnly?: boolean;
|
|
795
|
-
|
|
938
|
+
/** Additional special characters to allow */
|
|
796
939
|
allowedSpecialCharacters?: string;
|
|
940
|
+
/** Special characters to disallow */
|
|
797
941
|
dontAllowedSpecialCharacters?: string;
|
|
798
|
-
|
|
799
|
-
isAlphaNumericWithUnderscore?: boolean;
|
|
800
|
-
|
|
942
|
+
/** Disable the input */
|
|
801
943
|
isDisabled?: boolean;
|
|
944
|
+
/** Prevent paste action */
|
|
802
945
|
isCantPaste?: boolean;
|
|
803
|
-
|
|
804
|
-
result?:
|
|
946
|
+
/** Result text shown below the input */
|
|
947
|
+
result?: React.ReactNode;
|
|
948
|
+
/** Color for the result text */
|
|
805
949
|
resultColor?: string;
|
|
806
|
-
|
|
950
|
+
/** Disallow spaces */
|
|
807
951
|
noSpaceAllowed?: boolean;
|
|
808
|
-
|
|
809
|
-
showCountHelper?: boolean;
|
|
810
|
-
|
|
952
|
+
/** Input mask pattern (use 'x' for editable slots, e.g. "0xxx-xxxx-xxxx") */
|
|
811
953
|
textMask?: string;
|
|
812
|
-
|
|
954
|
+
/** MUI InputProps (startAdornment, endAdornment, sx, etc.) */
|
|
955
|
+
InputProps?: Record<string, any>;
|
|
956
|
+
/** Native input props (min, max, step, etc.) */
|
|
957
|
+
inputProps?: Record<string, any>;
|
|
958
|
+
/** MUI sx overrides for the wrapper Box */
|
|
959
|
+
sx?: SxProps;
|
|
960
|
+
/** Input placeholder text */
|
|
961
|
+
placeholder?: string;
|
|
962
|
+
/** Input type (text, password, email, etc.) */
|
|
963
|
+
type?: string;
|
|
813
964
|
[key: string]: any;
|
|
814
965
|
}
|
|
815
966
|
|
|
@@ -818,26 +969,28 @@ declare function BaseTextField(
|
|
|
818
969
|
): React.ReactElement | null;
|
|
819
970
|
|
|
820
971
|
interface TextFieldUploadProps {
|
|
972
|
+
/** Nama field untuk react-hook-form */
|
|
821
973
|
name?: string;
|
|
974
|
+
/** Control dari useForm() */
|
|
822
975
|
control?: any;
|
|
823
|
-
|
|
976
|
+
/** Nilai awal field */
|
|
824
977
|
defaultValue?: string;
|
|
825
|
-
|
|
978
|
+
/** Label di atas field */
|
|
826
979
|
title?: React.ReactNode;
|
|
827
|
-
|
|
980
|
+
/** Ekstensi file yang diterima (contoh: ".pdf,.jpg") */
|
|
828
981
|
accept?: string;
|
|
982
|
+
/** Ukuran maksimal file dalam MB */
|
|
829
983
|
maxSize?: number;
|
|
830
|
-
|
|
984
|
+
/** Nonaktifkan field */
|
|
831
985
|
isDisabled?: boolean;
|
|
832
|
-
|
|
986
|
+
/** Label pada tombol upload */
|
|
833
987
|
buttonLabel?: string;
|
|
988
|
+
/** Posisi tombol upload relatif terhadap input */
|
|
834
989
|
buttonPosition?: "start" | "end";
|
|
835
|
-
|
|
990
|
+
/** Callback ketika file dipilih */
|
|
991
|
+
uploadFile?: (fileName: string, file: File | null) => void;
|
|
992
|
+
/** Posisi ikon pada tombol upload */
|
|
836
993
|
iconPosition?: "start" | "end";
|
|
837
|
-
|
|
838
|
-
uploadFile?: (file: File) => void | Promise<any>;
|
|
839
|
-
|
|
840
|
-
[key: string]: any;
|
|
841
994
|
}
|
|
842
995
|
|
|
843
996
|
declare function TextFieldUpload(
|
|
@@ -867,12 +1020,8 @@ interface BaseTextAreaProps {
|
|
|
867
1020
|
exactLength?: number;
|
|
868
1021
|
/** Batas maksimal karakter */
|
|
869
1022
|
maxLength?: number;
|
|
870
|
-
/** CSS class untuk wrapper */
|
|
871
|
-
className?: string;
|
|
872
1023
|
/** Label di atas field */
|
|
873
1024
|
title?: string;
|
|
874
|
-
/** CSS class untuk title */
|
|
875
|
-
titleClassName?: string;
|
|
876
1025
|
/** Nonaktifkan field */
|
|
877
1026
|
isDisabled?: boolean;
|
|
878
1027
|
/** Aktifkan TinyMCE rich-text editor (default: plain MUI textarea) */
|
|
@@ -885,6 +1034,8 @@ interface BaseTextAreaProps {
|
|
|
885
1034
|
value: string,
|
|
886
1035
|
meta: Record<string, string>,
|
|
887
1036
|
) => void;
|
|
1037
|
+
/** Custom styles via MUI sx prop */
|
|
1038
|
+
sx?: SxProps;
|
|
888
1039
|
|
|
889
1040
|
[key: string]: any;
|
|
890
1041
|
}
|
|
@@ -992,4 +1143,4 @@ declare function BaseModalOTP(
|
|
|
992
1143
|
props: BaseModalOTPProps,
|
|
993
1144
|
): React.ReactElement | null;
|
|
994
1145
|
|
|
995
|
-
export { type
|
|
1146
|
+
export { type BaseRadioButtonProps as $, type BaseCheckboxOption as A, BaseAlert as B, CONTENT_SPACING_TOKENS as C, DerivedColor as D, type BaseCheckboxProps as E, type BaseDatatableAlign as F, type BaseDatatableColumn as G, type BaseDatatableFeatures as H, type BaseDatatableHeaderCell as I, type BaseDatatableLayout as J, type BaseDatatablePagination as K, type BaseDatatableProps as L, type BaseDatatableSelection as M, type BaseDatatableSortPayload as N, type BaseDatatableSortState as O, PrimitiveColor as P, type BaseDatePickerProps as Q, Radius as R, Shadow as S, TextFieldUpload as T, type BaseDropdownProps as U, VariantStyles as V, type BaseDropzoneProps as W, type BaseModalOTPProps as X, type BaseModalProps as Y, type BaseModalStepperProps as Z, type BaseModalStepperStep as _, BaseButton as a, type BaseSkeletonProps as a0, type BaseSnackbarPosition as a1, type BaseSnackbarProps as a2, type BaseStepperDashboardStep as a3, type BaseStepperProps as a4, type BaseStepperSimpleStep as a5, type BaseSwitchProps as a6, type BaseTextAreaProps as a7, type BaseTextFieldProps as a8, type ContentSpacingProps as a9, type DerivedColorType as aa, type PrimitiveColorType as ab, type RadiusLevel as ac, type RadiusMap as ad, type RadiusTokenProps as ae, type ShadowElevation as af, type ShadowLevel as ag, type ShadowMap as ah, type ShadowTokenProps as ai, type SpacingProps as aj, type TextFieldUploadProps as ak, type TypographyColor as al, type TypographyProps as am, type TypographyVariant as an, BaseCard as b, BaseCheckbox as c, BaseDatatable as d, BaseDatePicker as e, BaseDropdown as f, BaseDropzone as g, BaseModal as h, BaseModalOTP as i, BaseModalStepper as j, BaseRadioButton as k, BaseSkeleton as l, BaseSnackbar as m, BaseStepper as n, BaseSwitch as o, BaseTextArea as p, BaseTextField as q, BaseTypography as r, ContentSpacing as s, RadiusToken as t, ShadowToken as u, Spacing as v, SpacingToken as w, type BaseAlertProps as x, type BaseButtonProps as y, type BaseCardProps as z };
|