spotlibs-components 0.1.14 → 0.1.17
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 -82
- package/dist/atoms/icons/index.mjs +416 -1
- package/dist/atoms/icons/index.mjs.map +1 -1
- package/dist/{chunk-WDRSX6IA.mjs → chunk-5ZMWZXI3.mjs} +499 -952
- 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 +1397 -357
- package/dist/index.mjs +1111 -2582
- 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/rekening-tujuan-icon-BfSXbixN.d.mts +61 -0
- package/dist/utils/index.mjs +11 -2
- package/dist/utils/index.mjs.map +1 -1
- package/package.json +10 -4
- package/src/utils/exception.js +2 -0
- package/src/utils/index.js +1 -0
- package/dist/chunk-UFE7HFT2.mjs.map +0 -1
- package/dist/chunk-WDRSX6IA.mjs.map +0 -1
- package/dist/types-BtwscYRX.d.mts +0 -1310
- package/dist/types.d.mts +0 -4
- package/dist/types.mjs +0 -4
- package/dist/types.mjs.map +0 -1
|
@@ -1,1310 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
import { SxProps } from '@mui/material/styles';
|
|
4
|
-
import { Control, RegisterOptions } from 'react-hook-form';
|
|
5
|
-
|
|
6
|
-
interface BaseAlertProps {
|
|
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 */
|
|
14
|
-
children?: React.ReactNode;
|
|
15
|
-
/** Icon element or component. If not provided, no icon is shown. */
|
|
16
|
-
icon?: React.ReactNode | React.ComponentType<any>;
|
|
17
|
-
/** Custom background color override */
|
|
18
|
-
color?: string;
|
|
19
|
-
/** MUI sx overrides */
|
|
20
|
-
sx?: SxProps;
|
|
21
|
-
/** Close handler. If provided, close button is shown. */
|
|
22
|
-
onClose?: () => void;
|
|
23
|
-
/** sx overrides for children wrapper */
|
|
24
|
-
childrenSx?: SxProps;
|
|
25
|
-
[key: string]: any;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
declare function BaseAlert(props: BaseAlertProps): React.ReactElement;
|
|
29
|
-
|
|
30
|
-
interface PrimitiveColorType {
|
|
31
|
-
color_overlay: string;
|
|
32
|
-
|
|
33
|
-
color_neutral_900: string;
|
|
34
|
-
color_neutral_700: string;
|
|
35
|
-
color_neutral_600: string;
|
|
36
|
-
color_neutral_500: string;
|
|
37
|
-
color_neutral_400: string;
|
|
38
|
-
color_neutral_300: string;
|
|
39
|
-
color_neutral_200: string;
|
|
40
|
-
color_neutral_100: string;
|
|
41
|
-
color_neutral_50: string;
|
|
42
|
-
|
|
43
|
-
color_blue_cakrawala_900: string;
|
|
44
|
-
color_blue_cakrawala_800: string;
|
|
45
|
-
color_blue_cakrawala_700: string;
|
|
46
|
-
color_blue_cakrawala_600: string;
|
|
47
|
-
color_blue_cakrawala_500: string;
|
|
48
|
-
color_blue_cakrawala_400: string;
|
|
49
|
-
color_blue_cakrawala_300: string;
|
|
50
|
-
color_blue_cakrawala_200: string;
|
|
51
|
-
color_blue_cakrawala_100: string;
|
|
52
|
-
|
|
53
|
-
color_blue_mentari_900: string;
|
|
54
|
-
color_blue_mentari_700: string;
|
|
55
|
-
color_blue_mentari_600: string;
|
|
56
|
-
color_blue_mentari_500: string;
|
|
57
|
-
color_blue_mentari_400: string;
|
|
58
|
-
color_blue_mentari_300: string;
|
|
59
|
-
color_blue_mentari_100: string;
|
|
60
|
-
|
|
61
|
-
color_blue_neon_900: string;
|
|
62
|
-
color_blue_neon_700: string;
|
|
63
|
-
color_blue_neon_600: string;
|
|
64
|
-
color_blue_neon_500: string;
|
|
65
|
-
color_blue_neon_400: string;
|
|
66
|
-
color_blue_neon_300: string;
|
|
67
|
-
color_blue_neon_100: string;
|
|
68
|
-
|
|
69
|
-
color_blue_sky_900: string;
|
|
70
|
-
color_blue_sky_700: string;
|
|
71
|
-
color_blue_sky_600: string;
|
|
72
|
-
color_blue_sky_500: string;
|
|
73
|
-
color_blue_sky_400: string;
|
|
74
|
-
color_blue_sky_300: string;
|
|
75
|
-
color_blue_sky_100: string;
|
|
76
|
-
|
|
77
|
-
color_green_900: string;
|
|
78
|
-
color_green_700: string;
|
|
79
|
-
color_green_600: string;
|
|
80
|
-
color_green_500: string;
|
|
81
|
-
color_green_400: string;
|
|
82
|
-
color_green_300: string;
|
|
83
|
-
color_green_100: string;
|
|
84
|
-
|
|
85
|
-
color_red_900: string;
|
|
86
|
-
color_red_700: string;
|
|
87
|
-
color_red_600: string;
|
|
88
|
-
color_red_500: string;
|
|
89
|
-
color_red_400: string;
|
|
90
|
-
color_red_300: string;
|
|
91
|
-
color_red_100: string;
|
|
92
|
-
|
|
93
|
-
color_yellow_900: string;
|
|
94
|
-
color_yellow_700: string;
|
|
95
|
-
color_yellow_600: string;
|
|
96
|
-
color_yellow_500: string;
|
|
97
|
-
color_yellow_400: string;
|
|
98
|
-
color_yellow_300: string;
|
|
99
|
-
color_yellow_100: string;
|
|
100
|
-
|
|
101
|
-
color_briva_900: string;
|
|
102
|
-
color_briva_700: string;
|
|
103
|
-
color_briva_600: string;
|
|
104
|
-
color_briva_500: string;
|
|
105
|
-
color_briva_400: string;
|
|
106
|
-
color_briva_300: string;
|
|
107
|
-
color_briva_100: string;
|
|
108
|
-
|
|
109
|
-
color_brizzi_900: string;
|
|
110
|
-
color_brizzi_700: string;
|
|
111
|
-
color_brizzi_600: string;
|
|
112
|
-
color_brizzi_500: string;
|
|
113
|
-
color_brizzi_400: string;
|
|
114
|
-
color_brizzi_300: string;
|
|
115
|
-
color_brizzi_100: string;
|
|
116
|
-
|
|
117
|
-
[key: string]: string;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
declare const PrimitiveColor: PrimitiveColorType;
|
|
121
|
-
|
|
122
|
-
interface DerivedColorType {
|
|
123
|
-
/* Background */
|
|
124
|
-
color_bg_page: string;
|
|
125
|
-
color_bg_surface: string;
|
|
126
|
-
color_bg_inverse: string;
|
|
127
|
-
color_bg_disabled: string;
|
|
128
|
-
|
|
129
|
-
color_bg_brand_primary_strong: string;
|
|
130
|
-
color_bg_brand_primary: string;
|
|
131
|
-
color_bg_brand_primary_subtle: string;
|
|
132
|
-
color_bg_brand_secondary_strong: string;
|
|
133
|
-
color_bg_brand_secondary: string;
|
|
134
|
-
color_bg_brand_secondary_subtle: string;
|
|
135
|
-
|
|
136
|
-
color_bg_success_strong: string;
|
|
137
|
-
color_bg_success: string;
|
|
138
|
-
color_bg_success_subtle: string;
|
|
139
|
-
|
|
140
|
-
color_bg_danger_strong: string;
|
|
141
|
-
color_bg_danger: string;
|
|
142
|
-
color_bg_danger_subtle: string;
|
|
143
|
-
|
|
144
|
-
color_bg_warning_strong: string;
|
|
145
|
-
color_bg_warning: string;
|
|
146
|
-
color_bg_warning_subtle: string;
|
|
147
|
-
|
|
148
|
-
/* Border */
|
|
149
|
-
color_border_default: string;
|
|
150
|
-
color_border_strong: string;
|
|
151
|
-
color_border_inverse: string;
|
|
152
|
-
color_border_brand_primary: string;
|
|
153
|
-
color_border_brand_secondary: string;
|
|
154
|
-
color_border_success: string;
|
|
155
|
-
color_border_danger: string;
|
|
156
|
-
color_border_warning: string;
|
|
157
|
-
|
|
158
|
-
/* Text */
|
|
159
|
-
color_text_default: string;
|
|
160
|
-
color_text_subtle: string;
|
|
161
|
-
color_text_disabled: string;
|
|
162
|
-
color_text_placeholder: string;
|
|
163
|
-
color_text_inverse: string;
|
|
164
|
-
color_text_brand_primary: string;
|
|
165
|
-
color_text_brand_secondary: string;
|
|
166
|
-
color_text_success: string;
|
|
167
|
-
color_text_danger: string;
|
|
168
|
-
color_text_warning: string;
|
|
169
|
-
|
|
170
|
-
/* Icon */
|
|
171
|
-
color_icon_subtle: string;
|
|
172
|
-
color_icon_strong: string;
|
|
173
|
-
color_icon_disabled: string;
|
|
174
|
-
color_icon_inverse: string;
|
|
175
|
-
color_icon_brand_primary: string;
|
|
176
|
-
color_icon_brand_secondary: string;
|
|
177
|
-
color_icon_success: string;
|
|
178
|
-
color_icon_danger: string;
|
|
179
|
-
color_icon_warning: string;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
declare const DerivedColor: DerivedColorType;
|
|
183
|
-
|
|
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;
|
|
231
|
-
|
|
232
|
-
declare const SpacingToken: {
|
|
233
|
-
spacing0: string;
|
|
234
|
-
spacing1: string;
|
|
235
|
-
spacing2: string;
|
|
236
|
-
spacing3: string;
|
|
237
|
-
spacing4: string;
|
|
238
|
-
spacing5: string;
|
|
239
|
-
spacing6: string;
|
|
240
|
-
spacing7: string;
|
|
241
|
-
spacing8: string;
|
|
242
|
-
spacing9: string;
|
|
243
|
-
spacing10: string;
|
|
244
|
-
};
|
|
245
|
-
|
|
246
|
-
declare const CONTENT_SPACING_TOKENS: {
|
|
247
|
-
spacing_1: {
|
|
248
|
-
mobile: string;
|
|
249
|
-
tablet: string;
|
|
250
|
-
web: string;
|
|
251
|
-
};
|
|
252
|
-
spacing_2: {
|
|
253
|
-
mobile: string;
|
|
254
|
-
tablet: string;
|
|
255
|
-
web: string;
|
|
256
|
-
};
|
|
257
|
-
spacing_3: {
|
|
258
|
-
mobile: string;
|
|
259
|
-
tablet: string;
|
|
260
|
-
web: string;
|
|
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
|
-
}
|
|
296
|
-
|
|
297
|
-
declare const Spacing: React.FC<SpacingProps>;
|
|
298
|
-
|
|
299
|
-
declare const ContentSpacing: React.FC<ContentSpacingProps>;
|
|
300
|
-
|
|
301
|
-
interface ShadowElevation {
|
|
302
|
-
shadow: string;
|
|
303
|
-
surface: string;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
interface ShadowMap {
|
|
307
|
-
elevation_0: ShadowElevation;
|
|
308
|
-
elevation_1: ShadowElevation;
|
|
309
|
-
elevation_2: ShadowElevation;
|
|
310
|
-
elevation_3: ShadowElevation;
|
|
311
|
-
elevation_4: ShadowElevation;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
declare const Shadow: ShadowMap;
|
|
315
|
-
|
|
316
|
-
type ShadowLevel = keyof ShadowMap;
|
|
317
|
-
|
|
318
|
-
interface ShadowTokenProps {
|
|
319
|
-
/** Elevation level */
|
|
320
|
-
level?: ShadowLevel;
|
|
321
|
-
/** Content */
|
|
322
|
-
children?: React.ReactNode;
|
|
323
|
-
/** MUI sx overrides */
|
|
324
|
-
sx?: SxProps;
|
|
325
|
-
[key: string]: any;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
declare function ShadowToken(props: ShadowTokenProps): React.ReactElement;
|
|
329
|
-
|
|
330
|
-
interface RadiusMap {
|
|
331
|
-
radius_0: string;
|
|
332
|
-
radius_1: string;
|
|
333
|
-
radius_2: string;
|
|
334
|
-
radius_3: string;
|
|
335
|
-
radius_4: string;
|
|
336
|
-
radius_x: string;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
declare const Radius: RadiusMap;
|
|
340
|
-
|
|
341
|
-
type RadiusLevel = keyof RadiusMap;
|
|
342
|
-
|
|
343
|
-
interface RadiusTokenProps {
|
|
344
|
-
/** Radius level */
|
|
345
|
-
radius?: RadiusLevel;
|
|
346
|
-
/** Content */
|
|
347
|
-
children?: React.ReactNode;
|
|
348
|
-
/** MUI sx overrides */
|
|
349
|
-
sx?: SxProps;
|
|
350
|
-
[key: string]: any;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
declare function RadiusToken(props: RadiusTokenProps): React.ReactElement;
|
|
354
|
-
|
|
355
|
-
interface BaseButtonProps {
|
|
356
|
-
/** Click handler */
|
|
357
|
-
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
358
|
-
/** Button content */
|
|
359
|
-
children?: React.ReactNode;
|
|
360
|
-
/** Visual style variant */
|
|
361
|
-
variant?: "fill" | "outline" | "text" | "fab" | "ellipse-fill" | "ellipse-outline";
|
|
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;
|
|
366
|
-
/** Button size */
|
|
367
|
-
size?: "large" | "small";
|
|
368
|
-
/** Disabled state */
|
|
369
|
-
disabled?: boolean;
|
|
370
|
-
/** Icon element rendered before children */
|
|
371
|
-
startIcon?: React.ReactNode;
|
|
372
|
-
/** Icon element rendered after children */
|
|
373
|
-
endIcon?: React.ReactNode;
|
|
374
|
-
/** Button width */
|
|
375
|
-
width?: string;
|
|
376
|
-
/** MUI sx overrides */
|
|
377
|
-
sx?: SxProps;
|
|
378
|
-
[key: string]: any;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
declare function BaseButton(props: BaseButtonProps): React.ReactElement;
|
|
382
|
-
|
|
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;
|
|
407
|
-
/** MUI sx overrides */
|
|
408
|
-
sx?: SxProps;
|
|
409
|
-
[key: string]: any;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
declare function BaseSkeleton(props: BaseSkeletonProps): React.ReactElement;
|
|
413
|
-
|
|
414
|
-
interface BaseSwitchProps {
|
|
415
|
-
/** Current switch state */
|
|
416
|
-
status?: boolean;
|
|
417
|
-
/** Label text or element */
|
|
418
|
-
label?: React.ReactNode;
|
|
419
|
-
/** Label position relative to the switch */
|
|
420
|
-
labelPlacement?: "start" | "end" | "top" | "bottom";
|
|
421
|
-
/** Disabled state */
|
|
422
|
-
isDisabled?: boolean;
|
|
423
|
-
/** Change handler */
|
|
424
|
-
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
declare function BaseSwitch(props: BaseSwitchProps): React.ReactElement;
|
|
428
|
-
|
|
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. "12345678 / Brispot Web") */
|
|
461
|
-
watermarkText?: string;
|
|
462
|
-
/** MUI sx overrides */
|
|
463
|
-
sx?: SxProps;
|
|
464
|
-
[key: string]: any;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
declare function BaseCard(props: BaseCardProps): React.ReactElement;
|
|
468
|
-
|
|
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;
|
|
495
|
-
|
|
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,
|
|
544
|
-
): React.ReactElement | null;
|
|
545
|
-
|
|
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;
|
|
565
|
-
width?: number;
|
|
566
|
-
minWidth?: number;
|
|
567
|
-
sticky?: "left" | "right";
|
|
568
|
-
sortable?: boolean;
|
|
569
|
-
noWrap?: boolean;
|
|
570
|
-
cellBg?: string;
|
|
571
|
-
cellText?: string;
|
|
572
|
-
cellSx?: SxProps;
|
|
573
|
-
renderCell?: (context: {
|
|
574
|
-
value: any;
|
|
575
|
-
row: T;
|
|
576
|
-
rowIndex: number;
|
|
577
|
-
column: BaseDatatableColumn<T>;
|
|
578
|
-
columnIndex: number;
|
|
579
|
-
checked?: boolean;
|
|
580
|
-
}) => ReactNode;
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
interface BaseDatatableHeaderCell {
|
|
584
|
-
id?: string;
|
|
585
|
-
key?: string;
|
|
586
|
-
label: ReactNode;
|
|
587
|
-
align?: BaseDatatableAlign;
|
|
588
|
-
colSpan?: number;
|
|
589
|
-
rowSpan?: number;
|
|
590
|
-
colspan?: number;
|
|
591
|
-
rowspan?: number;
|
|
592
|
-
sortKey?: string;
|
|
593
|
-
width?: number;
|
|
594
|
-
minWidth?: number;
|
|
595
|
-
sticky?: "left" | "right";
|
|
596
|
-
sx?: SxProps;
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
interface BaseDatatableFeatures {
|
|
600
|
-
sorting?: boolean;
|
|
601
|
-
sortingMode?: "client" | "server";
|
|
602
|
-
defaultSort?: BaseDatatableSortState | null;
|
|
603
|
-
sortState?: BaseDatatableSortState | null;
|
|
604
|
-
resetPageOnSort?: boolean;
|
|
605
|
-
onSortChange?: (
|
|
606
|
-
payload: BaseDatatableSortPayload,
|
|
607
|
-
column: BaseDatatableColumn,
|
|
608
|
-
cell: BaseDatatableHeaderCell,
|
|
609
|
-
) => void;
|
|
610
|
-
headerInteractive?: boolean;
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
interface BaseDatatableSortState {
|
|
614
|
-
key: string;
|
|
615
|
-
direction: "asc" | "desc";
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
interface BaseDatatableSortPayload {
|
|
619
|
-
orderBy: string;
|
|
620
|
-
order: "asc" | "desc";
|
|
621
|
-
page: number;
|
|
622
|
-
rowsPerPage: number;
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
interface BaseDatatableLayout {
|
|
626
|
-
stickyHeader?: boolean;
|
|
627
|
-
stickyOffset?: number;
|
|
628
|
-
freezeLeft?: number;
|
|
629
|
-
freezeRight?: number;
|
|
630
|
-
maxHeight?: number;
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
interface BaseDatatableSelection<T = Record<string, any>> {
|
|
634
|
-
enabled?: boolean;
|
|
635
|
-
position?: "left" | "right";
|
|
636
|
-
selectRowOnClick?: boolean;
|
|
637
|
-
selectedRowIds?: Array<string | number>;
|
|
638
|
-
defaultSelectedRowIds?: Array<string | number>;
|
|
639
|
-
onChange?: (selectedRowIds: Array<string | number>) => void;
|
|
640
|
-
isRowSelectable?: (row: T, rowIndex: number) => boolean;
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
interface BaseDatatablePagination {
|
|
644
|
-
enabled?: boolean;
|
|
645
|
-
serverSide?: boolean;
|
|
646
|
-
count?: number;
|
|
647
|
-
page?: number;
|
|
648
|
-
rowsPerPage?: number;
|
|
649
|
-
rowsPerPageOptions?: number[];
|
|
650
|
-
labelRowsPerPage?: ReactNode;
|
|
651
|
-
onPageChange?: (event: unknown, nextPage: number) => void;
|
|
652
|
-
onRowsPerPageChange?: (event: unknown, nextRowsPerPage: number) => void;
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
interface BaseDatatableCellOverrides {
|
|
656
|
-
rowSpan?: number;
|
|
657
|
-
colSpan?: number;
|
|
658
|
-
content?: ReactNode;
|
|
659
|
-
sx?: SxProps;
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
interface BaseDatatableRenderRowContext<T = Record<string, any>> {
|
|
663
|
-
row: T;
|
|
664
|
-
rowIndex: number;
|
|
665
|
-
rowId: string | number;
|
|
666
|
-
rowActive: boolean;
|
|
667
|
-
columns: BaseDatatableColumn<T>[];
|
|
668
|
-
dataColumns: BaseDatatableColumn<T>[];
|
|
669
|
-
selectedRowIds: Array<string | number>;
|
|
670
|
-
renderCell: (
|
|
671
|
-
column: BaseDatatableColumn<T>,
|
|
672
|
-
row: T,
|
|
673
|
-
rowIndex: number,
|
|
674
|
-
columnIndex: number,
|
|
675
|
-
rowId: string | number,
|
|
676
|
-
rowActive: boolean,
|
|
677
|
-
cellOverrides?: BaseDatatableCellOverrides,
|
|
678
|
-
) => ReactNode;
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
interface BaseDatatableProps<T = Record<string, any>> {
|
|
682
|
-
columns?: Array<BaseDatatableColumn<T> | string>;
|
|
683
|
-
data?: T[];
|
|
684
|
-
header?: BaseDatatableHeaderCell[][];
|
|
685
|
-
features?: BaseDatatableFeatures;
|
|
686
|
-
layout?: BaseDatatableLayout;
|
|
687
|
-
selection?: BaseDatatableSelection<T>;
|
|
688
|
-
pagination?: BaseDatatablePagination;
|
|
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;
|
|
697
|
-
containerSx?: SxProps;
|
|
698
|
-
tableSx?: SxProps;
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
declare function BaseDatatable<T = Record<string, any>>(
|
|
702
|
-
props: BaseDatatableProps<T>,
|
|
703
|
-
): ReactNode;
|
|
704
|
-
|
|
705
|
-
interface BaseDatePickerProps {
|
|
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 */
|
|
713
|
-
defaultValue?: any;
|
|
714
|
-
/** Label title above input */
|
|
715
|
-
title?: string;
|
|
716
|
-
/** Optional subtitle */
|
|
717
|
-
subtitle?: string;
|
|
718
|
-
/** Input placeholder text */
|
|
719
|
-
placeholder?: string;
|
|
720
|
-
/** Minimum selectable date */
|
|
721
|
-
minDate?: Date | string;
|
|
722
|
-
/** Maximum selectable date */
|
|
723
|
-
maxDate?: Date | string;
|
|
724
|
-
/** Disable picker interaction */
|
|
725
|
-
isDisabled?: boolean;
|
|
726
|
-
/** Allow user to clear selected value */
|
|
727
|
-
clearable?: boolean;
|
|
728
|
-
/** Allow manual input editing (range only) */
|
|
729
|
-
editableDateInputs?: boolean;
|
|
730
|
-
/** Display format for value */
|
|
731
|
-
format?: string;
|
|
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;
|
|
738
|
-
[key: string]: any;
|
|
739
|
-
}
|
|
740
|
-
|
|
741
|
-
declare function BaseDatePicker(
|
|
742
|
-
props: BaseDatePickerProps,
|
|
743
|
-
): React.ReactElement | null;
|
|
744
|
-
|
|
745
|
-
interface DropdownOption {
|
|
746
|
-
label: string;
|
|
747
|
-
value: string;
|
|
748
|
-
disabled?: boolean;
|
|
749
|
-
[key: string]: any;
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
interface BaseDropdownProps {
|
|
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 */
|
|
762
|
-
isMulti?: boolean;
|
|
763
|
-
/** Enable search input */
|
|
764
|
-
isSearchable?: boolean;
|
|
765
|
-
/** Show selected values as chips (multi only) */
|
|
766
|
-
showChip?: boolean;
|
|
767
|
-
/** Show Select All checkbox (multi only) */
|
|
768
|
-
showSelectAll?: boolean;
|
|
769
|
-
/** Label title */
|
|
770
|
-
title?: string;
|
|
771
|
-
/** Subtitle text */
|
|
772
|
-
subtitle?: string;
|
|
773
|
-
/** Default selected value */
|
|
774
|
-
defaultValue?: any;
|
|
775
|
-
/** Disable dropdown */
|
|
776
|
-
isDisabled?: boolean;
|
|
777
|
-
/** Allow clearing value */
|
|
778
|
-
isClearable?: boolean;
|
|
779
|
-
/** Limit max height with scroll */
|
|
780
|
-
preventOverflow?: boolean;
|
|
781
|
-
/** Colors for multi-value tags */
|
|
782
|
-
optionColors?: string[];
|
|
783
|
-
/** Dropdown variant */
|
|
784
|
-
variant?: "select" | "checkbox";
|
|
785
|
-
/** MUI sx overrides for wrapper */
|
|
786
|
-
sx?: SxProps;
|
|
787
|
-
/** Custom onChange handler */
|
|
788
|
-
onChange?: (value: any) => void;
|
|
789
|
-
[key: string]: any;
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
declare function BaseDropdown(
|
|
793
|
-
props: BaseDropdownProps,
|
|
794
|
-
): React.ReactElement;
|
|
795
|
-
|
|
796
|
-
interface BaseDropzoneSettings {
|
|
797
|
-
/** Ekstensi file yang diizinkan (format react-dropzone accept) */
|
|
798
|
-
allowedExtensions?: Record<string, string[]>;
|
|
799
|
-
/** Ukuran maksimal file dalam MB */
|
|
800
|
-
maxSize?: number;
|
|
801
|
-
/** Jumlah maksimal file yang dapat diupload */
|
|
802
|
-
maxFiles?: number;
|
|
803
|
-
/** Tampilkan preview gambar */
|
|
804
|
-
isImagePreview?: boolean;
|
|
805
|
-
/** Tipe tampilan preview */
|
|
806
|
-
previewType?: "grid" | "list";
|
|
807
|
-
}
|
|
808
|
-
|
|
809
|
-
interface BaseDropzoneLabels {
|
|
810
|
-
/** Label judul di atas dropzone */
|
|
811
|
-
title?: React.ReactNode;
|
|
812
|
-
/** Teks utama di dalam area dropzone */
|
|
813
|
-
dropzoneTitle?: string;
|
|
814
|
-
/** Label pada tombol pilih file */
|
|
815
|
-
titleButton?: string;
|
|
816
|
-
/** Teks keterangan format file yang diizinkan */
|
|
817
|
-
allowedFileLabel?: string;
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
interface BaseDropzoneCallbacks {
|
|
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;
|
|
827
|
-
}
|
|
828
|
-
|
|
829
|
-
interface BaseDropzoneProps {
|
|
830
|
-
/** Upload otomatis setelah file dipilih */
|
|
831
|
-
autoUpload?: boolean;
|
|
832
|
-
/** Pengaturan dropzone */
|
|
833
|
-
settings?: BaseDropzoneSettings;
|
|
834
|
-
/** Label-label yang ditampilkan */
|
|
835
|
-
labels?: BaseDropzoneLabels;
|
|
836
|
-
/** Callback functions */
|
|
837
|
-
callbacks?: BaseDropzoneCallbacks;
|
|
838
|
-
}
|
|
839
|
-
|
|
840
|
-
declare function BaseDropzone(
|
|
841
|
-
props: BaseDropzoneProps,
|
|
842
|
-
): React.ReactElement;
|
|
843
|
-
|
|
844
|
-
interface BaseRadioOption {
|
|
845
|
-
label: React.ReactNode;
|
|
846
|
-
value: any;
|
|
847
|
-
isDisabled?: boolean;
|
|
848
|
-
[key: string]: any;
|
|
849
|
-
}
|
|
850
|
-
|
|
851
|
-
interface BaseRadioButtonProps {
|
|
852
|
-
/** Nama field untuk react-hook-form */
|
|
853
|
-
name?: string;
|
|
854
|
-
/** Control dari useForm() */
|
|
855
|
-
control?: any;
|
|
856
|
-
/** Nilai awal yang dipilih */
|
|
857
|
-
defaultValue?: any;
|
|
858
|
-
/** Label di atas radio group */
|
|
859
|
-
label?: React.ReactNode;
|
|
860
|
-
/** Daftar opsi radio */
|
|
861
|
-
options?: BaseRadioOption[];
|
|
862
|
-
/** Variant typography untuk label */
|
|
863
|
-
labelVariant?: string;
|
|
864
|
-
/** Variant typography untuk pesan error */
|
|
865
|
-
errorVariant?: string;
|
|
866
|
-
/** Orientasi layout radio group */
|
|
867
|
-
orientation?: "vertical" | "horizontal";
|
|
868
|
-
/** Token warna untuk radio yang dipilih */
|
|
869
|
-
radioColorToken?: string;
|
|
870
|
-
/** Nonaktifkan semua opsi */
|
|
871
|
-
isDisabled?: boolean;
|
|
872
|
-
/** Gunakan error state helper untuk nested field names */
|
|
873
|
-
useErrorStateHelper?: boolean;
|
|
874
|
-
/** Custom styles via MUI sx prop */
|
|
875
|
-
sx?: SxProps;
|
|
876
|
-
|
|
877
|
-
[key: string]: any;
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
declare function BaseRadioButton(
|
|
881
|
-
props: BaseRadioButtonProps,
|
|
882
|
-
): React.ReactElement | null;
|
|
883
|
-
|
|
884
|
-
interface BaseStepperSimpleStep {
|
|
885
|
-
/** Step status text (e.g. "Completed", "In Progress") */
|
|
886
|
-
status?: string;
|
|
887
|
-
/** Step label/description */
|
|
888
|
-
label?: string;
|
|
889
|
-
}
|
|
890
|
-
|
|
891
|
-
interface BaseStepperDashboardSublist {
|
|
892
|
-
sublist_title?: string;
|
|
893
|
-
is_done?: 0 | 1;
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
interface BaseStepperDashboardStep {
|
|
897
|
-
title?: string;
|
|
898
|
-
sublist?: BaseStepperDashboardSublist[];
|
|
899
|
-
is_done?: 0 | 1;
|
|
900
|
-
}
|
|
901
|
-
|
|
902
|
-
interface BaseStepperProps {
|
|
903
|
-
/** Array of step objects */
|
|
904
|
-
steps?: BaseStepperSimpleStep[] | BaseStepperDashboardStep[];
|
|
905
|
-
/** Currently active step index (for simple variant) */
|
|
906
|
-
activeStep?: number;
|
|
907
|
-
/** Layout orientation */
|
|
908
|
-
orientation?: "horizontal" | "vertical";
|
|
909
|
-
/** Stepper visual variant */
|
|
910
|
-
variant?: "simple" | "dashboard";
|
|
911
|
-
/** MUI sx overrides for wrapper */
|
|
912
|
-
sx?: SxProps;
|
|
913
|
-
}
|
|
914
|
-
|
|
915
|
-
declare function BaseStepper(props: BaseStepperProps): React.ReactElement;
|
|
916
|
-
|
|
917
|
-
interface BaseTextFieldProps {
|
|
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 */
|
|
923
|
-
defaultValue?: any;
|
|
924
|
-
/** Label title displayed above the input */
|
|
925
|
-
title?: string;
|
|
926
|
-
/** Maximum character length */
|
|
927
|
-
maxLength?: number;
|
|
928
|
-
/** Show "Maksimal X Karakter" helper text */
|
|
929
|
-
showLength?: boolean;
|
|
930
|
-
/** Show character counter (e.g. 5/20) */
|
|
931
|
-
showCountHelper?: boolean;
|
|
932
|
-
/** Only allow numeric input (0-9) */
|
|
933
|
-
isNumericOnly?: boolean;
|
|
934
|
-
/** Only allow alphanumeric input (a-z, A-Z, 0-9) */
|
|
935
|
-
isAlphaNumericOnly?: boolean;
|
|
936
|
-
/** Only allow alphabetic input (a-z, A-Z) */
|
|
937
|
-
isAlphaOnly?: boolean;
|
|
938
|
-
/** Additional special characters to allow */
|
|
939
|
-
allowedSpecialCharacters?: string;
|
|
940
|
-
/** Special characters to disallow */
|
|
941
|
-
dontAllowedSpecialCharacters?: string;
|
|
942
|
-
/** Disable the input */
|
|
943
|
-
isDisabled?: boolean;
|
|
944
|
-
/** Prevent paste action */
|
|
945
|
-
isCantPaste?: boolean;
|
|
946
|
-
/** Result text shown below the input */
|
|
947
|
-
result?: React.ReactNode;
|
|
948
|
-
/** Color for the result text */
|
|
949
|
-
resultColor?: string;
|
|
950
|
-
/** Disallow spaces */
|
|
951
|
-
noSpaceAllowed?: boolean;
|
|
952
|
-
/** Input mask pattern (use 'x' for editable slots, e.g. "0xxx-xxxx-xxxx") */
|
|
953
|
-
textMask?: string;
|
|
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;
|
|
964
|
-
[key: string]: any;
|
|
965
|
-
}
|
|
966
|
-
|
|
967
|
-
declare function BaseTextField(
|
|
968
|
-
props: BaseTextFieldProps,
|
|
969
|
-
): React.ReactElement | null;
|
|
970
|
-
|
|
971
|
-
interface TextFieldUploadProps {
|
|
972
|
-
/** Nama field untuk react-hook-form */
|
|
973
|
-
name?: string;
|
|
974
|
-
/** Control dari useForm() */
|
|
975
|
-
control?: any;
|
|
976
|
-
/** Nilai awal field */
|
|
977
|
-
defaultValue?: string;
|
|
978
|
-
/** Label di atas field */
|
|
979
|
-
title?: React.ReactNode;
|
|
980
|
-
/** Ekstensi file yang diterima (contoh: ".pdf,.jpg") */
|
|
981
|
-
accept?: string;
|
|
982
|
-
/** Ukuran maksimal file dalam MB */
|
|
983
|
-
maxSize?: number;
|
|
984
|
-
/** Nonaktifkan field */
|
|
985
|
-
isDisabled?: boolean;
|
|
986
|
-
/** Label pada tombol upload */
|
|
987
|
-
buttonLabel?: string;
|
|
988
|
-
/** Posisi tombol upload relatif terhadap input */
|
|
989
|
-
buttonPosition?: "start" | "end";
|
|
990
|
-
/** Callback ketika file dipilih */
|
|
991
|
-
uploadFile?: (fileName: string, file: File | null) => void;
|
|
992
|
-
/** Posisi ikon pada tombol upload */
|
|
993
|
-
iconPosition?: "start" | "end";
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
declare function TextFieldUpload(
|
|
997
|
-
props: TextFieldUploadProps,
|
|
998
|
-
): React.ReactElement | null;
|
|
999
|
-
|
|
1000
|
-
interface TinyMCEInitConfig {
|
|
1001
|
-
/** Placeholder text di area editor */
|
|
1002
|
-
placeholder?: string;
|
|
1003
|
-
/** Prefix URL untuk image upload */
|
|
1004
|
-
prefixUrl?: string;
|
|
1005
|
-
[key: string]: any;
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
interface BaseTextAreaProps {
|
|
1009
|
-
/** Nama field untuk react-hook-form */
|
|
1010
|
-
name?: string;
|
|
1011
|
-
/** Control dari useForm() */
|
|
1012
|
-
control?: Control<any>;
|
|
1013
|
-
/** Nilai awal (bisa HTML string jika useRichText aktif) */
|
|
1014
|
-
defaultValue?: string;
|
|
1015
|
-
/** Teks bantuan di bawah field (tampil jika tidak ada error) */
|
|
1016
|
-
helperText?: React.ReactNode;
|
|
1017
|
-
/** Validasi rules react-hook-form */
|
|
1018
|
-
rules?: RegisterOptions;
|
|
1019
|
-
/** Harus tepat N karakter (override min/maxLength) */
|
|
1020
|
-
exactLength?: number;
|
|
1021
|
-
/** Batas maksimal karakter */
|
|
1022
|
-
maxLength?: number;
|
|
1023
|
-
/** Label di atas field */
|
|
1024
|
-
title?: string;
|
|
1025
|
-
/** Nonaktifkan field */
|
|
1026
|
-
isDisabled?: boolean;
|
|
1027
|
-
/** Aktifkan TinyMCE rich-text editor (default: plain MUI textarea) */
|
|
1028
|
-
useRichText?: boolean;
|
|
1029
|
-
/** Override konfigurasi TinyMCE (placeholder, prefixUrl, dll) */
|
|
1030
|
-
init?: TinyMCEInitConfig;
|
|
1031
|
-
/** Callback file_picker_callback untuk upload gambar di rich text mode */
|
|
1032
|
-
handleImageUpload?: (
|
|
1033
|
-
callback: (url: string, meta?: Record<string, string>) => void,
|
|
1034
|
-
value: string,
|
|
1035
|
-
meta: Record<string, string>,
|
|
1036
|
-
) => void;
|
|
1037
|
-
/** Custom styles via MUI sx prop */
|
|
1038
|
-
sx?: SxProps;
|
|
1039
|
-
|
|
1040
|
-
[key: string]: any;
|
|
1041
|
-
}
|
|
1042
|
-
|
|
1043
|
-
declare function BaseTextArea(
|
|
1044
|
-
props: BaseTextAreaProps,
|
|
1045
|
-
): React.ReactElement | null;
|
|
1046
|
-
|
|
1047
|
-
interface BaseModalProps {
|
|
1048
|
-
open?: boolean;
|
|
1049
|
-
|
|
1050
|
-
onClose?: () => void;
|
|
1051
|
-
onConfirm?: () => void;
|
|
1052
|
-
onCancel?: () => void;
|
|
1053
|
-
|
|
1054
|
-
icon?: React.ReactNode;
|
|
1055
|
-
|
|
1056
|
-
title?: React.ReactNode;
|
|
1057
|
-
description?: React.ReactNode;
|
|
1058
|
-
|
|
1059
|
-
children?: React.ReactNode;
|
|
1060
|
-
footer?: React.ReactNode;
|
|
1061
|
-
|
|
1062
|
-
showConfirm?: boolean;
|
|
1063
|
-
showCancel?: boolean;
|
|
1064
|
-
|
|
1065
|
-
confirmLabel?: string;
|
|
1066
|
-
cancelLabel?: string;
|
|
1067
|
-
|
|
1068
|
-
confirmVariant?: string;
|
|
1069
|
-
cancelVariant?: string;
|
|
1070
|
-
|
|
1071
|
-
confirmColor?: string;
|
|
1072
|
-
cancelColor?: string;
|
|
1073
|
-
|
|
1074
|
-
confirmSize?: string;
|
|
1075
|
-
cancelSize?: string;
|
|
1076
|
-
|
|
1077
|
-
align?: "left" | "center" | "right";
|
|
1078
|
-
|
|
1079
|
-
modalWidth?: string;
|
|
1080
|
-
|
|
1081
|
-
showCloseIcon?: boolean;
|
|
1082
|
-
|
|
1083
|
-
[key: string]: any;
|
|
1084
|
-
}
|
|
1085
|
-
|
|
1086
|
-
declare function BaseModal(
|
|
1087
|
-
props: BaseModalProps,
|
|
1088
|
-
): React.ReactElement | null;
|
|
1089
|
-
|
|
1090
|
-
interface BaseModalAlertShowOptions {
|
|
1091
|
-
/** Icon type preset or custom image path */
|
|
1092
|
-
icon?: "success" | "error" | "info" | "warning" | "confirm" | string;
|
|
1093
|
-
/** Modal title text */
|
|
1094
|
-
title?: string;
|
|
1095
|
-
/** Modal description text */
|
|
1096
|
-
description?: string;
|
|
1097
|
-
/** Cancel button text. Default: "Batal" */
|
|
1098
|
-
cancelBtnText?: string;
|
|
1099
|
-
/** Confirm button text. Default: "Ya" */
|
|
1100
|
-
confirmBtnText?: string;
|
|
1101
|
-
/** Cancel button action. Default: closes modal. Can be custom function. */
|
|
1102
|
-
cancelBtnProps?: () => void;
|
|
1103
|
-
/** Confirm button action. Called on confirm click. */
|
|
1104
|
-
confirmBtnProps?: () => void;
|
|
1105
|
-
/** Show cancel button. Default: true */
|
|
1106
|
-
showCancelBtn?: boolean;
|
|
1107
|
-
/** Show confirm button. Default: true */
|
|
1108
|
-
showConfirmBtn?: boolean;
|
|
1109
|
-
}
|
|
1110
|
-
|
|
1111
|
-
interface BaseModalAlertDialogProps extends BaseModalAlertShowOptions {
|
|
1112
|
-
/** Whether the modal is open */
|
|
1113
|
-
open?: boolean;
|
|
1114
|
-
/** Close handler */
|
|
1115
|
-
onClose?: () => void;
|
|
1116
|
-
}
|
|
1117
|
-
|
|
1118
|
-
/**
|
|
1119
|
-
* Imperative BaseModalAlert API.
|
|
1120
|
-
*
|
|
1121
|
-
* Usage:
|
|
1122
|
-
* ```jsx
|
|
1123
|
-
* import { BaseModalAlert } from 'spotlibs-components';
|
|
1124
|
-
*
|
|
1125
|
-
* BaseModalAlert.show({
|
|
1126
|
-
* icon: 'success',
|
|
1127
|
-
* title: 'Berhasil!',
|
|
1128
|
-
* description: 'Data berhasil disimpan.',
|
|
1129
|
-
* confirmBtnText: 'OK',
|
|
1130
|
-
* showCancelBtn: false,
|
|
1131
|
-
* confirmBtnProps: () => console.log('confirmed'),
|
|
1132
|
-
* });
|
|
1133
|
-
*
|
|
1134
|
-
* BaseModalAlert.hide();
|
|
1135
|
-
* ```
|
|
1136
|
-
*/
|
|
1137
|
-
declare const BaseModalAlert: {
|
|
1138
|
-
/** Show the modal alert with given options */
|
|
1139
|
-
show: (options: BaseModalAlertShowOptions) => void;
|
|
1140
|
-
/** Hide the modal alert */
|
|
1141
|
-
hide: () => void;
|
|
1142
|
-
/** Internal: set modal ref (used by BaseModalAlertProvider) */
|
|
1143
|
-
setModalRef: (ref: React.RefObject<any>) => void;
|
|
1144
|
-
};
|
|
1145
|
-
|
|
1146
|
-
/**
|
|
1147
|
-
* Provider component. Mount once at app root to enable BaseModalAlert.show()/hide().
|
|
1148
|
-
*
|
|
1149
|
-
* ```jsx
|
|
1150
|
-
* import { BaseModalAlertProvider } from 'spotlibs-components';
|
|
1151
|
-
*
|
|
1152
|
-
* function App() {
|
|
1153
|
-
* return (
|
|
1154
|
-
* <>
|
|
1155
|
-
* <BaseModalAlertProvider />
|
|
1156
|
-
* <YourApp />
|
|
1157
|
-
* </>
|
|
1158
|
-
* );
|
|
1159
|
-
* }
|
|
1160
|
-
* ```
|
|
1161
|
-
*/
|
|
1162
|
-
declare function BaseModalAlertProvider(): React.ReactElement;
|
|
1163
|
-
|
|
1164
|
-
/**
|
|
1165
|
-
* Controlled dialog component for direct usage without imperative API.
|
|
1166
|
-
*/
|
|
1167
|
-
declare function BaseModalAlertDialog(props: BaseModalAlertDialogProps): React.ReactElement;
|
|
1168
|
-
|
|
1169
|
-
interface BaseModalLoadingDialogProps {
|
|
1170
|
-
/** Whether the loading modal is open */
|
|
1171
|
-
open?: boolean;
|
|
1172
|
-
/** Loading message text. Default: "Mohon tunggu..." */
|
|
1173
|
-
message?: string;
|
|
1174
|
-
}
|
|
1175
|
-
|
|
1176
|
-
/**
|
|
1177
|
-
* Imperative BaseModalLoading API.
|
|
1178
|
-
*
|
|
1179
|
-
* Usage:
|
|
1180
|
-
* ```jsx
|
|
1181
|
-
* import { BaseModalLoading } from 'spotlibs-components';
|
|
1182
|
-
*
|
|
1183
|
-
* BaseModalLoading.show(); // default message
|
|
1184
|
-
* BaseModalLoading.show("Sedang memproses data...");
|
|
1185
|
-
* BaseModalLoading.hide();
|
|
1186
|
-
* ```
|
|
1187
|
-
*/
|
|
1188
|
-
declare const BaseModalLoading: {
|
|
1189
|
-
/** Show the loading modal. Optionally pass a custom message. */
|
|
1190
|
-
show: (message?: string) => void;
|
|
1191
|
-
/** Hide the loading modal */
|
|
1192
|
-
hide: () => void;
|
|
1193
|
-
/** Internal: set modal ref (used by BaseModalLoadingProvider) */
|
|
1194
|
-
setModalRef: (ref: React.RefObject<any>) => void;
|
|
1195
|
-
};
|
|
1196
|
-
|
|
1197
|
-
/**
|
|
1198
|
-
* Provider component. Mount once at app root to enable BaseModalLoading.show()/hide().
|
|
1199
|
-
*
|
|
1200
|
-
* ```jsx
|
|
1201
|
-
* import { BaseModalLoadingProvider } from 'spotlibs-components';
|
|
1202
|
-
*
|
|
1203
|
-
* function App() {
|
|
1204
|
-
* return (
|
|
1205
|
-
* <>
|
|
1206
|
-
* <BaseModalLoadingProvider />
|
|
1207
|
-
* <YourApp />
|
|
1208
|
-
* </>
|
|
1209
|
-
* );
|
|
1210
|
-
* }
|
|
1211
|
-
* ```
|
|
1212
|
-
*/
|
|
1213
|
-
declare function BaseModalLoadingProvider(): React.ReactElement;
|
|
1214
|
-
|
|
1215
|
-
/**
|
|
1216
|
-
* Controlled loading dialog component for direct usage without imperative API.
|
|
1217
|
-
*/
|
|
1218
|
-
declare function BaseModalLoadingDialog(props: BaseModalLoadingDialogProps): React.ReactElement;
|
|
1219
|
-
|
|
1220
|
-
interface BaseModalPopupProps {
|
|
1221
|
-
/** Whether the modal is open */
|
|
1222
|
-
open?: boolean;
|
|
1223
|
-
/** Close handler */
|
|
1224
|
-
onClose?: () => void;
|
|
1225
|
-
/** Modal variant type */
|
|
1226
|
-
variant?: "default" | "with-header" | "with-header-footer";
|
|
1227
|
-
/** Header background color preset */
|
|
1228
|
-
color?: "primary" | "secondary" | "success" | "warning" | "danger";
|
|
1229
|
-
/** Header title text */
|
|
1230
|
-
title?: string;
|
|
1231
|
-
/** Header subtitle text */
|
|
1232
|
-
subtitle?: string;
|
|
1233
|
-
/** Icon element before title in header */
|
|
1234
|
-
startIcon?: React.ReactNode;
|
|
1235
|
-
/** Modal body content */
|
|
1236
|
-
children?: React.ReactNode;
|
|
1237
|
-
/** Footer content (only for with-header-footer variant) */
|
|
1238
|
-
footer?: React.ReactNode;
|
|
1239
|
-
/** MUI Dialog maxWidth. Default: "sm" */
|
|
1240
|
-
maxWidth?: "xs" | "sm" | "md" | "lg" | "xl" | false;
|
|
1241
|
-
/** Whether dialog takes full width of maxWidth. Default: true */
|
|
1242
|
-
fullWidth?: boolean;
|
|
1243
|
-
/** Enable watermark overlay on content area */
|
|
1244
|
-
isWatermark?: boolean;
|
|
1245
|
-
/** Watermark text (e.g. "12345678 / Brispot Web") */
|
|
1246
|
-
watermarkText?: string;
|
|
1247
|
-
/** MUI sx overrides for Dialog */
|
|
1248
|
-
sx?: SxProps;
|
|
1249
|
-
[key: string]: any;
|
|
1250
|
-
}
|
|
1251
|
-
|
|
1252
|
-
declare function BaseModalPopup(props: BaseModalPopupProps): React.ReactElement;
|
|
1253
|
-
|
|
1254
|
-
interface BaseModalStepperStep {
|
|
1255
|
-
label?: string;
|
|
1256
|
-
description?: string;
|
|
1257
|
-
responseCode?: string;
|
|
1258
|
-
responseDesc?: string;
|
|
1259
|
-
responseTime?: number;
|
|
1260
|
-
}
|
|
1261
|
-
|
|
1262
|
-
interface BaseModalStepperProps {
|
|
1263
|
-
open: boolean;
|
|
1264
|
-
|
|
1265
|
-
onClose: (event?: any, reason?: any) => void;
|
|
1266
|
-
|
|
1267
|
-
title?: string;
|
|
1268
|
-
|
|
1269
|
-
stepper?: BaseModalStepperStep[];
|
|
1270
|
-
|
|
1271
|
-
navState?: string | number | null;
|
|
1272
|
-
|
|
1273
|
-
lengthUpload?: number;
|
|
1274
|
-
|
|
1275
|
-
id_pengajuan?: number | null;
|
|
1276
|
-
|
|
1277
|
-
showFooter?: boolean;
|
|
1278
|
-
|
|
1279
|
-
children?: React.ReactNode;
|
|
1280
|
-
|
|
1281
|
-
modalWidth?: string;
|
|
1282
|
-
|
|
1283
|
-
[key: string]: any;
|
|
1284
|
-
}
|
|
1285
|
-
|
|
1286
|
-
declare function BaseModalStepper(
|
|
1287
|
-
props: BaseModalStepperProps,
|
|
1288
|
-
): React.ReactElement | null;
|
|
1289
|
-
|
|
1290
|
-
interface BaseModalOTPProps {
|
|
1291
|
-
isOpen?: boolean;
|
|
1292
|
-
|
|
1293
|
-
phone?: string;
|
|
1294
|
-
|
|
1295
|
-
setIsOpen?: (open: boolean) => void;
|
|
1296
|
-
|
|
1297
|
-
otpLength?: number;
|
|
1298
|
-
|
|
1299
|
-
onValidateOtp?: (otp: string) => void;
|
|
1300
|
-
|
|
1301
|
-
onRequestOtp?: () => void;
|
|
1302
|
-
|
|
1303
|
-
[key: string]: any;
|
|
1304
|
-
}
|
|
1305
|
-
|
|
1306
|
-
declare function BaseModalOTP(
|
|
1307
|
-
props: BaseModalOTPProps,
|
|
1308
|
-
): React.ReactElement | null;
|
|
1309
|
-
|
|
1310
|
-
export { type BaseDatePickerProps as $, RadiusToken as A, BaseAlert as B, CONTENT_SPACING_TOKENS as C, DerivedColor as D, ShadowToken as E, Spacing as F, SpacingToken as G, type BaseAlertProps as H, type BaseButtonProps as I, type BaseCardProps as J, type BaseCheckboxOption as K, type BaseCheckboxProps as L, type BaseDatatableAlign as M, type BaseDatatableColumn as N, type BaseDatatableFeatures as O, PrimitiveColor as P, type BaseDatatableHeaderCell as Q, Radius as R, Shadow as S, TextFieldUpload as T, type BaseDatatableLayout as U, VariantStyles as V, type BaseDatatablePagination as W, type BaseDatatableProps as X, type BaseDatatableSelection as Y, type BaseDatatableSortPayload as Z, type BaseDatatableSortState as _, BaseButton as a, type BaseDropdownProps as a0, type BaseDropzoneProps as a1, type BaseModalAlertDialogProps as a2, type BaseModalAlertShowOptions as a3, type BaseModalLoadingDialogProps as a4, type BaseModalOTPProps as a5, type BaseModalPopupProps as a6, type BaseModalProps as a7, type BaseModalStepperProps as a8, type BaseModalStepperStep as a9, type BaseRadioButtonProps as aa, type BaseSkeletonProps as ab, type BaseSnackbarPosition as ac, type BaseSnackbarProps as ad, type BaseStepperDashboardStep as ae, type BaseStepperProps as af, type BaseStepperSimpleStep as ag, type BaseSwitchProps as ah, type BaseTextAreaProps as ai, type BaseTextFieldProps as aj, type ContentSpacingProps as ak, type DerivedColorType as al, type PrimitiveColorType as am, type RadiusLevel as an, type RadiusMap as ao, type RadiusTokenProps as ap, type ShadowElevation as aq, type ShadowLevel as ar, type ShadowMap as as, type ShadowTokenProps as at, type SpacingProps as au, type TextFieldUploadProps as av, type TypographyColor as aw, type TypographyProps as ax, type TypographyVariant as ay, BaseCard as b, BaseCheckbox as c, BaseDatatable as d, BaseDatePicker as e, BaseDropdown as f, BaseDropzone as g, BaseModal as h, BaseModalAlert as i, BaseModalAlertDialog as j, BaseModalAlertProvider as k, BaseModalLoading as l, BaseModalLoadingDialog as m, BaseModalLoadingProvider as n, BaseModalOTP as o, BaseModalPopup as p, BaseModalStepper as q, BaseRadioButton as r, BaseSkeleton as s, BaseSnackbar as t, BaseStepper as u, BaseSwitch as v, BaseTextArea as w, BaseTextField as x, BaseTypography as y, ContentSpacing as z };
|