rds-ui-system 2.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) [2023] [Ignacio Andrés Miranda Figueroa]
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,34 @@
1
+ # Remondis UI Library
2
+
3
+ ## Preview on vercel
4
+ https://rds-ui-system-react.vercel.app/
5
+
6
+ ## Features
7
+
8
+ - [React 18](https://reactjs.org/)
9
+ - [Storybook 7](https://storybook.js.org/) - Components preview
10
+ - [Tailwind CSS 3](https://tailwindcss.com/)
11
+ - [Vite](https://vitejs.dev/) - Run and build the project blazingly fast!
12
+ - [Vitest](https://vitest.dev/) - Components Unit Testing
13
+ - [ESLint](https://eslint.org/) & [Prettier](https://prettier.io/) - Formatting and Linting
14
+ - [Typescript](https://www.typescriptlang.org/)
15
+ - [Husky](https://typicode.github.io/husky) & [Lint Staged](https://www.npmjs.com/package/lint-staged) - Pre-commit Hooks
16
+ - [Release Please](https://github.com/googleapis/release-please) — Generate the changelog with the release-please workflow
17
+ - [Github Actions](https://github.com/features/actions) — Releasing versions to NPM
18
+
19
+ ## Getting Started
20
+
21
+ 1. Install dependencies with `pnpm i` (first run `corepack enable` to enable pnpm)
22
+ 2. Run `pnpm prepare` command to setup [Husky](https://typicode.github.io/husky) pre-commit hooks.
23
+
24
+ ### Main Scripts
25
+
26
+ Always prepending pnpm:
27
+
28
+ - `dev`: Bootstrap the Storybook preview with Hot Reload.
29
+ - `build`: Builds the static storybook project.
30
+ - `build:lib`: Builds the component library into the **dist** folder.
31
+ - `lint:fix`: Applies linting based on the rules defined in **.eslintrc.js**.
32
+ - `format:prettier`: Formats files using the prettier rules defined in **.prettierrc**.
33
+ - `test`: Runs testing using watch mode.
34
+ - `test:cov`: Runs testing displaying a coverage report.
@@ -0,0 +1 @@
1
+ export * from './lib/index'
@@ -0,0 +1,14 @@
1
+ import { ButtonHTMLAttributes, ReactNode } from 'react';
2
+ export declare const BOX_VARIANT: {
3
+ readonly PRIMARY: "primary";
4
+ readonly SECONDARY: "secondary";
5
+ readonly TERTIARY: "tertiary";
6
+ };
7
+ export type BoxVariant = keyof typeof BOX_VARIANT;
8
+ export declare const boxVariant: Record<BoxVariant, string>;
9
+ export interface BoxProps extends ButtonHTMLAttributes<HTMLButtonElement> {
10
+ children?: ReactNode;
11
+ variant?: BoxVariant;
12
+ isDisabled?: boolean;
13
+ }
14
+ export declare const Box: ({ variant, isDisabled, children }: BoxProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { ButtonHTMLAttributes, MouseEventHandler, ReactNode } from 'react';
2
+ export declare const BUTTON_VARIANT: {
3
+ readonly PRIMARY: "primary";
4
+ readonly SECONDARY: "outlined";
5
+ readonly TERTIARY: "tertiary";
6
+ readonly ICON: "icon";
7
+ };
8
+ export type ButtonVariant = keyof typeof BUTTON_VARIANT;
9
+ export declare const buttonVariant: Record<ButtonVariant, string>;
10
+ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
11
+ label?: string;
12
+ variant?: ButtonVariant;
13
+ isDisabled?: boolean;
14
+ onClick?: MouseEventHandler<HTMLButtonElement>;
15
+ children?: ReactNode;
16
+ type: 'button' | 'reset' | 'submit' | undefined;
17
+ customClasses?: string;
18
+ }
19
+ export declare const Button: ({ label, variant, isDisabled, onClick, children, type, customClasses, }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { InputHTMLAttributes, ChangeEventHandler } from 'react';
2
+ export declare const CHECKBOX_VARIANT: {
3
+ readonly PRIMARY: "primary";
4
+ readonly SECONDARY: "secondary";
5
+ readonly TERTIARY: "tertiary";
6
+ };
7
+ export type CheckboxVariant = keyof typeof CHECKBOX_VARIANT;
8
+ export declare const checkboxVariant: Record<CheckboxVariant, string>;
9
+ export interface CheckboxProps extends InputHTMLAttributes<HTMLInputElement> {
10
+ label?: string;
11
+ placeholder?: string;
12
+ variant?: CheckboxVariant;
13
+ isDisabled?: boolean;
14
+ checked?: boolean;
15
+ onChange?: ChangeEventHandler<HTMLInputElement>;
16
+ id: string;
17
+ readOnly?: boolean;
18
+ }
19
+ export declare const Checkbox: ({ placeholder, label, variant, isDisabled, onChange, checked, id, readOnly, }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { ButtonHTMLAttributes, MouseEventHandler } from 'react';
2
+ export declare const FILTERCHIP_VARIANT: {
3
+ readonly PRIMARY: "primary";
4
+ readonly SECONDARY: "secondary";
5
+ readonly TERTIARY: "tertiary";
6
+ };
7
+ export type FilterChipVariant = keyof typeof FILTERCHIP_VARIANT;
8
+ export declare const filterChipVariant: Record<FilterChipVariant, string>;
9
+ export interface FilterChipProps extends ButtonHTMLAttributes<HTMLButtonElement> {
10
+ label: string;
11
+ variant?: FilterChipVariant;
12
+ isDisabled?: boolean;
13
+ onClick?: MouseEventHandler<HTMLButtonElement>;
14
+ }
15
+ export declare const FilterChip: ({ label, variant, isDisabled, onClick }: FilterChipProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,24 @@
1
+ import { FormHTMLAttributes, ReactNode, MouseEventHandler } from 'react';
2
+ export declare const FORM_VARIANT: {
3
+ readonly PRIMARY: "primary";
4
+ readonly SECONDARY: "secondary";
5
+ readonly TERTIARY: "tertiary";
6
+ };
7
+ export type FormVariant = keyof typeof FORM_VARIANT;
8
+ export declare const FormVariant: Record<FormVariant, string>;
9
+ export interface FormProps extends FormHTMLAttributes<HTMLFormElement> {
10
+ children?: ReactNode;
11
+ variant?: FormVariant;
12
+ isDisabled?: boolean;
13
+ blur?: boolean;
14
+ onSubmit?: any;
15
+ }
16
+ interface ButtonProps {
17
+ variant?: FormVariant;
18
+ onClickClose?: MouseEventHandler<HTMLButtonElement>;
19
+ onClickCancel?: MouseEventHandler<HTMLButtonElement>;
20
+ onClickSave?: MouseEventHandler<HTMLButtonElement>;
21
+ type?: 'button' | 'submit' | 'reset';
22
+ }
23
+ export declare const Form: ({ variant, isDisabled, children, onSubmit }: FormProps, { onClickClose, onClickCancel, onClickSave }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
24
+ export {};
@@ -0,0 +1,17 @@
1
+ import { ButtonHTMLAttributes, ReactNode } from 'react';
2
+ export declare const HEADING_VARIANT: {
3
+ readonly h1: "h1";
4
+ readonly h2: "h2";
5
+ readonly h3: "h3";
6
+ };
7
+ export type HeadingVariant = keyof typeof HEADING_VARIANT;
8
+ export declare const headingVariant: Record<HeadingVariant, string>;
9
+ export interface HeadingProps extends ButtonHTMLAttributes<HTMLButtonElement> {
10
+ label?: string;
11
+ text?: string;
12
+ children?: ReactNode;
13
+ variant?: HeadingVariant;
14
+ isDisabled?: boolean;
15
+ bold?: boolean;
16
+ }
17
+ export declare const Heading: ({ variant, isDisabled, text, children, bold, label }: HeadingProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,20 @@
1
+ import { InputHTMLAttributes } from 'react';
2
+ export declare const INPUT_VARIANT: {
3
+ readonly PRIMARY: "primary";
4
+ readonly SECONDARY: "secondary";
5
+ readonly TERTIARY: "tertiary";
6
+ };
7
+ export type InputVariant = keyof typeof INPUT_VARIANT;
8
+ export declare const inputVariant: Record<InputVariant, string>;
9
+ export interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
10
+ label?: string;
11
+ placeholder?: string;
12
+ variant?: InputVariant;
13
+ isDisabled?: boolean;
14
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
15
+ value?: string | number | string[];
16
+ name?: string;
17
+ type?: string;
18
+ supportingText?: string | boolean;
19
+ }
20
+ export declare const Input: ({ placeholder, label, variant, isDisabled, onChange, value, name, type, supportingText, }: InputProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { HTMLProps } from 'react';
2
+ export declare const LINK_VARIANT: {
3
+ readonly PRIMARY: "primary";
4
+ readonly SECONDARY: "secondary";
5
+ readonly TERTIARY: "tertiary";
6
+ };
7
+ export type LinkVariant = keyof typeof LINK_VARIANT;
8
+ export declare const linkVariant: Record<LinkVariant, string>;
9
+ export interface LinkProps extends HTMLProps<HTMLAnchorElement> {
10
+ label?: string;
11
+ variant?: LinkVariant;
12
+ isDisabled?: boolean;
13
+ src?: string;
14
+ }
15
+ export declare const Link: ({ label, variant, isDisabled, src }: LinkProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { ButtonHTMLAttributes, ReactNode } from 'react';
2
+ export declare const MODAL_VARIANT: {
3
+ readonly PRIMARY: "primary";
4
+ readonly SECONDARY: "secondary";
5
+ readonly TERTIARY: "tertiary";
6
+ };
7
+ export type ModalVariant = keyof typeof MODAL_VARIANT;
8
+ export declare const ModalVariant: Record<ModalVariant, string>;
9
+ export interface ModalProps extends ButtonHTMLAttributes<HTMLButtonElement> {
10
+ children?: ReactNode;
11
+ variant?: ModalVariant;
12
+ isDisabled?: boolean;
13
+ wide?: boolean;
14
+ onClick?: () => void;
15
+ }
16
+ export declare const Modal: ({ variant, isDisabled, children, wide, onClick }: ModalProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { InputHTMLAttributes, ChangeEventHandler } from 'react';
2
+ export declare const RADIO_VARIANT: {
3
+ readonly PRIMARY: "primary";
4
+ readonly SECONDARY: "secondary";
5
+ readonly TERTIARY: "tertiary";
6
+ };
7
+ export type RadioVariant = keyof typeof RADIO_VARIANT;
8
+ export declare const radioVariant: Record<RadioVariant, string>;
9
+ export interface RadioProps extends InputHTMLAttributes<HTMLInputElement> {
10
+ label?: string;
11
+ placeholder?: string;
12
+ variant?: RadioVariant;
13
+ isDisabled?: boolean;
14
+ onChange?: ChangeEventHandler<HTMLInputElement>;
15
+ }
16
+ export declare const Radio: ({ placeholder, label, variant, isDisabled, onChange }: RadioProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { SelectHTMLAttributes } from 'react';
2
+ export declare const SELECT_VARIANT: {
3
+ readonly PRIMARY: "primary";
4
+ readonly SECONDARY: "secondary";
5
+ readonly TERTIARY: "tertiary";
6
+ };
7
+ export type SelectVariant = keyof typeof SELECT_VARIANT;
8
+ export declare const selectVariant: Record<SelectVariant, string>;
9
+ export interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
10
+ label?: string;
11
+ variant?: SelectVariant;
12
+ isDisabled?: boolean;
13
+ onClick?: () => void;
14
+ data?: string[];
15
+ prepopulatedId?: any;
16
+ objectData?: any;
17
+ getSelectedOptions?: any;
18
+ }
19
+ export declare const Select: ({ label, variant, isDisabled, onClick, data, prepopulatedId, objectData, getSelectedOptions, }: SelectProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export declare const TEXT_VARIANT: {
3
+ readonly PRIMARY: "primary";
4
+ readonly SECONDARY: "secondary";
5
+ readonly TERTIARY: "tertiary";
6
+ };
7
+ export type TextVariant = keyof typeof TEXT_VARIANT;
8
+ export declare const textVariant: Record<TextVariant, string>;
9
+ export interface TextProps extends HTMLAttributes<HTMLParagraphElement> {
10
+ text?: string;
11
+ children?: ReactNode;
12
+ variant?: TextVariant;
13
+ isDisabled?: boolean;
14
+ bold?: boolean;
15
+ key?: any;
16
+ onClick?: () => void;
17
+ }
18
+ export declare const Text: ({ variant, isDisabled, text, children, bold, key, onClick }: TextProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { TextareaHTMLAttributes, ReactNode } from 'react';
2
+ export declare const TEXTAREA_VARIANT: {
3
+ readonly PRIMARY: "primary";
4
+ readonly SECONDARY: "secondary";
5
+ readonly TERTIARY: "tertiary";
6
+ };
7
+ export type Textarea = keyof typeof TEXTAREA_VARIANT;
8
+ export declare const textarea: Record<Textarea, string>;
9
+ export interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement | HTMLLabelElement> {
10
+ value?: string;
11
+ label?: string;
12
+ placeholder?: string;
13
+ variant?: Textarea;
14
+ isDisabled?: boolean;
15
+ children?: ReactNode;
16
+ defaultValue?: string;
17
+ onChange?: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;
18
+ }
19
+ export declare const Textarea: ({ value, placeholder, label, variant, isDisabled, children, defaultValue, onChange, }: TextareaProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ export * from './Button/Button';
2
+ export * from './Input/Input';
3
+ export * from './Checkbox/Checkbox';
4
+ export * from './FilterChip/FilterChip';
5
+ export * from './Link/Link';
6
+ export * from './Radio/Radio';
7
+ export * from './Select/Select';
8
+ export * from './Text/Text';
9
+ export * from './Textarea/Textarea';
10
+ export * from './Box/Box';
11
+ export * from './Modal/Modal';
12
+ export * from './Form/Form';
13
+ export * from './Heading/Heading';
@@ -0,0 +1,3 @@
1
+ export * from './atoms';
2
+ export * from './molecules';
3
+ export * from './organisms';
@@ -0,0 +1 @@
1
+ export * from './ml-banner';
@@ -0,0 +1 @@
1
+ export declare const MlBanner: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './or-footer';
@@ -0,0 +1 @@
1
+ export declare const OrFooter: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './components';