@hxtos/hx-components 0.2.0 → 0.4.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/LICENSE +21 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.es.js +27120 -3596
- package/dist/index.umd.js +163 -38
- package/dist/src/components/Avatar/index.d.ts +6 -0
- package/dist/src/components/Backdrop/index.d.ts +10 -0
- package/dist/src/components/Button/index.d.ts +7 -0
- package/dist/src/components/Card/index.d.ts +3 -0
- package/dist/src/components/Checkbox/index.d.ts +8 -0
- package/dist/src/components/ColorPicker/index.d.ts +7 -0
- package/dist/src/components/Dialog/index.d.ts +10 -0
- package/dist/src/components/ErrorMessage/index.d.ts +3 -0
- package/dist/src/components/File/BaseField.d.ts +7 -0
- package/dist/src/components/File/Color.d.ts +3 -0
- package/dist/src/components/File/Date.d.ts +3 -0
- package/dist/src/components/File/Datetime.d.ts +3 -0
- package/dist/src/components/File/ExampleForm.d.ts +3 -0
- package/dist/src/components/File/MaskedText.d.ts +6 -0
- package/dist/src/components/File/Number.d.ts +3 -0
- package/dist/src/components/File/Select.d.ts +4 -0
- package/dist/src/components/File/Text.d.ts +3 -0
- package/dist/src/components/File/Time.d.ts +3 -0
- package/dist/src/components/Header/index.d.ts +3 -0
- package/dist/src/components/HelperMessage/index.d.ts +2 -0
- package/dist/src/components/Input/index.d.ts +17 -0
- package/dist/src/components/Label/index.d.ts +8 -0
- package/dist/src/components/Navbar/index.d.ts +6 -0
- package/dist/src/components/Radio/index.d.ts +8 -0
- package/dist/src/components/Select/index.d.ts +11 -0
- package/dist/src/components/SideMenu/SideMenuRow.d.ts +11 -0
- package/dist/src/components/SideMenu/SideMenuTree.d.ts +8 -0
- package/dist/src/components/SideMenu/index.d.ts +6 -0
- package/dist/src/components/Switch/index.d.ts +11 -0
- package/dist/src/components/Tooltip/index.d.ts +7 -0
- package/dist/src/components/UploadFile/index.d.ts +15 -0
- package/dist/src/components/UserMenu/index.d.ts +23 -0
- package/package.json +14 -3
- package/dist/index.es.js.map +0 -1
- package/dist/index.umd.js.map +0 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
interface BackdropProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
isDialog?: boolean;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
close: () => void;
|
|
7
|
+
scrollToTop?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare function Backdrop({ isOpen, close, children, scrollToTop, isDialog, }: BackdropProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default Backdrop;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare interface ButtonProps extends React.ComponentPropsWithoutRef<'button'> {
|
|
3
|
+
size?: 'sm' | 'md';
|
|
4
|
+
variant?: 'primary' | 'secondary' | 'remove';
|
|
5
|
+
}
|
|
6
|
+
declare const Button: ({ children, className, size, variant, ...props }: ButtonProps) => JSX.Element;
|
|
7
|
+
export default Button;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface Props extends React.ComponentPropsWithoutRef<'input'> {
|
|
3
|
+
name: string;
|
|
4
|
+
label: string;
|
|
5
|
+
error?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const Checkbox: ({ label, name, className, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default Checkbox;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare interface ColorPickerProps {
|
|
2
|
+
color?: string;
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
onChange?: (color: string) => void;
|
|
5
|
+
}
|
|
6
|
+
declare const ColorPicker: ({ color: value, disabled, onChange, }: ColorPickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default ColorPicker;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface ModalProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
open: boolean;
|
|
5
|
+
close: any;
|
|
6
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl';
|
|
7
|
+
scrollToTop?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare function Modal({ open, children, close, size, scrollToTop }: ModalProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default Modal;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InputProps } from "../Input";
|
|
2
|
+
export interface Props extends InputProps {
|
|
3
|
+
helper?: string;
|
|
4
|
+
mask?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const BaseField: ({ name, helper, onChange, onBlur, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default BaseField;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { GroupBase } from "react-select";
|
|
2
|
+
import { Props as SelectProps } from "../Select";
|
|
3
|
+
export declare const Select: <Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ onChange, onBlur, options, name, label, getOptionLabel, getOptionValue, ...props }: SelectProps<Option, IsMulti, Group>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export default Select;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export declare interface ContainerProps extends ComponentPropsWithoutRef<'div'> {
|
|
3
|
+
error?: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const Container: ({ error, disabled, children }: ContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare interface InputProps extends React.ComponentPropsWithoutRef<'input'> {
|
|
8
|
+
error?: string;
|
|
9
|
+
helper?: string;
|
|
10
|
+
label: string;
|
|
11
|
+
mask?: string;
|
|
12
|
+
name: string;
|
|
13
|
+
onChange?: (value?: any) => void;
|
|
14
|
+
onBlur?: (value?: any) => void;
|
|
15
|
+
}
|
|
16
|
+
declare const Input: ({ className, error, helper, label, mask, name, type, value, onChange, onBlur, disabled, ...props }: InputProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export default Input;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare interface LabelProps extends React.ComponentPropsWithoutRef<"label"> {
|
|
3
|
+
disabled: boolean;
|
|
4
|
+
focused?: boolean;
|
|
5
|
+
error?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const Label: ({ className, children, disabled, focused, error, ...props }: LabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default Label;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const Nav: {
|
|
2
|
+
Navbar: ({ children, className, ...props }: React.ComponentPropsWithoutRef<'nav'>) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
Button: ({ children, className, ...props }: React.ComponentPropsWithoutRef<'button'>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
Title: ({ children, className, ...props }: React.ComponentPropsWithoutRef<'h1'>) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
};
|
|
6
|
+
export default Nav;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface Props extends React.ComponentPropsWithoutRef<'input'> {
|
|
3
|
+
name: string;
|
|
4
|
+
label: string;
|
|
5
|
+
error?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const Radio: ({ label, name, className, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default Radio;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { GroupBase, Props as ReactSelectProps } from 'react-select';
|
|
2
|
+
export type Props<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> = ReactSelectProps<Option, IsMulti, Group> & {
|
|
3
|
+
onChange?: (value: any) => void;
|
|
4
|
+
onBlur?: () => void;
|
|
5
|
+
name: string;
|
|
6
|
+
label: string;
|
|
7
|
+
helper?: string;
|
|
8
|
+
error?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const Select: <Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ components, helper, error, ...props }: Props<Option, IsMulti, Group>) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default Select;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
interface RowProps {
|
|
3
|
+
route: any;
|
|
4
|
+
level: number;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
lastIndex: number;
|
|
7
|
+
currentIndex: number;
|
|
8
|
+
closeDialog: () => void;
|
|
9
|
+
}
|
|
10
|
+
declare function Row({ route, children, level, lastIndex, currentIndex, closeDialog, }: RowProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default Row;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Dispatch, ReactNode, SetStateAction } from 'react';
|
|
2
|
+
export interface Props {
|
|
3
|
+
leftLabel?: string;
|
|
4
|
+
rightLabel?: string;
|
|
5
|
+
mode?: 'mono' | 'on-off' | 'off-on';
|
|
6
|
+
checked: boolean;
|
|
7
|
+
onChange: Dispatch<SetStateAction<boolean>>;
|
|
8
|
+
SwitchButton?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare const Switch: ({ leftLabel, rightLabel, mode, checked, SwitchButton, onChange, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default Switch;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export interface Props extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
Container?: any;
|
|
4
|
+
accept?: any;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
name: string;
|
|
7
|
+
disabled?: boolean | undefined;
|
|
8
|
+
fileName?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const UploadFile: {
|
|
11
|
+
PrimaryButton: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
OutlineButton: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
BoxButton: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
};
|
|
15
|
+
export default UploadFile;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface UserMenuProps {
|
|
3
|
+
user: any;
|
|
4
|
+
userTypeId?: number | undefined;
|
|
5
|
+
icons: any;
|
|
6
|
+
isDarkMode: boolean;
|
|
7
|
+
setIsDarkMode: any;
|
|
8
|
+
setTheme: any;
|
|
9
|
+
setLanguage: any;
|
|
10
|
+
onSelectTerminal?: any;
|
|
11
|
+
logout: any;
|
|
12
|
+
appNameText: string;
|
|
13
|
+
availablePortalsText: string;
|
|
14
|
+
clickToAccessText: string;
|
|
15
|
+
clickToChangeTerminal?: string;
|
|
16
|
+
nightThemeText: string;
|
|
17
|
+
logoutText: string;
|
|
18
|
+
isOpen: boolean;
|
|
19
|
+
setOpen: (value: React.SetStateAction<boolean>) => void;
|
|
20
|
+
terminalName?: string;
|
|
21
|
+
}
|
|
22
|
+
declare function UserMenu({ user, userTypeId, icons, isDarkMode, setIsDarkMode, setTheme, setLanguage, onSelectTerminal, logout, appNameText, availablePortalsText, clickToAccessText, clickToChangeTerminal, nightThemeText, logoutText, isOpen, setOpen, terminalName, }: UserMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export default UserMenu;
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"name": "Hxtos"
|
|
5
5
|
},
|
|
6
6
|
"private": false,
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.4.0",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"description": "Biblioteca de componentes Hxtos",
|
|
10
10
|
"type": "module",
|
|
@@ -29,13 +29,22 @@
|
|
|
29
29
|
"build-storybook": "storybook build"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@
|
|
32
|
+
"@headlessui/react": "^1.7.17",
|
|
33
|
+
"@hexagonpro/hx-icons": "3.4.0",
|
|
33
34
|
"@hexagonpro/tailwind-theme": "2.0.9",
|
|
34
35
|
"@tanstack/react-table": "^8.10.7",
|
|
36
|
+
"@types/lodash": "^4.14.202",
|
|
35
37
|
"chromatic": "^10.2.0",
|
|
36
38
|
"classnames": "^2.3.2",
|
|
39
|
+
"formik": "^2.4.5",
|
|
40
|
+
"framer-motion": "^10.16.16",
|
|
41
|
+
"lodash": "^4.17.21",
|
|
37
42
|
"react": "^18.2.0",
|
|
43
|
+
"react-color": "^2.19.3",
|
|
38
44
|
"react-dom": "^18.2.0",
|
|
45
|
+
"react-input-mask": "^2.0.4",
|
|
46
|
+
"react-router-dom": "^6.21.1",
|
|
47
|
+
"react-select": "^5.8.0",
|
|
39
48
|
"spinners-react": "^1.0.7"
|
|
40
49
|
},
|
|
41
50
|
"devDependencies": {
|
|
@@ -48,7 +57,9 @@
|
|
|
48
57
|
"@storybook/react-vite": "7.6.6",
|
|
49
58
|
"@storybook/test": "7.6.6",
|
|
50
59
|
"@types/react": "^18.2.43",
|
|
60
|
+
"@types/react-color": "^3.0.6",
|
|
51
61
|
"@types/react-dom": "^18.2.17",
|
|
62
|
+
"@types/react-input-mask": "^3.0.1",
|
|
52
63
|
"@typescript-eslint/eslint-plugin": "^6.14.0",
|
|
53
64
|
"@typescript-eslint/parser": "^6.14.0",
|
|
54
65
|
"@vitejs/plugin-react": "^4.2.1",
|
|
@@ -60,7 +71,7 @@
|
|
|
60
71
|
"postcss": "^8.4.12",
|
|
61
72
|
"storybook": "7.6.6",
|
|
62
73
|
"typescript": "^5.2.2",
|
|
63
|
-
"vite": "^5.0.8",
|
|
74
|
+
"vite": "^5.0.8",
|
|
64
75
|
"vite-plugin-dts": "^3.6.0"
|
|
65
76
|
}
|
|
66
77
|
}
|