tc-dazzle-ui 1.0.0 → 1.2.0
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/components/Atoms/Button/Button.d.ts +29 -0
- package/dist/components/Atoms/Button/index.d.ts +2 -0
- package/dist/components/Atoms/FilterDropdown/FilterDropdown.d.ts +20 -0
- package/dist/components/Atoms/FilterDropdown/index.d.ts +2 -0
- package/dist/components/Atoms/GlobalSearch/GlobalSearch.d.ts +20 -0
- package/dist/components/Atoms/GlobalSearch/index.d.ts +2 -0
- package/dist/components/Atoms/IconButton/IconButton.d.ts +16 -0
- package/dist/components/Atoms/IconButton/index.d.ts +2 -0
- package/dist/components/Atoms/Icons/Icons.d.ts +14 -0
- package/dist/components/Atoms/Icons/index.d.ts +2 -0
- package/dist/components/Atoms/Input/Input.d.ts +24 -0
- package/dist/components/Atoms/Input/index.d.ts +3 -0
- package/dist/components/Atoms/Logo/Logo.d.ts +13 -0
- package/dist/components/Atoms/Logo/index.d.ts +2 -0
- package/dist/components/Atoms/index.d.ts +14 -0
- package/dist/components/Molecules/DropdownMenu/DropdownMenu.d.ts +16 -0
- package/dist/components/Molecules/DropdownMenu/index.d.ts +2 -0
- package/dist/components/Molecules/HeaderMenu/HeaderMenu.d.ts +18 -0
- package/dist/components/Molecules/HeaderMenu/index.d.ts +2 -0
- package/dist/components/Molecules/Search/Search.d.ts +19 -0
- package/dist/components/Molecules/Search/index.d.ts +2 -0
- package/dist/components/Molecules/index.d.ts +6 -0
- package/dist/components/Organisms/MainHeader/MainHeader.d.ts +20 -0
- package/dist/components/Organisms/MainHeader/index.d.ts +2 -0
- package/dist/components/Organisms/index.d.ts +2 -0
- package/dist/components/TC Dazzle UI/FilterDropdown/FilterDropdown.d.ts +20 -0
- package/dist/components/TC Dazzle UI/FilterDropdown/index.d.ts +2 -0
- package/dist/components/TC Dazzle UI/GlobalSearch/GlobalSearch.d.ts +20 -0
- package/dist/components/TC Dazzle UI/GlobalSearch/index.d.ts +2 -0
- package/dist/components/TC Dazzle UI/IconButton/IconButton.d.ts +16 -0
- package/dist/components/TC Dazzle UI/IconButton/index.d.ts +2 -0
- package/dist/components/TC Dazzle UI/Icons/Icons.d.ts +13 -0
- package/dist/components/TC Dazzle UI/Icons/index.d.ts +2 -0
- package/dist/components/TC Dazzle UI/index.d.ts +8 -0
- package/dist/index.esm.js +334 -8
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +346 -6
- package/dist/index.js.map +1 -1
- package/dist/lib/index.d.ts +20 -4
- package/dist/styles.css +1 -1
- package/dist/web-components.css +1 -1
- package/dist/web-components.umd.js +46 -16
- package/dist/web-components.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Button.css';
|
|
3
|
+
export type ButtonVariant = 'primary' | 'secondary' | 'text';
|
|
4
|
+
export type ButtonState = 'active' | 'hover' | 'disabled';
|
|
5
|
+
export interface ButtonProps {
|
|
6
|
+
label?: string;
|
|
7
|
+
variant?: ButtonVariant;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
showStartIcon?: boolean;
|
|
10
|
+
showEndIcon?: boolean;
|
|
11
|
+
showLabel?: boolean;
|
|
12
|
+
startIcon?: React.ReactNode;
|
|
13
|
+
endIcon?: React.ReactNode;
|
|
14
|
+
onClick?: () => void;
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ButtonGroupProps {
|
|
18
|
+
label?: string;
|
|
19
|
+
variant?: ButtonVariant;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
showStartIcon?: boolean;
|
|
22
|
+
startIcon?: React.ReactNode;
|
|
23
|
+
onButtonClick?: () => void;
|
|
24
|
+
onDropdownClick?: () => void;
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare const Button: React.FC<ButtonProps>;
|
|
28
|
+
export declare const ButtonGroup: React.FC<ButtonGroupProps>;
|
|
29
|
+
export default Button;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './FilterDropdown.css';
|
|
3
|
+
export type FilterDropdownSize = 'small' | 'medium';
|
|
4
|
+
export type FilterDropdownState = 'enabled' | 'disabled' | 'focused';
|
|
5
|
+
export interface FilterDropdownOption {
|
|
6
|
+
value: string;
|
|
7
|
+
label: string;
|
|
8
|
+
}
|
|
9
|
+
export interface FilterDropdownProps {
|
|
10
|
+
value?: string;
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
options?: FilterDropdownOption[];
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
size?: FilterDropdownSize;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
onChange?: (value: string) => void;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const FilterDropdown: React.FC<FilterDropdownProps>;
|
|
20
|
+
export default FilterDropdown;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './GlobalSearch.css';
|
|
3
|
+
export interface GlobalSearchOption {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
export interface GlobalSearchProps {
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
filterPlaceholder?: string;
|
|
10
|
+
filterOptions?: GlobalSearchOption[];
|
|
11
|
+
filterValue?: string;
|
|
12
|
+
searchValue?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
onSearch?: (value: string) => void;
|
|
15
|
+
onFilterChange?: (value: string) => void;
|
|
16
|
+
onSubmit?: (searchValue: string, filterValue: string) => void;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const GlobalSearch: React.FC<GlobalSearchProps>;
|
|
20
|
+
export default GlobalSearch;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './IconButton.css';
|
|
3
|
+
export type IconButtonSize = 'small' | 'medium' | 'large';
|
|
4
|
+
export type IconButtonColor = 'default' | 'primary' | 'secondary';
|
|
5
|
+
export type IconButtonState = 'enabled' | 'hover' | 'disabled';
|
|
6
|
+
export interface IconButtonProps {
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
size?: IconButtonSize;
|
|
9
|
+
color?: IconButtonColor;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
ariaLabel?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const IconButton: React.FC<IconButtonProps>;
|
|
16
|
+
export default IconButton;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Icons.css';
|
|
3
|
+
export type IconSize = 'small' | 'medium' | 'large';
|
|
4
|
+
export interface IconProps {
|
|
5
|
+
size?: IconSize;
|
|
6
|
+
color?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const InfoIcon: React.FC<IconProps>;
|
|
10
|
+
export declare const SearchIcon: React.FC<IconProps>;
|
|
11
|
+
export declare const ChevronDownIcon: React.FC<IconProps>;
|
|
12
|
+
export declare const ChevronUpIcon: React.FC<IconProps>;
|
|
13
|
+
export declare const CaretDownIcon: React.FC<IconProps>;
|
|
14
|
+
export declare const TeamConnectIcon: React.FC<IconProps>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Input.css';
|
|
3
|
+
export type InputType = 'enabled' | 'focused' | 'disabled' | 'prefixed' | 'suffixed' | 'dropdown';
|
|
4
|
+
export interface InputProps {
|
|
5
|
+
label?: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
value?: string;
|
|
8
|
+
defaultValue?: string;
|
|
9
|
+
type?: 'text' | 'password' | 'email' | 'number' | 'tel' | 'url';
|
|
10
|
+
inputType?: InputType;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
error?: boolean;
|
|
13
|
+
helperText?: string;
|
|
14
|
+
prefixIcon?: React.ReactNode;
|
|
15
|
+
suffixIcon?: React.ReactNode;
|
|
16
|
+
dropdownValue?: string;
|
|
17
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
18
|
+
onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
19
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
20
|
+
onDropdownClick?: () => void;
|
|
21
|
+
className?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
24
|
+
export default Input;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Logo.css';
|
|
3
|
+
export type LogoSize = 'small' | 'medium' | 'large';
|
|
4
|
+
export type LogoVariant = 'full' | 'icon';
|
|
5
|
+
export interface LogoProps {
|
|
6
|
+
size?: LogoSize;
|
|
7
|
+
variant?: LogoVariant;
|
|
8
|
+
showSandbox?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const Logo: React.FC<LogoProps>;
|
|
13
|
+
export default Logo;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { Button, ButtonGroup } from './Button';
|
|
2
|
+
export type { ButtonProps, ButtonGroupProps, ButtonVariant, ButtonState } from './Button';
|
|
3
|
+
export { Input } from './Input';
|
|
4
|
+
export type { InputProps, InputType } from './Input';
|
|
5
|
+
export { FilterDropdown } from './FilterDropdown';
|
|
6
|
+
export type { FilterDropdownProps, FilterDropdownOption, FilterDropdownSize, FilterDropdownState } from './FilterDropdown';
|
|
7
|
+
export { GlobalSearch } from './GlobalSearch';
|
|
8
|
+
export type { GlobalSearchProps, GlobalSearchOption } from './GlobalSearch';
|
|
9
|
+
export { IconButton } from './IconButton';
|
|
10
|
+
export type { IconButtonProps, IconButtonSize, IconButtonColor, IconButtonState } from './IconButton';
|
|
11
|
+
export { InfoIcon, SearchIcon, ChevronDownIcon, ChevronUpIcon, CaretDownIcon, TeamConnectIcon } from './Icons';
|
|
12
|
+
export type { IconProps, IconSize } from './Icons';
|
|
13
|
+
export { Logo } from './Logo';
|
|
14
|
+
export type { LogoProps, LogoSize, LogoVariant } from './Logo';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './DropdownMenu.css';
|
|
3
|
+
export interface DropdownMenuItem {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
}
|
|
9
|
+
export interface DropdownMenuProps {
|
|
10
|
+
items: DropdownMenuItem[];
|
|
11
|
+
selectedId?: string;
|
|
12
|
+
onItemClick?: (item: DropdownMenuItem) => void;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const DropdownMenu: React.FC<DropdownMenuProps>;
|
|
16
|
+
export default DropdownMenu;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DropdownMenuItem } from '../DropdownMenu';
|
|
3
|
+
import './HeaderMenu.css';
|
|
4
|
+
export interface HeaderMenuItem {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
dropdownItems?: DropdownMenuItem[];
|
|
9
|
+
}
|
|
10
|
+
export interface HeaderMenuProps {
|
|
11
|
+
items: HeaderMenuItem[];
|
|
12
|
+
onItemClick?: (item: HeaderMenuItem) => void;
|
|
13
|
+
onDropdownItemClick?: (menuItem: HeaderMenuItem, dropdownItem: DropdownMenuItem) => void;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const defaultIcons: Record<string, React.ReactNode>;
|
|
17
|
+
export declare const HeaderMenu: React.FC<HeaderMenuProps>;
|
|
18
|
+
export default HeaderMenu;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { GlobalSearchOption } from '../../Atoms';
|
|
3
|
+
import './Search.css';
|
|
4
|
+
export interface SearchProps {
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
filterPlaceholder?: string;
|
|
7
|
+
filterOptions?: GlobalSearchOption[];
|
|
8
|
+
filterValue?: string;
|
|
9
|
+
searchValue?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
showInfoIcon?: boolean;
|
|
12
|
+
onSearch?: (value: string) => void;
|
|
13
|
+
onFilterChange?: (value: string) => void;
|
|
14
|
+
onSubmit?: (searchValue: string, filterValue: string) => void;
|
|
15
|
+
onInfoClick?: () => void;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const Search: React.FC<SearchProps>;
|
|
19
|
+
export default Search;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { Search } from './Search';
|
|
2
|
+
export type { SearchProps } from './Search';
|
|
3
|
+
export { DropdownMenu } from './DropdownMenu';
|
|
4
|
+
export type { DropdownMenuProps, DropdownMenuItem } from './DropdownMenu';
|
|
5
|
+
export { HeaderMenu, defaultIcons } from './HeaderMenu';
|
|
6
|
+
export type { HeaderMenuProps, HeaderMenuItem } from './HeaderMenu';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { HeaderMenuItem } from '../../Molecules';
|
|
3
|
+
import type { DropdownMenuItem } from '../../Molecules';
|
|
4
|
+
import type { GlobalSearchOption } from '../../Atoms';
|
|
5
|
+
import './MainHeader.css';
|
|
6
|
+
export interface MainHeaderProps {
|
|
7
|
+
showSandbox?: boolean;
|
|
8
|
+
menuItems?: HeaderMenuItem[];
|
|
9
|
+
searchFilterOptions?: GlobalSearchOption[];
|
|
10
|
+
searchPlaceholder?: string;
|
|
11
|
+
searchFilterPlaceholder?: string;
|
|
12
|
+
onLogoClick?: () => void;
|
|
13
|
+
onSearch?: (searchValue: string, filterValue: string) => void;
|
|
14
|
+
onMenuItemClick?: (menuItem: HeaderMenuItem) => void;
|
|
15
|
+
onDropdownItemClick?: (menuItem: HeaderMenuItem, dropdownItem: DropdownMenuItem) => void;
|
|
16
|
+
onInfoClick?: () => void;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const MainHeader: React.FC<MainHeaderProps>;
|
|
20
|
+
export default MainHeader;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './FilterDropdown.css';
|
|
3
|
+
export type FilterDropdownSize = 'small' | 'medium';
|
|
4
|
+
export type FilterDropdownState = 'enabled' | 'disabled' | 'focused';
|
|
5
|
+
export interface FilterDropdownOption {
|
|
6
|
+
value: string;
|
|
7
|
+
label: string;
|
|
8
|
+
}
|
|
9
|
+
export interface FilterDropdownProps {
|
|
10
|
+
value?: string;
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
options?: FilterDropdownOption[];
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
size?: FilterDropdownSize;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
onChange?: (value: string) => void;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const FilterDropdown: React.FC<FilterDropdownProps>;
|
|
20
|
+
export default FilterDropdown;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './GlobalSearch.css';
|
|
3
|
+
export interface GlobalSearchOption {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
export interface GlobalSearchProps {
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
filterPlaceholder?: string;
|
|
10
|
+
filterOptions?: GlobalSearchOption[];
|
|
11
|
+
filterValue?: string;
|
|
12
|
+
searchValue?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
onSearch?: (value: string) => void;
|
|
15
|
+
onFilterChange?: (value: string) => void;
|
|
16
|
+
onSubmit?: (searchValue: string, filterValue: string) => void;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const GlobalSearch: React.FC<GlobalSearchProps>;
|
|
20
|
+
export default GlobalSearch;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './IconButton.css';
|
|
3
|
+
export type IconButtonSize = 'small' | 'medium' | 'large';
|
|
4
|
+
export type IconButtonColor = 'default' | 'primary' | 'secondary';
|
|
5
|
+
export type IconButtonState = 'enabled' | 'hover' | 'disabled';
|
|
6
|
+
export interface IconButtonProps {
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
size?: IconButtonSize;
|
|
9
|
+
color?: IconButtonColor;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
ariaLabel?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const IconButton: React.FC<IconButtonProps>;
|
|
16
|
+
export default IconButton;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Icons.css';
|
|
3
|
+
export type IconSize = 'small' | 'medium' | 'large';
|
|
4
|
+
export interface IconProps {
|
|
5
|
+
size?: IconSize;
|
|
6
|
+
color?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const InfoIcon: React.FC<IconProps>;
|
|
10
|
+
export declare const SearchIcon: React.FC<IconProps>;
|
|
11
|
+
export declare const ChevronDownIcon: React.FC<IconProps>;
|
|
12
|
+
export declare const ChevronUpIcon: React.FC<IconProps>;
|
|
13
|
+
export declare const CaretDownIcon: React.FC<IconProps>;
|
|
@@ -2,3 +2,11 @@ export { Button, ButtonGroup } from './Button';
|
|
|
2
2
|
export type { ButtonProps, ButtonGroupProps, ButtonVariant, ButtonState } from './Button';
|
|
3
3
|
export { Input } from './Input';
|
|
4
4
|
export type { InputProps, InputType } from './Input';
|
|
5
|
+
export { FilterDropdown } from './FilterDropdown';
|
|
6
|
+
export type { FilterDropdownProps, FilterDropdownOption, FilterDropdownSize, FilterDropdownState } from './FilterDropdown';
|
|
7
|
+
export { GlobalSearch } from './GlobalSearch';
|
|
8
|
+
export type { GlobalSearchProps, GlobalSearchOption } from './GlobalSearch';
|
|
9
|
+
export { IconButton } from './IconButton';
|
|
10
|
+
export type { IconButtonProps, IconButtonSize, IconButtonColor, IconButtonState } from './IconButton';
|
|
11
|
+
export { InfoIcon, SearchIcon, ChevronDownIcon, ChevronUpIcon, CaretDownIcon } from './Icons';
|
|
12
|
+
export type { IconProps, IconSize } from './Icons';
|