@true-tech-team/react-components 0.0.1 → 0.0.2
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 +103 -1
- package/index.css +1 -1
- package/index.js +1 -1
- package/index.mjs +3546 -2956
- package/lib/assets/icons/index.d.ts +29 -1
- package/lib/components/display/Avatar/Avatar.d.ts +58 -0
- package/lib/components/display/Avatar/index.d.ts +2 -0
- package/lib/components/display/Badge/Badge.d.ts +48 -0
- package/lib/components/display/Badge/index.d.ts +3 -0
- package/lib/components/display/Chip/Chip.d.ts +61 -0
- package/lib/components/display/Chip/index.d.ts +3 -0
- package/lib/components/display/CircularProgress/CircularProgress.d.ts +65 -0
- package/lib/components/display/CircularProgress/index.d.ts +3 -0
- package/lib/components/display/KPI/KPI.d.ts +85 -0
- package/lib/components/display/KPI/index.d.ts +3 -0
- package/lib/components/display/Pill/Pill.d.ts +83 -0
- package/lib/components/display/Pill/index.d.ts +2 -0
- package/lib/components/display/ProgressBar/ProgressBar.d.ts +70 -0
- package/lib/components/display/ProgressBar/index.d.ts +3 -0
- package/lib/components/display/Skeleton/Skeleton.d.ts +51 -0
- package/lib/components/display/Skeleton/index.d.ts +3 -0
- package/lib/components/display/StatusIndicator/StatusIndicator.d.ts +56 -0
- package/lib/components/display/StatusIndicator/index.d.ts +2 -0
- package/lib/components/display/Tag/Tag.d.ts +60 -0
- package/lib/components/display/Tag/index.d.ts +2 -0
- package/lib/components/display/index.d.ts +10 -0
- package/lib/components/index.d.ts +21 -1
- package/package.json +1 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { BaseComponentProps } from '../../../types/component.types';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the Tag component
|
|
5
|
+
*/
|
|
6
|
+
export interface TagProps extends BaseComponentProps {
|
|
7
|
+
/**
|
|
8
|
+
* Visual variant of the tag
|
|
9
|
+
* @default 'primary'
|
|
10
|
+
*/
|
|
11
|
+
variant?: 'primary' | 'secondary' | 'tertiary';
|
|
12
|
+
/**
|
|
13
|
+
* Size of the tag
|
|
14
|
+
* @default 'md'
|
|
15
|
+
*/
|
|
16
|
+
size?: 'sm' | 'md' | 'lg';
|
|
17
|
+
/**
|
|
18
|
+
* Whether the tag is disabled
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Whether the tag can be removed
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
removable?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Callback when remove button is clicked
|
|
29
|
+
*/
|
|
30
|
+
onRemove?: () => void;
|
|
31
|
+
/**
|
|
32
|
+
* Callback when tag is clicked (makes tag interactive)
|
|
33
|
+
*/
|
|
34
|
+
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Tag - Standalone tag element for labeling and categorization
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```tsx
|
|
41
|
+
* <Tag variant="primary" size="md">
|
|
42
|
+
* React
|
|
43
|
+
* </Tag>
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```tsx
|
|
48
|
+
* <Tag variant="secondary" size="sm" removable onRemove={() => console.log('removed')}>
|
|
49
|
+
* Removable
|
|
50
|
+
* </Tag>
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```tsx
|
|
55
|
+
* <Tag variant="tertiary" onClick={() => console.log('clicked')}>
|
|
56
|
+
* Clickable
|
|
57
|
+
* </Tag>
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
export declare const Tag: React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLElement>>;
|
|
@@ -1 +1,11 @@
|
|
|
1
1
|
export * from './Icon';
|
|
2
|
+
export * from './Badge';
|
|
3
|
+
export * from './Chip';
|
|
4
|
+
export * from './Pill';
|
|
5
|
+
export * from './Tag';
|
|
6
|
+
export * from './Avatar';
|
|
7
|
+
export * from './StatusIndicator';
|
|
8
|
+
export * from './ProgressBar';
|
|
9
|
+
export * from './CircularProgress';
|
|
10
|
+
export * from './KPI';
|
|
11
|
+
export * from './Skeleton';
|
|
@@ -2,6 +2,26 @@ export { Button } from './buttons/Button';
|
|
|
2
2
|
export type { ButtonProps } from './buttons/Button';
|
|
3
3
|
export { Icon } from './display/Icon';
|
|
4
4
|
export type { IconProps } from './display/Icon';
|
|
5
|
+
export { Badge } from './display/Badge';
|
|
6
|
+
export type { BadgeProps } from './display/Badge';
|
|
7
|
+
export { Chip } from './display/Chip';
|
|
8
|
+
export type { ChipProps } from './display/Chip';
|
|
9
|
+
export { Pill } from './display/Pill';
|
|
10
|
+
export type { PillProps } from './display/Pill';
|
|
11
|
+
export { Tag } from './display/Tag';
|
|
12
|
+
export type { TagProps } from './display/Tag';
|
|
13
|
+
export { Avatar } from './display/Avatar';
|
|
14
|
+
export type { AvatarProps } from './display/Avatar';
|
|
15
|
+
export { StatusIndicator } from './display/StatusIndicator';
|
|
16
|
+
export type { StatusIndicatorProps } from './display/StatusIndicator';
|
|
17
|
+
export { ProgressBar } from './display/ProgressBar';
|
|
18
|
+
export type { ProgressBarProps } from './display/ProgressBar';
|
|
19
|
+
export { CircularProgress } from './display/CircularProgress';
|
|
20
|
+
export type { CircularProgressProps } from './display/CircularProgress';
|
|
21
|
+
export { KPI } from './display/KPI';
|
|
22
|
+
export type { KPIProps } from './display/KPI';
|
|
23
|
+
export { Skeleton } from './display/Skeleton';
|
|
24
|
+
export type { SkeletonProps } from './display/Skeleton';
|
|
5
25
|
export { Portal } from './overlays/Portal';
|
|
6
26
|
export type { PortalProps } from './overlays/Portal';
|
|
7
27
|
export { Popover } from './overlays/Popover';
|
|
@@ -13,7 +33,7 @@ export type { MenuProps, MenuListProps, MenuItemProps, MenuDividerProps, MenuGro
|
|
|
13
33
|
export { Dropdown } from './overlays/Dropdown';
|
|
14
34
|
export type { DropdownProps } from './overlays/Dropdown';
|
|
15
35
|
export { Input } from './inputs/Input';
|
|
16
|
-
export type { InputProps, ValidationResult, FormatMask, ValidationTiming, InputType } from './inputs/Input';
|
|
36
|
+
export type { InputProps, ValidationResult, FormatMask, ValidationTiming, InputType, } from './inputs/Input';
|
|
17
37
|
export { Autocomplete } from './inputs/Autocomplete';
|
|
18
38
|
export type { AutocompleteProps, AutocompleteOption } from './inputs/Autocomplete';
|
|
19
39
|
export { Toggle } from './inputs/Toggle';
|