chesai-ui 0.13.2 → 0.13.3
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/chesai-ui.css +1 -1
- package/dist/chesai-ui.es.js +221 -215
- package/dist/chesai-ui.umd.js +113 -113
- package/dist/components/date-input/duration-input-field.d.ts +7 -0
- package/dist/components/date-input/duration-input-segment.d.ts +11 -0
- package/dist/components/date-input/duration-input.d.ts +5 -0
- package/dist/components/date-input/index.d.ts +4 -0
- package/dist/components/date-input/use-duration-input.d.ts +116 -0
- package/dist/components/icon-button/index.d.ts +3 -5
- package/dist/{index-3i0I0qop.mjs → index-q9xToSUv.mjs} +19901 -19600
- package/dist/{maplibre-gl-Bm4bjv6l.mjs → maplibre-gl-CjA3LxnG.mjs} +1 -1
- package/dist/{web-DDa3bCEG.mjs → web-BXas7xGU.mjs} +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { DurationFieldState } from './use-duration-input';
|
|
3
|
+
export interface DurationInputFieldProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
state: DurationFieldState;
|
|
5
|
+
inputProps: React.InputHTMLAttributes<HTMLInputElement>;
|
|
6
|
+
}
|
|
7
|
+
export declare const DurationInputField: React.ForwardRefExoticComponent<DurationInputFieldProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { DurationSegment, DurationFieldState } from './use-duration-input';
|
|
3
|
+
export interface DurationInputSegmentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
state: DurationFieldState;
|
|
5
|
+
segment: DurationSegment;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const DurationInputSegment: {
|
|
9
|
+
({ state, segment, className, ...props }: DurationInputSegmentProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { UseDurationInputProps } from './use-duration-input';
|
|
3
|
+
export interface DurationInputProps extends UseDurationInputProps {
|
|
4
|
+
}
|
|
5
|
+
export declare const DurationInput: React.ForwardRefExoticComponent<Omit<DurationInputProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -4,5 +4,9 @@ export * from './date-input-segment';
|
|
|
4
4
|
export * from './date-input-field';
|
|
5
5
|
export * from './use-date-input';
|
|
6
6
|
export * from './use-time-input';
|
|
7
|
+
export * from './use-duration-input';
|
|
7
8
|
export * from './date-input';
|
|
8
9
|
export * from './time-input';
|
|
10
|
+
export * from './duration-input';
|
|
11
|
+
export * from './duration-input-field';
|
|
12
|
+
export * from './duration-input-segment';
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { dateInputSlots } from './date-input-styles';
|
|
2
|
+
export interface DurationValue {
|
|
3
|
+
hours: number | null;
|
|
4
|
+
minutes: number | null;
|
|
5
|
+
seconds: number | null;
|
|
6
|
+
}
|
|
7
|
+
export interface DurationSegment {
|
|
8
|
+
type: 'hours' | 'minutes' | 'seconds' | 'literal';
|
|
9
|
+
text: string;
|
|
10
|
+
value: number | null;
|
|
11
|
+
isPlaceholder: boolean;
|
|
12
|
+
placeholder: string;
|
|
13
|
+
isEditable: boolean;
|
|
14
|
+
minValue: number;
|
|
15
|
+
maxValue: number;
|
|
16
|
+
}
|
|
17
|
+
export interface DurationFieldState {
|
|
18
|
+
segments: DurationSegment[];
|
|
19
|
+
value: DurationValue;
|
|
20
|
+
isInvalid: boolean;
|
|
21
|
+
setSegmentValue: (type: 'hours' | 'minutes' | 'seconds', val: number | null) => void;
|
|
22
|
+
}
|
|
23
|
+
export interface UseDurationInputProps {
|
|
24
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
25
|
+
value?: DurationValue;
|
|
26
|
+
defaultValue?: DurationValue;
|
|
27
|
+
onChange?: (value: DurationValue) => void;
|
|
28
|
+
name?: string;
|
|
29
|
+
label?: React.ReactNode;
|
|
30
|
+
description?: React.ReactNode;
|
|
31
|
+
errorMessage?: React.ReactNode;
|
|
32
|
+
startContent?: React.ReactNode;
|
|
33
|
+
endContent?: React.ReactNode;
|
|
34
|
+
classNames?: Partial<typeof dateInputSlots>;
|
|
35
|
+
labelPlacement?: 'inside' | 'outside' | 'outside-left';
|
|
36
|
+
className?: string;
|
|
37
|
+
variant?: 'filled' | 'filled-inverted' | 'outlined' | 'outlined-inverted' | 'underlined' | 'underlined-inverted' | 'ghost' | 'ghost-inverted';
|
|
38
|
+
color?: 'primary' | 'secondary' | 'error';
|
|
39
|
+
size?: 'sm' | 'md' | 'lg';
|
|
40
|
+
shape?: 'full' | 'minimal' | 'sharp';
|
|
41
|
+
isInvalid?: boolean;
|
|
42
|
+
isDisabled?: boolean;
|
|
43
|
+
isRequired?: boolean;
|
|
44
|
+
}
|
|
45
|
+
export declare function parseDuration(value: string): DurationValue;
|
|
46
|
+
export declare function formatDuration(value: DurationValue | null | undefined): string;
|
|
47
|
+
export declare function useDurationInput(props: UseDurationInputProps): {
|
|
48
|
+
state: DurationFieldState;
|
|
49
|
+
domRef: import('react').RefObject<HTMLDivElement | null>;
|
|
50
|
+
slots: {
|
|
51
|
+
base: string;
|
|
52
|
+
label: string;
|
|
53
|
+
inputWrapper: string;
|
|
54
|
+
innerWrapper: string;
|
|
55
|
+
segment: string;
|
|
56
|
+
helperWrapper: string;
|
|
57
|
+
description: string;
|
|
58
|
+
errorMessage: string;
|
|
59
|
+
};
|
|
60
|
+
classNames: Partial<{
|
|
61
|
+
base: string;
|
|
62
|
+
label: string[];
|
|
63
|
+
inputWrapper: string[];
|
|
64
|
+
innerWrapper: string;
|
|
65
|
+
segment: string[];
|
|
66
|
+
helperWrapper: string;
|
|
67
|
+
description: string;
|
|
68
|
+
errorMessage: string;
|
|
69
|
+
}> | undefined;
|
|
70
|
+
getBaseGroupProps: () => {
|
|
71
|
+
ref: import('react').RefObject<HTMLDivElement | null>;
|
|
72
|
+
className: string;
|
|
73
|
+
'data-slot': string;
|
|
74
|
+
'data-filled': boolean;
|
|
75
|
+
'data-filled-within': boolean;
|
|
76
|
+
'data-invalid': boolean;
|
|
77
|
+
'data-disabled': boolean | undefined;
|
|
78
|
+
label: import('react').ReactNode;
|
|
79
|
+
description: import('react').ReactNode;
|
|
80
|
+
errorMessage: string | number | bigint | true | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | null;
|
|
81
|
+
isInvalid: boolean;
|
|
82
|
+
startContent: import('react').ReactNode;
|
|
83
|
+
endContent: import('react').ReactNode;
|
|
84
|
+
shouldLabelBeOutside: boolean;
|
|
85
|
+
labelProps: {
|
|
86
|
+
className: string;
|
|
87
|
+
};
|
|
88
|
+
wrapperProps: {
|
|
89
|
+
className: string;
|
|
90
|
+
'data-focus': boolean;
|
|
91
|
+
};
|
|
92
|
+
innerWrapperProps: {
|
|
93
|
+
className: string;
|
|
94
|
+
};
|
|
95
|
+
helperWrapperProps: {
|
|
96
|
+
className: string;
|
|
97
|
+
};
|
|
98
|
+
errorMessageProps: {
|
|
99
|
+
className: string;
|
|
100
|
+
};
|
|
101
|
+
descriptionProps: {
|
|
102
|
+
className: string;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
getFieldProps: () => {
|
|
106
|
+
onFocus: (e: React.FocusEvent) => void;
|
|
107
|
+
onBlur: (e: React.FocusEvent) => void;
|
|
108
|
+
className: string;
|
|
109
|
+
};
|
|
110
|
+
getInputProps: () => {
|
|
111
|
+
type: string;
|
|
112
|
+
name: string | undefined;
|
|
113
|
+
value: string;
|
|
114
|
+
disabled: boolean | undefined;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
1
2
|
import { default as React } from 'react';
|
|
2
3
|
export declare const iconButtonVariants: (props?: ({
|
|
3
4
|
variant?: "link" | "outline" | "primary" | "secondary" | "tertiary" | "destructive" | "ghost" | null | undefined;
|
|
4
5
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
5
6
|
shape?: "full" | "minimal" | "sharp" | null | undefined;
|
|
7
|
+
containerShape?: "normal" | "wide-pill" | null | undefined;
|
|
6
8
|
isLoading?: boolean | null | undefined;
|
|
7
9
|
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
8
|
-
export interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
9
|
-
variant?: "primary" | "secondary" | "tertiary" | "outline" | "destructive" | "ghost" | "link";
|
|
10
|
-
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
11
|
-
shape?: "full" | "minimal" | "sharp";
|
|
12
|
-
isLoading?: boolean;
|
|
10
|
+
export interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof iconButtonVariants> {
|
|
13
11
|
}
|
|
14
12
|
export declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement>>;
|