@tqc-solution/design-system 0.1.77 → 0.1.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/assets/icon/IconCheckCircle.d.ts +3 -0
  2. package/dist/assets/icon/IconCircleOutline.d.ts +3 -0
  3. package/dist/assets/icon/IconPlus.d.ts +3 -0
  4. package/dist/assets/icon/IconSmallCaretDown.d.ts +3 -0
  5. package/dist/components/DataFilter/DataFilter.d.ts +10 -0
  6. package/dist/components/DataFilter/index.d.ts +2 -0
  7. package/dist/components/FilterChip/FilterChip.d.ts +18 -0
  8. package/dist/components/FilterChip/index.d.ts +2 -0
  9. package/dist/components/Input/InputForm/InputForm.d.ts +32 -3
  10. package/dist/components/Input/InputForm/index.d.ts +1 -1
  11. package/dist/components/Input/InputFormSpecial/InputFormSpecial.d.ts +73 -20
  12. package/dist/components/Input/InputFormSpecial/index.d.ts +1 -1
  13. package/dist/components/MenuList/FilterMenu/FilterMenu.d.ts +36 -0
  14. package/dist/components/MenuList/FilterMenu/index.d.ts +2 -0
  15. package/dist/components/MenuList/MenuList.d.ts +67 -0
  16. package/dist/components/MenuList/MenuListItem/MenuListItem.d.ts +37 -0
  17. package/dist/components/MenuList/MenuListItem/index.d.ts +2 -0
  18. package/dist/components/MenuList/index.d.ts +6 -0
  19. package/dist/components/Toast/Toast.d.ts +9 -3
  20. package/dist/components/Toast/ToastContainer.d.ts +2 -0
  21. package/dist/components/Toast/ToastItem.d.ts +7 -0
  22. package/dist/components/Toast/index.d.ts +4 -1
  23. package/dist/components/Toast/toastContainerManager.d.ts +15 -0
  24. package/dist/components/Toast/toastStore.d.ts +29 -0
  25. package/dist/components/Toast/toastUtils.d.ts +4 -0
  26. package/dist/components/Tooltip/Tooltip.d.ts +46 -6
  27. package/dist/components/Tooltip/index.d.ts +1 -1
  28. package/dist/index.cjs.js +8 -8
  29. package/dist/index.d.ts +13 -0
  30. package/dist/index.es.js +6476 -4786
  31. package/package.json +1 -1
