@coderan/components-react 0.1.1

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.
@@ -0,0 +1,7 @@
1
+ import { FC, HTMLAttributes, PropsWithChildren } from 'react';
2
+ import { ValueOf } from '../../utilities/types';
3
+ import { BadgeColor } from './BadgeColor';
4
+ export interface BadgeProps extends HTMLAttributes<HTMLDivElement> {
5
+ color?: ValueOf<typeof BadgeColor>;
6
+ }
7
+ export declare const Badge: FC<PropsWithChildren<BadgeProps>>;
@@ -0,0 +1,3 @@
1
+ import { Color } from '../../utilities/Color';
2
+ import { Variant } from '../../utilities/Variant';
3
+ export declare const BadgeColor: typeof Color & Partial<typeof Variant>;
@@ -0,0 +1,2 @@
1
+ export * from './Badge';
2
+ export * from './BadgeColor';
@@ -0,0 +1,10 @@
1
+ import { FC, PropsWithChildren, ReactNode } from 'react';
2
+ import { ButtonColor } from './ButtonColor';
3
+ import { ValueOf } from '../../utilities/types';
4
+ export type ButtonProps = {
5
+ color: ValueOf<typeof ButtonColor>;
6
+ loading?: boolean;
7
+ iconStart?: ReactNode;
8
+ iconEnd?: ReactNode;
9
+ };
10
+ export declare const Button: FC<PropsWithChildren<ButtonProps>>;
@@ -0,0 +1,2 @@
1
+ import { Variant } from '../../utilities/Variant';
2
+ export declare const ButtonColor: typeof Variant;
@@ -0,0 +1,2 @@
1
+ export * from './Button';
2
+ export * from './ButtonColor';
@@ -0,0 +1,10 @@
1
+ import { FC, HTMLAttributes, PropsWithChildren } from 'react';
2
+ import { CardHeader } from './CardHeader';
3
+ import { CardContent } from './CardContent';
4
+ export interface CardProps extends HTMLAttributes<HTMLDivElement> {
5
+ }
6
+ export interface StaticCardComponents {
7
+ Header: typeof CardHeader;
8
+ Content: typeof CardContent;
9
+ }
10
+ export declare const Card: FC<PropsWithChildren<CardProps>> & StaticCardComponents;
@@ -0,0 +1,4 @@
1
+ import { FC, HTMLAttributes, PropsWithChildren } from 'react';
2
+ export interface CardContentProps extends HTMLAttributes<HTMLDivElement> {
3
+ }
4
+ export declare const CardContent: FC<PropsWithChildren<CardContentProps>>;
@@ -0,0 +1,6 @@
1
+ import { FC, HTMLAttributes, PropsWithChildren, ReactNode } from 'react';
2
+ export interface CardHeaderProps extends HTMLAttributes<HTMLDivElement> {
3
+ subTitle?: string;
4
+ actions?: ReactNode;
5
+ }
6
+ export declare const CardHeader: FC<PropsWithChildren<CardHeaderProps>>;
@@ -0,0 +1 @@
1
+ export * from './Card';
@@ -0,0 +1,11 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ import { ClassValue } from 'clsx';
3
+ import { FieldProps } from './FieldProps';
4
+ export interface FormContainerProps extends FieldProps {
5
+ inputId: string;
6
+ hasValue?: boolean;
7
+ className?: ClassValue;
8
+ controlWrapperClassName?: ClassValue;
9
+ labelAlwaysLikeFocus?: boolean;
10
+ }
11
+ export declare const Field: FC<PropsWithChildren<FormContainerProps>>;
@@ -0,0 +1,32 @@
1
+ import { ReactNode } from 'react';
2
+ export interface FieldProps {
3
+ /**
4
+ * Label describing the field. This label comes in two flavors:
5
+ * - Floating label (default): the label is displayed above the field when it is focused or has a value.
6
+ * When the field is empty and not focused, the label is displayed inside the field as a placeholder.
7
+ * - Non-floating label: the label is displayed above the field at all times.
8
+ */
9
+ label?: string;
10
+ /**
11
+ * Whether the label should float above the field when focused or has a value.
12
+ * If false, the label will always be displayed above the field.
13
+ */
14
+ floatingLabel?: boolean;
15
+ /**
16
+ * Placeholder that is displayed inside the field when it is empty and not focused.
17
+ * When the field has a floating label, this placeholder is shown when the label is focussed.
18
+ */
19
+ placeholder?: string;
20
+ /**
21
+ * Icon to display at the start of the field, typically used for visual cues or branding.
22
+ */
23
+ iconStart?: ReactNode;
24
+ /**
25
+ * Icon to display at the end of the field, typically used for actions like clearing the field or showing additional options.
26
+ */
27
+ iconEnd?: ReactNode;
28
+ /**
29
+ * Indicates whether the field has an error.
30
+ */
31
+ hasError?: boolean;
32
+ }
@@ -0,0 +1,7 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ import { ClassValue } from 'clsx';
3
+ import { GroupProps } from './GroupProps';
4
+ export interface FormContainerProps extends GroupProps {
5
+ className?: ClassValue;
6
+ }
7
+ export declare const Group: FC<PropsWithChildren<FormContainerProps>>;
@@ -0,0 +1,11 @@
1
+ export interface GroupProps {
2
+ /**
3
+ * Error message(s) to display below the field. Default theme styles these as red text.
4
+ */
5
+ errors?: string | string[];
6
+ /**
7
+ * Additional hint text to display below the field, typically used for additional instructions or information.
8
+ * Default theme styles these as gray text.
9
+ */
10
+ hint?: string;
11
+ }
@@ -0,0 +1,10 @@
1
+ import { FC, InputHTMLAttributes } from 'react';
2
+ import { FieldProps } from './FieldProps';
3
+ import { GroupProps } from './GroupProps';
4
+ import { ClassValue } from 'clsx';
5
+ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'>, FieldProps, GroupProps {
6
+ groupClassName?: ClassValue;
7
+ fieldClasName?: ClassValue;
8
+ onChange?: (value: string) => void;
9
+ }
10
+ export declare const Input: FC<InputProps>;
@@ -0,0 +1,8 @@
1
+ import { FC, PropsWithChildren, SelectHTMLAttributes } from 'react';
2
+ import { FieldProps } from './FieldProps';
3
+ import { GroupProps } from './GroupProps';
4
+ import { ClassValue } from 'clsx';
5
+ export interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement>, FieldProps, GroupProps {
6
+ groupClassName?: ClassValue;
7
+ }
8
+ export declare const Select: FC<PropsWithChildren<SelectProps>>;
@@ -0,0 +1,8 @@
1
+ import { FC, PropsWithChildren, SelectHTMLAttributes } from 'react';
2
+ import { FieldProps } from './FieldProps';
3
+ import { GroupProps } from './GroupProps';
4
+ import { ClassValue } from 'clsx';
5
+ export interface TextAreaProps extends SelectHTMLAttributes<HTMLSelectElement>, FieldProps, GroupProps {
6
+ groupClassName?: ClassValue;
7
+ }
8
+ export declare const TextArea: FC<PropsWithChildren<TextAreaProps>>;
@@ -0,0 +1,3 @@
1
+ export * from './Input';
2
+ export * from './Select';
3
+ export * from './TextArea';
@@ -0,0 +1,4 @@
1
+ export * from './Button';
2
+ export * from './Form';
3
+ export * from './Badge';
4
+ export * from './Card';
package/dist/index.css ADDED
@@ -0,0 +1 @@
1
+ @keyframes _loading_1734o_1{0%{left:0;width:0}50%{left:0;width:100%}to{left:100%;width:0}}:root{--cui-button-font-weight: 500;--cui-button-primary-background-color: var(--cui-primary-color);--cui-button-primary-background-color-hover: hsl(from var(--cui-primary-color) h s calc(l*.9) );--cui-button-primary-background-color-active: hsl(from var(--cui-primary-color) h s calc(l*.8) );--cui-button-primary-background-color-loading: hsl(from var(--cui-primary-color) h s l / .2);--cui-button-primary-text-color: #fff;--cui-button-primary-text-color-loading: hsl(from var(--cui-primary-color) h s l / .9);--cui-button-primary-loading-bar-background-color: var(--cui-button-primary-background-color);--cui-button-secondary-background-color: rgba(0, 0, 0, .1);--cui-button-secondary-background-color-hover: rgba(0, 0, 0, .2);--cui-button-secondary-background-color-active: rgba(0, 0, 0, .3);--cui-button-secondary-text-color: var(--cui-color-gray-900);--cui-button-secondary-background-color-loading: transparent;--cui-button-secondary-text-color-loading: var(--cui-button-secondary-background-color-active);--cui-button-secondary-loading-bar-background-color: var(--cui-color-gray-900);--cui-button-danger-background-color: hsl(from var(--cui-danger-color) h s l / .1);--cui-button-danger-background-color-hover: hsl(from var(--cui-danger-color) h s l / .2);--cui-button-danger-background-color-active: hsl(from var(--cui-danger-color) h s l / .3);--cui-button-danger-text-color: hsl(from var(--cui-danger-color) h s calc(l/2) );--cui-button-danger-background-color-loading: hsl(from var(--cui-danger-color) h s l / .1);--cui-button-danger-text-color-loading: #fff;--cui-button-danger-loading-bar-background-color: var(--cui-danger-color);--cui-button-success-background-color: hsl(from var(--cui-success-color) h s l / .1);--cui-button-success-background-color-hover: hsl(from var(--cui-success-color) h s l / .2);--cui-button-success-background-color-active: hsl(from var(--cui-success-color) h s l / .3);--cui-button-success-text-color: var(--cui-success-color);--cui-button-success-background-color-loading: hsl(from var(--cui-success-color) h s l / .1);--cui-button-success-text-color-loading: #fff;--cui-button-success-loading-bar-background-color: var(--cui-success-color)}@media(prefers-color-scheme:dark){:root{--cui-button-secondary-background-color: rgba(255, 255, 255, .1);--cui-button-secondary-background-color-hover: rgba(255, 255, 255, .2);--cui-button-secondary-background-color-active: rgba(255, 255, 255, .3);--cui-button-secondary-text-color: #fff;--cui-button-secondary-background-color-loading: transparent;--cui-button-secondary-text-color-loading: var(--cui-button-secondary-background-color-active);--cui-button-secondary-loading-bar-background-color: #fff;--cui-button-danger-background-color: hsl(from var(--cui-danger-color) h s l / .1);--cui-button-danger-background-color-hover: hsl(from var(--cui-danger-color) h s l / .2);--cui-button-danger-background-color-active: hsl(from var(--cui-danger-color) h s l / .3);--cui-button-danger-text-color: var(--cui-danger-color);--cui-button-danger-background-color-loading: hsl(from var(--cui-danger-color) h s l / .1);--cui-button-danger-text-color-loading: var(--cui-color-gray-900);--cui-button-success-background-color: hsl(from var(--cui-success-color) h s l / .1);--cui-button-success-background-color-hover: hsl(from var(--cui-success-color) h s l / .2);--cui-button-success-background-color-active: hsl(from var(--cui-success-color) h s l / .3);--cui-button-success-text-color: var(--cui-success-color);--cui-button-success-background-color-loading: hsl(from var(--cui-success-color) h s l / .1);--cui-button-success-text-color-loading: var(--cui-color-gray-900)}}._cuiButton_1734o_65{padding:.9rem;font-size:.9rem;line-height:1.5;border-radius:var(--cui-default-border-radius);font-weight:var(--cui-button-font-weight);cursor:pointer;position:relative;border:none;display:inline-flex;align-items:center;box-sizing:border-box}._cuiButton_1734o_65 ._cuiButtonText_1734o_78{white-space:nowrap}._cuiButton_1734o_65._cuiButton--loading_1734o_82{cursor:wait}._cuiButton_1734o_65._cuiButton--loading_1734o_82:after{animation:_loading_1734o_1 1s infinite;border-radius:var(--cui-default-border-radius);content:"";height:5px;left:0;position:absolute;top:0;width:100%}._cuiButton_1734o_65._cuiButton--primary_1734o_97{background-color:var(--cui-button-primary-background-color);color:var(--cui-button-primary-text-color)}._cuiButton_1734o_65._cuiButton--primary_1734o_97:hover{background:var(--cui-button-primary-background-color-hover)}._cuiButton_1734o_65._cuiButton--primary_1734o_97:active{background:var(--cui-button-primary-background-color-active)}._cuiButton_1734o_65._cuiButton--primary_1734o_97._cuiButton--loading_1734o_82{background:var(--cui-button-primary-background-color-loading);color:var(--cui-button-primary-text-color-loading)}._cuiButton_1734o_65._cuiButton--primary_1734o_97._cuiButton--loading_1734o_82:after{background:var(--cui-button-primary-loading-bar-background-color)}._cuiButton_1734o_65._cuiButton--secondary_1734o_119{background:var(--cui-button-secondary-background-color);color:var(--cui-button-secondary-text-color)}._cuiButton_1734o_65._cuiButton--secondary_1734o_119:hover{background:var(--cui-button-secondary-background-color-hover)}._cuiButton_1734o_65._cuiButton--secondary_1734o_119:active{background:var(--cui-button-secondary-background-color-active)}._cuiButton_1734o_65._cuiButton--secondary_1734o_119._cuiButton--loading_1734o_82{background:var(--cui-button-secondary-background-color-loading);color:var(--cui-button-secondary-text-color-loading)}._cuiButton_1734o_65._cuiButton--secondary_1734o_119._cuiButton--loading_1734o_82:after{background:var(--cui-button-secondary-loading-bar-background-color)}._cuiButton_1734o_65._cuiButton--success_1734o_141{background:var(--cui-button-success-background-color);color:var(--cui-button-success-text-color)}._cuiButton_1734o_65._cuiButton--success_1734o_141:hover{background:var(--cui-button-success-background-color-hover)}._cuiButton_1734o_65._cuiButton--success_1734o_141:active{background:var(--cui-button-success-background-color-active)}._cuiButton_1734o_65._cuiButton--success_1734o_141._cuiButton--loading_1734o_82{background:var(--cui-button-success-background-color-loading);color:var(--cui-button-success-text-color-loading)}._cuiButton_1734o_65._cuiButton--success_1734o_141._cuiButton--loading_1734o_82:after{background:var(--cui-button-success-loading-bar-background-color)}._cuiButton_1734o_65._cuiButton--danger_1734o_163{background:var(--cui-button-danger-background-color);color:var(--cui-button-danger-text-color)}._cuiButton_1734o_65._cuiButton--danger_1734o_163:hover{background:var(--cui-button-danger-background-color-hover)}._cuiButton_1734o_65._cuiButton--danger_1734o_163:active{background:var(--cui-button-danger-background-color-active)}._cuiButton_1734o_65._cuiButton--danger_1734o_163._cuiButton--loading_1734o_82{background:var(--cui-button-danger-background-color-loading);color:var(--cui-button-danger-text-color-loading)}._cuiButton_1734o_65._cuiButton--danger_1734o_163._cuiButton--loading_1734o_82:after{background:var(--cui-button-danger-loading-bar-background-color)}._cuiButton_1734o_65 ._cuiButtonIcon_1734o_185{font-style:normal}._cuiButton_1734o_65 ._cuiButtonIcon_1734o_185._cuiButtonIcon--start_1734o_188{margin-right:.5rem}._cuiButton_1734o_65 ._cuiButtonIcon_1734o_185._cuiButtonIcon--end_1734o_192{margin-left:.5rem}._cuiButton_1734o_65._cuiButton--loading_1734o_82 ._cuiButtonIcon--start_1734o_188,._cuiButton_1734o_65._cuiButton--loading_1734o_82 ._cuiButtonIcon--end_1734o_192{opacity:.5}:root{--cui-form-input-border-color: var(--cui-color-gray-300);--cui-form-input-border-color-focus: var(--cui-primary-color);--cui-form-input-label-text-color: var(--cui-color-gray-700);--cui-form-input-label-text-color-focus: var(--cui-primary-color);--cui-form-input-background-color: var(--cui-background-color);--cui-form-hint-text-color: var(--cui-color-gray-500);--cui-form-error-text-color: var(--cui-danger-color)}@media(prefers-color-scheme:dark){:root{--cui-form-input-border-color: var(--cui-color-gray-700);--cui-form-input-label-text-color: var(--cui-color-gray-500)}}._cuiFormGroup_1jun3_20{display:flex;flex-direction:column}._cuiFormField_1jun3_25{display:flex;box-shadow:inset 0 0 0 1px var(--cui-form-input-border-color);border-radius:var(--cui-default-border-radius);position:relative;background-color:var(--cui-form-input-background-color)}._cuiFormField_1jun3_25:focus-within{box-shadow:inset 0 0 0 1px var(--cui-form-input-border-color-focus);border-width:1px}._cuiFormField_1jun3_25:focus-within ._cuiFormLabel_1jun3_36{color:var(--cui-form-input-label-text-color-focus)}:is(._cuiFormField_1jun3_25:focus-within,._cuiFormField_1jun3_25._cuiFormField--filled_1jun3_41) ._cuiFormLabel_1jun3_36{margin-left:-.25rem;transform:scale(.8) translateY(-.9rem)}:is(._cuiFormField_1jun3_25:focus-within,._cuiFormField_1jun3_25._cuiFormField--filled_1jun3_41) ._cuiFormControl_1jun3_47{padding:1.4rem .9rem .4rem}:is(._cuiFormField_1jun3_25:focus-within,._cuiFormField_1jun3_25._cuiFormField--filled_1jun3_41) ._cuiTextareaWrapper_1jun3_51 ._cuiFormLabel_1jun3_36{margin-left:-.5rem}._cuiFormField_1jun3_25._cuiFormField--error_1jun3_58{box-shadow:inset 0 0 0 1px var(--cui-danger-color)}._cuiFormField_1jun3_25._cuiFormField--error_1jun3_58 ._cuiFormLabel_1jun3_36{color:var(--cui-danger-color)}._cuiFormField_1jun3_25._cuiFormField--error_1jun3_58 ._cuiFormError_1jun3_65{display:block}._cuiFormControlWrapper_1jun3_71{position:relative}._cuiFormControl_1jun3_47{font-family:var(--cui-font-family),sans-serif;padding:.9rem;font-size:.9rem;line-height:1.5;border:none;border-radius:var(--cui-default-border-radius);outline:none;min-width:180px;background:transparent;color:var(--cui-text-color)}._cuiFormControl_1jun3_47:focus{padding:calc(.9rem - 1px)}._cuiFormInput_1jun3_92:not(:focus)::placeholder{color:transparent}._cuiSelectWrapper_1jun3_98 ._cuiFormSelect_1jun3_99{appearance:none}._cuiSelectWrapper_1jun3_98:after{content:"";background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48IS0tIUZvbnQgQXdlc29tZSBGcmVlIDYuNy4yIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlL2ZyZWUgQ29weXJpZ2h0IDIwMjUgRm9udGljb25zLCBJbmMuLS0+PHBhdGggZD0iTTIzMy40IDQwNi42YzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwbDE5Mi0xOTJjMTIuNS0xMi41IDEyLjUtMzIuOCAwLTQ1LjNzLTMyLjgtMTIuNS00NS4zIDBMMjU2IDMzOC43IDg2LjYgMTY5LjRjLTEyLjUtMTIuNS0zMi44LTEyLjUtNDUuMyAwcy0xMi41IDMyLjggMCA0NS4zbDE5MiAxOTJ6Ii8+PC9zdmc+);width:12px;height:12px;position:absolute;right:.9rem;top:50%;transform:translateY(-50%);pointer-events:none}@media(prefers-color-scheme:dark){._cuiSelectWrapper_1jun3_98:after{background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48IS0tIUZvbnQgQXdlc29tZSBGcmVlIDYuNy4yIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlL2ZyZWUgQ29weXJpZ2h0IDIwMjUgRm9udGljb25zLCBJbmMuLS0+PHBhdGggZD0iTTIzMy40IDQwNi42YzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwbDE5Mi0xOTJjMTIuNS0xMi41IDEyLjUtMzIuOCAwLTQ1LjNzLTMyLjgtMTIuNS00NS4zIDBMMjU2IDMzOC43IDg2LjYgMTY5LjRjLTEyLjUtMTIuNS0zMi44LTEyLjUtNDUuMyAwcy0xMi41IDMyLjggMCA0NS4zbDE5MiAxOTJ6IiBmaWxsPSIjZmZmIi8+PC9zdmc+)}}._cuiFormLabel_1jun3_36{font-family:var(--cui-font-family),sans-serif;font-size:.9rem;position:absolute;left:0;transition:all .1s;color:var(--cui-form-input-label-text-color);pointer-events:none;padding:.9rem;line-height:1.5}._cuiFormIcon--start_1jun3_136,._cuiFormIcon--end_1jun3_142{margin:0 .9rem;display:flex;align-items:center}._cuiFormHint_1jun3_148{font-size:.8rem;color:var(--cui-form-hint-text-color);margin-top:.2rem}._cuiFormError_1jun3_65{font-size:.8rem;color:var(--cui-form-error-text-color);margin-top:.2rem}:root{--cui-badge-border-radius: var(--cui-small-border-radius);--cui-badge-primary-text-color: var(--cui-primary-color);--cui-badge-primary-background-color: hsl(from var(--cui-badge-primary-text-color) h s l / .1);--cui-badge-danger-text-color: var(--cui-danger-color);--cui-badge-danger-background-color: hsl(from var(--cui-badge-danger-text-color) h s l / .1);--cui-badge-success-text-color: var(--cui-success-color);--cui-badge-success-background-color: hsl(from var(--cui-badge-success-text-color) h s l / .1);--cui-badge-red-text-color: var(--cui-color-red-700);--cui-badge-red-background-color: hsl(from var(--cui-badge-red-text-color) h s l / .1);--cui-badge-pink-text-color: var(--cui-color-pink-700);--cui-badge-pink-background-color: hsl(from var(--cui-badge-pink-text-color) h s l / .1);--cui-badge-purple-text-color: var(--cui-color-purple-700);--cui-badge-purple-background-color: hsl(from var(--cui-badge-purple-text-color) h s l / .1);--cui-badge-indigo-text-color: var(--cui-color-indigo-700);--cui-badge-indigo-background-color: hsl(from var(--cui-badge-indigo-text-color) h s l / .1);--cui-badge-blue-text-color: var(--cui-color-blue-700);--cui-badge-blue-background-color: hsl(from var(--cui-badge-blue-text-color) h s l / .1);--cui-badge-teal-text-color: var(--cui-color-teal-900);--cui-badge-teal-background-color: hsl(from var(--cui-badge-teal-text-color) h s l / .1);--cui-badge-green-text-color: var(--cui-color-green-800);--cui-badge-green-background-color: hsl(from var(--cui-badge-green-text-color) h s l / .1);--cui-badge-lime-text-color: var(--cui-color-lime-900);--cui-badge-lime-background-color: hsl(from var(--cui-badge-lime-text-color) h s l / .1);--cui-badge-yellow-text-color: var(--cui-color-yellow-700);--cui-badge-yellow-background-color: hsl(from var(--cui-badge-yellow-text-color) h s l / .1);--cui-badge-orange-text-color: var(--cui-color-orange-900);--cui-badge-orange-background-color: hsl(from var(--cui-badge-orange-text-color) h s l / .1);--cui-badge-brown-text-color: var(--cui-color-brown-700);--cui-badge-brown-background-color: hsl(from var(--cui-badge-brown-text-color) h s l / .1);--cui-badge-gray-text-color: var(--cui-color-gray-700);--cui-badge-gray-background-color: hsl(from var(--cui-badge-gray-text-color) h s l / .1);--cui-badge-blue-gray-text-color: var(--cui-color-blue-gray-700);--cui-badge-blue-gray-background-color: hsl(from var(--cui-badge-blue-gray-text-color) h s l / .1)}@media(prefers-color-scheme:dark){:root{--cui-badge-primary-text-color: var(--cui-primary-color);--cui-badge-primary-background-color: hsl(from var(--cui-primary-color) h s l / .1);--cui-badge-danger-text-color: var(--cui-danger-color);--cui-badge-danger-background-color: hsl(from var(--cui-danger-color) h s l / .1);--cui-badge-success-text-color: var(--cui-success-color);--cui-badge-success-background-color: hsl(from var(--cui-success-color) h s l / .1);--cui-badge-red-text-color: var(--cui-color-red-300);--cui-badge-red-background-color: hsl(from var(--cui-badge-red-text-color) h s l / .1);--cui-badge-pink-text-color: var(--cui-color-pink-300);--cui-badge-pink-background-color: hsl(from var(--cui-badge-pink-text-color) h s l / .1);--cui-badge-purple-text-color: var(--cui-color-purple-300);--cui-badge-purple-background-color: hsl(from var(--cui-badge-purple-text-color) h s l / .1);--cui-badge-indigo-text-color: var(--cui-color-indigo-300);--cui-badge-indigo-background-color: hsl(from var(--cui-badge-indigo-text-color) h s l / .1);--cui-badge-blue-text-color: var(--cui-color-blue-300);--cui-badge-blue-background-color: hsl(from var(--cui-badge-blue-text-color) h s l / .1);--cui-badge-teal-text-color: var(--cui-color-teal-300);--cui-badge-teal-background-color: hsl(from var(--cui-badge-teal-text-color) h s l / .1);--cui-badge-green-text-color: var(--cui-color-green-300);--cui-badge-green-background-color: hsl(from var(--cui-badge-green-text-color) h s l / .1);--cui-badge-lime-text-color: var(--cui-color-lime-300);--cui-badge-lime-background-color: hsl(from var(--cui-badge-lime-text-color) h s l / .1);--cui-badge-yellow-text-color: var(--cui-color-yellow-300);--cui-badge-yellow-background-color: hsl(from var(--cui-badge-yellow-text-color) h s l / .1);--cui-badge-orange-text-color: var(--cui-color-orange-300);--cui-badge-orange-background-color: hsl(from var(--cui-badge-orange-text-color) h s l / .1);--cui-badge-brown-text-color: var(--cui-color-brown-300);--cui-badge-brown-background-color: hsl(from var(--cui-badge-brown-text-color) h s l / .1);--cui-badge-gray-text-color: var(--cui-color-gray-300);--cui-badge-gray-background-color: hsl(from var(--cui-badge-gray-text-color) h s l / .1);--cui-badge-blue-gray-text-color: var(--cui-color-blue-gray-300);--cui-badge-blue-gray-background-color: hsl(from var(--cui-badge-blue-gray-text-color) h s l / .1)}}._cuiBadge_19wui_105{padding:.5rem;font-size:.75rem;border-radius:var(--cui-badge-border-radius)}._cuiBadge_19wui_105._cuiBadge--primary_19wui_110{color:var(--cui-badge-primary-text-color);background-color:var(--cui-badge-primary-background-color)}._cuiBadge_19wui_105._cuiBadge--danger_19wui_115{color:var(--cui-badge-danger-text-color);background-color:var(--cui-badge-danger-background-color)}._cuiBadge_19wui_105._cuiBadge--success_19wui_120{color:var(--cui-badge-success-text-color);background-color:var(--cui-badge-success-background-color)}._cuiBadge_19wui_105._cuiBadge--red_19wui_125{color:var(--cui-badge-red-text-color);background-color:var(--cui-badge-red-background-color)}._cuiBadge_19wui_105._cuiBadge--pink_19wui_130{color:var(--cui-badge-pink-text-color);background-color:var(--cui-badge-pink-background-color)}._cuiBadge_19wui_105._cuiBadge--purple_19wui_135{color:var(--cui-badge-purple-text-color);background-color:var(--cui-badge-purple-background-color)}._cuiBadge_19wui_105._cuiBadge--indigo_19wui_140{color:var(--cui-badge-indigo-text-color);background-color:var(--cui-badge-indigo-background-color)}._cuiBadge_19wui_105._cuiBadge--blue_19wui_145{color:var(--cui-badge-blue-text-color);background-color:var(--cui-badge-blue-background-color)}._cuiBadge_19wui_105._cuiBadge--teal_19wui_150{color:var(--cui-badge-teal-text-color);background-color:var(--cui-badge-teal-background-color)}._cuiBadge_19wui_105._cuiBadge--green_19wui_155{color:var(--cui-badge-green-text-color);background-color:var(--cui-badge-green-background-color)}._cuiBadge_19wui_105._cuiBadge--lime_19wui_160{color:var(--cui-badge-lime-text-color);background-color:var(--cui-badge-lime-background-color)}._cuiBadge_19wui_105._cuiBadge--yellow_19wui_165{color:var(--cui-badge-yellow-text-color);background-color:var(--cui-badge-yellow-background-color)}._cuiBadge_19wui_105._cuiBadge--orange_19wui_170{color:var(--cui-badge-orange-text-color);background-color:var(--cui-badge-orange-background-color)}._cuiBadge_19wui_105._cuiBadge--brown_19wui_175{color:var(--cui-badge-brown-text-color);background-color:var(--cui-badge-brown-background-color)}._cuiBadge_19wui_105._cuiBadge--gray_19wui_180{color:var(--cui-badge-gray-text-color);background-color:var(--cui-badge-gray-background-color)}._cuiBadge_19wui_105._cuiBadge--blueGray_19wui_185{color:var(--cui-badge-blue-gray-text-color);background-color:var(--cui-badge-blue-gray-background-color)}:root{--cui-card-background-color: #fff;--cui-card-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px 0 rgba(0, 0, 0, .06)}@media(prefers-color-scheme:dark){:root{--cui-card-background-color: var(--cui-color-gray-900)}}._cuiCard_1d5d3_12{display:block;background-color:var(--cui-card-background-color);border-radius:var(--cui-default-border-radius);box-shadow:var(--cui-card-box-shadow)}._cuiCardHeader_1d5d3_19{padding:1rem;display:flex;align-items:center}._cuiCardContent_1d5d3_25{padding:1rem}._cuiCardHeaderActions_1d5d3_29{margin-left:auto;padding-left:.5rem}
@@ -0,0 +1,2 @@
1
+ export * from './components';
2
+ export * from './utilities/Color';
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),C=require("react");function S(e){var u,r,c="";if(typeof e=="string"||typeof e=="number")c+=e;else if(typeof e=="object")if(Array.isArray(e)){var t=e.length;for(u=0;u<t;u++)e[u]&&(r=S(e[u]))&&(c&&(c+=" "),c+=r)}else for(r in e)e[r]&&(c&&(c+=" "),c+=r);return c}function n(){for(var e,u,r=0,c="",t=arguments.length;r<t;r++)(e=arguments[r])&&(u=S(e))&&(c&&(c+=" "),c+=u);return c}const R="_cuiButton_1734o_65",w="_loading_1734o_1",b="_cuiButtonText_1734o_78",v="_cuiButtonIcon_1734o_185",g={cuiButton:R,loading:w,cuiButtonText:b,"cuiButton--loading":"_cuiButton--loading_1734o_82","cuiButton--primary":"_cuiButton--primary_1734o_97","cuiButton--secondary":"_cuiButton--secondary_1734o_119","cuiButton--success":"_cuiButton--success_1734o_141","cuiButton--danger":"_cuiButton--danger_1734o_163",cuiButtonIcon:v,"cuiButtonIcon--start":"_cuiButtonIcon--start_1734o_188","cuiButtonIcon--end":"_cuiButtonIcon--end_1734o_192"},f=({children:e,loading:u,color:r,iconStart:c,iconEnd:t,...a})=>i.jsxs("button",{className:n(g.cuiButton,g[`cuiButton--${r}`],u&&g["cuiButton--loading"]),...a,children:[c&&i.jsx("i",{className:n(g.cuiButtonIcon,g["cuiButtonIcon--start"]),children:c}),i.jsx("span",{className:g.cuiButtonText,children:e}),t&&i.jsx("i",{className:n(g.cuiButtonIcon,g["cuiButtonIcon--end"]),children:t})]}),p={PRIMARY:"primary",SECONDARY:"secondary",SUCCESS:"success",DANGER:"danger"},G={SUCCESS:p.SUCCESS,DANGER:p.DANGER,PRIMARY:p.PRIMARY,SECONDARY:p.SECONDARY},W="_cuiFormGroup_1jun3_20",H="_cuiFormField_1jun3_25",L="_cuiFormLabel_1jun3_36",T="_cuiFormControl_1jun3_47",Y="_cuiTextareaWrapper_1jun3_51",D="_cuiFormError_1jun3_65",P="_cuiFormControlWrapper_1jun3_71",O="_cuiFormInput_1jun3_92",U="_cuiSelectWrapper_1jun3_98",k="_cuiFormSelect_1jun3_99",M="_cuiFormHint_1jun3_148",o={cuiFormGroup:W,cuiFormField:H,cuiFormLabel:L,"cuiFormField--filled":"_cuiFormField--filled_1jun3_41",cuiFormControl:T,cuiTextareaWrapper:Y,"cuiFormField--error":"_cuiFormField--error_1jun3_58",cuiFormError:D,cuiFormControlWrapper:P,cuiFormInput:O,cuiSelectWrapper:U,cuiFormSelect:k,"cuiFormIcon--start":"_cuiFormIcon--start_1jun3_136","cuiFormIcon--end":"_cuiFormIcon--end_1jun3_142",cuiFormHint:M},I=({children:e,label:u,floatingLabel:r=!0,className:c,controlWrapperClassName:t,inputId:a,hasValue:l,labelAlwaysLikeFocus:d,iconStart:m,iconEnd:s,hasError:_,...B})=>i.jsxs("div",{className:n(o.cuiFormField,(l||d)&&o["cuiFormField--filled"],_&&o["cuiFormField--error"],c),...B,children:[m&&i.jsx("span",{className:o["cuiFormIcon--start"],children:m}),i.jsxs("div",{className:n(o.cuiFormControlWrapper,t),children:[r&&u&&i.jsx("label",{className:o.cuiFormLabel,htmlFor:a,children:u}),e]}),s&&i.jsx("span",{className:o["cuiFormIcon--end"],children:s})]}),x=({children:e,className:u,hint:r,errors:c,...t})=>{const a=c?Array.isArray(c)?c:[c]:[];return i.jsxs("div",{className:n(o.cuiFormGroup,u),...t,children:[e,a.map((l,d)=>i.jsx("div",{className:o.cuiFormError,children:l},d)),r&&i.jsx("div",{className:o.cuiFormHint,children:r})]})},V=({groupClassName:e,fieldClasName:u,placeholder:r,label:c,iconStart:t,iconEnd:a,id:l,errors:d,hint:m,hasError:s})=>{const _=C.useId(),B=l||_,[F,A]=C.useState("");return i.jsx(x,{errors:d,hint:m,className:e,children:i.jsx(I,{className:u,label:c,inputId:B,hasValue:!!F,iconStart:t,iconEnd:a,hasError:s||d?.length&&s!==!1,children:i.jsx("input",{type:"text",className:n(o.cuiFormControl,o.cuiFormInput),placeholder:r,"aria-placeholder":r,"aria-label":c,id:B,onChange:E=>A(E.target.value),value:F})})})},$=({groupClassName:e,label:u,iconStart:r,iconEnd:c,id:t,errors:a,hint:l,children:d})=>{const m=C.useId(),s=t||m,[_,B]=C.useState("");return i.jsx(x,{errors:a,hint:l,className:e,children:i.jsx(I,{controlWrapperClassName:o.cuiSelectWrapper,label:u,inputId:s,hasValue:!!_,iconStart:r,iconEnd:c,hasError:!!a,labelAlwaysLikeFocus:!0,children:i.jsx("select",{className:n(o.cuiFormControl,o.cuiFormSelect),id:s,onChange:F=>B(F.target.value),value:_,children:d})})})},q=({groupClassName:e,label:u,iconStart:r,iconEnd:c,id:t,errors:a,hint:l,children:d})=>{const m=C.useId(),s=t||m,[_,B]=C.useState("");return i.jsx(x,{errors:a,hint:l,className:e,children:i.jsx(I,{controlWrapperClassName:o.cuiTextareaWrapper,label:u,inputId:s,hasValue:!!_,iconStart:r,iconEnd:c,hasError:!!a,children:i.jsx("textarea",{className:o.cuiFormControl,id:s,onChange:F=>B(F.target.value),value:_,children:d})})})},K="_cuiBadge_19wui_105",y={cuiBadge:K,"cuiBadge--primary":"_cuiBadge--primary_19wui_110","cuiBadge--danger":"_cuiBadge--danger_19wui_115","cuiBadge--success":"_cuiBadge--success_19wui_120","cuiBadge--red":"_cuiBadge--red_19wui_125","cuiBadge--pink":"_cuiBadge--pink_19wui_130","cuiBadge--purple":"_cuiBadge--purple_19wui_135","cuiBadge--indigo":"_cuiBadge--indigo_19wui_140","cuiBadge--blue":"_cuiBadge--blue_19wui_145","cuiBadge--teal":"_cuiBadge--teal_19wui_150","cuiBadge--green":"_cuiBadge--green_19wui_155","cuiBadge--lime":"_cuiBadge--lime_19wui_160","cuiBadge--yellow":"_cuiBadge--yellow_19wui_165","cuiBadge--orange":"_cuiBadge--orange_19wui_170","cuiBadge--brown":"_cuiBadge--brown_19wui_175","cuiBadge--gray":"_cuiBadge--gray_19wui_180","cuiBadge--blueGray":"_cuiBadge--blueGray_19wui_185"},z=({className:e,color:u,children:r})=>i.jsx("div",{className:n(y.cuiBadge,y[`cuiBadge--${u}`],e),children:r}),h={RED:"red",PINK:"pink",PURPLE:"purple",INDIGO:"indigo",BLUE:"blue",TEAL:"teal",GREEN:"green",LIME:"lime",YELLOW:"yellow",ORANGE:"orange",BROWN:"brown",BLUE_GRAY:"blueGray",GRAY:"gray"},J={...h,PRIMARY:p.PRIMARY,DANGER:p.DANGER,SUCCESS:p.SUCCESS},Q="_cuiCard_1d5d3_12",X="_cuiCardHeader_1d5d3_19",Z="_cuiCardContent_1d5d3_25",ee="_cuiCardHeaderActions_1d5d3_29",j={cuiCard:Q,cuiCardHeader:X,cuiCardContent:Z,cuiCardHeaderActions:ee},ce=({actions:e,children:u,className:r})=>i.jsxs("div",{className:n(j.cuiCardHeader,r),children:[u,e&&i.jsx("div",{className:j.cuiCardHeaderActions,children:e})]}),ue=({children:e,className:u})=>i.jsx("div",{className:n(j.cuiCardContent,u),children:e}),N=({children:e,className:u})=>i.jsx("div",{className:n(j.cuiCard,u),children:e});N.Header=ce;N.Content=ue;exports.Badge=z;exports.BadgeColor=J;exports.Button=f;exports.ButtonColor=G;exports.Card=N;exports.Color=h;exports.Input=V;exports.Select=$;exports.TextArea=q;
package/dist/index.mjs ADDED
@@ -0,0 +1,389 @@
1
+ import { jsxs as C, jsx as i } from "react/jsx-runtime";
2
+ import { useId as N, useState as y } from "react";
3
+ function S(c) {
4
+ var u, r, e = "";
5
+ if (typeof c == "string" || typeof c == "number") e += c;
6
+ else if (typeof c == "object") if (Array.isArray(c)) {
7
+ var a = c.length;
8
+ for (u = 0; u < a; u++) c[u] && (r = S(c[u])) && (e && (e += " "), e += r);
9
+ } else for (r in c) c[r] && (e && (e += " "), e += r);
10
+ return e;
11
+ }
12
+ function n() {
13
+ for (var c, u, r = 0, e = "", a = arguments.length; r < a; r++) (c = arguments[r]) && (u = S(c)) && (e && (e += " "), e += u);
14
+ return e;
15
+ }
16
+ const f = "_cuiButton_1734o_65", v = "_loading_1734o_1", j = "_cuiButtonText_1734o_78", G = "_cuiButtonIcon_1734o_185", g = {
17
+ cuiButton: f,
18
+ loading: v,
19
+ cuiButtonText: j,
20
+ "cuiButton--loading": "_cuiButton--loading_1734o_82",
21
+ "cuiButton--primary": "_cuiButton--primary_1734o_97",
22
+ "cuiButton--secondary": "_cuiButton--secondary_1734o_119",
23
+ "cuiButton--success": "_cuiButton--success_1734o_141",
24
+ "cuiButton--danger": "_cuiButton--danger_1734o_163",
25
+ cuiButtonIcon: G,
26
+ "cuiButtonIcon--start": "_cuiButtonIcon--start_1734o_188",
27
+ "cuiButtonIcon--end": "_cuiButtonIcon--end_1734o_192"
28
+ }, cc = ({
29
+ children: c,
30
+ loading: u,
31
+ color: r,
32
+ iconStart: e,
33
+ iconEnd: a,
34
+ ...t
35
+ }) => /* @__PURE__ */ C(
36
+ "button",
37
+ {
38
+ className: n(
39
+ g.cuiButton,
40
+ g[`cuiButton--${r}`],
41
+ u && g["cuiButton--loading"]
42
+ ),
43
+ ...t,
44
+ children: [
45
+ e && /* @__PURE__ */ i(
46
+ "i",
47
+ {
48
+ className: n(
49
+ g.cuiButtonIcon,
50
+ g["cuiButtonIcon--start"]
51
+ ),
52
+ children: e
53
+ }
54
+ ),
55
+ /* @__PURE__ */ i("span", { className: g.cuiButtonText, children: c }),
56
+ a && /* @__PURE__ */ i(
57
+ "i",
58
+ {
59
+ className: n(
60
+ g.cuiButtonIcon,
61
+ g["cuiButtonIcon--end"]
62
+ ),
63
+ children: a
64
+ }
65
+ )
66
+ ]
67
+ }
68
+ ), p = {
69
+ PRIMARY: "primary",
70
+ SECONDARY: "secondary",
71
+ SUCCESS: "success",
72
+ DANGER: "danger"
73
+ }, ec = {
74
+ SUCCESS: p.SUCCESS,
75
+ DANGER: p.DANGER,
76
+ PRIMARY: p.PRIMARY,
77
+ SECONDARY: p.SECONDARY
78
+ }, W = "_cuiFormGroup_1jun3_20", x = "_cuiFormField_1jun3_25", H = "_cuiFormLabel_1jun3_36", L = "_cuiFormControl_1jun3_47", Y = "_cuiTextareaWrapper_1jun3_51", D = "_cuiFormError_1jun3_65", T = "_cuiFormControlWrapper_1jun3_71", P = "_cuiFormInput_1jun3_92", U = "_cuiSelectWrapper_1jun3_98", k = "_cuiFormSelect_1jun3_99", O = "_cuiFormHint_1jun3_148", o = {
79
+ cuiFormGroup: W,
80
+ cuiFormField: x,
81
+ cuiFormLabel: H,
82
+ "cuiFormField--filled": "_cuiFormField--filled_1jun3_41",
83
+ cuiFormControl: L,
84
+ cuiTextareaWrapper: Y,
85
+ "cuiFormField--error": "_cuiFormField--error_1jun3_58",
86
+ cuiFormError: D,
87
+ cuiFormControlWrapper: T,
88
+ cuiFormInput: P,
89
+ cuiSelectWrapper: U,
90
+ cuiFormSelect: k,
91
+ "cuiFormIcon--start": "_cuiFormIcon--start_1jun3_136",
92
+ "cuiFormIcon--end": "_cuiFormIcon--end_1jun3_142",
93
+ cuiFormHint: O
94
+ }, h = ({
95
+ children: c,
96
+ label: u,
97
+ floatingLabel: r = !0,
98
+ className: e,
99
+ controlWrapperClassName: a,
100
+ inputId: t,
101
+ hasValue: l,
102
+ labelAlwaysLikeFocus: d,
103
+ iconStart: m,
104
+ iconEnd: s,
105
+ hasError: _,
106
+ ...B
107
+ }) => /* @__PURE__ */ C("div", { className: n(
108
+ o.cuiFormField,
109
+ (l || d) && o["cuiFormField--filled"],
110
+ _ && o["cuiFormField--error"],
111
+ e
112
+ ), ...B, children: [
113
+ m && /* @__PURE__ */ i("span", { className: o["cuiFormIcon--start"], children: m }),
114
+ /* @__PURE__ */ C(
115
+ "div",
116
+ {
117
+ className: n(
118
+ o.cuiFormControlWrapper,
119
+ a
120
+ ),
121
+ children: [
122
+ r && u && /* @__PURE__ */ i("label", { className: o.cuiFormLabel, htmlFor: t, children: u }),
123
+ c
124
+ ]
125
+ }
126
+ ),
127
+ s && /* @__PURE__ */ i("span", { className: o["cuiFormIcon--end"], children: s })
128
+ ] }), A = ({
129
+ children: c,
130
+ className: u,
131
+ hint: r,
132
+ errors: e,
133
+ ...a
134
+ }) => {
135
+ const t = e ? Array.isArray(e) ? e : [e] : [];
136
+ return /* @__PURE__ */ C(
137
+ "div",
138
+ {
139
+ className: n(
140
+ o.cuiFormGroup,
141
+ u
142
+ ),
143
+ ...a,
144
+ children: [
145
+ c,
146
+ t.map((l, d) => /* @__PURE__ */ i("div", { className: o.cuiFormError, children: l }, d)),
147
+ r && /* @__PURE__ */ i("div", { className: o.cuiFormHint, children: r })
148
+ ]
149
+ }
150
+ );
151
+ }, uc = ({
152
+ groupClassName: c,
153
+ fieldClasName: u,
154
+ placeholder: r,
155
+ label: e,
156
+ iconStart: a,
157
+ iconEnd: t,
158
+ id: l,
159
+ errors: d,
160
+ hint: m,
161
+ hasError: s
162
+ }) => {
163
+ const _ = N(), B = l || _, [F, w] = y("");
164
+ return /* @__PURE__ */ i(
165
+ A,
166
+ {
167
+ errors: d,
168
+ hint: m,
169
+ className: c,
170
+ children: /* @__PURE__ */ i(
171
+ h,
172
+ {
173
+ className: u,
174
+ label: e,
175
+ inputId: B,
176
+ hasValue: !!F,
177
+ iconStart: a,
178
+ iconEnd: t,
179
+ hasError: s || d?.length && s !== !1,
180
+ children: /* @__PURE__ */ i(
181
+ "input",
182
+ {
183
+ type: "text",
184
+ className: n(
185
+ o.cuiFormControl,
186
+ o.cuiFormInput
187
+ ),
188
+ placeholder: r,
189
+ "aria-placeholder": r,
190
+ "aria-label": e,
191
+ id: B,
192
+ onChange: (b) => w(b.target.value),
193
+ value: F
194
+ }
195
+ )
196
+ }
197
+ )
198
+ }
199
+ );
200
+ }, rc = ({
201
+ groupClassName: c,
202
+ label: u,
203
+ iconStart: r,
204
+ iconEnd: e,
205
+ id: a,
206
+ errors: t,
207
+ hint: l,
208
+ children: d
209
+ }) => {
210
+ const m = N(), s = a || m, [_, B] = y("");
211
+ return /* @__PURE__ */ i(
212
+ A,
213
+ {
214
+ errors: t,
215
+ hint: l,
216
+ className: c,
217
+ children: /* @__PURE__ */ i(
218
+ h,
219
+ {
220
+ controlWrapperClassName: o.cuiSelectWrapper,
221
+ label: u,
222
+ inputId: s,
223
+ hasValue: !!_,
224
+ iconStart: r,
225
+ iconEnd: e,
226
+ hasError: !!t,
227
+ labelAlwaysLikeFocus: !0,
228
+ children: /* @__PURE__ */ i(
229
+ "select",
230
+ {
231
+ className: n(
232
+ o.cuiFormControl,
233
+ o.cuiFormSelect
234
+ ),
235
+ id: s,
236
+ onChange: (F) => B(F.target.value),
237
+ value: _,
238
+ children: d
239
+ }
240
+ )
241
+ }
242
+ )
243
+ }
244
+ );
245
+ }, ic = ({
246
+ groupClassName: c,
247
+ label: u,
248
+ iconStart: r,
249
+ iconEnd: e,
250
+ id: a,
251
+ errors: t,
252
+ hint: l,
253
+ children: d
254
+ }) => {
255
+ const m = N(), s = a || m, [_, B] = y("");
256
+ return /* @__PURE__ */ i(
257
+ A,
258
+ {
259
+ errors: t,
260
+ hint: l,
261
+ className: c,
262
+ children: /* @__PURE__ */ i(
263
+ h,
264
+ {
265
+ controlWrapperClassName: o.cuiTextareaWrapper,
266
+ label: u,
267
+ inputId: s,
268
+ hasValue: !!_,
269
+ iconStart: r,
270
+ iconEnd: e,
271
+ hasError: !!t,
272
+ children: /* @__PURE__ */ i(
273
+ "textarea",
274
+ {
275
+ className: o.cuiFormControl,
276
+ id: s,
277
+ onChange: (F) => B(F.target.value),
278
+ value: _,
279
+ children: d
280
+ }
281
+ )
282
+ }
283
+ )
284
+ }
285
+ );
286
+ }, V = "_cuiBadge_19wui_105", E = {
287
+ cuiBadge: V,
288
+ "cuiBadge--primary": "_cuiBadge--primary_19wui_110",
289
+ "cuiBadge--danger": "_cuiBadge--danger_19wui_115",
290
+ "cuiBadge--success": "_cuiBadge--success_19wui_120",
291
+ "cuiBadge--red": "_cuiBadge--red_19wui_125",
292
+ "cuiBadge--pink": "_cuiBadge--pink_19wui_130",
293
+ "cuiBadge--purple": "_cuiBadge--purple_19wui_135",
294
+ "cuiBadge--indigo": "_cuiBadge--indigo_19wui_140",
295
+ "cuiBadge--blue": "_cuiBadge--blue_19wui_145",
296
+ "cuiBadge--teal": "_cuiBadge--teal_19wui_150",
297
+ "cuiBadge--green": "_cuiBadge--green_19wui_155",
298
+ "cuiBadge--lime": "_cuiBadge--lime_19wui_160",
299
+ "cuiBadge--yellow": "_cuiBadge--yellow_19wui_165",
300
+ "cuiBadge--orange": "_cuiBadge--orange_19wui_170",
301
+ "cuiBadge--brown": "_cuiBadge--brown_19wui_175",
302
+ "cuiBadge--gray": "_cuiBadge--gray_19wui_180",
303
+ "cuiBadge--blueGray": "_cuiBadge--blueGray_19wui_185"
304
+ }, oc = ({
305
+ className: c,
306
+ color: u,
307
+ children: r
308
+ }) => /* @__PURE__ */ i("div", { className: n(
309
+ E.cuiBadge,
310
+ E[`cuiBadge--${u}`],
311
+ c
312
+ ), children: r }), M = {
313
+ RED: "red",
314
+ PINK: "pink",
315
+ PURPLE: "purple",
316
+ INDIGO: "indigo",
317
+ BLUE: "blue",
318
+ TEAL: "teal",
319
+ GREEN: "green",
320
+ LIME: "lime",
321
+ YELLOW: "yellow",
322
+ ORANGE: "orange",
323
+ BROWN: "brown",
324
+ BLUE_GRAY: "blueGray",
325
+ GRAY: "gray"
326
+ }, ac = {
327
+ ...M,
328
+ PRIMARY: p.PRIMARY,
329
+ DANGER: p.DANGER,
330
+ SUCCESS: p.SUCCESS
331
+ }, $ = "_cuiCard_1d5d3_12", K = "_cuiCardHeader_1d5d3_19", q = "_cuiCardContent_1d5d3_25", z = "_cuiCardHeaderActions_1d5d3_29", I = {
332
+ cuiCard: $,
333
+ cuiCardHeader: K,
334
+ cuiCardContent: q,
335
+ cuiCardHeaderActions: z
336
+ }, J = ({
337
+ actions: c,
338
+ children: u,
339
+ className: r
340
+ }) => /* @__PURE__ */ C(
341
+ "div",
342
+ {
343
+ className: n(
344
+ I.cuiCardHeader,
345
+ r
346
+ ),
347
+ children: [
348
+ u,
349
+ c && /* @__PURE__ */ i("div", { className: I.cuiCardHeaderActions, children: c })
350
+ ]
351
+ }
352
+ ), Q = ({
353
+ children: c,
354
+ className: u
355
+ }) => /* @__PURE__ */ i(
356
+ "div",
357
+ {
358
+ className: n(
359
+ I.cuiCardContent,
360
+ u
361
+ ),
362
+ children: c
363
+ }
364
+ ), R = ({
365
+ children: c,
366
+ className: u
367
+ }) => /* @__PURE__ */ i(
368
+ "div",
369
+ {
370
+ className: n(
371
+ I.cuiCard,
372
+ u
373
+ ),
374
+ children: c
375
+ }
376
+ );
377
+ R.Header = J;
378
+ R.Content = Q;
379
+ export {
380
+ oc as Badge,
381
+ ac as BadgeColor,
382
+ cc as Button,
383
+ ec as ButtonColor,
384
+ R as Card,
385
+ M as Color,
386
+ uc as Input,
387
+ rc as Select,
388
+ ic as TextArea
389
+ };
@@ -0,0 +1,15 @@
1
+ export declare const Color: {
2
+ readonly RED: "red";
3
+ readonly PINK: "pink";
4
+ readonly PURPLE: "purple";
5
+ readonly INDIGO: "indigo";
6
+ readonly BLUE: "blue";
7
+ readonly TEAL: "teal";
8
+ readonly GREEN: "green";
9
+ readonly LIME: "lime";
10
+ readonly YELLOW: "yellow";
11
+ readonly ORANGE: "orange";
12
+ readonly BROWN: "brown";
13
+ readonly BLUE_GRAY: "blueGray";
14
+ readonly GRAY: "gray";
15
+ };
@@ -0,0 +1,5 @@
1
+ export declare const Size: {
2
+ TINY: string;
3
+ NORMAL: string;
4
+ BIG: string;
5
+ };
@@ -0,0 +1,6 @@
1
+ export declare const Variant: {
2
+ readonly PRIMARY: "primary";
3
+ readonly SECONDARY: "secondary";
4
+ readonly SUCCESS: "success";
5
+ readonly DANGER: "danger";
6
+ };
@@ -0,0 +1 @@
1
+ export type ValueOf<T> = T[keyof T];
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@coderan/components-react",
3
+ "version": "0.1.1",
4
+ "description": "",
5
+ "module": "dist/index.mjs",
6
+ "types": "dist/index.d.ts",
7
+ "main": "dist/index.js",
8
+ "scripts": {
9
+ "build": "rm -rf dist && vite build",
10
+ "test": "echo \"Error: no test specified\" && exit 1"
11
+ },
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "require": "./dist/index.js",
16
+ "import": "./dist/index.mjs"
17
+ }
18
+ },
19
+ "keywords": [],
20
+ "author": "",
21
+ "license": "ISC",
22
+ "dependencies": {
23
+ "@coderan/component-styles": "^0.1.1",
24
+ "clsx": "^2.1.0",
25
+ "react": "^19.1.0"
26
+ },
27
+ "devDependencies": {
28
+ "@types/react": "^19.1.8"
29
+ },
30
+ "files": [
31
+ "dist"
32
+ ],
33
+ "publishConfig": {
34
+ "access": "public"
35
+ },
36
+ "gitHead": "1f6a300be9d8f6a453ca1a4438ace1610a8c3a54"
37
+ }