@candy.thieves/ui-kit-lumos 0.0.9 → 0.0.10
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/README.md +87 -94
- package/dist/favicon-dark-108.svg +1 -0
- package/dist/favicon-dark-16.svg +4 -0
- package/dist/favicon-dark-24.svg +4 -0
- package/dist/favicon-dark-48.svg +4 -0
- package/dist/favicon-dark-72.svg +1 -0
- package/dist/favicon-light-108.svg +4 -0
- package/dist/favicon-light-16.svg +1 -0
- package/dist/favicon-light-24.svg +4 -0
- package/dist/favicon-light-48.svg +1 -0
- package/dist/favicon-light-72.svg +1 -0
- package/dist/index.css +1 -1
- package/dist/index.js +2113 -1287
- package/dist/index.js.map +1 -1
- package/dist/types/assets/icons/ErrorIcon.d.ts +3 -0
- package/dist/types/assets/icons/FileIcon.d.ts +3 -0
- package/dist/types/assets/icons/Sending.d.ts +3 -0
- package/dist/types/assets/index.d.ts +4 -0
- package/dist/types/assets/logo/Logo.d.ts +10 -0
- package/dist/types/components/AudioPlayer/AudioPlayer.d.ts +6 -0
- package/dist/types/components/AudioPlayer/index.d.ts +1 -0
- package/dist/types/components/Avatar/Avatar.d.ts +17 -0
- package/dist/types/components/Avatar/AvatarBlock.d.ts +15 -0
- package/dist/types/components/Avatar/MainAvatar.d.ts +20 -0
- package/dist/types/components/Avatar/index.d.ts +3 -0
- package/dist/types/components/Button/Button.d.ts +19 -0
- package/dist/types/components/Button/ButtonLegacy.d.ts +41 -0
- package/dist/types/components/Button/index.d.ts +2 -0
- package/dist/types/components/Cards/Cards.d.ts +7 -0
- package/dist/types/components/Cards/index.d.ts +1 -0
- package/dist/types/components/Checkbox/FormCheckbox.d.ts +1 -2
- package/dist/types/components/CircularProgress/CircularProgress.d.ts +10 -0
- package/dist/types/components/CircularProgress/index.d.ts +1 -0
- package/dist/types/components/Input/FormInput.d.ts +1 -2
- package/dist/types/components/LinearProgress/LinearProgress.d.ts +14 -0
- package/dist/types/components/LinearProgress/index.d.ts +1 -0
- package/dist/types/components/Message/AttachmentItem.d.ts +2 -0
- package/dist/types/components/Message/Message.d.ts +2 -0
- package/dist/types/components/Message/MessageStatus.d.ts +2 -0
- package/dist/types/components/Message/ReplyPreview.d.ts +2 -0
- package/dist/types/components/Message/index.d.ts +2 -0
- package/dist/types/components/Message/types.d.ts +40 -0
- package/dist/types/components/PasswordInput/FormPasswordInput.d.ts +2 -3
- package/dist/types/components/PasswordInput/PasswordInput.d.ts +2 -1
- package/dist/types/components/ReadMore/ReadMore.d.ts +8 -0
- package/dist/types/components/ReadMore/index.d.ts +1 -0
- package/dist/types/components/SearchInput/SearchInput.d.ts +1 -1
- package/dist/types/components/Select/Select.d.ts +66 -0
- package/dist/types/components/Select/index.d.ts +1 -0
- package/dist/types/components/Table/Table.d.ts +6 -0
- package/dist/types/components/Table/index.d.ts +1 -0
- package/dist/types/components/Tabs/Tabs.d.ts +18 -0
- package/dist/types/components/Tabs/index.d.ts +1 -0
- package/dist/types/components/Tooltip/Tooltip.d.ts +12 -0
- package/dist/types/components/Tooltip/index.d.ts +1 -0
- package/dist/types/components/Typography/Typography.d.ts +4 -5
- package/dist/types/components/index.d.ts +18 -7
- package/dist/types/constants/constants.d.ts +3 -0
- package/dist/types/constants/index.d.ts +1 -0
- package/dist/types/demo/index.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/types.d.ts +4 -0
- package/dist/types/utils/formatTime.d.ts +1 -0
- package/dist/types/utils/getFirstLetterCapitalized.d.ts +1 -0
- package/dist/types/utils/index.d.ts +5 -0
- package/dist/types/utils/isAudioAttachment.d.ts +2 -0
- package/dist/types/utils/isThemeColor.d.ts +2 -0
- package/dist/types/utils/truncateText.d.ts +1 -0
- package/package.json +5 -1
- package/dist/favicon.svg +0 -1
- package/dist/icons.svg +0 -24
- package/dist/types/components/TestMixins/index.d.ts +0 -1
- /package/dist/types/{components → demo}/TestMixins/TestMixins.d.ts +0 -0
|
@@ -97,3 +97,7 @@ export { Opera } from './icons/Opera';
|
|
|
97
97
|
export { Safari } from './icons/Safari';
|
|
98
98
|
export { UcBrowser } from './icons/UcBrowser';
|
|
99
99
|
export { Yandex } from './icons/Yandex';
|
|
100
|
+
export { Sending } from './icons/Sending';
|
|
101
|
+
export { ErrorIcon } from './icons/ErrorIcon';
|
|
102
|
+
export { FileIcon } from './icons/FileIcon';
|
|
103
|
+
export { Logo } from './logo/Logo';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type SVGProps } from 'react';
|
|
2
|
+
type LogoSize = 'l' | 'm' | 's' | 'xl' | 'xs';
|
|
3
|
+
type LogoTheme = 'day' | 'night';
|
|
4
|
+
export type LogoProps = {
|
|
5
|
+
size?: LogoSize;
|
|
6
|
+
theme?: LogoTheme;
|
|
7
|
+
svgProps?: SVGProps<SVGSVGElement>;
|
|
8
|
+
};
|
|
9
|
+
export declare const Logo: import("react").NamedExoticComponent<LogoProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AudioPlayer';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Avatar as AvatarItem } from 'radix-ui';
|
|
2
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
import type { AvatarSize } from '@/types';
|
|
4
|
+
export type AvatarProps = {
|
|
5
|
+
src?: string;
|
|
6
|
+
alt?: string;
|
|
7
|
+
userName: string;
|
|
8
|
+
delayMs?: number;
|
|
9
|
+
size?: AvatarSize;
|
|
10
|
+
} & Omit<ComponentPropsWithoutRef<typeof AvatarItem.Root>, 'asChild'>;
|
|
11
|
+
export declare const Avatar: import("react").ForwardRefExoticComponent<{
|
|
12
|
+
src?: string;
|
|
13
|
+
alt?: string;
|
|
14
|
+
userName: string;
|
|
15
|
+
delayMs?: number;
|
|
16
|
+
size?: AvatarSize;
|
|
17
|
+
} & Omit<Omit<AvatarItem.AvatarProps & import("react").RefAttributes<HTMLSpanElement>, "ref">, "asChild"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export type AvatarItem = {
|
|
3
|
+
src?: string;
|
|
4
|
+
alt?: string;
|
|
5
|
+
userName: string;
|
|
6
|
+
delayMs?: number;
|
|
7
|
+
};
|
|
8
|
+
export type AvatarBlockProps = {
|
|
9
|
+
users: AvatarItem[];
|
|
10
|
+
className?: string;
|
|
11
|
+
} & Omit<ComponentPropsWithoutRef<'div'>, 'children'>;
|
|
12
|
+
export declare const AvatarBlock: import("react").ForwardRefExoticComponent<{
|
|
13
|
+
users: AvatarItem[];
|
|
14
|
+
className?: string;
|
|
15
|
+
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import type { MainAvatarSize } from '@/types';
|
|
3
|
+
export type MainAvatarProps = {
|
|
4
|
+
src?: string;
|
|
5
|
+
alt?: string;
|
|
6
|
+
userName: string;
|
|
7
|
+
delayMs?: number;
|
|
8
|
+
showCloseButton?: boolean;
|
|
9
|
+
onClose?: () => void;
|
|
10
|
+
size?: MainAvatarSize;
|
|
11
|
+
} & Omit<ComponentPropsWithoutRef<'div'>, 'children'>;
|
|
12
|
+
export declare const MainAvatar: import("react").ForwardRefExoticComponent<{
|
|
13
|
+
src?: string;
|
|
14
|
+
alt?: string;
|
|
15
|
+
userName: string;
|
|
16
|
+
delayMs?: number;
|
|
17
|
+
showCloseButton?: boolean;
|
|
18
|
+
onClose?: () => void;
|
|
19
|
+
size?: MainAvatarSize;
|
|
20
|
+
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef, ElementType, ReactNode } from 'react';
|
|
2
|
+
import type { Variant } from '@/components/Button';
|
|
3
|
+
/**
|
|
4
|
+
* A flexible and reusable button component that supports multiple variants (button, a, div, etc.),
|
|
5
|
+
* custom root components via the `as` prop, and full-width styling.
|
|
6
|
+
*
|
|
7
|
+
* Uses React 19's ref prop forwarding, allowing refs to be passed directly
|
|
8
|
+
* to the underlying DOM element or component.
|
|
9
|
+
*
|
|
10
|
+
* @typeParam C - The element type or component to render (defaults to 'button')
|
|
11
|
+
*/
|
|
12
|
+
export type ButtonProps<T extends ElementType = 'button'> = {
|
|
13
|
+
as?: T;
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
variant?: Variant;
|
|
16
|
+
fullWidth?: boolean;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
} & ComponentPropsWithRef<T>;
|
|
19
|
+
export declare const Button: <C extends ElementType = "button">(props: ButtonProps<C> & Omit<ComponentPropsWithRef<C>, keyof ButtonProps<C>>) => import("react").JSX.Element;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ElementType, type PropsWithChildren, type ReactElement } from 'react';
|
|
2
|
+
export type Variant = 'outlined' | 'primary' | 'secondary' | 'text';
|
|
3
|
+
type PolymorphicRef<C extends ElementType> = ComponentPropsWithRef<C>['ref'];
|
|
4
|
+
type AsProp<C extends ElementType> = {
|
|
5
|
+
as?: C;
|
|
6
|
+
};
|
|
7
|
+
type PropsToOmit<C extends ElementType, P> = keyof (AsProp<C> & P);
|
|
8
|
+
type PolymorphicComponentProp<C extends ElementType, Props = {}> = PropsWithChildren<Props & AsProp<C>> & Omit<ComponentPropsWithoutRef<C>, PropsToOmit<C, Props>>;
|
|
9
|
+
type PolymorphicComponentPropWithRef<C extends ElementType, Props = {}> = PolymorphicComponentProp<C, Props> & {
|
|
10
|
+
ref?: PolymorphicRef<C>;
|
|
11
|
+
};
|
|
12
|
+
export type ButtonLegacyProps<C extends ElementType> = PolymorphicComponentPropWithRef<C, {
|
|
13
|
+
variant?: Variant;
|
|
14
|
+
fullWidth?: boolean;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
}>;
|
|
17
|
+
export type ButtonLegacyComponent = (<C extends ElementType = 'button'>(props: ButtonLegacyProps<C>) => null | ReactElement) & {
|
|
18
|
+
displayName?: string;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* A polymorphic button component that renders as any HTML element or custom component.
|
|
22
|
+
*
|
|
23
|
+
* **Ref Forwarding:**
|
|
24
|
+
* Uses React's `forwardRef` API for ref forwarding, which is the standard approach
|
|
25
|
+
* for ref handling in React versions below 19.
|
|
26
|
+
*
|
|
27
|
+
* **React 19 Compatibility:**
|
|
28
|
+
* This component uses `@ts-expect-error` because React's `forwardRef` doesn't
|
|
29
|
+
* preserve polymorphic generic parameters in React 19. In React 19, refs are
|
|
30
|
+
* passed directly via props, but the type definitions for `forwardRef` with
|
|
31
|
+
* generics are still evolving. The error is safely ignored as the component
|
|
32
|
+
* works correctly at runtime.
|
|
33
|
+
*
|
|
34
|
+
* @description
|
|
35
|
+
* A flexible and reusable button component that supports multiple variants (button, a, div, etc.),
|
|
36
|
+
* custom root components, and full-width styling.
|
|
37
|
+
*
|
|
38
|
+
* @typeParam C - The element type or component to render (defaults to 'button')
|
|
39
|
+
*/
|
|
40
|
+
export declare const ButtonLegacy: ButtonLegacyComponent;
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
2
|
+
export type CardsProps = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
} & Omit<ComponentPropsWithoutRef<'div'>, 'children'>;
|
|
5
|
+
export declare const Cards: import("react").ForwardRefExoticComponent<{
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Cards';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { type Control, type FieldValues, type Path } from 'react-hook-form';
|
|
2
2
|
import { type CheckboxProps } from './Checkbox';
|
|
3
|
-
type FormCheckboxProps<T extends FieldValues> = Omit<CheckboxProps, 'checked' | 'defaultChecked' | 'onCheckedChange'> & {
|
|
3
|
+
export type FormCheckboxProps<T extends FieldValues> = Omit<CheckboxProps, 'checked' | 'defaultChecked' | 'onCheckedChange'> & {
|
|
4
4
|
control: Control<T>;
|
|
5
5
|
name: Path<T>;
|
|
6
6
|
};
|
|
7
7
|
export declare const FormCheckbox: <T extends FieldValues>({ control, name, ...props }: FormCheckboxProps<T>) => import("react").JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import type { ProgressSizeVariant, ProgressThemeColor } from '@/types';
|
|
3
|
+
export type Props = {
|
|
4
|
+
size?: ProgressSizeVariant;
|
|
5
|
+
color?: ProgressThemeColor | string;
|
|
6
|
+
} & Omit<ComponentPropsWithoutRef<'span'>, 'aria-label' | 'aria-live' | 'role'>;
|
|
7
|
+
export declare const CircularProgress: import("react").ForwardRefExoticComponent<{
|
|
8
|
+
size?: ProgressSizeVariant;
|
|
9
|
+
color?: ProgressThemeColor | string;
|
|
10
|
+
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref">, "role" | "aria-label" | "aria-live"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CircularProgress';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { type Control, type FieldPath, type FieldValues } from 'react-hook-form';
|
|
2
2
|
import { type InputProps } from './Input';
|
|
3
|
-
type FormInputProps<T extends FieldValues> = {
|
|
3
|
+
export type FormInputProps<T extends FieldValues> = {
|
|
4
4
|
control: Control<T>;
|
|
5
5
|
name: FieldPath<T>;
|
|
6
6
|
} & Omit<InputProps, 'name' | 'onBlur' | 'onChange' | 'value'>;
|
|
7
7
|
export declare const FormInput: <T extends FieldValues>({ control, name, ...props }: FormInputProps<T>) => import("react").JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import type { ProgressSizeVariant, ProgressThemeColor } from '@/types';
|
|
3
|
+
export type LinearProgressProps = {
|
|
4
|
+
size?: ProgressSizeVariant;
|
|
5
|
+
color?: ProgressThemeColor | string;
|
|
6
|
+
value?: number;
|
|
7
|
+
determinate?: boolean;
|
|
8
|
+
} & Omit<ComponentPropsWithoutRef<'div'>, 'aria-label' | 'aria-live' | 'role'>;
|
|
9
|
+
export declare const LinearProgress: import("react").ForwardRefExoticComponent<{
|
|
10
|
+
size?: ProgressSizeVariant;
|
|
11
|
+
color?: ProgressThemeColor | string;
|
|
12
|
+
value?: number;
|
|
13
|
+
determinate?: boolean;
|
|
14
|
+
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "role" | "aria-label" | "aria-live"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './LinearProgress';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export type MessageStatus = 'delivered' | 'error' | 'read' | 'sending' | 'sent';
|
|
3
|
+
export type MessageType = 'incoming' | 'outgoing';
|
|
4
|
+
export type Attachment = {
|
|
5
|
+
id: number | string;
|
|
6
|
+
name: string;
|
|
7
|
+
url: string;
|
|
8
|
+
type: 'image';
|
|
9
|
+
};
|
|
10
|
+
export type AudioAttachment = {
|
|
11
|
+
id: number | string;
|
|
12
|
+
type: 'audio';
|
|
13
|
+
component: ReactNode;
|
|
14
|
+
};
|
|
15
|
+
export type AttachmentFile = Attachment | AudioAttachment;
|
|
16
|
+
export type ReplyTo = {
|
|
17
|
+
id: number | string;
|
|
18
|
+
author: string;
|
|
19
|
+
text: string;
|
|
20
|
+
};
|
|
21
|
+
export type AttachmentProps = {
|
|
22
|
+
attachment: AttachmentFile;
|
|
23
|
+
};
|
|
24
|
+
export type MessageProps = {
|
|
25
|
+
author: string;
|
|
26
|
+
text?: string;
|
|
27
|
+
timestamp: string;
|
|
28
|
+
type?: MessageType;
|
|
29
|
+
avatar?: string;
|
|
30
|
+
status?: MessageStatus;
|
|
31
|
+
replyTo?: ReplyTo;
|
|
32
|
+
attachments?: AttachmentFile;
|
|
33
|
+
className?: string;
|
|
34
|
+
};
|
|
35
|
+
export type MessageStatusProps = {
|
|
36
|
+
status: MessageStatus;
|
|
37
|
+
};
|
|
38
|
+
export type ReplyPreviewProps = {
|
|
39
|
+
reply: ReplyTo;
|
|
40
|
+
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { type Control, type FieldPath, type FieldValues } from 'react-hook-form';
|
|
2
|
-
import { type PasswordInputProps } from '
|
|
3
|
-
type FormPasswordInputProps<T extends FieldValues> = {
|
|
2
|
+
import { type PasswordInputProps } from '@/components';
|
|
3
|
+
export type FormPasswordInputProps<T extends FieldValues> = {
|
|
4
4
|
control: Control<T>;
|
|
5
5
|
name: FieldPath<T>;
|
|
6
6
|
} & Omit<PasswordInputProps, 'name' | 'onBlur' | 'onChange' | 'value'>;
|
|
7
7
|
export declare const FormPasswordInput: <T extends FieldValues>({ control, name, ...props }: FormPasswordInputProps<T>) => import("react").JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { type InputHTMLAttributes } from 'react';
|
|
1
2
|
export type PasswordInputProps = {
|
|
2
3
|
label?: string;
|
|
3
4
|
error?: string;
|
|
4
|
-
} &
|
|
5
|
+
} & InputHTMLAttributes<HTMLInputElement>;
|
|
5
6
|
export declare const PasswordInput: ({ ...props }: PasswordInputProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type ReadMoreProps = {
|
|
2
|
+
text: string;
|
|
3
|
+
maxLength: number;
|
|
4
|
+
expandLabel?: string;
|
|
5
|
+
collapseLabel?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const ReadMore: ({ text, maxLength, expandLabel, collapseLabel, className, }: ReadMoreProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ReadMore';
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import { Select as SelectPrimitive } from 'radix-ui';
|
|
3
|
+
export type SelectOption = {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
itemIndicator?: ReactNode;
|
|
7
|
+
itemIndicatorProps?: ComponentPropsWithoutRef<typeof SelectPrimitive.ItemIndicator>;
|
|
8
|
+
itemProps?: Omit<ComponentPropsWithoutRef<typeof SelectPrimitive.Item>, 'children' | 'disabled' | 'textValue' | 'value'>;
|
|
9
|
+
itemTextProps?: ComponentPropsWithoutRef<typeof SelectPrimitive.ItemText>;
|
|
10
|
+
label: ReactNode;
|
|
11
|
+
textValue?: string;
|
|
12
|
+
type?: 'item';
|
|
13
|
+
value: string;
|
|
14
|
+
};
|
|
15
|
+
export type SelectOptionGroup = {
|
|
16
|
+
groupProps?: ComponentPropsWithoutRef<typeof SelectPrimitive.Group>;
|
|
17
|
+
label: ReactNode;
|
|
18
|
+
labelProps?: ComponentPropsWithoutRef<typeof SelectPrimitive.Label>;
|
|
19
|
+
options: SelectOption[];
|
|
20
|
+
type: 'group';
|
|
21
|
+
};
|
|
22
|
+
export type SelectOptionSeparator = {
|
|
23
|
+
separatorProps?: ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>;
|
|
24
|
+
type: 'separator';
|
|
25
|
+
};
|
|
26
|
+
export type SelectItem = SelectOption | SelectOptionGroup | SelectOptionSeparator;
|
|
27
|
+
export type SelectProps = Omit<ComponentPropsWithoutRef<typeof SelectPrimitive.Root>, 'children'> & {
|
|
28
|
+
className?: string;
|
|
29
|
+
contentProps?: ComponentPropsWithoutRef<typeof SelectPrimitive.Content>;
|
|
30
|
+
contentClassName?: string;
|
|
31
|
+
groupLabelClassName?: string;
|
|
32
|
+
iconProps?: ComponentPropsWithoutRef<typeof SelectPrimitive.Icon>;
|
|
33
|
+
itemClassName?: string;
|
|
34
|
+
label?: ReactNode;
|
|
35
|
+
labelProps?: ComponentPropsWithoutRef<'label'>;
|
|
36
|
+
options: SelectItem[];
|
|
37
|
+
placeholder?: ReactNode;
|
|
38
|
+
portalProps?: ComponentPropsWithoutRef<typeof SelectPrimitive.Portal>;
|
|
39
|
+
separatorClassName?: string;
|
|
40
|
+
triggerIcon?: ReactNode;
|
|
41
|
+
triggerProps?: Omit<ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>, 'children'>;
|
|
42
|
+
valueProps?: ComponentPropsWithoutRef<typeof SelectPrimitive.Value>;
|
|
43
|
+
viewportProps?: ComponentPropsWithoutRef<typeof SelectPrimitive.Viewport>;
|
|
44
|
+
};
|
|
45
|
+
export declare const Select: import("react").ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSharedProps & {
|
|
46
|
+
value?: string;
|
|
47
|
+
defaultValue?: string;
|
|
48
|
+
onValueChange?(value: string): void;
|
|
49
|
+
}, "children"> & {
|
|
50
|
+
className?: string;
|
|
51
|
+
contentProps?: ComponentPropsWithoutRef<typeof SelectPrimitive.Content>;
|
|
52
|
+
contentClassName?: string;
|
|
53
|
+
groupLabelClassName?: string;
|
|
54
|
+
iconProps?: ComponentPropsWithoutRef<typeof SelectPrimitive.Icon>;
|
|
55
|
+
itemClassName?: string;
|
|
56
|
+
label?: ReactNode;
|
|
57
|
+
labelProps?: ComponentPropsWithoutRef<"label">;
|
|
58
|
+
options: SelectItem[];
|
|
59
|
+
placeholder?: ReactNode;
|
|
60
|
+
portalProps?: ComponentPropsWithoutRef<typeof SelectPrimitive.Portal>;
|
|
61
|
+
separatorClassName?: string;
|
|
62
|
+
triggerIcon?: ReactNode;
|
|
63
|
+
triggerProps?: Omit<ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>, "children">;
|
|
64
|
+
valueProps?: ComponentPropsWithoutRef<typeof SelectPrimitive.Value>;
|
|
65
|
+
viewportProps?: ComponentPropsWithoutRef<typeof SelectPrimitive.Viewport>;
|
|
66
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Select';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const Table: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, "ref"> & import("react").RefAttributes<HTMLTableElement>>;
|
|
2
|
+
export declare const TableHead: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & import("react").RefAttributes<HTMLTableSectionElement>>;
|
|
3
|
+
export declare const TableBody: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & import("react").RefAttributes<HTMLTableSectionElement>>;
|
|
4
|
+
export declare const TableRow: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, "ref"> & import("react").RefAttributes<HTMLTableRowElement>>;
|
|
5
|
+
export declare const TableHeaderCell: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, "ref"> & import("react").RefAttributes<HTMLTableCellElement>>;
|
|
6
|
+
export declare const TableCell: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, "ref"> & import("react").RefAttributes<HTMLTableCellElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Table';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
2
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
3
|
+
export type Tab = {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
content: ReactNode;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type TabsProps = Omit<ComponentPropsWithoutRef<typeof TabsPrimitive.Root>, 'defaultValue' | 'onValueChange'> & {
|
|
10
|
+
tabs: Tab[];
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
onValueChange?: (value: string) => void;
|
|
13
|
+
};
|
|
14
|
+
export declare const Tabs: import("react").ForwardRefExoticComponent<Omit<Omit<TabsPrimitive.TabsProps & import("react").RefAttributes<HTMLDivElement>, "ref">, "defaultValue" | "onValueChange"> & {
|
|
15
|
+
tabs: Tab[];
|
|
16
|
+
defaultValue?: string;
|
|
17
|
+
onValueChange?: (value: string) => void;
|
|
18
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Tabs';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
3
|
+
export type TooltipProps = Omit<ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>, 'children'> & {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
content?: ReactNode;
|
|
6
|
+
delayDuration?: ComponentPropsWithoutRef<typeof TooltipPrimitive.Root>['delayDuration'];
|
|
7
|
+
};
|
|
8
|
+
export declare const Tooltip: import("react").ForwardRefExoticComponent<Omit<Omit<TooltipPrimitive.TooltipContentProps & import("react").RefAttributes<HTMLDivElement>, "ref">, "children"> & {
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
content?: ReactNode;
|
|
11
|
+
delayDuration?: ComponentPropsWithoutRef<typeof TooltipPrimitive.Root>["delayDuration"];
|
|
12
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Tooltip';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ComponentPropsWithRef, CSSProperties, ElementType, ReactNode } from 'react';
|
|
2
|
-
type TypographyVariant = 'body1' | 'body2' | 'body3' | 'caption1' | 'caption2' | 'caution' | 'caution-error' | 'h1' | 'h2' | 'h3' | 'large' | 'link' | 'signature' | 'signature-legal' | 'subtitle1' | 'subtitle2' | 'subtitle-link';
|
|
3
|
-
type TypographyAlign = 'center' | 'justify' | 'left' | 'right';
|
|
4
|
-
type MarginProps = {
|
|
2
|
+
export type TypographyVariant = 'body1' | 'body2' | 'body3' | 'caption1' | 'caption2' | 'caution' | 'caution-error' | 'h1' | 'h2' | 'h3' | 'large' | 'link' | 'signature' | 'signature-legal' | 'subtitle1' | 'subtitle2' | 'subtitle-link';
|
|
3
|
+
export type TypographyAlign = 'center' | 'justify' | 'left' | 'right';
|
|
4
|
+
export type MarginProps = {
|
|
5
5
|
mt?: CSSProperties['marginTop'];
|
|
6
6
|
mb?: CSSProperties['marginBottom'];
|
|
7
7
|
ml?: CSSProperties['marginLeft'];
|
|
@@ -9,7 +9,7 @@ type MarginProps = {
|
|
|
9
9
|
mx?: CSSProperties['marginLeft'];
|
|
10
10
|
my?: CSSProperties['marginTop'];
|
|
11
11
|
};
|
|
12
|
-
type TypographyProps<T extends ElementType = 'div'> = {
|
|
12
|
+
export type TypographyProps<T extends ElementType = 'div'> = {
|
|
13
13
|
variant?: TypographyVariant;
|
|
14
14
|
children: ReactNode;
|
|
15
15
|
color?: CSSProperties['color'];
|
|
@@ -23,4 +23,3 @@ type TypographyProps<T extends ElementType = 'div'> = {
|
|
|
23
23
|
rel?: string;
|
|
24
24
|
} & MarginProps & Omit<ComponentPropsWithRef<T>, 'align' | 'color' | 'gutterBottom' | 'href' | 'noWrap' | 'rel' | 'style' | 'target' | keyof MarginProps>;
|
|
25
25
|
export declare const Typography: <C extends ElementType = "div">(props: TypographyProps<C>) => import("react").JSX.Element;
|
|
26
|
-
export {};
|
|
@@ -1,7 +1,18 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './
|
|
7
|
-
export * from './
|
|
1
|
+
export * from './AudioPlayer';
|
|
2
|
+
export * from './Avatar';
|
|
3
|
+
export * from './Button';
|
|
4
|
+
export * from './Cards';
|
|
5
|
+
export * from './Checkbox';
|
|
6
|
+
export * from './CircularProgress';
|
|
7
|
+
export * from './Input';
|
|
8
|
+
export * from './LinearProgress';
|
|
9
|
+
export * from './Message';
|
|
10
|
+
export * from './PasswordInput';
|
|
11
|
+
export * from './RadioGroup';
|
|
12
|
+
export * from './ReadMore';
|
|
13
|
+
export * from './SearchInput';
|
|
14
|
+
export * from './Select';
|
|
15
|
+
export * from './Table';
|
|
16
|
+
export * from './Tabs';
|
|
17
|
+
export * from './Tooltip';
|
|
18
|
+
export * from './Typography';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './constants';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TestMixins/TestMixins';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const formatTime: (seconds: number) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getFirstLetterCapitalized: (str: string) => string;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
export { ColorIconBase, type ColorIconProps } from './ColorIconBase';
|
|
2
2
|
export { IconBase, type IconProps } from './IconBase';
|
|
3
3
|
export { ColorIconBaseSmall } from './ColorIconBaseSmall';
|
|
4
|
+
export { truncateText } from './truncateText';
|
|
5
|
+
export { isThemeColor } from './isThemeColor';
|
|
6
|
+
export { getFirstLetterCapitalized } from './getFirstLetterCapitalized';
|
|
7
|
+
export { isAudioAttachment } from './isAudioAttachment';
|
|
8
|
+
export { formatTime } from './formatTime';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const truncateText: (text: string, maxLength: number) => string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@candy.thieves/ui-kit-lumos",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.10",
|
|
5
|
+
"license": "MIT",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"main": "dist/index.js",
|
|
7
8
|
"module": "dist/index.js",
|
|
@@ -20,14 +21,17 @@
|
|
|
20
21
|
"lint": "eslint src --ext .jsx,.js,.tsx,.ts --no-error-on-unmatched-pattern --fix",
|
|
21
22
|
"preview": "vite preview",
|
|
22
23
|
"storybook": "storybook dev -p 6006",
|
|
24
|
+
"test:storybook": "vitest --project storybook",
|
|
23
25
|
"build-storybook": "storybook build",
|
|
24
26
|
"prepare": "husky"
|
|
25
27
|
},
|
|
26
28
|
"dependencies": {
|
|
27
29
|
"@fontsource-variable/inter": "^5.3.0",
|
|
28
30
|
"@fontsource-variable/roboto": "^5.3.0",
|
|
31
|
+
"@radix-ui/react-tabs": "^1.1.18",
|
|
29
32
|
"@radix-ui/react-checkbox": "^1.3.8",
|
|
30
33
|
"@radix-ui/react-radio-group": "^1.4.5",
|
|
34
|
+
"@radix-ui/react-tooltip": "^1.2.16",
|
|
31
35
|
"@radix-ui/themes": "^3.3.0",
|
|
32
36
|
"clsx": "^2.1.1",
|
|
33
37
|
"eslint-plugin-perfectionist": "^5.10.0",
|