@idds/react 1.1.86
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/README.md +429 -0
- package/dist/index.cjs.js +20 -0
- package/dist/index.css +1 -0
- package/dist/index.es.js +9682 -0
- package/dist/index.umd.js +20 -0
- package/dist/types/App.d.ts +3 -0
- package/dist/types/App.d.ts.map +1 -0
- package/dist/types/components/Accordion.d.ts +48 -0
- package/dist/types/components/Accordion.d.ts.map +1 -0
- package/dist/types/components/AccordionCard.d.ts +22 -0
- package/dist/types/components/AccordionCard.d.ts.map +1 -0
- package/dist/types/components/AccordionGroup.d.ts +45 -0
- package/dist/types/components/AccordionGroup.d.ts.map +1 -0
- package/dist/types/components/ActionDropdown.d.ts +21 -0
- package/dist/types/components/ActionDropdown.d.ts.map +1 -0
- package/dist/types/components/Alert.d.ts +55 -0
- package/dist/types/components/Alert.d.ts.map +1 -0
- package/dist/types/components/Avatar.d.ts +33 -0
- package/dist/types/components/Avatar.d.ts.map +1 -0
- package/dist/types/components/Badge.d.ts +61 -0
- package/dist/types/components/Badge.d.ts.map +1 -0
- package/dist/types/components/BottomSheet.d.ts +9 -0
- package/dist/types/components/BottomSheet.d.ts.map +1 -0
- package/dist/types/components/Breadcrumb.d.ts +25 -0
- package/dist/types/components/Breadcrumb.d.ts.map +1 -0
- package/dist/types/components/Button.d.ts +68 -0
- package/dist/types/components/Button.d.ts.map +1 -0
- package/dist/types/components/ButtonGroup.d.ts +27 -0
- package/dist/types/components/ButtonGroup.d.ts.map +1 -0
- package/dist/types/components/Card.d.ts +94 -0
- package/dist/types/components/Card.d.ts.map +1 -0
- package/dist/types/components/Checkbox.d.ts +33 -0
- package/dist/types/components/Checkbox.d.ts.map +1 -0
- package/dist/types/components/Chip.d.ts +36 -0
- package/dist/types/components/Chip.d.ts.map +1 -0
- package/dist/types/components/Collapse.d.ts +16 -0
- package/dist/types/components/Collapse.d.ts.map +1 -0
- package/dist/types/components/DatePicker.d.ts +39 -0
- package/dist/types/components/DatePicker.d.ts.map +1 -0
- package/dist/types/components/Divider.d.ts +42 -0
- package/dist/types/components/Divider.d.ts.map +1 -0
- package/dist/types/components/Drawer.d.ts +35 -0
- package/dist/types/components/Drawer.d.ts.map +1 -0
- package/dist/types/components/Dropdown.d.ts +24 -0
- package/dist/types/components/Dropdown.d.ts.map +1 -0
- package/dist/types/components/FieldInputTable.d.ts +33 -0
- package/dist/types/components/FieldInputTable.d.ts.map +1 -0
- package/dist/types/components/FileUpload.d.ts +86 -0
- package/dist/types/components/FileUpload.d.ts.map +1 -0
- package/dist/types/components/InputSearch.d.ts +14 -0
- package/dist/types/components/InputSearch.d.ts.map +1 -0
- package/dist/types/components/LinearProgressIndicator.d.ts +16 -0
- package/dist/types/components/LinearProgressIndicator.d.ts.map +1 -0
- package/dist/types/components/List/List.d.ts +17 -0
- package/dist/types/components/List/List.d.ts.map +1 -0
- package/dist/types/components/List/ListItem.d.ts +19 -0
- package/dist/types/components/List/ListItem.d.ts.map +1 -0
- package/dist/types/components/List/ListItemAvatar.d.ts +15 -0
- package/dist/types/components/List/ListItemAvatar.d.ts.map +1 -0
- package/dist/types/components/List/ListItemButton.d.ts +12 -0
- package/dist/types/components/List/ListItemButton.d.ts.map +1 -0
- package/dist/types/components/List/ListItemIcon.d.ts +12 -0
- package/dist/types/components/List/ListItemIcon.d.ts.map +1 -0
- package/dist/types/components/List/ListItemText.d.ts +14 -0
- package/dist/types/components/List/ListItemText.d.ts.map +1 -0
- package/dist/types/components/List/ListSubheader.d.ts +16 -0
- package/dist/types/components/List/ListSubheader.d.ts.map +1 -0
- package/dist/types/components/Modal.d.ts +13 -0
- package/dist/types/components/Modal.d.ts.map +1 -0
- package/dist/types/components/MonthPicker.d.ts +39 -0
- package/dist/types/components/MonthPicker.d.ts.map +1 -0
- package/dist/types/components/MultipleChoiceGrid.d.ts +32 -0
- package/dist/types/components/MultipleChoiceGrid.d.ts.map +1 -0
- package/dist/types/components/Pagination.d.ts +58 -0
- package/dist/types/components/Pagination.d.ts.map +1 -0
- package/dist/types/components/PasswordInput.d.ts +75 -0
- package/dist/types/components/PasswordInput.d.ts.map +1 -0
- package/dist/types/components/PhoneInput.d.ts +19 -0
- package/dist/types/components/PhoneInput.d.ts.map +1 -0
- package/dist/types/components/ProgressBar.d.ts +32 -0
- package/dist/types/components/ProgressBar.d.ts.map +1 -0
- package/dist/types/components/RadioInput.d.ts +27 -0
- package/dist/types/components/RadioInput.d.ts.map +1 -0
- package/dist/types/components/SelectDropdown.d.ts +81 -0
- package/dist/types/components/SelectDropdown.d.ts.map +1 -0
- package/dist/types/components/Skeleton.d.ts +20 -0
- package/dist/types/components/Skeleton.d.ts.map +1 -0
- package/dist/types/components/Spinner.d.ts +22 -0
- package/dist/types/components/Spinner.d.ts.map +1 -0
- package/dist/types/components/Stepper.d.ts +25 -0
- package/dist/types/components/Stepper.d.ts.map +1 -0
- package/dist/types/components/TabHorizontal.d.ts +34 -0
- package/dist/types/components/TabHorizontal.d.ts.map +1 -0
- package/dist/types/components/TabVertical.d.ts +34 -0
- package/dist/types/components/TabVertical.d.ts.map +1 -0
- package/dist/types/components/Table.d.ts +69 -0
- package/dist/types/components/Table.d.ts.map +1 -0
- package/dist/types/components/TableProgressBar.d.ts +20 -0
- package/dist/types/components/TableProgressBar.d.ts.map +1 -0
- package/dist/types/components/TextArea.d.ts +57 -0
- package/dist/types/components/TextArea.d.ts.map +1 -0
- package/dist/types/components/TextField.d.ts +61 -0
- package/dist/types/components/TextField.d.ts.map +1 -0
- package/dist/types/components/ThemeToggle.d.ts +7 -0
- package/dist/types/components/ThemeToggle.d.ts.map +1 -0
- package/dist/types/components/TimePicker.d.ts +56 -0
- package/dist/types/components/TimePicker.d.ts.map +1 -0
- package/dist/types/components/Toast.d.ts +15 -0
- package/dist/types/components/Toast.d.ts.map +1 -0
- package/dist/types/components/Toggle.d.ts +26 -0
- package/dist/types/components/Toggle.d.ts.map +1 -0
- package/dist/types/components/Tooltip.d.ts +85 -0
- package/dist/types/components/Tooltip.d.ts.map +1 -0
- package/dist/types/components/YearPicker.d.ts +43 -0
- package/dist/types/components/YearPicker.d.ts.map +1 -0
- package/dist/types/index.d.ts +70 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/main.d.ts +1 -0
- package/dist/types/main.d.ts.map +1 -0
- package/dist/types/themes/index.d.ts +41 -0
- package/dist/types/themes/index.d.ts.map +1 -0
- package/dist/types/utils/ConfirmationProvider.d.ts +16 -0
- package/dist/types/utils/ConfirmationProvider.d.ts.map +1 -0
- package/dist/types/utils/ToastProvider.d.ts +12 -0
- package/dist/types/utils/ToastProvider.d.ts.map +1 -0
- package/dist/types/utils/fileValidation.d.ts +57 -0
- package/dist/types/utils/fileValidation.d.ts.map +1 -0
- package/dist/types/utils/form.d.ts +21 -0
- package/dist/types/utils/form.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +11 -0
- package/dist/types/utils/index.d.ts.map +1 -0
- package/dist/types/utils/security.d.ts +61 -0
- package/dist/types/utils/security.d.ts.map +1 -0
- package/package.json +55 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type TimeFormat = 'HH:mm:ss' | 'HH:mm' | 'h:mm:ss a' | 'h:mm a' | string;
|
|
3
|
+
export type TimePickerSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export interface TimePickerProps {
|
|
5
|
+
/** Set default time */
|
|
6
|
+
defaultValue?: string;
|
|
7
|
+
/** Determine whether the TimePicker is disabled */
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
/** To set the time format */
|
|
10
|
+
format?: TimeFormat;
|
|
11
|
+
/** Hour step interval */
|
|
12
|
+
hourStep?: number;
|
|
13
|
+
/** Minute step interval */
|
|
14
|
+
minuteStep?: number;
|
|
15
|
+
/** Second step interval */
|
|
16
|
+
secondStep?: number;
|
|
17
|
+
/** Placeholder text */
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
/** Size variant */
|
|
20
|
+
size?: TimePickerSize;
|
|
21
|
+
/** Status variant */
|
|
22
|
+
status?: 'neutral' | 'error' | 'warning' | 'success';
|
|
23
|
+
/** Current value */
|
|
24
|
+
value?: string;
|
|
25
|
+
/** Callback when time changes */
|
|
26
|
+
onChange?: (time: string) => void;
|
|
27
|
+
/** Callback when picker open/close */
|
|
28
|
+
onOpenChange?: (open: boolean) => void;
|
|
29
|
+
/** Custom className */
|
|
30
|
+
className?: string;
|
|
31
|
+
/** Whether to use 12-hour format */
|
|
32
|
+
use12Hours?: boolean;
|
|
33
|
+
/** Show seconds column */
|
|
34
|
+
showSecond?: boolean;
|
|
35
|
+
/** Allow clear */
|
|
36
|
+
allowClear?: boolean;
|
|
37
|
+
/** Prefix icon */
|
|
38
|
+
prefixIcon?: React.ReactNode;
|
|
39
|
+
/** Suffix icon */
|
|
40
|
+
suffixIcon?: React.ReactNode;
|
|
41
|
+
/** Disable times before current time */
|
|
42
|
+
disabledBackTime?: boolean;
|
|
43
|
+
/** Disable times before this specific time (format: same as format prop) */
|
|
44
|
+
disabledTimeBefore?: string;
|
|
45
|
+
/** Disable times after this specific time (format: same as format prop) */
|
|
46
|
+
disabledTimeAfter?: string;
|
|
47
|
+
/** Show "Now" button to set current time */
|
|
48
|
+
showNowButton?: boolean;
|
|
49
|
+
}
|
|
50
|
+
export interface TimePickerRef {
|
|
51
|
+
focus: () => void;
|
|
52
|
+
blur: () => void;
|
|
53
|
+
}
|
|
54
|
+
declare const TimePicker: React.ForwardRefExoticComponent<TimePickerProps & React.RefAttributes<TimePickerRef>>;
|
|
55
|
+
export default TimePicker;
|
|
56
|
+
//# sourceMappingURL=TimePicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TimePicker.d.ts","sourceRoot":"","sources":["../../../src/components/TimePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AAGf,OAAO,yCAAyC,CAAC;AAEjD,MAAM,MAAM,UAAU,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C,EAAE,OAAO,CAAC;IAC3B,4EAA4E;IAC5E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,2EAA2E;IAC3E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,4CAA4C;IAC5C,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB;AAED,QAAA,MAAM,UAAU,uFAmmBf,CAAC;AAIF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface ToastProps {
|
|
3
|
+
show: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
title: ReactNode;
|
|
6
|
+
description?: ReactNode;
|
|
7
|
+
actionNode?: ReactNode;
|
|
8
|
+
variant?: 'neutral' | 'positive' | 'warning' | 'info' | 'negative';
|
|
9
|
+
style?: 'outline' | 'solid';
|
|
10
|
+
duration?: number;
|
|
11
|
+
position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'top-middle' | 'bottom-middle' | 'left-middle' | 'right-middle';
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export default function Toast({ show, onClose, title, description, actionNode, variant, style, duration, position, className, }: ToastProps): import('react').ReactPortal | null;
|
|
15
|
+
//# sourceMappingURL=Toast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../src/components/Toast.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAA+B,MAAM,OAAO,CAAC;AAW/D,OAAO,mCAAmC,CAAC;AAE3C,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,MAAM,GAAG,UAAU,CAAC;IACnE,KAAK,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EACL,UAAU,GACV,WAAW,GACX,aAAa,GACb,cAAc,GACd,YAAY,GACZ,eAAe,GACf,aAAa,GACb,cAAc,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA+CD,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAC5B,IAAI,EACJ,OAAO,EACP,KAAK,EACL,WAAgB,EAChB,UAAU,EACV,OAAgB,EAChB,KAAiB,EACjB,QAAe,EACf,QAAsB,EACtB,SAAc,GACf,EAAE,UAAU,sCAgFZ"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface ToggleProps {
|
|
2
|
+
/** Whether the toggle is checked/on */
|
|
3
|
+
checked?: boolean;
|
|
4
|
+
/** Default checked state (for uncontrolled mode) */
|
|
5
|
+
defaultChecked?: boolean;
|
|
6
|
+
/** Whether the toggle is disabled */
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
/** Size variant of the toggle */
|
|
9
|
+
size?: 'sm' | 'md' | 'lg';
|
|
10
|
+
/** Callback fired when the toggle state changes */
|
|
11
|
+
onChange?: (checked: boolean) => void;
|
|
12
|
+
/** Additional CSS class name */
|
|
13
|
+
className?: string;
|
|
14
|
+
/** ARIA label for accessibility */
|
|
15
|
+
'aria-label'?: string;
|
|
16
|
+
/** ARIA describedby for accessibility */
|
|
17
|
+
'aria-describedby'?: string;
|
|
18
|
+
/** HTML id attribute */
|
|
19
|
+
id?: string;
|
|
20
|
+
/** HTML name attribute for form submission */
|
|
21
|
+
name?: string;
|
|
22
|
+
/** HTML value attribute for form submission */
|
|
23
|
+
value?: string;
|
|
24
|
+
}
|
|
25
|
+
export default function Toggle({ checked: controlledChecked, defaultChecked, disabled, size, onChange, className, 'aria-label': ariaLabel, 'aria-describedby': ariaDescribedBy, id, name, value, }: ToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
//# sourceMappingURL=Toggle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toggle.d.ts","sourceRoot":"","sources":["../../../src/components/Toggle.tsx"],"names":[],"mappings":"AAEA,OAAO,oCAAoC,CAAC;AAE5C,MAAM,WAAW,WAAW;IAC1B,uCAAuC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oDAAoD;IACpD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iCAAiC;IACjC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,mDAAmD;IACnD,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yCAAyC;IACzC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,wBAAwB;IACxB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,8CAA8C;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAC7B,OAAO,EAAE,iBAAiB,EAC1B,cAAsB,EACtB,QAAgB,EAChB,IAAW,EACX,QAAQ,EACR,SAAc,EACd,YAAY,EAAE,SAAS,EACvB,kBAAkB,EAAE,eAAe,EACnC,EAAE,EACF,IAAI,EACJ,KAAK,GACN,EAAE,WAAW,2CAkJb"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Tooltip component — menampilkan popup dengan konten yang bisa kompleks
|
|
4
|
+
* ketika user hover atau fokus pada elemen trigger.
|
|
5
|
+
*
|
|
6
|
+
* @param {string | ReactNode} title - Judul tooltip (untuk basic/light/dark/media).
|
|
7
|
+
* @param {string | ReactNode} description - Deskripsi tooltip (untuk light/dark/media).
|
|
8
|
+
* @param {string | ReactNode} image - Image/thumbnail untuk media variant.
|
|
9
|
+
* @param {object} pagination - Pagination dots { current: number, total: number }.
|
|
10
|
+
* @param {ReactNode[]} actions - Action buttons (array of ReactNode).
|
|
11
|
+
* @param {ReactNode} children - Elemen trigger atau custom content (untuk variant custom).
|
|
12
|
+
* @param {TooltipVariant} variant - Variant tooltip: basic, light, dark, media, custom.
|
|
13
|
+
* @param {TooltipPlacement} placement - Posisi tooltip (12 pilihan).
|
|
14
|
+
* @param {boolean} showArrow - Apakah menampilkan arrow.
|
|
15
|
+
* @param {string} className - ClassName tambahan.
|
|
16
|
+
* @param {number} enterDelay - Delay sebelum show (ms).
|
|
17
|
+
* @param {number} leaveDelay - Delay sebelum hide (ms).
|
|
18
|
+
* @param {function} onClose - Callback ketika close button diklik (untuk light/dark/media).
|
|
19
|
+
*/
|
|
20
|
+
export type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
|
|
21
|
+
export type TooltipVariant = 'basic' | 'light' | 'dark' | 'media' | 'custom';
|
|
22
|
+
export interface TooltipPagination {
|
|
23
|
+
current: number;
|
|
24
|
+
total: number;
|
|
25
|
+
}
|
|
26
|
+
export interface TooltipProps {
|
|
27
|
+
/**
|
|
28
|
+
* Judul tooltip (untuk basic/light/dark/media variant).
|
|
29
|
+
*/
|
|
30
|
+
title?: string | ReactNode;
|
|
31
|
+
/**
|
|
32
|
+
* Deskripsi tooltip (untuk light/dark/media variant).
|
|
33
|
+
*/
|
|
34
|
+
description?: string | ReactNode;
|
|
35
|
+
/**
|
|
36
|
+
* Image/thumbnail untuk media variant.
|
|
37
|
+
*/
|
|
38
|
+
image?: string | ReactNode;
|
|
39
|
+
/**
|
|
40
|
+
* Pagination dots { current: number, total: number }.
|
|
41
|
+
*/
|
|
42
|
+
pagination?: TooltipPagination;
|
|
43
|
+
/**
|
|
44
|
+
* Action buttons (array of ReactNode, biasanya Button components).
|
|
45
|
+
*/
|
|
46
|
+
actions?: ReactNode[];
|
|
47
|
+
/**
|
|
48
|
+
* Elemen trigger.
|
|
49
|
+
*/
|
|
50
|
+
children: ReactNode;
|
|
51
|
+
/**
|
|
52
|
+
* Custom content untuk variant custom (ReactNode).
|
|
53
|
+
*/
|
|
54
|
+
customContent?: ReactNode;
|
|
55
|
+
/**
|
|
56
|
+
* Variant tooltip: basic, light, dark, media, custom.
|
|
57
|
+
*/
|
|
58
|
+
variant?: TooltipVariant;
|
|
59
|
+
/**
|
|
60
|
+
* Posisi tooltip relatif terhadap trigger element.
|
|
61
|
+
*/
|
|
62
|
+
placement?: TooltipPlacement;
|
|
63
|
+
/**
|
|
64
|
+
* Apakah menampilkan arrow.
|
|
65
|
+
*/
|
|
66
|
+
showArrow?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* ClassName tambahan.
|
|
69
|
+
*/
|
|
70
|
+
className?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Delay sebelum show (ms).
|
|
73
|
+
*/
|
|
74
|
+
enterDelay?: number;
|
|
75
|
+
/**
|
|
76
|
+
* Delay sebelum hide (ms).
|
|
77
|
+
*/
|
|
78
|
+
leaveDelay?: number;
|
|
79
|
+
/**
|
|
80
|
+
* Callback ketika close button diklik (untuk light/dark/media variant).
|
|
81
|
+
*/
|
|
82
|
+
onClose?: () => void;
|
|
83
|
+
}
|
|
84
|
+
export default function Tooltip({ title, description, image, pagination, actions, children, customContent, variant, placement, showArrow, className, enterDelay, leaveDelay, onClose, }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
85
|
+
//# sourceMappingURL=Tooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAA+B,MAAM,OAAO,CAAC;AAG/D,OAAO,qCAAqC,CAAC;AAE7C;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,MAAM,gBAAgB,GACxB,KAAK,GACL,QAAQ,GACR,MAAM,GACN,OAAO,GACP,WAAW,GACX,SAAS,GACT,cAAc,GACd,YAAY,GACZ,YAAY,GACZ,UAAU,GACV,aAAa,GACb,WAAW,CAAC;AAEhB,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE7E,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE3B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE3B;;OAEG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAE/B;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC;IAEtB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAE1B;;OAEG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;IAEzB;;OAEG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAE7B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAC9B,KAAK,EACL,WAAW,EACX,KAAK,EACL,UAAU,EACV,OAAO,EACP,QAAQ,EACR,aAAa,EACb,OAAiB,EACjB,SAAoB,EACpB,SAAgB,EAChB,SAAc,EACd,UAAc,EACd,UAAc,EACd,OAAO,GACR,EAAE,YAAY,2CAqMd"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export type YearPickerSize = 'sm' | 'md';
|
|
2
|
+
export interface YearPickerProps {
|
|
3
|
+
/** Current selected year */
|
|
4
|
+
value?: string | number;
|
|
5
|
+
/** Default year */
|
|
6
|
+
defaultValue?: string | number;
|
|
7
|
+
/** Callback when year changes */
|
|
8
|
+
onChange?: (year: string | number) => void;
|
|
9
|
+
/** Minimum year */
|
|
10
|
+
minYear?: number;
|
|
11
|
+
/** Maximum year */
|
|
12
|
+
maxYear?: number;
|
|
13
|
+
/** Number of years per decade block */
|
|
14
|
+
decadeSize?: number;
|
|
15
|
+
/** Custom class name */
|
|
16
|
+
className?: string;
|
|
17
|
+
/** Whether the picker is disabled */
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/** Whether the picker is readonly */
|
|
20
|
+
readonly?: boolean;
|
|
21
|
+
/** Whether to show the picker */
|
|
22
|
+
open?: boolean;
|
|
23
|
+
/** Callback when picker opens/closes */
|
|
24
|
+
onOpenChange?: (open: boolean) => void;
|
|
25
|
+
/** Disable years before current year */
|
|
26
|
+
disabledBackYear?: boolean;
|
|
27
|
+
/** Disable years after current year */
|
|
28
|
+
disabledFutureYear?: boolean;
|
|
29
|
+
/** Disable years before this specific year */
|
|
30
|
+
disabledYearBefore?: string | number;
|
|
31
|
+
/** Disable years after this specific year */
|
|
32
|
+
disabledYearAfter?: string | number;
|
|
33
|
+
/** Whether to show the calendar icon on the left */
|
|
34
|
+
showIcon?: boolean;
|
|
35
|
+
/** Whether to show the clear button */
|
|
36
|
+
showClearButton?: boolean;
|
|
37
|
+
/** Callback when clear button is clicked */
|
|
38
|
+
onClear?: () => void;
|
|
39
|
+
/** Size variant */
|
|
40
|
+
size?: YearPickerSize;
|
|
41
|
+
}
|
|
42
|
+
export default function YearPicker({ value, defaultValue, onChange, minYear, maxYear, decadeSize, className, disabled, readonly, open, onOpenChange, disabledBackYear, disabledFutureYear, disabledYearBefore, disabledYearAfter, showIcon, showClearButton, onClear, size, }: YearPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
//# sourceMappingURL=YearPicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"YearPicker.d.ts","sourceRoot":"","sources":["../../../src/components/YearPicker.tsx"],"names":[],"mappings":"AAQA,OAAO,yCAAyC,CAAC;AAEjD,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,IAAI,CAAC;AAEzC,MAAM,WAAW,eAAe;IAC9B,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,mBAAmB;IACnB,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,iCAAiC;IACjC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;IAC3C,mBAAmB;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mBAAmB;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uCAAuC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iCAAiC;IACjC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,wCAAwC;IACxC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,wCAAwC;IACxC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,uCAAuC;IACvC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,8CAA8C;IAC9C,kBAAkB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrC,6CAA6C;IAC7C,iBAAiB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACpC,oDAAoD;IACpD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uCAAuC;IACvC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,mBAAmB;IACnB,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,OAAc,EACd,OAAc,EACd,UAAe,EACf,SAAc,EACd,QAAgB,EAChB,QAAgB,EAChB,IAAY,EACZ,YAAY,EACZ,gBAAwB,EACxB,kBAA0B,EAC1B,kBAAkB,EAClB,iBAAiB,EACjB,QAAgB,EAChB,eAAuB,EACvB,OAAO,EACP,IAAW,GACZ,EAAE,eAAe,2CA+ajB"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export { default as inaColorTokens } from '../../styles/src/tailwind/ts/idds';
|
|
2
|
+
export { default as iddsColorToken } from '../../styles/src/tailwind/ts/idds';
|
|
3
|
+
export { default as inagovTokens } from '../../styles/src/tailwind/ts/inagov';
|
|
4
|
+
export { default as inakuTokens } from '../../styles/src/tailwind/ts/inaku';
|
|
5
|
+
export { default as inapasTokens } from '../../styles/src/tailwind/ts/inapas';
|
|
6
|
+
export { default as bgnTokens } from '../../styles/src/tailwind/ts/bgn';
|
|
7
|
+
export { default as bknTokens } from '../../styles/src/tailwind/ts/bkn';
|
|
8
|
+
export { default as lanTokens } from '../../styles/src/tailwind/ts/lan';
|
|
9
|
+
export { default as panrbTokens } from '../../styles/src/tailwind/ts/panrb';
|
|
10
|
+
export { default as List, type ListProps } from './components/List/List';
|
|
11
|
+
export { default as ListItem, type ListItemAlignItems, type ListItemProps, } from './components/List/ListItem';
|
|
12
|
+
export { default as ListItemAvatar, type ListItemAvatarAlign, type ListItemAvatarProps, } from './components/List/ListItemAvatar';
|
|
13
|
+
export { default as ListItemButton, type ListItemButtonProps, } from './components/List/ListItemButton';
|
|
14
|
+
export { default as ListItemIcon, type ListItemIconProps, } from './components/List/ListItemIcon';
|
|
15
|
+
export { default as ListItemText, type ListItemTextProps, } from './components/List/ListItemText';
|
|
16
|
+
export { default as ListSubheader, type ListSubheaderProps, } from './components/List/ListSubheader';
|
|
17
|
+
export { default as Accordion, type AccordionProps, } from './components/Accordion';
|
|
18
|
+
export { default as AccordionCard, type AccordionCardProps, } from './components/AccordionCard';
|
|
19
|
+
export { default as AccordionGroup, useAccordionGroup, type AccordionGroupProps, } from './components/AccordionGroup';
|
|
20
|
+
export { default as ActionDropdown, type ActionDropdownProps, } from './components/ActionDropdown';
|
|
21
|
+
export { default as Alert, type AlertProps } from './components/Alert';
|
|
22
|
+
export { default as Avatar, type AvatarProps, type AvatarSize, } from './components/Avatar';
|
|
23
|
+
export { default as Badge, type BadgeProps } from './components/Badge';
|
|
24
|
+
export { default as BottomSheet, type BottomSheetProps, } from './components/BottomSheet';
|
|
25
|
+
export { default as Card, type CardProps, type CardVariant, } from './components/Card';
|
|
26
|
+
export { default as Breadcrumb, type BreadcrumbProps, type BreadcrumbItem, } from './components/Breadcrumb';
|
|
27
|
+
export { default as Stepper, type StepperProps, type StepperItem, } from './components/Stepper';
|
|
28
|
+
export { default as Button, type ButtonProps } from './components/Button';
|
|
29
|
+
export { default as ButtonGroup, type ButtonGroupProps, type ButtonGroupOption, } from './components/ButtonGroup';
|
|
30
|
+
export { default as Checkbox, type CheckboxProps } from './components/Checkbox';
|
|
31
|
+
export { default as Chip, type ChipOption, type ChipProps, } from './components/Chip';
|
|
32
|
+
export { default as Collapse, type CollapseProps } from './components/Collapse';
|
|
33
|
+
export { default as Divider, type DividerOrientation, type DividerProps, type DividerVariant, } from './components/Divider';
|
|
34
|
+
export { default as Dropdown, type DropdownProps } from './components/Dropdown';
|
|
35
|
+
export { default as FileUpload, type FileUploadProps, type FileUploadStatus, type UploadedFile, } from './components/FileUpload';
|
|
36
|
+
export { default as FieldInputTable, type FieldInputTableProps, } from './components/FieldInputTable';
|
|
37
|
+
export { default as InputSearch, type InputSearchProps, } from './components/InputSearch';
|
|
38
|
+
export { default as Modal, type ModalProps } from './components/Modal';
|
|
39
|
+
export { default as Pagination, type PaginationProps, } from './components/Pagination';
|
|
40
|
+
export { default as ProgressBar, type ProgressBarProps, } from './components/ProgressBar';
|
|
41
|
+
export { default as LinearProgressIndicator, type LinearProgressIndicatorProps, } from './components/LinearProgressIndicator';
|
|
42
|
+
export { default as TableProgressBar, type TableProgressBarProps, } from './components/TableProgressBar';
|
|
43
|
+
export { default as PasswordInput, type PasswordInputProps, type PasswordInputStatus, } from './components/PasswordInput';
|
|
44
|
+
export { default as PhoneInput, type PhoneInputProps, } from './components/PhoneInput';
|
|
45
|
+
export { default as RadioInput, type RadioInputProps, type OptionItem, } from './components/RadioInput';
|
|
46
|
+
export { default as SelectDropdown, type SelectOption, type SelectDropdownProps, } from './components/SelectDropdown';
|
|
47
|
+
export { default as Drawer, type DrawerProps } from './components/Drawer';
|
|
48
|
+
export { default as Skeleton, type SkeletonProps } from './components/Skeleton';
|
|
49
|
+
export { default as Spinner, type SpinnerProps } from './components/Spinner';
|
|
50
|
+
export { default as Table, type Column, type EditableColumn, type EditorProps, type FetchParams, type FetchResult, type TableProps, } from './components/Table';
|
|
51
|
+
export { default as TextArea, type TextAreaProps, type TextAreaStatus, } from './components/TextArea';
|
|
52
|
+
export { default as TextField, type TextFieldProps, type TextFieldStatus, } from './components/TextField';
|
|
53
|
+
export { default as TimePicker, type TimePickerProps, type TimePickerRef, type TimeFormat, } from './components/TimePicker';
|
|
54
|
+
export { default as Toast, type ToastProps } from './components/Toast';
|
|
55
|
+
export { default as Tooltip, type TooltipPlacement, type TooltipProps, type TooltipVariant, type TooltipPagination, } from './components/Tooltip';
|
|
56
|
+
export { default as ThemeToggle, type ThemeToggleProps, } from './components/ThemeToggle';
|
|
57
|
+
export { ConfirmationProvider, useConfirmation, ConfirmationContext, type ConfirmationContextValue, type ConfirmOptions, } from './utils/ConfirmationProvider';
|
|
58
|
+
export { ToastProvider, useToast, ToastContext, type ToastContextValue, type ToastOptions, } from './utils/ToastProvider';
|
|
59
|
+
export { FormField, type FormFieldProps, FormProvider, type SubmitHandler, useForm, } from './utils/form';
|
|
60
|
+
export { formattingThousand, getCookie, getCurrentLocation, onlyAlphanumeric, onlyNumericValue, onlyDecimalNumber, } from './utils';
|
|
61
|
+
export { default as YearPicker, type YearPickerProps, } from './components/YearPicker';
|
|
62
|
+
export { default as MonthPicker, type MonthPickerProps, } from './components/MonthPicker';
|
|
63
|
+
export { default as DatePicker, type DatePickerProps, type DatePickerMode, } from './components/DatePicker';
|
|
64
|
+
export { default as MultipleChoiceGrid, type MultipleChoiceGridProps, type GridColumn, type GridRow, type GridSelection, } from './components/MultipleChoiceGrid';
|
|
65
|
+
export { default as Toggle, type ToggleProps } from './components/Toggle';
|
|
66
|
+
export { default as TabHorizontal, type TabHorizontalProps, type TabHorizontalItem, } from './components/TabHorizontal';
|
|
67
|
+
export { default as TabVertical, type TabVerticalProps, type TabVerticalItem, } from './components/TabVertical';
|
|
68
|
+
export { sanitizeInput, validateInput, encodeHtmlEntities, decodeHtmlEntities, containsDangerousPatterns, DEFAULT_SECURITY_CONFIG, type SecurityConfig, } from './utils/security';
|
|
69
|
+
export { setBrandTheme, setCustomTheme, getCurrentTheme, getAvailableBrands, initializeTheme, resetTheme, isValidBrand, type BrandName, type CustomTheme, } from './themes';
|
|
70
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,aAAa,CAAC;AAGrB,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAExE,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EACL,OAAO,IAAI,QAAQ,EACnB,KAAK,kBAAkB,EACvB,KAAK,aAAa,GACnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,OAAO,IAAI,cAAc,EACzB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,OAAO,IAAI,cAAc,EACzB,KAAK,mBAAmB,GACzB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,OAAO,IAAI,YAAY,EACvB,KAAK,iBAAiB,GACvB,MAAM,gCAAgC,CAAC;AACxC,O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,OAAO,EACL,OAAO,IAAI,WAAW,EACtB,KAAK,gBAAgB,EACrB,KAAK,eAAe,GACrB,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,yBAAyB,EACzB,uBAAuB,EACvB,KAAK,cAAc,GACpB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,aAAa,EACb,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,UAAU,EACV,YAAY,EACZ,KAAK,SAAS,EACd,KAAK,WAAW,GACjB,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=main.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.tsx"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export type BrandName = 'inagov' | 'inaku' | 'bgn' | 'bkn' | 'lan' | 'pan-rb' | 'default';
|
|
2
|
+
export interface CustomTheme {
|
|
3
|
+
name: string;
|
|
4
|
+
colors: Record<string, string>;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Set brand theme by name
|
|
8
|
+
* @param brandName - Name of the brand theme
|
|
9
|
+
*/
|
|
10
|
+
export declare function setBrandTheme(brandName: BrandName): void;
|
|
11
|
+
/**
|
|
12
|
+
* Set custom theme
|
|
13
|
+
* @param customTheme - Custom theme object
|
|
14
|
+
*/
|
|
15
|
+
export declare function setCustomTheme(customTheme: CustomTheme): void;
|
|
16
|
+
/**
|
|
17
|
+
* Get current active theme
|
|
18
|
+
*/
|
|
19
|
+
export declare function getCurrentTheme(): {
|
|
20
|
+
name: string;
|
|
21
|
+
colors?: Record<string, string>;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Get available brand names
|
|
25
|
+
*/
|
|
26
|
+
export declare function getAvailableBrands(): BrandName[];
|
|
27
|
+
/**
|
|
28
|
+
* Initialize theme system
|
|
29
|
+
* @param brandName - Initial brand name (optional)
|
|
30
|
+
*/
|
|
31
|
+
export declare function initializeTheme(brandName?: BrandName): void;
|
|
32
|
+
/**
|
|
33
|
+
* Reset to default theme
|
|
34
|
+
*/
|
|
35
|
+
export declare function resetTheme(): void;
|
|
36
|
+
/**
|
|
37
|
+
* Validate if brand exists
|
|
38
|
+
* @param brandName - Brand name to validate
|
|
39
|
+
*/
|
|
40
|
+
export declare function isValidBrand(brandName: string): brandName is BrandName;
|
|
41
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/themes/index.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,SAAS,GACjB,QAAQ,GACR,OAAO,GACP,KAAK,GACL,KAAK,GACL,KAAK,GACL,QAAQ,GACR,SAAS,CAAC;AAEd,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC;AAiCD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,CAQxD;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAG7D;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAEA;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,SAAS,EAAE,CAEhD;AA8DD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,SAAS,CAAC,EAAE,SAAS,GAAG,IAAI,CAQ3D;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,IAAI,CAEjC;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,IAAI,SAAS,CAEtE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
export type ConfirmOptions = {
|
|
3
|
+
title?: string;
|
|
4
|
+
message: ReactNode;
|
|
5
|
+
confirmText?: string;
|
|
6
|
+
cancelText?: string;
|
|
7
|
+
};
|
|
8
|
+
export type ConfirmationContextValue = {
|
|
9
|
+
confirm: (opts: ConfirmOptions) => Promise<boolean>;
|
|
10
|
+
};
|
|
11
|
+
export declare const ConfirmationContext: React.Context<ConfirmationContextValue>;
|
|
12
|
+
export declare const useConfirmation: () => ConfirmationContextValue;
|
|
13
|
+
export declare const ConfirmationProvider: React.FC<{
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
}>;
|
|
16
|
+
//# sourceMappingURL=ConfirmationProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmationProvider.d.ts","sourceRoot":"","sources":["../../../src/utils/ConfirmationProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAuC,SAAS,EAAE,MAAM,OAAO,CAAC;AAI9E,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,SAAS,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,OAAO,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CACrD,CAAC;AAEF,eAAO,MAAM,mBAAmB,yCAE9B,CAAC;AAEH,eAAO,MAAM,eAAe,gCAAwC,CAAC;AAErE,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,CAqDlE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode, FC } from 'react';
|
|
2
|
+
import { ToastProps } from '../components/Toast';
|
|
3
|
+
export type ToastOptions = Omit<ToastProps, 'show' | 'onClose'>;
|
|
4
|
+
export interface ToastContextValue {
|
|
5
|
+
toast: (opts: ToastOptions) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const ToastContext: import('react').Context<ToastContextValue>;
|
|
8
|
+
export declare const useToast: () => ToastContextValue;
|
|
9
|
+
export declare const ToastProvider: FC<{
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}>;
|
|
12
|
+
//# sourceMappingURL=ToastProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToastProvider.d.ts","sourceRoot":"","sources":["../../../src/utils/ToastProvider.tsx"],"names":[],"mappings":"AACA,OAAO,EAAuC,SAAS,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3E,OAAc,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGxD,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;AAGhE,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;CACrC;AACD,eAAO,MAAM,YAAY,4CAIvB,CAAC;AAEH,eAAO,MAAM,QAAQ,yBAAiC,CAAC;AAOvD,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,CAmCrD,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File validation utilities for security
|
|
3
|
+
* Validates mimeType, file size, and file extensions
|
|
4
|
+
*/
|
|
5
|
+
export declare const ALLOWED_MIME_TYPES: Record<string, string[]>;
|
|
6
|
+
export declare const DANGEROUS_MIME_TYPES: string[];
|
|
7
|
+
export interface FileValidationResult {
|
|
8
|
+
isValid: boolean;
|
|
9
|
+
error?: string;
|
|
10
|
+
file: File;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Validate file MIME type against allowed types
|
|
14
|
+
*/
|
|
15
|
+
export declare function validateMimeType(file: File, allowedTypes?: string): {
|
|
16
|
+
isValid: boolean;
|
|
17
|
+
error?: string;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Validate file extension matches MIME type (additional security check)
|
|
21
|
+
*/
|
|
22
|
+
export declare function validateFileExtension(file: File): {
|
|
23
|
+
isValid: boolean;
|
|
24
|
+
error?: string;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Validate file size
|
|
28
|
+
*/
|
|
29
|
+
export declare function validateFileSize(file: File, maxSize: number): {
|
|
30
|
+
isValid: boolean;
|
|
31
|
+
error?: string;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Comprehensive file validation
|
|
35
|
+
*/
|
|
36
|
+
export declare function validateFile(file: File, options?: {
|
|
37
|
+
allowedTypes?: string;
|
|
38
|
+
maxSize?: number;
|
|
39
|
+
validateExtension?: boolean;
|
|
40
|
+
}): FileValidationResult;
|
|
41
|
+
/**
|
|
42
|
+
* Format file size to human readable format
|
|
43
|
+
*/
|
|
44
|
+
export declare function formatFileSize(bytes: number): string;
|
|
45
|
+
/**
|
|
46
|
+
* Validate file magic number (file signature) against expected MIME type
|
|
47
|
+
* This is a critical security check recommended by OWASP
|
|
48
|
+
*
|
|
49
|
+
* @param file - File object to validate
|
|
50
|
+
* @param expectedMimeType - Expected MIME type
|
|
51
|
+
* @returns Promise with validation result
|
|
52
|
+
*/
|
|
53
|
+
export declare function validateMagicNumber(file: File, expectedMimeType: string): Promise<{
|
|
54
|
+
isValid: boolean;
|
|
55
|
+
error?: string;
|
|
56
|
+
}>;
|
|
57
|
+
//# sourceMappingURL=fileValidation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version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,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAqD/C"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { FieldValues, UseFormProps, ControllerFieldState, ControllerRenderProps, SubmitHandler as RHFSubmitHandler } from 'react-hook-form';
|
|
3
|
+
/**
|
|
4
|
+
* Wrapper hook untuk buat form
|
|
5
|
+
*/
|
|
6
|
+
export declare function useForm<TFieldValues extends FieldValues = FieldValues>(options?: UseFormProps<TFieldValues>): import('react-hook-form').UseFormReturn<TFieldValues, any, TFieldValues>;
|
|
7
|
+
/**
|
|
8
|
+
* Kita expose FormProvider agar seluruh komponen bisa pakai useFormContext()
|
|
9
|
+
*/
|
|
10
|
+
export declare const FormProvider: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: import('react-hook-form').FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
11
|
+
export type SubmitHandler<TFieldValues> = RHFSubmitHandler<TFieldValues>;
|
|
12
|
+
/**
|
|
13
|
+
* Controller helper untuk TextField
|
|
14
|
+
*/
|
|
15
|
+
export type FormFieldProps<T> = {
|
|
16
|
+
name: keyof T;
|
|
17
|
+
rules?: Record<string, any>;
|
|
18
|
+
render: (field: ControllerRenderProps, fieldState: ControllerFieldState) => ReactElement;
|
|
19
|
+
};
|
|
20
|
+
export declare function FormField<T extends FieldValues>({ name, rules, render, }: FormFieldProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
//# sourceMappingURL=form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../src/utils/form.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAIL,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,aAAa,IAAI,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEzE;;GAEG;AACH,wBAAgB,OAAO,CAAC,YAAY,SAAS,WAAW,GAAG,WAAW,EACpE,OAAO,CAAC,EAAE,YAAY,CAAC,YAAY,CAAC,4EAGrC;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,4MAAkB,CAAC;AAE5C,MAAM,MAAM,aAAa,CAAC,YAAY,IAAI,gBAAgB,CAAC,YAAY,CAAC,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI;IAC9B,IAAI,EAAE,MAAM,CAAC,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,MAAM,EAAE,CACN,KAAK,EAAE,qBAAqB,EAC5B,UAAU,EAAE,oBAAoB,KAC7B,YAAY,CAAC;CACnB,CAAC;AAEF,wBAAgB,SAAS,CAAC,CAAC,SAAS,WAAW,EAAE,EAC/C,IAAI,EACJ,KAAK,EACL,MAAM,GACP,EAAE,cAAc,CAAC,CAAC,CAAC,2CAQnB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare function onlyDecimalNumber(event: any, ...ignore: any): boolean;
|
|
2
|
+
export declare function formattingThousand(value: number | string): string | number;
|
|
3
|
+
export declare function onlyAlphanumeric(value: string): boolean;
|
|
4
|
+
export declare function getCookie(cname: string): string | undefined;
|
|
5
|
+
export declare function onlyNumericValue(input: string | number): number;
|
|
6
|
+
export declare function getCurrentLocation(options: {
|
|
7
|
+
enableHighAccuracy: boolean;
|
|
8
|
+
timeout: number;
|
|
9
|
+
maximumAge: number;
|
|
10
|
+
}): Promise<unknown>;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AACA,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM,EAAE,GAAG,WAiB3D;AACD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,mBAYxD;AACD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,WAI7C;AACD,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,sBAetC;AACD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAS/D;AACD,wBAAgB,kBAAkB,CAAC,OAAO,EAAE;IAC1C,kBAAkB,EAAE,OAAO,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB,oBAWA"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Security utilities for preventing XSS attacks
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Encode HTML entities to prevent XSS
|
|
6
|
+
*/
|
|
7
|
+
export declare function encodeHtmlEntities(input: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* Decode HTML entities (use with caution)
|
|
10
|
+
*/
|
|
11
|
+
export declare function decodeHtmlEntities(input: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* Check if input contains dangerous patterns
|
|
14
|
+
*/
|
|
15
|
+
export declare function containsDangerousPatterns(input: string): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Sanitize input by removing dangerous content
|
|
18
|
+
*/
|
|
19
|
+
export declare function sanitizeInput(input: string, options?: {
|
|
20
|
+
allowHtml?: boolean;
|
|
21
|
+
maxLength?: number;
|
|
22
|
+
stripScripts?: boolean;
|
|
23
|
+
stripEvents?: boolean;
|
|
24
|
+
}): string;
|
|
25
|
+
/**
|
|
26
|
+
* Validate input for security threats
|
|
27
|
+
*/
|
|
28
|
+
export declare function validateInput(input: string): {
|
|
29
|
+
isValid: boolean;
|
|
30
|
+
threats: string[];
|
|
31
|
+
sanitized: string;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Security configuration for input components
|
|
35
|
+
*/
|
|
36
|
+
export interface SecurityConfig {
|
|
37
|
+
/** Enable XSS protection */
|
|
38
|
+
enableXssProtection?: boolean;
|
|
39
|
+
/** Maximum allowed input length */
|
|
40
|
+
maxLength?: number;
|
|
41
|
+
/** Allow HTML content (use with extreme caution) */
|
|
42
|
+
allowHtml?: boolean;
|
|
43
|
+
/** Strip script tags */
|
|
44
|
+
stripScripts?: boolean;
|
|
45
|
+
/** Strip event handlers */
|
|
46
|
+
stripEvents?: boolean;
|
|
47
|
+
/** Log security violations */
|
|
48
|
+
logViolations?: boolean;
|
|
49
|
+
/** Callback for security violations */
|
|
50
|
+
onSecurityViolation?: (threats: string[], input: string) => void;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Default security configuration
|
|
54
|
+
*/
|
|
55
|
+
export declare const DEFAULT_SECURITY_CONFIG: SecurityConfig;
|
|
56
|
+
/**
|
|
57
|
+
* Sanitize file name for safe display
|
|
58
|
+
* Removes dangerous characters that could lead to XSS
|
|
59
|
+
*/
|
|
60
|
+
export declare function sanitizeFileName(fileName: string): string;
|
|
61
|
+
//# sourceMappingURL=security.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"security.d.ts","sourceRoot":"","sources":["../../../src/utils/security.ts"],"names":[],"mappings":"AAAA;;GAEG;AA6FH;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMxD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAWxD;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAkBhE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,OAAO,GAAE;IACP,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB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