spotlibs-components 0.1.13 → 0.1.16
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/atoms/icons/index.d.mts +21 -84
- package/dist/atoms/icons/index.mjs +416 -1
- package/dist/atoms/icons/index.mjs.map +1 -1
- package/dist/{chunk-F6KSEYVB.mjs → chunk-5ZMWZXI3.mjs} +502 -990
- package/dist/chunk-5ZMWZXI3.mjs.map +1 -0
- package/dist/{chunk-UFE7HFT2.mjs → chunk-E6DKJIAE.mjs} +3 -10
- package/dist/chunk-E6DKJIAE.mjs.map +1 -0
- package/dist/chunk-G2BF4U5I.mjs +834 -0
- package/dist/chunk-G2BF4U5I.mjs.map +1 -0
- package/dist/index.d.mts +4 -355
- package/dist/index.mjs +1925 -2746
- package/dist/index.mjs.map +1 -1
- package/dist/layout/index.d.mts +42 -0
- package/dist/layout/index.mjs +5 -0
- package/dist/layout/index.mjs.map +1 -0
- package/dist/mui/index.d.mts +3 -9
- package/dist/mui/index.mjs +3 -9
- package/dist/rekening-tujuan-icon-BfSXbixN.d.mts +61 -0
- package/dist/{types-D1akE7ak.d.mts → types-D0cyG_RH.d.mts} +309 -46
- package/dist/types.d.mts +1 -1
- package/dist/utils/index.mjs +9 -2
- package/dist/utils/index.mjs.map +1 -1
- package/package.json +10 -3
- package/dist/chunk-F6KSEYVB.mjs.map +0 -1
- package/dist/chunk-UFE7HFT2.mjs.map +0 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
declare function LayoutShell({ menuItems, username, fullname, currentPath, excludedRoutes, logoText, logoSrc, onLogout, onNavigate, children, }: {
|
|
4
|
+
menuItems?: any[];
|
|
5
|
+
username: any;
|
|
6
|
+
fullname: any;
|
|
7
|
+
currentPath?: string;
|
|
8
|
+
excludedRoutes?: string[];
|
|
9
|
+
logoText?: string;
|
|
10
|
+
logoSrc: any;
|
|
11
|
+
onLogout: any;
|
|
12
|
+
onNavigate: any;
|
|
13
|
+
children: any;
|
|
14
|
+
}): react_jsx_runtime.JSX.Element;
|
|
15
|
+
|
|
16
|
+
declare function AppSidebar({ menuItems, currentPath, logoText, onNavigate, }: {
|
|
17
|
+
menuItems?: any[];
|
|
18
|
+
currentPath?: string;
|
|
19
|
+
logoText?: string;
|
|
20
|
+
onNavigate: any;
|
|
21
|
+
}): react_jsx_runtime.JSX.Element;
|
|
22
|
+
|
|
23
|
+
declare function AppHeader({ username, fullname, logoSrc, onLogout, onNavigate }: {
|
|
24
|
+
username: any;
|
|
25
|
+
fullname: any;
|
|
26
|
+
logoSrc: any;
|
|
27
|
+
onLogout: any;
|
|
28
|
+
onNavigate: any;
|
|
29
|
+
}): react_jsx_runtime.JSX.Element;
|
|
30
|
+
|
|
31
|
+
declare function Backdrop({ onClick }: {
|
|
32
|
+
onClick: any;
|
|
33
|
+
}): react_jsx_runtime.JSX.Element;
|
|
34
|
+
|
|
35
|
+
declare function parseAccessMenu(encryptedValue: any, secretKey: any): any;
|
|
36
|
+
|
|
37
|
+
declare function SidebarProvider({ children }: {
|
|
38
|
+
children: any;
|
|
39
|
+
}): react_jsx_runtime.JSX.Element;
|
|
40
|
+
declare function useSidebar(): any;
|
|
41
|
+
|
|
42
|
+
export { AppHeader, AppSidebar, Backdrop, LayoutShell, SidebarProvider, parseAccessMenu, useSidebar };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.mjs"}
|
package/dist/mui/index.d.mts
CHANGED
|
@@ -2,22 +2,16 @@ export { default as Box } from '@mui/material/Box';
|
|
|
2
2
|
export { default as Stack } from '@mui/material/Stack';
|
|
3
3
|
export { default as Grid } from '@mui/material/Grid';
|
|
4
4
|
export { default as Container } from '@mui/material/Container';
|
|
5
|
+
export { styled } from '@mui/material/styles';
|
|
5
6
|
export { default as ThemeProvider } from '@mui/material/styles/ThemeProvider';
|
|
6
|
-
export { default as createTheme } from '@mui/material/styles/createTheme';
|
|
7
|
-
export { default as useMediaQuery } from '@mui/material/useMediaQuery';
|
|
8
7
|
export { default as Paper } from '@mui/material/Paper';
|
|
9
8
|
export { default as Divider } from '@mui/material/Divider';
|
|
10
9
|
export { default as Collapse } from '@mui/material/Collapse';
|
|
11
|
-
export { default as Fade } from '@mui/material/Fade';
|
|
12
|
-
export { default as Grow } from '@mui/material/Grow';
|
|
13
|
-
export { default as Slide } from '@mui/material/Slide';
|
|
14
|
-
export { default as Zoom } from '@mui/material/Zoom';
|
|
15
|
-
export { default as Hidden } from '@mui/material/Hidden';
|
|
16
10
|
export { default as Portal } from '@mui/material/Portal';
|
|
17
11
|
export { default as ClickAwayListener } from '@mui/material/ClickAwayListener';
|
|
18
12
|
export { default as Popper } from '@mui/material/Popper';
|
|
19
13
|
export { default as Backdrop } from '@mui/material/Backdrop';
|
|
20
14
|
export { default as CircularProgress } from '@mui/material/CircularProgress';
|
|
21
15
|
export { default as LinearProgress } from '@mui/material/LinearProgress';
|
|
22
|
-
export { default as
|
|
23
|
-
export {
|
|
16
|
+
export { default as InputAdornment } from '@mui/material/InputAdornment';
|
|
17
|
+
export { default as IconButton } from '@mui/material/IconButton';
|
package/dist/mui/index.mjs
CHANGED
|
@@ -4,24 +4,18 @@ export { default as Box } from '@mui/material/Box';
|
|
|
4
4
|
export { default as Stack } from '@mui/material/Stack';
|
|
5
5
|
export { default as Grid } from '@mui/material/Grid';
|
|
6
6
|
export { default as Container } from '@mui/material/Container';
|
|
7
|
-
export {
|
|
7
|
+
export { styled } from '@mui/material/styles';
|
|
8
8
|
export { default as ThemeProvider } from '@mui/material/styles/ThemeProvider';
|
|
9
|
-
export { default as createTheme } from '@mui/material/styles/createTheme';
|
|
10
|
-
export { default as useMediaQuery } from '@mui/material/useMediaQuery';
|
|
11
9
|
export { default as Paper } from '@mui/material/Paper';
|
|
12
10
|
export { default as Divider } from '@mui/material/Divider';
|
|
13
11
|
export { default as Collapse } from '@mui/material/Collapse';
|
|
14
|
-
export { default as Fade } from '@mui/material/Fade';
|
|
15
|
-
export { default as Grow } from '@mui/material/Grow';
|
|
16
|
-
export { default as Slide } from '@mui/material/Slide';
|
|
17
|
-
export { default as Zoom } from '@mui/material/Zoom';
|
|
18
|
-
export { default as Hidden } from '@mui/material/Hidden';
|
|
19
12
|
export { default as Portal } from '@mui/material/Portal';
|
|
20
13
|
export { default as ClickAwayListener } from '@mui/material/ClickAwayListener';
|
|
21
14
|
export { default as Popper } from '@mui/material/Popper';
|
|
22
15
|
export { default as Backdrop } from '@mui/material/Backdrop';
|
|
23
16
|
export { default as CircularProgress } from '@mui/material/CircularProgress';
|
|
24
17
|
export { default as LinearProgress } from '@mui/material/LinearProgress';
|
|
25
|
-
export { default as
|
|
18
|
+
export { default as InputAdornment } from '@mui/material/InputAdornment';
|
|
19
|
+
export { default as IconButton } from '@mui/material/IconButton';
|
|
26
20
|
//# sourceMappingURL=index.mjs.map
|
|
27
21
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
declare function FilePdfIcon({ color }: {
|
|
4
|
+
color: any;
|
|
5
|
+
}): react_jsx_runtime.JSX.Element;
|
|
6
|
+
|
|
7
|
+
declare function AnalisisRisikoKreditNasabahIcon(): react_jsx_runtime.JSX.Element;
|
|
8
|
+
|
|
9
|
+
declare function AppendixIcon(): react_jsx_runtime.JSX.Element;
|
|
10
|
+
|
|
11
|
+
declare function BgBuilding(): react_jsx_runtime.JSX.Element;
|
|
12
|
+
|
|
13
|
+
declare function BgPerson(): react_jsx_runtime.JSX.Element;
|
|
14
|
+
|
|
15
|
+
declare function ChecklistDokumenPaketKreditIcon(): react_jsx_runtime.JSX.Element;
|
|
16
|
+
|
|
17
|
+
declare function CreditRiskRatingIcon(): react_jsx_runtime.JSX.Element;
|
|
18
|
+
|
|
19
|
+
declare function DokumenPenjagaanIcon(): react_jsx_runtime.JSX.Element;
|
|
20
|
+
|
|
21
|
+
declare function InformasiKursIcon(): react_jsx_runtime.JSX.Element;
|
|
22
|
+
|
|
23
|
+
declare function InformasiNasabahIcon(): react_jsx_runtime.JSX.Element;
|
|
24
|
+
|
|
25
|
+
declare function MatriksRiskDanMitigationIcon(): react_jsx_runtime.JSX.Element;
|
|
26
|
+
|
|
27
|
+
declare function NotulenRapatPraKomiteIcon(): react_jsx_runtime.JSX.Element;
|
|
28
|
+
|
|
29
|
+
declare function OfferingLetterIcon(): react_jsx_runtime.JSX.Element;
|
|
30
|
+
|
|
31
|
+
declare function PengajuanDanFasilitasKreditIcon(): react_jsx_runtime.JSX.Element;
|
|
32
|
+
|
|
33
|
+
declare function ProfitabilitasDanHubunganNasabahIcon(): react_jsx_runtime.JSX.Element;
|
|
34
|
+
|
|
35
|
+
declare function RekomendasiPutusanIcon(): react_jsx_runtime.JSX.Element;
|
|
36
|
+
|
|
37
|
+
declare function RingkasanEksekutifIcon(): react_jsx_runtime.JSX.Element;
|
|
38
|
+
|
|
39
|
+
declare function DefaultAvatarIcon({ width, height, strokeColor, fillColor1, fillColor2, fillColor3, }: {
|
|
40
|
+
width?: string;
|
|
41
|
+
height?: string;
|
|
42
|
+
strokeColor?: string;
|
|
43
|
+
fillColor1?: string;
|
|
44
|
+
fillColor2?: string;
|
|
45
|
+
fillColor3?: string;
|
|
46
|
+
}): react_jsx_runtime.JSX.Element;
|
|
47
|
+
|
|
48
|
+
declare function DefaultImageIcon({ width, height, bgColor, fillColor, }: {
|
|
49
|
+
width?: string;
|
|
50
|
+
height?: string;
|
|
51
|
+
bgColor?: string;
|
|
52
|
+
fillColor?: string;
|
|
53
|
+
}): react_jsx_runtime.JSX.Element;
|
|
54
|
+
|
|
55
|
+
declare function RekeningEscrowIcon(): react_jsx_runtime.JSX.Element;
|
|
56
|
+
|
|
57
|
+
declare function RekeningOprasionalIcon(): react_jsx_runtime.JSX.Element;
|
|
58
|
+
|
|
59
|
+
declare function RekeningTujuanIcon(): react_jsx_runtime.JSX.Element;
|
|
60
|
+
|
|
61
|
+
export { AnalisisRisikoKreditNasabahIcon as A, BgBuilding as B, ChecklistDokumenPaketKreditIcon as C, DefaultAvatarIcon as D, FilePdfIcon as F, InformasiKursIcon as I, MatriksRiskDanMitigationIcon as M, NotulenRapatPraKomiteIcon as N, OfferingLetterIcon as O, PengajuanDanFasilitasKreditIcon as P, RekeningEscrowIcon as R, AppendixIcon as a, BgPerson as b, CreditRiskRatingIcon as c, DefaultImageIcon as d, DokumenPenjagaanIcon as e, InformasiNasabahIcon as f, ProfitabilitasDanHubunganNasabahIcon as g, RekeningOprasionalIcon as h, RekeningTujuanIcon as i, RekomendasiPutusanIcon as j, RingkasanEksekutifIcon as k };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { SxProps } from '@mui/material/styles';
|
|
4
|
-
import { Control, RegisterOptions } from 'react-hook-form';
|
|
4
|
+
import { Control, RegisterOptions, UseFormReturn } from 'react-hook-form';
|
|
5
5
|
|
|
6
6
|
interface BaseAlertProps {
|
|
7
7
|
/** Alert color variant */
|
|
@@ -195,7 +195,9 @@ type TypographyVariant =
|
|
|
195
195
|
| "header2_semibold"
|
|
196
196
|
| "header2_bold"
|
|
197
197
|
| "body1_regular"
|
|
198
|
+
| "body1_semibold"
|
|
198
199
|
| "body2_regular"
|
|
200
|
+
| "body2_semibold"
|
|
199
201
|
| "caption_regular";
|
|
200
202
|
|
|
201
203
|
type TypographyColor =
|
|
@@ -380,6 +382,52 @@ interface BaseButtonProps {
|
|
|
380
382
|
|
|
381
383
|
declare function BaseButton(props: BaseButtonProps): React.ReactElement;
|
|
382
384
|
|
|
385
|
+
interface BaseSkeletonProps {
|
|
386
|
+
/**
|
|
387
|
+
* Skeleton shape variant.
|
|
388
|
+
* - `text` — single line of text placeholder
|
|
389
|
+
* - `rectangular` — rectangle block placeholder
|
|
390
|
+
* - `rounded` — rectangle with border-radius
|
|
391
|
+
* - `circular` — circle placeholder (avatar, icon)
|
|
392
|
+
*/
|
|
393
|
+
variant?: "text" | "rectangular" | "rounded" | "circular";
|
|
394
|
+
/**
|
|
395
|
+
* Animation type.
|
|
396
|
+
* - `pulse` — fading animation (default)
|
|
397
|
+
* - `wave` — wave sweep animation
|
|
398
|
+
* - `none` — no animation (static)
|
|
399
|
+
*/
|
|
400
|
+
animation?: "pulse" | "wave" | "none";
|
|
401
|
+
/** Width of the skeleton. Accepts number (px) or string (e.g. "100%", "200px") */
|
|
402
|
+
width?: number | string;
|
|
403
|
+
/** Height of the skeleton. Accepts number (px) or string (e.g. "40px", "1.2em") */
|
|
404
|
+
height?: number | string;
|
|
405
|
+
/** Number of skeleton lines to render. If > 1, renders stacked skeletons. */
|
|
406
|
+
count?: number;
|
|
407
|
+
/** Gap between stacked skeletons when count > 1. Default is SpacingToken.spacing2 */
|
|
408
|
+
gap?: string | number;
|
|
409
|
+
/** MUI sx overrides */
|
|
410
|
+
sx?: SxProps;
|
|
411
|
+
[key: string]: any;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
declare function BaseSkeleton(props: BaseSkeletonProps): React.ReactElement;
|
|
415
|
+
|
|
416
|
+
interface BaseSwitchProps {
|
|
417
|
+
/** Current switch state */
|
|
418
|
+
status?: boolean;
|
|
419
|
+
/** Label text or element */
|
|
420
|
+
label?: React.ReactNode;
|
|
421
|
+
/** Label position relative to the switch */
|
|
422
|
+
labelPlacement?: "start" | "end" | "top" | "bottom";
|
|
423
|
+
/** Disabled state */
|
|
424
|
+
isDisabled?: boolean;
|
|
425
|
+
/** Change handler */
|
|
426
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
declare function BaseSwitch(props: BaseSwitchProps): React.ReactElement;
|
|
430
|
+
|
|
383
431
|
interface BaseCardProps {
|
|
384
432
|
/** Card variant type */
|
|
385
433
|
variant?: "default" | "with-header" | "with-header-footer";
|
|
@@ -409,6 +457,10 @@ interface BaseCardProps {
|
|
|
409
457
|
showEndIcon?: boolean;
|
|
410
458
|
/** Footer content (only for with-header-footer variant) */
|
|
411
459
|
footer?: React.ReactNode;
|
|
460
|
+
/** Enable watermark overlay on content area */
|
|
461
|
+
isWatermark?: boolean;
|
|
462
|
+
/** Watermark text (e.g. "12345678 / Brispot Web") */
|
|
463
|
+
watermarkText?: string;
|
|
412
464
|
/** MUI sx overrides */
|
|
413
465
|
sx?: SxProps;
|
|
414
466
|
[key: string]: any;
|
|
@@ -416,20 +468,32 @@ interface BaseCardProps {
|
|
|
416
468
|
|
|
417
469
|
declare function BaseCard(props: BaseCardProps): React.ReactElement;
|
|
418
470
|
|
|
419
|
-
interface
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
/** Label text or element */
|
|
423
|
-
label?: React.ReactNode;
|
|
424
|
-
/** Label position relative to the switch */
|
|
425
|
-
labelPlacement?: "start" | "end" | "top" | "bottom";
|
|
426
|
-
/** Disabled state */
|
|
427
|
-
isDisabled?: boolean;
|
|
428
|
-
/** Change handler */
|
|
429
|
-
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
471
|
+
interface BaseSnackbarPosition {
|
|
472
|
+
vertical: "top" | "bottom";
|
|
473
|
+
horizontal: "left" | "center" | "right";
|
|
430
474
|
}
|
|
431
475
|
|
|
432
|
-
|
|
476
|
+
interface BaseSnackbarProps {
|
|
477
|
+
/** Whether the snackbar is open */
|
|
478
|
+
open?: boolean;
|
|
479
|
+
/** Close handler */
|
|
480
|
+
onClose?: (event?: React.SyntheticEvent | Event, reason?: string) => void;
|
|
481
|
+
/** Snackbar message content */
|
|
482
|
+
message?: string;
|
|
483
|
+
/** Color variant */
|
|
484
|
+
variant?: "success" | "error" | "info" | "warning" | "default";
|
|
485
|
+
/** Auto hide duration in milliseconds */
|
|
486
|
+
duration?: number;
|
|
487
|
+
/** Anchor origin position */
|
|
488
|
+
position?: BaseSnackbarPosition;
|
|
489
|
+
/** Icon element or component. If not provided, no icon is shown. */
|
|
490
|
+
icon?: React.ReactNode | React.ComponentType<any>;
|
|
491
|
+
/** MUI sx overrides */
|
|
492
|
+
sx?: SxProps;
|
|
493
|
+
[key: string]: any;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
declare function BaseSnackbar(props: BaseSnackbarProps): React.ReactElement;
|
|
433
497
|
|
|
434
498
|
interface BaseCheckboxOption {
|
|
435
499
|
/** Label yang ditampilkan */
|
|
@@ -982,48 +1046,169 @@ declare function BaseTextArea(
|
|
|
982
1046
|
props: BaseTextAreaProps,
|
|
983
1047
|
): React.ReactElement | null;
|
|
984
1048
|
|
|
985
|
-
interface
|
|
986
|
-
|
|
1049
|
+
interface BaseModalAlertShowOptions {
|
|
1050
|
+
/** Icon type preset or custom image path */
|
|
1051
|
+
icon?: "success" | "error" | "info" | "warning" | "confirm" | string;
|
|
1052
|
+
/** Modal title text */
|
|
1053
|
+
title?: string;
|
|
1054
|
+
/** Modal description text */
|
|
1055
|
+
description?: string;
|
|
1056
|
+
/** Cancel button text. Default: "Batal" */
|
|
1057
|
+
cancelBtnText?: string;
|
|
1058
|
+
/** Confirm button text. Default: "Ya" */
|
|
1059
|
+
confirmBtnText?: string;
|
|
1060
|
+
/** Cancel button action. Default: closes modal. Can be custom function. */
|
|
1061
|
+
cancelBtnProps?: () => void;
|
|
1062
|
+
/** Confirm button action. Called on confirm click. */
|
|
1063
|
+
confirmBtnProps?: () => void;
|
|
1064
|
+
/** Show cancel button. Default: true */
|
|
1065
|
+
showCancelBtn?: boolean;
|
|
1066
|
+
/** Show confirm button. Default: true */
|
|
1067
|
+
showConfirmBtn?: boolean;
|
|
1068
|
+
}
|
|
987
1069
|
|
|
1070
|
+
interface BaseModalAlertDialogProps extends BaseModalAlertShowOptions {
|
|
1071
|
+
/** Whether the modal is open */
|
|
1072
|
+
open?: boolean;
|
|
1073
|
+
/** Close handler */
|
|
988
1074
|
onClose?: () => void;
|
|
989
|
-
|
|
990
|
-
onCancel?: () => void;
|
|
1075
|
+
}
|
|
991
1076
|
|
|
992
|
-
|
|
1077
|
+
/**
|
|
1078
|
+
* Imperative BaseModalAlert API.
|
|
1079
|
+
*
|
|
1080
|
+
* Usage:
|
|
1081
|
+
* ```jsx
|
|
1082
|
+
* import { BaseModalAlert } from 'spotlibs-components';
|
|
1083
|
+
*
|
|
1084
|
+
* BaseModalAlert.show({
|
|
1085
|
+
* icon: 'success',
|
|
1086
|
+
* title: 'Berhasil!',
|
|
1087
|
+
* description: 'Data berhasil disimpan.',
|
|
1088
|
+
* confirmBtnText: 'OK',
|
|
1089
|
+
* showCancelBtn: false,
|
|
1090
|
+
* confirmBtnProps: () => console.log('confirmed'),
|
|
1091
|
+
* });
|
|
1092
|
+
*
|
|
1093
|
+
* BaseModalAlert.hide();
|
|
1094
|
+
* ```
|
|
1095
|
+
*/
|
|
1096
|
+
declare const BaseModalAlert: {
|
|
1097
|
+
/** Show the modal alert with given options */
|
|
1098
|
+
show: (options: BaseModalAlertShowOptions) => void;
|
|
1099
|
+
/** Hide the modal alert */
|
|
1100
|
+
hide: () => void;
|
|
1101
|
+
/** Internal: set modal ref (used by BaseModalAlertProvider) */
|
|
1102
|
+
setModalRef: (ref: React.RefObject<any>) => void;
|
|
1103
|
+
};
|
|
993
1104
|
|
|
994
|
-
|
|
995
|
-
|
|
1105
|
+
/**
|
|
1106
|
+
* Provider component. Mount once at app root to enable BaseModalAlert.show()/hide().
|
|
1107
|
+
*
|
|
1108
|
+
* ```jsx
|
|
1109
|
+
* import { BaseModalAlertProvider } from 'spotlibs-components';
|
|
1110
|
+
*
|
|
1111
|
+
* function App() {
|
|
1112
|
+
* return (
|
|
1113
|
+
* <>
|
|
1114
|
+
* <BaseModalAlertProvider />
|
|
1115
|
+
* <YourApp />
|
|
1116
|
+
* </>
|
|
1117
|
+
* );
|
|
1118
|
+
* }
|
|
1119
|
+
* ```
|
|
1120
|
+
*/
|
|
1121
|
+
declare function BaseModalAlertProvider(): React.ReactElement;
|
|
1122
|
+
|
|
1123
|
+
/**
|
|
1124
|
+
* Controlled dialog component for direct usage without imperative API.
|
|
1125
|
+
*/
|
|
1126
|
+
declare function BaseModalAlertDialog(props: BaseModalAlertDialogProps): React.ReactElement;
|
|
1127
|
+
|
|
1128
|
+
interface BaseModalLoadingDialogProps {
|
|
1129
|
+
/** Whether the loading modal is open */
|
|
1130
|
+
open?: boolean;
|
|
1131
|
+
/** Loading message text. Default: "Mohon tunggu..." */
|
|
1132
|
+
message?: string;
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
/**
|
|
1136
|
+
* Imperative BaseModalLoading API.
|
|
1137
|
+
*
|
|
1138
|
+
* Usage:
|
|
1139
|
+
* ```jsx
|
|
1140
|
+
* import { BaseModalLoading } from 'spotlibs-components';
|
|
1141
|
+
*
|
|
1142
|
+
* BaseModalLoading.show(); // default message
|
|
1143
|
+
* BaseModalLoading.show("Sedang memproses data...");
|
|
1144
|
+
* BaseModalLoading.hide();
|
|
1145
|
+
* ```
|
|
1146
|
+
*/
|
|
1147
|
+
declare const BaseModalLoading: {
|
|
1148
|
+
/** Show the loading modal. Optionally pass a custom message. */
|
|
1149
|
+
show: (message?: string) => void;
|
|
1150
|
+
/** Hide the loading modal */
|
|
1151
|
+
hide: () => void;
|
|
1152
|
+
/** Internal: set modal ref (used by BaseModalLoadingProvider) */
|
|
1153
|
+
setModalRef: (ref: React.RefObject<any>) => void;
|
|
1154
|
+
};
|
|
996
1155
|
|
|
1156
|
+
/**
|
|
1157
|
+
* Provider component. Mount once at app root to enable BaseModalLoading.show()/hide().
|
|
1158
|
+
*
|
|
1159
|
+
* ```jsx
|
|
1160
|
+
* import { BaseModalLoadingProvider } from 'spotlibs-components';
|
|
1161
|
+
*
|
|
1162
|
+
* function App() {
|
|
1163
|
+
* return (
|
|
1164
|
+
* <>
|
|
1165
|
+
* <BaseModalLoadingProvider />
|
|
1166
|
+
* <YourApp />
|
|
1167
|
+
* </>
|
|
1168
|
+
* );
|
|
1169
|
+
* }
|
|
1170
|
+
* ```
|
|
1171
|
+
*/
|
|
1172
|
+
declare function BaseModalLoadingProvider(): React.ReactElement;
|
|
1173
|
+
|
|
1174
|
+
/**
|
|
1175
|
+
* Controlled loading dialog component for direct usage without imperative API.
|
|
1176
|
+
*/
|
|
1177
|
+
declare function BaseModalLoadingDialog(props: BaseModalLoadingDialogProps): React.ReactElement;
|
|
1178
|
+
|
|
1179
|
+
interface BaseModalPopupProps {
|
|
1180
|
+
/** Whether the modal is open */
|
|
1181
|
+
open?: boolean;
|
|
1182
|
+
/** Close handler */
|
|
1183
|
+
onClose?: () => void;
|
|
1184
|
+
/** Modal variant type */
|
|
1185
|
+
variant?: "default" | "with-header" | "with-header-footer";
|
|
1186
|
+
/** Header background color preset */
|
|
1187
|
+
color?: "primary" | "secondary" | "success" | "warning" | "danger";
|
|
1188
|
+
/** Header title text */
|
|
1189
|
+
title?: string;
|
|
1190
|
+
/** Header subtitle text */
|
|
1191
|
+
subtitle?: string;
|
|
1192
|
+
/** Icon element before title in header */
|
|
1193
|
+
startIcon?: React.ReactNode;
|
|
1194
|
+
/** Modal body content */
|
|
997
1195
|
children?: React.ReactNode;
|
|
1196
|
+
/** Footer content (only for with-header-footer variant) */
|
|
998
1197
|
footer?: React.ReactNode;
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
confirmColor?: string;
|
|
1010
|
-
cancelColor?: string;
|
|
1011
|
-
|
|
1012
|
-
confirmSize?: string;
|
|
1013
|
-
cancelSize?: string;
|
|
1014
|
-
|
|
1015
|
-
align?: "left" | "center" | "right";
|
|
1016
|
-
|
|
1017
|
-
modalWidth?: string;
|
|
1018
|
-
|
|
1019
|
-
showCloseIcon?: boolean;
|
|
1020
|
-
|
|
1198
|
+
/** MUI Dialog maxWidth. Default: "sm" */
|
|
1199
|
+
maxWidth?: "xs" | "sm" | "md" | "lg" | "xl" | false;
|
|
1200
|
+
/** Whether dialog takes full width of maxWidth. Default: true */
|
|
1201
|
+
fullWidth?: boolean;
|
|
1202
|
+
/** Enable watermark overlay on content area */
|
|
1203
|
+
isWatermark?: boolean;
|
|
1204
|
+
/** Watermark text (e.g. "12345678 / Brispot Web") */
|
|
1205
|
+
watermarkText?: string;
|
|
1206
|
+
/** MUI sx overrides for Dialog */
|
|
1207
|
+
sx?: SxProps;
|
|
1021
1208
|
[key: string]: any;
|
|
1022
1209
|
}
|
|
1023
1210
|
|
|
1024
|
-
declare function
|
|
1025
|
-
props: BaseModalProps,
|
|
1026
|
-
): React.ReactElement | null;
|
|
1211
|
+
declare function BaseModalPopup(props: BaseModalPopupProps): React.ReactElement;
|
|
1027
1212
|
|
|
1028
1213
|
interface BaseModalStepperStep {
|
|
1029
1214
|
label?: string;
|
|
@@ -1081,4 +1266,82 @@ declare function BaseModalOTP(
|
|
|
1081
1266
|
props: BaseModalOTPProps,
|
|
1082
1267
|
): React.ReactElement | null;
|
|
1083
1268
|
|
|
1084
|
-
|
|
1269
|
+
declare const FORM_TYPE: {
|
|
1270
|
+
TEXT_FIELD: "text-field";
|
|
1271
|
+
TEXT_AREA: "text-area";
|
|
1272
|
+
TEXT_FIELD_UPLOAD: "text-field-upload";
|
|
1273
|
+
DATE_PICKER: "date-picker";
|
|
1274
|
+
DATETIME_PICKER: "datetime-picker";
|
|
1275
|
+
TIME_PICKER: "time-picker";
|
|
1276
|
+
YEAR_PICKER: "year-picker";
|
|
1277
|
+
MONTH_PICKER: "month-picker";
|
|
1278
|
+
DAY_PICKER: "day-picker";
|
|
1279
|
+
DATE_RANGE: "date-range";
|
|
1280
|
+
DROPDOWN: "dropdown";
|
|
1281
|
+
DROPDOWN_ASYNC: "dropdown-async";
|
|
1282
|
+
CHECKBOX: "checkbox";
|
|
1283
|
+
RADIO: "radio";
|
|
1284
|
+
CUSTOM: "custom";
|
|
1285
|
+
};
|
|
1286
|
+
|
|
1287
|
+
interface FormBuilderFieldConfig {
|
|
1288
|
+
type: string;
|
|
1289
|
+
name?: string;
|
|
1290
|
+
title?: string;
|
|
1291
|
+
/** Per-field layout override */
|
|
1292
|
+
layout?: "vertical" | "horizontal";
|
|
1293
|
+
/** Per-field label width override */
|
|
1294
|
+
labelWidth?: string;
|
|
1295
|
+
/** Per-field divider override */
|
|
1296
|
+
divider?: boolean;
|
|
1297
|
+
[key: string]: any;
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
interface FormBuilderProps<T = any> {
|
|
1301
|
+
/** MUI sx overrides for form element */
|
|
1302
|
+
sx?: SxProps;
|
|
1303
|
+
/** Array of field configurations */
|
|
1304
|
+
fields?: FormBuilderFieldConfig[];
|
|
1305
|
+
/** react-hook-form methods */
|
|
1306
|
+
methods?: UseFormReturn<T>;
|
|
1307
|
+
/** Form submit handler */
|
|
1308
|
+
onSubmit?: (data: T) => void;
|
|
1309
|
+
/** Gap between fields in px. Default: 16 */
|
|
1310
|
+
gap?: number;
|
|
1311
|
+
/** Number of grid columns. Default: 1 */
|
|
1312
|
+
columns?: number;
|
|
1313
|
+
/** Field layout direction. Default: "vertical" */
|
|
1314
|
+
layout?: "vertical" | "horizontal";
|
|
1315
|
+
/** Label width for horizontal layout. Default: "30%" */
|
|
1316
|
+
labelWidth?: string;
|
|
1317
|
+
/** Show border-bottom between fields. Default: false */
|
|
1318
|
+
divider?: boolean;
|
|
1319
|
+
/** CSS class for form element */
|
|
1320
|
+
className?: string;
|
|
1321
|
+
[key: string]: any;
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
interface SubFormBuilderProps<T = any> {
|
|
1325
|
+
/** MUI sx overrides */
|
|
1326
|
+
sx?: SxProps;
|
|
1327
|
+
/** Array of field configurations */
|
|
1328
|
+
fields?: FormBuilderFieldConfig[];
|
|
1329
|
+
/** react-hook-form methods */
|
|
1330
|
+
methods?: UseFormReturn<T>;
|
|
1331
|
+
/** Gap between fields in px. Default: 16 */
|
|
1332
|
+
gap?: number;
|
|
1333
|
+
/** Number of grid columns. Default: 1 */
|
|
1334
|
+
columns?: number;
|
|
1335
|
+
/** Field layout direction. Default: "vertical" */
|
|
1336
|
+
layout?: "vertical" | "horizontal";
|
|
1337
|
+
/** Label width for horizontal layout. Default: "30%" */
|
|
1338
|
+
labelWidth?: string;
|
|
1339
|
+
/** Show border-bottom between fields. Default: false */
|
|
1340
|
+
divider?: boolean;
|
|
1341
|
+
[key: string]: any;
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
declare function FormBuilder<T = any>(props: FormBuilderProps<T>): React.ReactElement;
|
|
1345
|
+
declare function SubFormBuilder<T = any>(props: SubFormBuilderProps<T>): React.ReactElement;
|
|
1346
|
+
|
|
1347
|
+
export { type BaseDatatableSortPayload as $, RadiusToken as A, BaseAlert as B, CONTENT_SPACING_TOKENS as C, DerivedColor as D, ShadowToken as E, FORM_TYPE as F, Spacing as G, SpacingToken as H, SubFormBuilder as I, type BaseAlertProps as J, type BaseButtonProps as K, type BaseCardProps as L, type BaseCheckboxOption as M, type BaseCheckboxProps as N, type BaseDatatableAlign as O, PrimitiveColor as P, type BaseDatatableColumn as Q, Radius as R, Shadow as S, TextFieldUpload as T, type BaseDatatableFeatures as U, VariantStyles as V, type BaseDatatableHeaderCell as W, type BaseDatatableLayout as X, type BaseDatatablePagination as Y, type BaseDatatableProps as Z, type BaseDatatableSelection as _, BaseButton as a, type BaseDatatableSortState as a0, type BaseDatePickerProps as a1, type BaseDropdownProps as a2, type BaseDropzoneProps as a3, type BaseModalAlertDialogProps as a4, type BaseModalAlertShowOptions as a5, type BaseModalLoadingDialogProps as a6, type BaseModalOTPProps as a7, type BaseModalPopupProps as a8, type BaseModalStepperProps as a9, type TypographyColor as aA, type TypographyProps as aB, type TypographyVariant as aC, type BaseModalStepperStep as aa, type BaseRadioButtonProps as ab, type BaseSkeletonProps as ac, type BaseSnackbarPosition as ad, type BaseSnackbarProps as ae, type BaseStepperDashboardStep as af, type BaseStepperProps as ag, type BaseStepperSimpleStep as ah, type BaseSwitchProps as ai, type BaseTextAreaProps as aj, type BaseTextFieldProps as ak, type ContentSpacingProps as al, type DerivedColorType as am, type FormBuilderFieldConfig as an, type FormBuilderProps as ao, type PrimitiveColorType as ap, type RadiusLevel as aq, type RadiusMap as ar, type RadiusTokenProps as as, type ShadowElevation as at, type ShadowLevel as au, type ShadowMap as av, type ShadowTokenProps as aw, type SpacingProps as ax, type SubFormBuilderProps as ay, type TextFieldUploadProps as az, BaseCard as b, BaseCheckbox as c, BaseDatatable as d, BaseDatePicker as e, BaseDropdown as f, BaseDropzone as g, BaseModalAlert as h, BaseModalAlertDialog as i, BaseModalAlertProvider as j, BaseModalLoading as k, BaseModalLoadingDialog as l, BaseModalLoadingProvider as m, BaseModalOTP as n, BaseModalPopup as o, BaseModalStepper as p, BaseRadioButton as q, BaseSkeleton as r, BaseSnackbar as s, BaseStepper as t, BaseSwitch as u, BaseTextArea as v, BaseTextField as w, BaseTypography as x, ContentSpacing as y, FormBuilder as z };
|
package/dist/types.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { J as BaseAlertProps, K as BaseButtonProps, L as BaseCardProps, M as BaseCheckboxOption, N as BaseCheckboxProps, O as BaseDatatableAlign, Q as BaseDatatableColumn, U as BaseDatatableFeatures, W as BaseDatatableHeaderCell, X as BaseDatatableLayout, Y as BaseDatatablePagination, Z as BaseDatatableProps, _ as BaseDatatableSelection, $ as BaseDatatableSortPayload, a0 as BaseDatatableSortState, a1 as BaseDatePickerProps, a2 as BaseDropdownProps, a3 as BaseDropzoneProps, a4 as BaseModalAlertDialogProps, a5 as BaseModalAlertShowOptions, a6 as BaseModalLoadingDialogProps, a7 as BaseModalOTPProps, a8 as BaseModalPopupProps, a9 as BaseModalStepperProps, aa as BaseModalStepperStep, ab as BaseRadioButtonProps, ac as BaseSkeletonProps, ad as BaseSnackbarPosition, ae as BaseSnackbarProps, af as BaseStepperDashboardStep, ag as BaseStepperProps, ah as BaseStepperSimpleStep, ai as BaseSwitchProps, aj as BaseTextAreaProps, ak as BaseTextFieldProps, al as ContentSpacingProps, am as DerivedColorType, an as FormBuilderFieldConfig, ao as FormBuilderProps, ap as PrimitiveColorType, aq as RadiusLevel, ar as RadiusMap, as as RadiusTokenProps, at as ShadowElevation, au as ShadowLevel, av as ShadowMap, aw as ShadowTokenProps, ax as SpacingProps, ay as SubFormBuilderProps, az as TextFieldUploadProps, aA as TypographyColor, aB as TypographyProps, aC as TypographyVariant } from './types-D0cyG_RH.mjs';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '@mui/material/styles';
|
|
4
4
|
import 'react-hook-form';
|
package/dist/utils/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export { ascendingStringify,
|
|
2
|
+
export { ascendingStringify, errorState, jsonToStringLimiter, parseJSON } from '../chunk-E6DKJIAE.mjs';
|
|
3
3
|
import { __spreadProps, __spreadValues } from '../chunk-YOSPWY5K.mjs';
|
|
4
4
|
|
|
5
5
|
// src/utils/formatters/account.js
|
|
@@ -241,6 +241,13 @@ var maskString = (value, type) => {
|
|
|
241
241
|
return tempArr.join("");
|
|
242
242
|
};
|
|
243
243
|
|
|
244
|
+
// src/utils/asset.js
|
|
245
|
+
var callAsset = (uri = "") => {
|
|
246
|
+
var _a;
|
|
247
|
+
const basePath = typeof window === "undefined" ? "" : ((_a = window.__NEXT_DATA__) == null ? void 0 : _a.assetPrefix) || process.env.NEXT_PUBLIC_BASE_PATH || "";
|
|
248
|
+
return `${basePath}${uri}`;
|
|
249
|
+
};
|
|
250
|
+
|
|
244
251
|
// src/utils/booleanUtils.js
|
|
245
252
|
var checkRoleUser = (roles, listRole) => {
|
|
246
253
|
let result = false;
|
|
@@ -472,6 +479,6 @@ function dashedNPWP(value) {
|
|
|
472
479
|
}
|
|
473
480
|
}
|
|
474
481
|
|
|
475
|
-
export { ACCESS_EXCEPTION, ApiException, CLIENT_ALLOWED_ORIGINS, CLIENT_PUBLIC_API_ROUTES, COOKIE_MAX_SIZE, EXCEPTION_MESSAGES, HEADER_EXCEPTION, INVALIDRULE_EXCEPTION, NOTFOUND_EXCEPTION, NOT_AUTHORIZE_RESPONSE_CODE, PARAMETER_EXCEPTION, PUBLIC_PATHS, RUNTIME_EXCEPTION, THIRDPARTY_EXCEPTION, UNSUPPORTED_EXCEPTION, WAITING_EXCEPTION, checkRoleUser, dashedAccount, dashedNPWP, dateFirstSlashToYearFirstDash, ddmmyyToSlashDate, disableFormBuilder, disableFormElements, formatAccountNumber, formatCurrency, formatCurrency2 as formatCurrencyLegacy, formatDateToDDMMYYYY, formatDateToDDSlashMMSlashYYYY, formatDigit, formatNPWP, formatNominal, formatNominal2 as formatNominalLegacy, formatResponseDesc, formatResponseDesc2 as formatResponseDescLegacy, formatRupiah, generateVcifId, getExceptionMessage, getLocalStorageItem, getTipeBankKorporasi, isExceptionCode, maskString, matchWiths, sevenDigitToDateFirstDash, sevenDigitToDateFirstSlash, sevenDigitToYearFirstDash, snakeToCamelWithSpace, stringToBoolean, stringToBoolean2 as stringToBooleanLegacy, titleCase, titleCase2 as titleCaseLegacy, toDateFirstSlash, toDateTimeHourMinute, toYearFirstDash, toggleUsingDummyWbenchEndpoint, yearFirstDashToDateFirstDash, yearFirstDashToDateFirstSlash };
|
|
482
|
+
export { ACCESS_EXCEPTION, ApiException, CLIENT_ALLOWED_ORIGINS, CLIENT_PUBLIC_API_ROUTES, COOKIE_MAX_SIZE, EXCEPTION_MESSAGES, HEADER_EXCEPTION, INVALIDRULE_EXCEPTION, NOTFOUND_EXCEPTION, NOT_AUTHORIZE_RESPONSE_CODE, PARAMETER_EXCEPTION, PUBLIC_PATHS, RUNTIME_EXCEPTION, THIRDPARTY_EXCEPTION, UNSUPPORTED_EXCEPTION, WAITING_EXCEPTION, callAsset, checkRoleUser, dashedAccount, dashedNPWP, dateFirstSlashToYearFirstDash, ddmmyyToSlashDate, disableFormBuilder, disableFormElements, formatAccountNumber, formatCurrency, formatCurrency2 as formatCurrencyLegacy, formatDateToDDMMYYYY, formatDateToDDSlashMMSlashYYYY, formatDigit, formatNPWP, formatNominal, formatNominal2 as formatNominalLegacy, formatResponseDesc, formatResponseDesc2 as formatResponseDescLegacy, formatRupiah, generateVcifId, getExceptionMessage, getLocalStorageItem, getTipeBankKorporasi, isExceptionCode, maskString, matchWiths, sevenDigitToDateFirstDash, sevenDigitToDateFirstSlash, sevenDigitToYearFirstDash, snakeToCamelWithSpace, stringToBoolean, stringToBoolean2 as stringToBooleanLegacy, titleCase, titleCase2 as titleCaseLegacy, toDateFirstSlash, toDateTimeHourMinute, toYearFirstDash, toggleUsingDummyWbenchEndpoint, yearFirstDashToDateFirstDash, yearFirstDashToDateFirstSlash };
|
|
476
483
|
//# sourceMappingURL=index.mjs.map
|
|
477
484
|
//# sourceMappingURL=index.mjs.map
|