@@ -0,0 +1,3 @@
1
+ import type { IconProps } from "../../types";
2
+ declare const IconCheckCircle: ({ className, width, height, color, }: IconProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default IconCheckCircle;
@@ -0,0 +1,3 @@
1
+ import type { IconProps } from "../../types";
2
+ declare const IconCircleOutline: ({ className, width, height, color, }: IconProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default IconCircleOutline;
@@ -0,0 +1,3 @@
1
+ import type { IconProps } from '../../types';
2
+ declare const IconPlus: ({ className, width, height, color, }: IconProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default IconPlus;
@@ -0,0 +1,3 @@
1
+ import type { IconProps } from "../../types";
2
+ declare const IconSmallCaretDown: ({ className, width, height, color, }: IconProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default IconSmallCaretDown;
@@ -0,0 +1,10 @@
1
+ import { type ButtonHTMLAttributes } from 'react';
2
+ export interface DataFilterProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
3
+ /** Label text (default: "Data filter") */
4
+ label?: string;
5
+ /** Whether the chip is in selected/active state (blue border) */
6
+ selected?: boolean;
7
+ /** Additional CSS class name */
8
+ className?: string;
9
+ }
10
+ export declare const DataFilter: import("react").ForwardRefExoticComponent<DataFilterProps & import("react").RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,2 @@
1
+ export { DataFilter } from './DataFilter';
2
+ export type { DataFilterProps } from './DataFilter';
@@ -0,0 +1,18 @@
1
+ import { type HTMLAttributes } from 'react';
2
+ export interface FilterChipProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {
3
+ /** Filter label (e.g., "Status", "Category") */
4
+ label?: string;
5
+ /** Filter value to display */
6
+ value: string;
7
+ /** Visual type of the filter chip */
8
+ type?: 'default' | 'filterMore';
9
+ /** Whether the chip is selected/active (affects border color) */
10
+ selected?: boolean;
11
+ /** Callback function when close button is clicked (filterMore type only) */
12
+ onClose?: () => void;
13
+ /** Additional CSS class name */
14
+ className?: string;
15
+ /** Count badge to display (e.g., number of items in filter). If prefixed with "+", will show as "+2" */
16
+ count?: number | string;
17
+ }
18
+ export declare const FilterChip: import("react").ForwardRefExoticComponent<FilterChipProps & import("react").RefAttributes<HTMLSpanElement>>;
@@ -0,0 +1,2 @@
1
+ export { FilterChip } from './FilterChip';
2
+ export type { FilterChipProps } from './FilterChip';
@@ -1,4 +1,5 @@
1
1
  import { type InputHTMLAttributes, type TextareaHTMLAttributes, type ReactNode } from 'react';
2
+ import { type MenuListItemData, type CategoryOptionMapping } from '../../MenuList';
2
3
  export type InputFormType = 'text' | 'textarea';
3
4
  export type HelperTextType = 'default' | 'error' | 'success' | 'disabled';
4
5
  export type HelperTextConfig = {
@@ -10,10 +11,10 @@ export type HelperTextConfig = {
10
11
  icon?: ReactNode;
11
12
  };
12
13
  type BaseInputFormProps = {
13
- /** Input type: 'text' for single-line input or 'textarea' for multi-line textarea */
14
+ /** Input type: 'text' for single-line input, 'textarea' for multi-line textarea */
14
15
  type?: InputFormType;
15
- /** Unique identifier for the input field (required for label association) */
16
- id: string;
16
+ /** Unique identifier for the input field (optional, only needed if label is provided) */
17
+ id?: string;
17
18
  /** Label text displayed above the input */
18
19
  label?: string;
19
20
  /** Whether the field is required (shows asterisk) */
@@ -30,6 +31,34 @@ type BaseInputFormProps = {
30
31
  onCopy?: () => void;
31
32
  /** Additional CSS class name */
32
33
  className?: string;
34
+ /** Whether to show as dropdown (true) or text input (false). When true, shows dropdown with options. When false or undefined, shows regular text input. Note: textarea does not support dropdown */
35
+ dropdown?: boolean;
36
+ /** Menu items for dropdown mode */
37
+ items?: MenuListItemData[];
38
+ /** Selection mode for dropdown mode: 'single', 'multiple', or 'multipleWithMultiple' */
39
+ selectMode?: 'single' | 'multiple' | 'multipleWithMultiple';
40
+ /** Selected value(s) for dropdown mode - string for single mode, string[] for multiple mode, { categories: string[], options: string[] } for multipleWithMultiple */
41
+ selectValue?: string | string[] | {
42
+ categories: string[];
43
+ options: string[];
44
+ };
45
+ /** Callback when selection changes (for dropdown mode) */
46
+ onSelectChange?: (value: string | string[] | {
47
+ categories: string[];
48
+ options: string[];
49
+ }) => void;
50
+ /** For multipleWithMultiple mode: categories items (left column) */
51
+ categories?: MenuListItemData[];
52
+ /** For multipleWithMultiple mode: options items (right column) */
53
+ options?: MenuListItemData[];
54
+ /** For multipleWithMultiple mode: mapping between categories and their options */
55
+ categoryOptionMapping?: CategoryOptionMapping[];
56
+ /** Maximum height of dropdown menu */
57
+ dropdownMaxHeight?: string;
58
+ /** Whether dropdown is open (controlled) */
59
+ dropdownOpen?: boolean;
60
+ /** Callback when dropdown open state changes */
61
+ onDropdownOpenChange?: (open: boolean) => void;
33
62
  };
34
63
  type TextInputProps = BaseInputFormProps & Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'id'> & {
35
64
  type?: 'text';
@@ -1,2 +1,2 @@
1
1
  export { InputForm } from './InputForm';
2
- export type { InputFormProps, InputFormType } from './InputForm';
2
+ export type { InputFormProps, InputFormType, HelperTextConfig, HelperTextType } from './InputForm';
@@ -1,4 +1,5 @@
1
1
  import { type InputHTMLAttributes, type ReactNode, type ChangeEvent } from 'react';
2
+ import { type MenuListItemData, type CategoryOptionMapping } from '../../MenuList';
2
3
  export declare const InputFormSpecialType: {
3
4
  readonly EMAIL: "email";
4
5
  readonly PHONE: "phone";
@@ -25,10 +26,10 @@ export type PasswordRule = {
25
26
  satisfied: boolean;
26
27
  };
27
28
  export type InputFormSpecialProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'value' | 'onChange'> & {
28
- /** Unique identifier for the input field (required for label association) */
29
- id: string;
30
- /** Type of special input */
31
- type: InputFormSpecialType;
29
+ /** Unique identifier for the input field (optional, only needed if label is provided) */
30
+ id?: string;
31
+ /** Type of special input. When dropdown is true, can be any string (e.g., 'text'). When dropdown is false, must be InputFormSpecialType */
32
+ type: InputFormSpecialType | string;
32
33
  /** Label text displayed above the input */
33
34
  label?: string;
34
35
  /** Whether the field is required (shows asterisk) */
@@ -43,6 +44,10 @@ export type InputFormSpecialProps = Omit<InputHTMLAttributes<HTMLInputElement>,
43
44
  countryCode?: string;
44
45
  /** Callback when country code changes (for phone type) */
45
46
  onCountryCodeChange?: (code: string) => void;
47
+ /** Whether to show country code selector as dropdown (for phone type, default: false). When true, shows dropdown to select country code */
48
+ selectCountryCode?: boolean;
49
+ /** Country code options for dropdown selection (for phone type with selectCountryCode=true) */
50
+ countryCodeOptions?: MenuListItemData[];
46
51
  /** Prefix text for website type (default: 'http://') */
47
52
  websitePrefix?: string;
48
53
  /** Currency symbol for money type (default: '$') */
@@ -53,24 +58,46 @@ export type InputFormSpecialProps = Omit<InputHTMLAttributes<HTMLInputElement>,
53
58
  passwordRules?: PasswordRule[];
54
59
  /** Whether to show password toggle icon (for password type, default: true) */
55
60
  showPasswordToggle?: boolean;
56
- /** Maximum number of tags to display before showing "+X" (for multiple-tag type, undefined = auto-calculate based on width) */
57
- maxVisibleTags?: number;
58
61
  /** Additional CSS class name */
59
62
  className?: string;
60
- /** Input value - for MULTIPLE_TAG type, can be string (comma-separated) or string[] */
61
- value?: string | string[];
62
- /** Callback when value changes - for MULTIPLE_TAG type, can emit string or string[] */
63
+ /** Input value - for MULTIPLE_TAG type, can be string (comma-separated) or string[]. For dropdown: string for single, string[] for multiple, { categories: string[], options: string[] } for multipleWithMultiple */
64
+ value?: string | string[] | {
65
+ categories: string[];
66
+ options: string[];
67
+ };
68
+ /** Callback when value changes - for MULTIPLE_TAG type, can emit string or string[]. For dropdown: same as value type */
63
69
  onChange?: (e: ChangeEvent<HTMLInputElement> | {
64
70
  target: {
65
- value: string | string[];
71
+ value: string | string[] | {
72
+ categories: string[];
73
+ options: string[];
74
+ };
66
75
  };
67
76
  }) => void;
77
+ /** Whether to show as dropdown (true) or text input (false). When true, shows dropdown with options. When false or undefined, shows regular text input based on type */
78
+ dropdown?: boolean;
79
+ /** Menu items for dropdown mode */
80
+ items?: MenuListItemData[];
81
+ /** Selection mode for dropdown mode: 'single', 'multiple', or 'multipleWithMultiple' */
82
+ selectMode?: 'single' | 'multiple' | 'multipleWithMultiple';
83
+ /** Maximum height of dropdown menu */
84
+ dropdownMaxHeight?: string;
85
+ /** Whether dropdown is open (controlled) */
86
+ dropdownOpen?: boolean;
87
+ /** Callback when dropdown open state changes */
88
+ onDropdownOpenChange?: (open: boolean) => void;
89
+ /** For multipleWithMultiple mode: categories items (left column) */
90
+ categories?: MenuListItemData[];
91
+ /** For multipleWithMultiple mode: options items (right column) */
92
+ options?: MenuListItemData[];
93
+ /** For multipleWithMultiple mode: mapping between categories and their options */
94
+ categoryOptionMapping?: CategoryOptionMapping[];
68
95
  };
69
96
  export declare const InputFormSpecial: import("react").ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "onChange" | "size" | "value" | "type"> & {
70
- /** Unique identifier for the input field (required for label association) */
71
- id: string;
72
- /** Type of special input */
73
- type: InputFormSpecialType;
97
+ /** Unique identifier for the input field (optional, only needed if label is provided) */
98
+ id?: string;
99
+ /** Type of special input. When dropdown is true, can be any string (e.g., 'text'). When dropdown is false, must be InputFormSpecialType */
100
+ type: InputFormSpecialType | string;
74
101
  /** Label text displayed above the input */
75
102
  label?: string;
76
103
  /** Whether the field is required (shows asterisk) */
@@ -85,6 +112,10 @@ export declare const InputFormSpecial: import("react").ForwardRefExoticComponent
85
112
  countryCode?: string;
86
113
  /** Callback when country code changes (for phone type) */
87
114
  onCountryCodeChange?: (code: string) => void;
115
+ /** Whether to show country code selector as dropdown (for phone type, default: false). When true, shows dropdown to select country code */
116
+ selectCountryCode?: boolean;
117
+ /** Country code options for dropdown selection (for phone type with selectCountryCode=true) */
118
+ countryCodeOptions?: MenuListItemData[];
88
119
  /** Prefix text for website type (default: 'http://') */
89
120
  websitePrefix?: string;
90
121
  /** Currency symbol for money type (default: '$') */
@@ -95,16 +126,38 @@ export declare const InputFormSpecial: import("react").ForwardRefExoticComponent
95
126
  passwordRules?: PasswordRule[];
96
127
  /** Whether to show password toggle icon (for password type, default: true) */
97
128
  showPasswordToggle?: boolean;
98
- /** Maximum number of tags to display before showing "+X" (for multiple-tag type, undefined = auto-calculate based on width) */
99
- maxVisibleTags?: number;
100
129
  /** Additional CSS class name */
101
130
  className?: string;
102
- /** Input value - for MULTIPLE_TAG type, can be string (comma-separated) or string[] */
103
- value?: string | string[];
104
- /** Callback when value changes - for MULTIPLE_TAG type, can emit string or string[] */
131
+ /** Input value - for MULTIPLE_TAG type, can be string (comma-separated) or string[]. For dropdown: string for single, string[] for multiple, { categories: string[], options: string[] } for multipleWithMultiple */
132
+ value?: string | string[] | {
133
+ categories: string[];
134
+ options: string[];
135
+ };
136
+ /** Callback when value changes - for MULTIPLE_TAG type, can emit string or string[]. For dropdown: same as value type */
105
137
  onChange?: (e: ChangeEvent<HTMLInputElement> | {
106
138
  target: {
107
- value: string | string[];
139
+ value: string | string[] | {
140
+ categories: string[];
141
+ options: string[];
142
+ };
108
143
  };
109
144
  }) => void;
145
+ /** Whether to show as dropdown (true) or text input (false). When true, shows dropdown with options. When false or undefined, shows regular text input based on type */
146
+ dropdown?: boolean;
147
+ /** Menu items for dropdown mode */
148
+ items?: MenuListItemData[];
149
+ /** Selection mode for dropdown mode: 'single', 'multiple', or 'multipleWithMultiple' */
150
+ selectMode?: "single" | "multiple" | "multipleWithMultiple";
151
+ /** Maximum height of dropdown menu */
152
+ dropdownMaxHeight?: string;
153
+ /** Whether dropdown is open (controlled) */
154
+ dropdownOpen?: boolean;
155
+ /** Callback when dropdown open state changes */
156
+ onDropdownOpenChange?: (open: boolean) => void;
157
+ /** For multipleWithMultiple mode: categories items (left column) */
158
+ categories?: MenuListItemData[];
159
+ /** For multipleWithMultiple mode: options items (right column) */
160
+ options?: MenuListItemData[];
161
+ /** For multipleWithMultiple mode: mapping between categories and their options */
162
+ categoryOptionMapping?: CategoryOptionMapping[];
110
163
  } & import("react").RefAttributes<HTMLInputElement>>;
@@ -1,2 +1,2 @@
1
1
  export { InputFormSpecial, InputFormSpecialType } from './InputFormSpecial';
2
- export type { InputFormSpecialProps, HelperTextConfig, PasswordRule, } from './InputFormSpecial';
2
+ export type { InputFormSpecialProps, HelperTextConfig, HelperTextType, PasswordRule, } from './InputFormSpecial';
@@ -0,0 +1,36 @@
1
+ import { type HTMLAttributes } from 'react';
2
+ import type { MenuListItemData } from '../MenuList';
3
+ export type FilterMenuMode = 'single' | 'multiple' | 'multipleCategory';
4
+ export interface FilterMenuCategory {
5
+ /** Category label */
6
+ label: string;
7
+ /** Items in this category */
8
+ items: MenuListItemData[];
9
+ }
10
+ export interface FilterMenuProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'onApply'> {
11
+ /** Menu items (for single/multiple mode) */
12
+ items?: MenuListItemData[];
13
+ /** Items with categories (for multipleCategory mode) */
14
+ itemsWithCategories?: FilterMenuCategory[];
15
+ /** Selection mode: 'single', 'multiple', or 'multipleCategory' */
16
+ mode?: FilterMenuMode;
17
+ /** Selected value(s) - string for single mode, string[] for multiple mode */
18
+ value?: string | string[];
19
+ /** Callback when selection changes (pending state for multiple modes) */
20
+ onChange?: (value: string | string[]) => void;
21
+ /** Callback when Apply button is clicked (only for multiple and multipleCategory modes) */
22
+ onApply?: (value: string | string[]) => void;
23
+ /** Whether search is enabled */
24
+ searchable?: boolean;
25
+ /** Search placeholder */
26
+ searchPlaceholder?: string;
27
+ /** Apply button text (only for multiple and multipleCategory modes) */
28
+ applyButtonText?: string;
29
+ /** Maximum height of the menu list */
30
+ maxHeight?: string;
31
+ /** Whether this is a standalone menu (not in dropdown) */
32
+ standalone?: boolean;
33
+ /** Additional CSS class name */
34
+ className?: string;
35
+ }
36
+ export declare const FilterMenu: import("react").ForwardRefExoticComponent<FilterMenuProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ export { FilterMenu } from './FilterMenu.tsx';
2
+ export type { FilterMenuProps, FilterMenuMode, FilterMenuCategory } from './FilterMenu.tsx';
@@ -0,0 +1,67 @@
1
+ import { type HTMLAttributes, type ReactNode } from 'react';
2
+ import type { TagProps } from '../Tag';
3
+ export type MenuListMode = 'single' | 'multiple' | 'multipleWithSearch' | 'multipleWithMultiple';
4
+ export interface MenuListItemData {
5
+ /** Item value */
6
+ value: string;
7
+ /** Item label */
8
+ label: string;
9
+ /** Optional supporting text */
10
+ supportingText?: string;
11
+ /** Optional left element (avatar, icon, flag, etc.) */
12
+ leftElement?: ReactNode;
13
+ /** Optional right element (tag, icon, etc.) */
14
+ rightElement?: ReactNode;
15
+ /** Tag configuration - will be displayed in rightElement position (only for multiple mode) */
16
+ tag?: {
17
+ /** Tag text content */
18
+ text: string;
19
+ /** Tag type (default: 'blue') */
20
+ type?: TagProps['type'];
21
+ /** Tag size (default: 'sm') */
22
+ size?: TagProps['size'];
23
+ };
24
+ /** Whether item is disabled */
25
+ disabled?: boolean;
26
+ }
27
+ export interface CategoryOptionMapping {
28
+ /** Category value */
29
+ categoryValue: string;
30
+ /** Options that belong to this category */
31
+ optionValues: string[];
32
+ }
33
+ export interface MenuListProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
34
+ /** Menu items (not required for multipleWithMultiple mode) */
35
+ items?: MenuListItemData[];
36
+ /** Selection mode: 'single', 'multiple', 'multipleWithSearch', or 'multipleWithMultiple' */
37
+ mode?: MenuListMode;
38
+ /** Selected value(s) - string for single mode, string[] for multiple mode. For multipleWithMultiple: { categories: string[], options: string[] } */
39
+ value?: string | string[] | {
40
+ categories: string[];
41
+ options: string[];
42
+ };
43
+ /** Callback when selection changes. For multipleWithMultiple: (value: { categories: string[], options: string[] }) => void */
44
+ onChange?: (value: string | string[] | {
45
+ categories: string[];
46
+ options: string[];
47
+ }) => void;
48
+ /** Search placeholder */
49
+ searchPlaceholder?: string;
50
+ /** Category label (shown in header when showHeader is true) */
51
+ categoryLabel?: string;
52
+ /** Custom clear button text */
53
+ clearButtonText?: string;
54
+ /** Maximum height of the menu list */
55
+ maxHeight?: string;
56
+ /** Whether this is a standalone menu (not in dropdown) */
57
+ standalone?: boolean;
58
+ /** Additional CSS class name */
59
+ className?: string;
60
+ /** For multipleWithMultiple mode: categories items (left column) */
61
+ categories?: MenuListItemData[];
62
+ /** For multipleWithMultiple mode: options items (right column) */
63
+ options?: MenuListItemData[];
64
+ /** For multipleWithMultiple mode: mapping between categories and their options */
65
+ categoryOptionMapping?: CategoryOptionMapping[];
66
+ }
67
+ export declare const MenuList: import("react").ForwardRefExoticComponent<MenuListProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,37 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type TagProps } from '../../Tag';
3
+ export interface MenuListItemProps {
4
+ /** Item value */
5
+ value: string;
6
+ /** Item label */
7
+ label: string;
8
+ /** Optional supporting text */
9
+ supportingText?: string;
10
+ /** Optional left element (avatar/image) */
11
+ leftElement?: ReactNode;
12
+ /** Optional right element (tag - only shown in multiple mode) */
13
+ rightElement?: ReactNode;
14
+ /** Tag configuration - will be displayed in rightElement position (only for multiple mode) */
15
+ tag?: {
16
+ /** Tag text content */
17
+ text: string;
18
+ /** Tag type (default: 'blue') */
19
+ type?: TagProps['type'];
20
+ /** Tag size (default: 'sm') */
21
+ size?: TagProps['size'];
22
+ };
23
+ /** Whether item is disabled */
24
+ disabled?: boolean;
25
+ /** Whether item is selected */
26
+ selected?: boolean;
27
+ /** Selection mode: 'single' or 'multiple' */
28
+ mode?: 'single' | 'multiple';
29
+ /** Callback when item is clicked */
30
+ onClick?: (value: string) => void;
31
+ /** Additional CSS class name */
32
+ className?: string;
33
+ }
34
+ export declare const MenuListItem: {
35
+ ({ value, label, supportingText, leftElement, rightElement, tag, disabled, selected, mode, onClick, className, }: MenuListItemProps): import("react/jsx-runtime").JSX.Element;
36
+ displayName: string;
37
+ };
@@ -0,0 +1,2 @@
1
+ export { MenuListItem } from './MenuListItem';
2
+ export type { MenuListItemProps } from './MenuListItem';
@@ -0,0 +1,6 @@
1
+ export { MenuList } from './MenuList';
2
+ export type { MenuListProps, MenuListMode, MenuListItemData, CategoryOptionMapping } from './MenuList';
3
+ export { MenuListItem } from './MenuListItem';
4
+ export type { MenuListItemProps } from './MenuListItem';
5
+ export { FilterMenu } from './FilterMenu';
6
+ export type { FilterMenuProps, FilterMenuMode } from './FilterMenu';
@@ -1,9 +1,15 @@
1
- export type ToastType = 'success' | 'error';
1
+ import type { ToastPlacement, ToastType } from './toastStore';
2
+ export type { ToastType };
2
3
  export interface ToastProps {
3
4
  type: ToastType;
4
5
  message: string;
5
6
  actionLabel?: string;
6
7
  onActionClick?: () => void;
8
+ duration?: number;
9
+ placement?: ToastPlacement;
10
+ width?: number | string;
11
+ className?: string;
12
+ onClose?: () => void;
13
+ onClick?: () => void;
14
+ style?: React.CSSProperties;
7
15
  }
8
- export declare const showToast: () => string;
9
- export declare const notification: any;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const ToastContainer: React.FC;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { type ToastItem as ToastItemType } from './toastStore';
3
+ interface ToastItemProps {
4
+ toast: ToastItemType;
5
+ }
6
+ export declare const ToastItem: React.FC<ToastItemProps>;
7
+ export {};
@@ -1,2 +1,5 @@
1
- export { showToast, notification } from './Toast';
1
+ export { showToast, closeToast, closeAllToasts } from './toastUtils';
2
+ export { ToastContainer } from './ToastContainer';
2
3
  export type { ToastProps, ToastType } from './Toast';
4
+ export type { ToastPlacement } from './toastStore';
5
+ export { ensureToastContainer, removeToastContainer } from './toastContainerManager';
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Đánh dấu rằng container đã được mount thủ công
3
+ * Ngăn không cho tự động mount
4
+ */
5
+ export declare const setManualMount: () => void;
6
+ /**
7
+ * Tự động mount ToastContainer vào DOM khi cần
8
+ * Chỉ mount một lần duy nhất, tái sử dụng cho các lần sau
9
+ * Không mount nếu đã được mount thủ công
10
+ */
11
+ export declare const ensureToastContainer: () => void;
12
+ /**
13
+ * Unmount ToastContainer (dùng cho testing hoặc cleanup)
14
+ */
15
+ export declare const removeToastContainer: () => void;
@@ -0,0 +1,29 @@
1
+ export type ToastPlacement = 'top' | 'topLeft' | 'topRight' | 'bottom' | 'bottomLeft' | 'bottomRight';
2
+ export type ToastType = 'success' | 'error';
3
+ export interface ToastItem {
4
+ key: string;
5
+ type: ToastType;
6
+ message: string;
7
+ actionLabel?: string;
8
+ onActionClick?: () => void;
9
+ duration: number;
10
+ placement: ToastPlacement;
11
+ width?: number | string;
12
+ className?: string;
13
+ onClose?: () => void;
14
+ onClick?: () => void;
15
+ style?: React.CSSProperties;
16
+ }
17
+ type ToastListener = (toasts: ToastItem[]) => void;
18
+ declare class ToastStore {
19
+ private toasts;
20
+ private listeners;
21
+ subscribe(listener: ToastListener): () => void;
22
+ private notify;
23
+ add(toast: ToastItem): string;
24
+ remove(key: string): void;
25
+ removeAll(): void;
26
+ getToasts(placement?: ToastPlacement): ToastItem[];
27
+ }
28
+ export declare const toastStore: ToastStore;
29
+ export {};
@@ -0,0 +1,4 @@
1
+ import type { ToastProps } from './Toast';
2
+ export declare const showToast: (props: ToastProps) => string;
3
+ export declare const closeToast: (key: string) => void;
4
+ export declare const closeAllToasts: () => void;
@@ -1,10 +1,50 @@
1
- export type TooltipTheme = 'light' | 'dark';
2
- export interface TooltipProps {
3
- title: any;
4
- supportText?: any;
1
+ import { type ReactNode } from "react";
2
+ export type TooltipTheme = "light" | "dark";
3
+ export type TooltipPlacement = "top" | "bottom" | "left" | "right" | "topLeft" | "topRight";
4
+ export type TooltipTrigger = "hover" | "click" | Array<"hover" | "click">;
5
+ export interface TooltipProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title'> {
6
+ /**
7
+ * The main title content to display in the tooltip
8
+ */
9
+ title: ReactNode;
10
+ /**
11
+ * Optional support text (description) to display below the title
12
+ */
13
+ supportText?: ReactNode;
14
+ /**
15
+ * The theme of the tooltip (light or dark)
16
+ * @default 'dark'
17
+ */
5
18
  theme?: TooltipTheme;
6
- children: any;
19
+ /**
20
+ * The element that triggers the tooltip
21
+ */
22
+ children: ReactNode;
23
+ /**
24
+ * Additional CSS class name for custom styling
25
+ */
7
26
  className?: string;
27
+ /**
28
+ * Whether to show arrow
29
+ * @default true
30
+ */
8
31
  arrow?: boolean;
32
+ /**
33
+ * The position of the tooltip relative to the target element
34
+ * @default 'top'
35
+ */
36
+ placement?: TooltipPlacement;
37
+ /**
38
+ * The trigger mode which executes the tooltip
39
+ * @default 'hover'
40
+ */
41
+ trigger?: TooltipTrigger;
42
+ /**
43
+ * z-index of tooltip
44
+ */
45
+ zIndex?: number;
9
46
  }
10
- export declare const Tooltip: () => null;
47
+ export declare const Tooltip: {
48
+ ({ title, supportText, theme, children, className, arrow, placement, trigger, zIndex, }: TooltipProps): import("react/jsx-runtime").JSX.Element;
49
+ displayName: string;
50
+ };
@@ -1,2 +1,2 @@
1
1
  export { Tooltip } from './Tooltip';
2
- export type { TooltipProps, TooltipTheme } from './Tooltip';
2
+ export type { TooltipProps, TooltipTheme, TooltipPlacement, TooltipTrigger } from './Tooltip';