@lion-npm/ui 1.0.3 → 1.0.4
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/buttons/AndroidButton.d.ts +16 -0
- package/dist/components/buttons/BootstrapButton.d.ts +16 -0
- package/dist/components/buttons/IOSButton.d.ts +16 -0
- package/dist/components/buttons/LionButton.d.ts +18 -0
- package/dist/components/inputs/AndroidInput.d.ts +20 -0
- package/dist/components/inputs/BootstrapInput.d.ts +16 -0
- package/dist/components/inputs/IOSInput.d.ts +21 -0
- package/dist/components/inputs/LionInput.d.ts +27 -0
- package/dist/components/loadings/LoadingBar.d.ts +5 -0
- package/dist/components/modals/LionModal.d.ts +17 -0
- package/dist/context/LionUIComponentsContext.d.ts +5 -0
- package/dist/index.d.ts +25 -0
- package/dist/interfaces/LionUIComponentsProviderProps.d.ts +6 -0
- package/dist/interfaces/LionUIContextProps.d.ts +5 -0
- package/dist/interfaces/LionUIState.d.ts +12 -0
- package/dist/types/Android/AndroidInputShapeTypes.d.ts +5 -0
- package/dist/types/Android/AndroidInputStyleTypes.d.ts +5 -0
- package/dist/types/Android/AndroidShapeTypes.d.ts +5 -0
- package/dist/types/Android/AndroidStyleTypes.d.ts +8 -0
- package/dist/types/ButtonTypes.d.ts +7 -0
- package/dist/types/IOS/IOSInputShapeTypes.d.ts +6 -0
- package/dist/types/IOS/IOSInputStyleTypes.d.ts +8 -0
- package/dist/types/IOS/IOSShapeTypes.d.ts +5 -0
- package/dist/types/IOS/IOSStyleTypes.d.ts +7 -0
- package/dist/types/InputTypes.d.ts +11 -0
- package/dist/types/PlatformTypes.d.ts +7 -0
- package/dist/types/SizeTypes.d.ts +9 -0
- package/dist/types/VariantTypes.d.ts +17 -0
- package/dist/types/Web/BootstrapInputShapeTypes.d.ts +6 -0
- package/dist/types/Web/BootstrapInputStyleTypes.d.ts +5 -0
- package/dist/types/Web/BootstrapShapeTypes.d.ts +6 -0
- package/dist/types/Web/BootstrapStyleTypes.d.ts +5 -0
- package/package.json +1 -2
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ButtonHTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
import { VariantTypes } from '../../types/VariantTypes';
|
|
3
|
+
import { SizeTypes } from '../../types/SizeTypes';
|
|
4
|
+
import { ButtonTypes } from '../../types/ButtonTypes';
|
|
5
|
+
import { AndroidStyleTypes } from '../../types/Android/AndroidStyleTypes';
|
|
6
|
+
import { AndroidShapeTypes } from '../../types/Android/AndroidShapeTypes';
|
|
7
|
+
export interface AndroidButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type' | 'size'> {
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
variant?: VariantTypes;
|
|
10
|
+
styleType?: AndroidStyleTypes;
|
|
11
|
+
shape?: AndroidShapeTypes;
|
|
12
|
+
size?: SizeTypes;
|
|
13
|
+
type?: ButtonTypes;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
export default function AndroidButton({ children, variant, styleType, shape, size, type, className, ...props }: AndroidButtonProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ButtonHTMLAttributes, type ReactNode } from "react";
|
|
2
|
+
import { VariantTypes } from "../../types/VariantTypes.tsx";
|
|
3
|
+
import { SizeTypes } from "../../types/SizeTypes.tsx";
|
|
4
|
+
import { ButtonTypes } from "../../types/ButtonTypes.tsx";
|
|
5
|
+
import { BootstrapStyleTypes } from "../../types/Web/BootstrapStyleTypes.tsx";
|
|
6
|
+
import { BootstrapShapeTypes } from "../../types/Web/BootstrapShapeTypes.tsx";
|
|
7
|
+
export interface BootstrapButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type" | "size"> {
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
variant?: VariantTypes;
|
|
10
|
+
styleType?: BootstrapStyleTypes;
|
|
11
|
+
shape?: BootstrapShapeTypes;
|
|
12
|
+
size?: SizeTypes;
|
|
13
|
+
type?: ButtonTypes;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
export default function BootstrapButton({ children, variant, styleType, shape, size, type, className, ...props }: BootstrapButtonProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ButtonHTMLAttributes, type ReactNode } from "react";
|
|
2
|
+
import { VariantTypes } from "../../types/VariantTypes";
|
|
3
|
+
import { SizeTypes } from "../../types/SizeTypes";
|
|
4
|
+
import { ButtonTypes } from "../../types/ButtonTypes";
|
|
5
|
+
import { IOSStyleTypes } from "../../types/IOS/IOSStyleTypes";
|
|
6
|
+
import { IOSShapeTypes } from "../../types/IOS/IOSShapeTypes";
|
|
7
|
+
export interface IOSButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type" | "size"> {
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
variant?: VariantTypes;
|
|
10
|
+
styleType?: IOSStyleTypes;
|
|
11
|
+
shape?: IOSShapeTypes;
|
|
12
|
+
size?: SizeTypes;
|
|
13
|
+
type?: ButtonTypes;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
export default function IOSButton({ children, variant, styleType, shape, size, type, className, ...props }: IOSButtonProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ButtonHTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
import type { AndroidStyleTypes } from "../../types/Android/AndroidStyleTypes.tsx";
|
|
3
|
+
import type { AndroidShapeTypes } from "../../types/Android/AndroidShapeTypes.tsx";
|
|
4
|
+
import type { BootstrapShapeTypes } from "../../types/Web/BootstrapShapeTypes.tsx";
|
|
5
|
+
import type { BootstrapStyleTypes } from "../../types/Web/BootstrapStyleTypes.tsx";
|
|
6
|
+
import type { IOSShapeTypes } from "../../types/IOS/IOSShapeTypes.tsx";
|
|
7
|
+
import type { IOSStyleTypes } from "../../types/IOS/IOSStyleTypes.tsx";
|
|
8
|
+
type PlatformMapping<T> = {};
|
|
9
|
+
export type LionButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
variant?: string;
|
|
12
|
+
platform?: string;
|
|
13
|
+
size?: SizeTypes.SM | SizeTypes.MD | SizeTypes.LG;
|
|
14
|
+
shape?: BootstrapShapeTypes | AndroidShapeTypes | IOSShapeTypes | string | PlatformMapping<BootstrapShapeTypes | AndroidShapeTypes | IOSShapeTypes | string>;
|
|
15
|
+
styleType?: BootstrapStyleTypes | AndroidStyleTypes | IOSStyleTypes | string | PlatformMapping<BootstrapStyleTypes | AndroidStyleTypes | IOSStyleTypes | string>;
|
|
16
|
+
};
|
|
17
|
+
export default function LionButton({ children, shape, styleType, platform, ...props }: LionButtonProps): import("react").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { InputTypes } from "../../types/InputTypes";
|
|
2
|
+
import { AndroidInputStyleTypes } from "../../types/Android/AndroidInputStyleTypes.tsx";
|
|
3
|
+
import { AndroidInputShapeTypes } from "../../types/Android/AndroidInputShapeTypes.tsx";
|
|
4
|
+
import { type InputHTMLAttributes, type ReactNode } from "react";
|
|
5
|
+
export interface AndroidInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "shape"> {
|
|
6
|
+
type?: InputTypes;
|
|
7
|
+
styleType?: AndroidInputStyleTypes;
|
|
8
|
+
shape?: AndroidInputShapeTypes;
|
|
9
|
+
variant?: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
helperText?: string;
|
|
13
|
+
error?: boolean | string;
|
|
14
|
+
startIcon?: ReactNode;
|
|
15
|
+
endIcon?: ReactNode;
|
|
16
|
+
prefixText?: string;
|
|
17
|
+
suffixText?: string;
|
|
18
|
+
counter?: boolean | number;
|
|
19
|
+
}
|
|
20
|
+
export default function AndroidInput({ type, styleType, shape, variant, label, required, helperText, error, startIcon, endIcon, prefixText, suffixText, counter, disabled, readOnly, value, defaultValue, onChange, onFocus, onBlur, id, className, maxLength, placeholder, ...rest }: AndroidInputProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type InputHTMLAttributes } from "react";
|
|
2
|
+
import { InputTypes } from "../../types/InputTypes";
|
|
3
|
+
import { BootstrapInputShapeTypes } from "../../types/Web/BootstrapInputShapeTypes.tsx";
|
|
4
|
+
import { BootstrapInputStyleTypes } from "../../types/Web/BootstrapInputStyleTypes.tsx";
|
|
5
|
+
export interface BootstrapInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "shape"> {
|
|
6
|
+
type?: InputTypes;
|
|
7
|
+
styleType?: BootstrapInputStyleTypes;
|
|
8
|
+
shape?: BootstrapInputShapeTypes;
|
|
9
|
+
variant?: string;
|
|
10
|
+
sizeType?: "sm" | "md" | "lg";
|
|
11
|
+
label?: string;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
helperText?: string;
|
|
14
|
+
error?: boolean | string;
|
|
15
|
+
}
|
|
16
|
+
export default function BootstrapInput({ type, styleType, shape, variant, sizeType, label, required, helperText, error, disabled, readOnly, id, className, placeholder, ...rest }: BootstrapInputProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { InputTypes } from "../../types/InputTypes";
|
|
3
|
+
import { IOSInputStyleTypes } from "../../types/IOS/IOSInputStyleTypes.tsx";
|
|
4
|
+
import { IOSInputShapeTypes } from "../../types/IOS/IOSInputShapeTypes.tsx";
|
|
5
|
+
export interface IOSInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "shape"> {
|
|
6
|
+
type?: InputTypes;
|
|
7
|
+
styleType?: IOSInputStyleTypes;
|
|
8
|
+
shape?: IOSInputShapeTypes;
|
|
9
|
+
variant?: string;
|
|
10
|
+
sizeType?: "sx" | "sm" | "md" | "lg";
|
|
11
|
+
label?: string;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
helperText?: string;
|
|
14
|
+
error?: boolean | string;
|
|
15
|
+
startIcon?: React.ReactNode;
|
|
16
|
+
endIcon?: React.ReactNode;
|
|
17
|
+
prefixText?: string;
|
|
18
|
+
suffixText?: string;
|
|
19
|
+
clearable?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export default function IOSInput({ type, styleType, shape, variant, sizeType, label, required, helperText, error, startIcon, endIcon, prefixText, suffixText, clearable, disabled, readOnly, value, defaultValue, onChange, onFocus, onBlur, id, className, maxLength, placeholder, ...rest }: IOSInputProps): React.JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type InputHTMLAttributes, type ReactNode } from "react";
|
|
2
|
+
import type { AndroidStyleTypes } from "../../types/Android/AndroidStyleTypes.tsx";
|
|
3
|
+
import type { AndroidShapeTypes } from "../../types/Android/AndroidShapeTypes.tsx";
|
|
4
|
+
import type { BootstrapShapeTypes } from "../../types/Web/BootstrapShapeTypes.tsx";
|
|
5
|
+
import type { BootstrapStyleTypes } from "../../types/Web/BootstrapStyleTypes.tsx";
|
|
6
|
+
import type { IOSShapeTypes } from "../../types/IOS/IOSShapeTypes.tsx";
|
|
7
|
+
import type { IOSStyleTypes } from "../../types/IOS/IOSStyleTypes.tsx";
|
|
8
|
+
type PlatformMapping<T> = {};
|
|
9
|
+
export type LionInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "shape"> & {
|
|
10
|
+
variant?: string;
|
|
11
|
+
platform?: string;
|
|
12
|
+
sizeType?: string;
|
|
13
|
+
shape?: BootstrapShapeTypes | AndroidShapeTypes | IOSShapeTypes | string | PlatformMapping<BootstrapShapeTypes | AndroidShapeTypes | IOSShapeTypes | string>;
|
|
14
|
+
styleType?: BootstrapStyleTypes | AndroidStyleTypes | IOSStyleTypes | string | PlatformMapping<BootstrapStyleTypes | AndroidStyleTypes | IOSStyleTypes | string>;
|
|
15
|
+
label?: string;
|
|
16
|
+
required?: boolean;
|
|
17
|
+
helperText?: string;
|
|
18
|
+
error?: boolean | string;
|
|
19
|
+
startIcon?: ReactNode;
|
|
20
|
+
endIcon?: ReactNode;
|
|
21
|
+
prefixText?: string;
|
|
22
|
+
suffixText?: string;
|
|
23
|
+
counter?: boolean | number;
|
|
24
|
+
clearable?: boolean;
|
|
25
|
+
};
|
|
26
|
+
export default function LionInput({ shape, styleType, platform, ...props }: LionInputProps): import("react").JSX.Element;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { VariantTypes } from "../../types/VariantTypes.tsx";
|
|
3
|
+
import { PlatformTypes } from "../../types/PlatformTypes.tsx";
|
|
4
|
+
export interface LionModalProps {
|
|
5
|
+
modalId: string;
|
|
6
|
+
title: string;
|
|
7
|
+
body: ReactNode;
|
|
8
|
+
buttons?: ReactNode;
|
|
9
|
+
backdrop?: string;
|
|
10
|
+
fullscreen?: true | "sm" | "md" | "lg" | "xl" | "xxl" | "sm-down" | "md-down" | "lg-down" | "xl-down" | "xxl-down";
|
|
11
|
+
size?: SizeTypes.SM | SizeTypes.LG | SizeTypes.XL;
|
|
12
|
+
variant?: VariantTypes | string;
|
|
13
|
+
platform?: PlatformTypes | string;
|
|
14
|
+
cancelButtonIcon?: ReactNode;
|
|
15
|
+
cancelButtonText?: string;
|
|
16
|
+
}
|
|
17
|
+
export default function LionModal({ modalId, title, body, buttons, backdrop, fullscreen, size, variant, platform, cancelButtonIcon, cancelButtonText, }: LionModalProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import type { LionUIContextProps } from "../interfaces/LionUIContextProps.tsx";
|
|
3
|
+
import type { LionUIComponentsProviderProps } from "../interfaces/LionUIComponentsProviderProps.tsx";
|
|
4
|
+
export declare const LionUIComponentsProvider: FC<LionUIComponentsProviderProps>;
|
|
5
|
+
export declare const useLionUI: () => LionUIContextProps;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import "./assets/css/index.css";
|
|
2
|
+
import "./assets/css/buttons/buttons-android.css";
|
|
3
|
+
import "./assets/css/buttons/buttons-ios.css";
|
|
4
|
+
import "./assets/css/buttons/buttons-web.css";
|
|
5
|
+
import "./assets/css/inputs/inputs-android.css";
|
|
6
|
+
import "./assets/css/inputs/inputs-ios.css";
|
|
7
|
+
import "./assets/css/inputs/inputs-bootstrap.css";
|
|
8
|
+
import "./assets/css/modals/modals.css";
|
|
9
|
+
import "./assets/css/loadings/loading-bar.css";
|
|
10
|
+
export { LionUIComponentsProvider } from './context/LionUIComponentsContext';
|
|
11
|
+
export { default as AndroidButton } from './components/buttons/AndroidButton';
|
|
12
|
+
export { default as BootstrapButton } from './components/buttons/BootstrapButton';
|
|
13
|
+
export { default as IOSButton } from './components/buttons/IOSButton';
|
|
14
|
+
export { default as LionButton } from './components/buttons/LionButton';
|
|
15
|
+
export { default as AndroidInput } from './components/inputs/AndroidInput';
|
|
16
|
+
export { default as BootstrapInput } from './components/inputs/BootstrapInput';
|
|
17
|
+
export { default as IOSInput } from './components/inputs/IOSInput';
|
|
18
|
+
export { default as LionInput } from './components/inputs/LionInput';
|
|
19
|
+
export { default as LoadingBar } from './components/loadings/LoadingBar';
|
|
20
|
+
export { default as LionModal } from './components/modals/LionModal';
|
|
21
|
+
export * from './types/ButtonTypes';
|
|
22
|
+
export * from './types/InputTypes';
|
|
23
|
+
export * from './types/PlatformTypes';
|
|
24
|
+
export * from './types/SizeTypes';
|
|
25
|
+
export * from './types/VariantTypes';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PlatformTypes } from "../types/PlatformTypes.tsx";
|
|
2
|
+
export interface LionUIState {
|
|
3
|
+
platform: PlatformTypes;
|
|
4
|
+
loading: boolean;
|
|
5
|
+
reload: boolean;
|
|
6
|
+
booting: boolean;
|
|
7
|
+
sidebar: boolean;
|
|
8
|
+
version: string | null;
|
|
9
|
+
modal?: string | null;
|
|
10
|
+
logo: File | string | null;
|
|
11
|
+
background: File | string | null;
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const AndroidStyleTypes: {
|
|
2
|
+
readonly FILLED: "filled";
|
|
3
|
+
readonly ELEVATED: "elevated";
|
|
4
|
+
readonly TONAL: "tonal";
|
|
5
|
+
readonly OUTLINED: "outlined";
|
|
6
|
+
readonly TEXT: "text";
|
|
7
|
+
};
|
|
8
|
+
export type AndroidStyleTypes = (typeof AndroidStyleTypes)[keyof typeof AndroidStyleTypes];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const IOSInputStyleTypes: {
|
|
2
|
+
readonly FORM: "form";
|
|
3
|
+
readonly ROUNDED_BORDER: "rounded-border";
|
|
4
|
+
readonly FILLED: "filled";
|
|
5
|
+
readonly OUTLINED: "outlined";
|
|
6
|
+
readonly PLAIN: "plain";
|
|
7
|
+
};
|
|
8
|
+
export type IOSInputStyleTypes = (typeof IOSInputStyleTypes)[keyof typeof IOSInputStyleTypes];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const InputTypes: {
|
|
2
|
+
readonly TEXT: "text";
|
|
3
|
+
readonly PASSWORD: "password";
|
|
4
|
+
readonly EMAIL: "email";
|
|
5
|
+
readonly NUMBER: "number";
|
|
6
|
+
readonly TEL: "tel";
|
|
7
|
+
readonly URL: "url";
|
|
8
|
+
readonly DATE: "date";
|
|
9
|
+
readonly DATETIME: "datetime";
|
|
10
|
+
};
|
|
11
|
+
export type InputTypes = (typeof InputTypes)[keyof typeof InputTypes];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const VariantTypes: {
|
|
2
|
+
readonly SECONDARY: "secondary";
|
|
3
|
+
readonly PRIMARY: "primary";
|
|
4
|
+
readonly SUCCESS: "success";
|
|
5
|
+
readonly DANGER: "danger";
|
|
6
|
+
readonly WARNING: "warning";
|
|
7
|
+
readonly INFO: "info";
|
|
8
|
+
readonly LIGHT: "light";
|
|
9
|
+
readonly LINK: "link";
|
|
10
|
+
readonly DARK: "dark";
|
|
11
|
+
readonly MODAL: "modal";
|
|
12
|
+
readonly LION_PACKAGES: "lion-packages";
|
|
13
|
+
readonly LION_PARKING: "lion-parking";
|
|
14
|
+
readonly LION_TECH: "lion-tech";
|
|
15
|
+
readonly LION_GLAM: "lion-glam";
|
|
16
|
+
};
|
|
17
|
+
export type VariantTypes = (typeof VariantTypes)[keyof typeof VariantTypes];
|