@apple-pie/slice 0.0.0
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 +80 -0
- package/dist/colors.css +237 -0
- package/dist/flexBox.module.css +85 -0
- package/dist/index.esm.js +4831 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +4873 -0
- package/dist/index.js.map +1 -0
- package/dist/type.css +16 -0
- package/dist/type.module.css +161 -0
- package/dist/types/hooks/index.d.ts +2 -0
- package/dist/types/hooks/useMayaTheme.d.ts +7 -0
- package/dist/types/hooks/useObserveResize.d.ts +9 -0
- package/dist/types/hooks/useTheme.d.ts +2 -0
- package/dist/types/hooks/useTrackRenders.d.ts +5 -0
- package/dist/types/index.d.ts +74 -0
- package/dist/types/providers/ThemeProvider.d.ts +9 -0
- package/dist/types/providers/index.d.ts +1 -0
- package/dist/types/theme/colors/colors.d.ts +4 -0
- package/dist/types/theme/colors/types.d.ts +160 -0
- package/dist/types/theme/corners/corners.d.ts +2 -0
- package/dist/types/theme/corners/types.d.ts +10 -0
- package/dist/types/theme/index.d.ts +5 -0
- package/dist/types/theme/themes.d.ts +12 -0
- package/dist/types/theme/type/type.d.ts +2 -0
- package/dist/types/theme/type/types.d.ts +20 -0
- package/dist/types/uikit/Avatar/Avatar.d.ts +3 -0
- package/dist/types/uikit/Avatar/AvatarInline.stories.d.ts +7 -0
- package/dist/types/uikit/Avatar/_types.d.ts +19 -0
- package/dist/types/uikit/Avatar/index.d.ts +2 -0
- package/dist/types/uikit/AvatarGroup/AvatarGroup.d.ts +3 -0
- package/dist/types/uikit/AvatarGroup/_types.d.ts +21 -0
- package/dist/types/uikit/AvatarGroup/index.d.ts +2 -0
- package/dist/types/uikit/Badge/Badge.d.ts +3 -0
- package/dist/types/uikit/Badge/_types.d.ts +5 -0
- package/dist/types/uikit/Badge/index.d.ts +2 -0
- package/dist/types/uikit/CheckBox/CheckBox.d.ts +3 -0
- package/dist/types/uikit/CheckBox/_types.d.ts +8 -0
- package/dist/types/uikit/CheckBox/index.d.ts +2 -0
- package/dist/types/uikit/DivInput/DivInput.d.ts +3 -0
- package/dist/types/uikit/DivInput/_types.d.ts +21 -0
- package/dist/types/uikit/DivInput/index.d.ts +2 -0
- package/dist/types/uikit/DocIcon/DocIcons.d.ts +3 -0
- package/dist/types/uikit/DocIcon/_types.d.ts +4 -0
- package/dist/types/uikit/DocIcon/index.d.ts +2 -0
- package/dist/types/uikit/Dot/Dot.d.ts +3 -0
- package/dist/types/uikit/Dot/_types.d.ts +15 -0
- package/dist/types/uikit/Dot/index.d.ts +2 -0
- package/dist/types/uikit/DraggablePanel/DrggablePanel.d.ts +43 -0
- package/dist/types/uikit/DraggablePanel/_types.d.ts +5 -0
- package/dist/types/uikit/DraggablePanel/index.d.ts +1 -0
- package/dist/types/uikit/DropDown/DropDown.d.ts +3 -0
- package/dist/types/uikit/DropDown/_types.d.ts +31 -0
- package/dist/types/uikit/DropDown/index.d.ts +2 -0
- package/dist/types/uikit/EditorButtonBar/EditorButtonBar.d.ts +4 -0
- package/dist/types/uikit/EditorButtonBar/_Data.d.ts +12 -0
- package/dist/types/uikit/EditorButtonBar/_types.d.ts +59 -0
- package/dist/types/uikit/EditorButtonBar/index.d.ts +2 -0
- package/dist/types/uikit/ErrorSummary/ErrorSummary.d.ts +3 -0
- package/dist/types/uikit/ErrorSummary/_types.d.ts +9 -0
- package/dist/types/uikit/ErrorSummary/index.d.ts +2 -0
- package/dist/types/uikit/FlexDiv/FlexDiv.d.ts +3 -0
- package/dist/types/uikit/FlexDiv/_types.d.ts +28 -0
- package/dist/types/uikit/FlexDiv/index.d.ts +2 -0
- package/dist/types/uikit/Grouper/Grouper.d.ts +3 -0
- package/dist/types/uikit/Grouper/_types.d.ts +16 -0
- package/dist/types/uikit/Grouper/index.d.ts +2 -0
- package/dist/types/uikit/Icon/Icon.d.ts +3 -0
- package/dist/types/uikit/Icon/_types.d.ts +102 -0
- package/dist/types/uikit/Icon/iconRegistry.d.ts +16 -0
- package/dist/types/uikit/Icon/index.d.ts +2 -0
- package/dist/types/uikit/IconButton/IconButton.d.ts +3 -0
- package/dist/types/uikit/IconButton/_types.d.ts +32 -0
- package/dist/types/uikit/IconButton/index.d.ts +2 -0
- package/dist/types/uikit/Logos/Logos.d.ts +2 -0
- package/dist/types/uikit/Logos/_types.d.ts +5 -0
- package/dist/types/uikit/Logos/index.d.ts +2 -0
- package/dist/types/uikit/MessageInput/ExcerptList/ExcerptList.d.ts +2 -0
- package/dist/types/uikit/MessageInput/ExcerptList/_types.d.ts +15 -0
- package/dist/types/uikit/MessageInput/FileList/FileList.d.ts +2 -0
- package/dist/types/uikit/MessageInput/FileList/_types.d.ts +6 -0
- package/dist/types/uikit/MessageInput/InputField/MessageInput.d.ts +2 -0
- package/dist/types/uikit/MessageInput/InputField/_types.d.ts +36 -0
- package/dist/types/uikit/MessageInput/UserList/UserList.d.ts +5 -0
- package/dist/types/uikit/MessageInput/UserList/_types.d.ts +40 -0
- package/dist/types/uikit/MessageInput/_Data.d.ts +6 -0
- package/dist/types/uikit/MessageInput/_types.d.ts +42 -0
- package/dist/types/uikit/MessageInput/index.d.ts +4 -0
- package/dist/types/uikit/Overlay/Overlay.d.ts +3 -0
- package/dist/types/uikit/Overlay/_types.d.ts +9 -0
- package/dist/types/uikit/Overlay/index.d.ts +2 -0
- package/dist/types/uikit/Pager/Pager.d.ts +3 -0
- package/dist/types/uikit/Pager/_types.d.ts +10 -0
- package/dist/types/uikit/Pager/index.d.ts +2 -0
- package/dist/types/uikit/Progress/DoneCheck/DoneCheck.d.ts +3 -0
- package/dist/types/uikit/Progress/DoneCheck/_types.d.ts +11 -0
- package/dist/types/uikit/Progress/ProgressIndicator/ProgressIndicator.d.ts +3 -0
- package/dist/types/uikit/Progress/ProgressIndicator/_types.d.ts +11 -0
- package/dist/types/uikit/Progress/index.d.ts +4 -0
- package/dist/types/uikit/RadioButton/RadioButton.d.ts +3 -0
- package/dist/types/uikit/RadioButton/_types.d.ts +20 -0
- package/dist/types/uikit/RadioButton/index.d.ts +2 -0
- package/dist/types/uikit/RadioButtonList/RadioButtonList.d.ts +3 -0
- package/dist/types/uikit/RadioButtonList/_types.d.ts +20 -0
- package/dist/types/uikit/RadioButtonList/index.d.ts +2 -0
- package/dist/types/uikit/Slider/Slider.d.ts +3 -0
- package/dist/types/uikit/Slider/_types.d.ts +17 -0
- package/dist/types/uikit/Slider/index.d.ts +2 -0
- package/dist/types/uikit/Spacer/Spacer.d.ts +3 -0
- package/dist/types/uikit/Spacer/_types.d.ts +3 -0
- package/dist/types/uikit/Spacer/index.d.ts +2 -0
- package/dist/types/uikit/Switch/Switch.d.ts +3 -0
- package/dist/types/uikit/Switch/_types.d.ts +12 -0
- package/dist/types/uikit/Switch/index.d.ts +2 -0
- package/dist/types/uikit/TabBar/TabBar.d.ts +3 -0
- package/dist/types/uikit/TabBar/_types.d.ts +47 -0
- package/dist/types/uikit/TabBar/index.d.ts +2 -0
- package/dist/types/uikit/TextArea/TextArea.d.ts +3 -0
- package/dist/types/uikit/TextArea/_types.d.ts +38 -0
- package/dist/types/uikit/TextArea/index.d.ts +2 -0
- package/dist/types/uikit/Textfield/TextField.d.ts +3 -0
- package/dist/types/uikit/Textfield/_types.d.ts +77 -0
- package/dist/types/uikit/Textfield/index.d.ts +2 -0
- package/dist/types/uikit/UIButton/UIButton.d.ts +3 -0
- package/dist/types/uikit/UIButton/_types.d.ts +42 -0
- package/dist/types/uikit/UIButton/index.d.ts +2 -0
- package/dist/types/uikit/UIButtonBar/UIButtonBar.d.ts +2 -0
- package/dist/types/uikit/UIButtonBar/_types.d.ts +14 -0
- package/dist/types/uikit/UIButtonBar/index.d.ts +2 -0
- package/dist/types/uikit/UICard/UICard.d.ts +3 -0
- package/dist/types/uikit/UICard/_types.d.ts +11 -0
- package/dist/types/uikit/UICard/index.d.ts +2 -0
- package/dist/types/uikit/UIChip/UIChip.d.ts +3 -0
- package/dist/types/uikit/UIChip/_types.d.ts +19 -0
- package/dist/types/uikit/UIChip/index.d.ts +3 -0
- package/dist/types/uikit/UIFileIcon/UIFileIcon.d.ts +3 -0
- package/dist/types/uikit/UIFileIcon/_types.d.ts +17 -0
- package/dist/types/uikit/UIFileIcon/index.d.ts +2 -0
- package/dist/types/uikit/UILabel/UILabel.d.ts +2 -0
- package/dist/types/uikit/UILabel/_types.d.ts +9 -0
- package/dist/types/uikit/UILabel/index.d.ts +2 -0
- package/dist/types/uikit/sharedTypes.d.ts +21 -0
- package/dist/types/util/debounce.d.ts +10 -0
- package/dist/types/util/flexBox.d.ts +11 -0
- package/dist/types/util/utils.d.ts +33 -0
- package/package.json +74 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { DocExcerpt } from './ExcerptList/_types';
|
|
2
|
+
export type SendMessage = {
|
|
3
|
+
id: string;
|
|
4
|
+
content: string;
|
|
5
|
+
timestamp: string;
|
|
6
|
+
promptType: PromptType;
|
|
7
|
+
role: Role;
|
|
8
|
+
htmlContent: string;
|
|
9
|
+
files: File[];
|
|
10
|
+
excerpts: DocExcerpt[];
|
|
11
|
+
done: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare enum PromptType {
|
|
14
|
+
none = -1,
|
|
15
|
+
text = 0,
|
|
16
|
+
expand = 1,
|
|
17
|
+
summarize = 2,
|
|
18
|
+
research = 3,
|
|
19
|
+
translate = 4,
|
|
20
|
+
shorten = 5,
|
|
21
|
+
file = 6,
|
|
22
|
+
compliance = 7
|
|
23
|
+
}
|
|
24
|
+
export declare enum Role {
|
|
25
|
+
USER = "user",
|
|
26
|
+
ASSISTANT = "assistant",
|
|
27
|
+
TOOL = "tool",
|
|
28
|
+
SYSTEM = "system"
|
|
29
|
+
}
|
|
30
|
+
export type UploadDocument = {
|
|
31
|
+
fileName?: string;
|
|
32
|
+
mimeType?: string;
|
|
33
|
+
size?: number;
|
|
34
|
+
docType?: DocumentType;
|
|
35
|
+
lastModified?: string;
|
|
36
|
+
localURL?: string;
|
|
37
|
+
file?: File;
|
|
38
|
+
};
|
|
39
|
+
export type JurisdictionFocus = {
|
|
40
|
+
country?: string | null;
|
|
41
|
+
state?: string | null;
|
|
42
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ProgressIndicatorProps } from './_types';
|
|
2
|
+
export declare function ProgressIndicator(props: Readonly<ProgressIndicatorProps>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const OpenCircle: (size: number, secondsPerSpin: number, color: string, stroke?: number, playing?: boolean) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type RadioButtonOption = {
|
|
2
|
+
fieldName?: string;
|
|
3
|
+
title?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
state?: boolean;
|
|
6
|
+
icon?: string;
|
|
7
|
+
};
|
|
8
|
+
export interface RadioButtonProps {
|
|
9
|
+
selected?: boolean;
|
|
10
|
+
option: RadioButtonOption;
|
|
11
|
+
deselect?: boolean;
|
|
12
|
+
tabIndex?: number;
|
|
13
|
+
wrap?: boolean;
|
|
14
|
+
list?: boolean;
|
|
15
|
+
hideRadio?: boolean;
|
|
16
|
+
toggleIcon?: boolean;
|
|
17
|
+
iconColor?: string;
|
|
18
|
+
noFrame?: boolean;
|
|
19
|
+
onChange?: (option: RadioButtonOption, state: boolean) => void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { RadioButtonOption } from '../RadioButton/_types';
|
|
2
|
+
export interface RadioButtonListProps {
|
|
3
|
+
options?: RadioButtonOption[];
|
|
4
|
+
selectedIndexes?: number[] | null;
|
|
5
|
+
selectedOptions?: string[] | null;
|
|
6
|
+
label?: string | null;
|
|
7
|
+
deselect?: boolean;
|
|
8
|
+
multiSelect?: boolean;
|
|
9
|
+
wrap?: boolean;
|
|
10
|
+
spacer?: 'xl' | 'lg' | 'md' | 'sm' | 'custom' | 'none';
|
|
11
|
+
custom?: number;
|
|
12
|
+
gap?: number;
|
|
13
|
+
tabIndexSeed?: number;
|
|
14
|
+
hideRadio?: boolean;
|
|
15
|
+
toggleIcon?: boolean;
|
|
16
|
+
iconColor?: string;
|
|
17
|
+
iconSelectedColor?: string;
|
|
18
|
+
noFrame?: boolean;
|
|
19
|
+
onChange?: (options: RadioButtonOption[] | null, indexes: number[] | null) => void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface SliderProps {
|
|
2
|
+
value?: number;
|
|
3
|
+
scaleMin?: number;
|
|
4
|
+
scaleMax?: number;
|
|
5
|
+
width?: number | string;
|
|
6
|
+
height?: number | string;
|
|
7
|
+
touchHeight?: number | string;
|
|
8
|
+
trackHeadSize?: number | null;
|
|
9
|
+
trackHeadWidth?: number | null;
|
|
10
|
+
headType?: 'round' | 'square' | 'none';
|
|
11
|
+
headColor?: string;
|
|
12
|
+
trackColor?: string;
|
|
13
|
+
progressColor?: string;
|
|
14
|
+
cursor?: 'default' | 'grab' | 'grabbing' | 'pointer';
|
|
15
|
+
onChange?: (value: number, percent: number) => void;
|
|
16
|
+
onDragChange?: (value: number, percent: number) => void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Transition } from 'motion/react';
|
|
2
|
+
export interface SwitchProps {
|
|
3
|
+
state?: boolean;
|
|
4
|
+
height?: number;
|
|
5
|
+
width?: number;
|
|
6
|
+
bgColorOff?: string;
|
|
7
|
+
bgColorOn?: string;
|
|
8
|
+
knobColor?: string;
|
|
9
|
+
padding?: number;
|
|
10
|
+
onChange?: (state: boolean) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const TRANSITION: Transition;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { ToolTip } from '../sharedTypes';
|
|
2
|
+
export type TabOption = {
|
|
3
|
+
name?: string;
|
|
4
|
+
value?: any;
|
|
5
|
+
icon?: string | null;
|
|
6
|
+
toolTip?: string;
|
|
7
|
+
count?: number;
|
|
8
|
+
component?: any;
|
|
9
|
+
};
|
|
10
|
+
export declare const placeholderOptions: TabOption[];
|
|
11
|
+
export interface TabBarProps {
|
|
12
|
+
options?: TabOption[];
|
|
13
|
+
selected?: number;
|
|
14
|
+
underline?: boolean;
|
|
15
|
+
border?: boolean;
|
|
16
|
+
selectedValue?: string;
|
|
17
|
+
height?: number | string;
|
|
18
|
+
width?: number | string;
|
|
19
|
+
tabWidth?: 'min-content' | 'distribute' | number;
|
|
20
|
+
closeWidth?: number | string;
|
|
21
|
+
padding?: number | string;
|
|
22
|
+
iconSize?: number;
|
|
23
|
+
iconGap?: number;
|
|
24
|
+
tabGap?: number;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
hasClose?: boolean;
|
|
27
|
+
onToolTip?: (tip: ToolTip | null) => void;
|
|
28
|
+
onChange?: (index: number) => void;
|
|
29
|
+
onTabChange?: (option: TabOption) => void;
|
|
30
|
+
onClose?: () => void;
|
|
31
|
+
}
|
|
32
|
+
export interface TabOptionProps {
|
|
33
|
+
label?: string;
|
|
34
|
+
value?: number;
|
|
35
|
+
icon?: string | null;
|
|
36
|
+
showToolTip?: string | null;
|
|
37
|
+
selected?: boolean;
|
|
38
|
+
padding?: number | string;
|
|
39
|
+
iconSize?: number;
|
|
40
|
+
iconGap?: number;
|
|
41
|
+
disabled?: boolean;
|
|
42
|
+
count?: number;
|
|
43
|
+
tabWidth?: 'min-content' | 'distribute' | number;
|
|
44
|
+
underline?: boolean;
|
|
45
|
+
onClick?: (value: number) => void;
|
|
46
|
+
onToolTip?: (tip: ToolTip | null) => void;
|
|
47
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export interface TextAreaProps {
|
|
3
|
+
value?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
width?: number | string;
|
|
6
|
+
minWidth?: number | string;
|
|
7
|
+
rows?: number;
|
|
8
|
+
focused?: boolean;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
padding?: number | string;
|
|
11
|
+
validate?: boolean;
|
|
12
|
+
border?: boolean;
|
|
13
|
+
resizable?: boolean;
|
|
14
|
+
hasSend?: boolean;
|
|
15
|
+
sendOffset?: {
|
|
16
|
+
bottom: number;
|
|
17
|
+
right: number;
|
|
18
|
+
};
|
|
19
|
+
sendSize?: number;
|
|
20
|
+
bgColor?: string;
|
|
21
|
+
borderRadius?: number;
|
|
22
|
+
returnSubmits?: boolean;
|
|
23
|
+
textSize?: 's' | 'm' | 'l';
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
submitClears?: boolean;
|
|
26
|
+
onChange?: (value: string) => void;
|
|
27
|
+
onSubmit?: (value: string) => void;
|
|
28
|
+
onFocus?: () => void;
|
|
29
|
+
onBlur?: () => void;
|
|
30
|
+
onValidate?: (state: boolean) => void;
|
|
31
|
+
onKeyDown?: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
32
|
+
}
|
|
33
|
+
export type Tip = {
|
|
34
|
+
icon?: string;
|
|
35
|
+
iconRight?: boolean;
|
|
36
|
+
key: string;
|
|
37
|
+
label?: string;
|
|
38
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { Transition } from 'motion/react';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
export interface TextFieldProps {
|
|
4
|
+
value?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
labelSize?: 's' | 'm' | 'l';
|
|
8
|
+
textSize?: 's' | 'm' | 'l';
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
focused?: boolean;
|
|
11
|
+
editable?: boolean;
|
|
12
|
+
onChange?: (value: string) => void;
|
|
13
|
+
onBlur?: (value: string) => void;
|
|
14
|
+
onFocus?: (value: string) => void;
|
|
15
|
+
onKeydown?: (key: string, event: React.KeyboardEvent) => void;
|
|
16
|
+
onSubmit?: (value: string) => void;
|
|
17
|
+
onPaste?: (value: React.ClipboardEvent<HTMLInputElement>) => void;
|
|
18
|
+
onClear?: () => void;
|
|
19
|
+
onAction?: () => void;
|
|
20
|
+
onValidate?: (state: boolean) => void;
|
|
21
|
+
isValid?: boolean;
|
|
22
|
+
inline?: boolean;
|
|
23
|
+
maxLength?: number;
|
|
24
|
+
size?: {
|
|
25
|
+
width?: number | string;
|
|
26
|
+
height?: number | string;
|
|
27
|
+
};
|
|
28
|
+
padding?: string;
|
|
29
|
+
borderRadius?: number | string;
|
|
30
|
+
textAlign?: 'left' | 'center';
|
|
31
|
+
borderColor?: {
|
|
32
|
+
focused: string;
|
|
33
|
+
blurred: string;
|
|
34
|
+
error: string;
|
|
35
|
+
};
|
|
36
|
+
backgroundColor?: {
|
|
37
|
+
focused: string;
|
|
38
|
+
blurred: string;
|
|
39
|
+
};
|
|
40
|
+
color?: {
|
|
41
|
+
focused: string;
|
|
42
|
+
blurred: string;
|
|
43
|
+
error: string;
|
|
44
|
+
placeholder: string;
|
|
45
|
+
disabled: string;
|
|
46
|
+
label: string;
|
|
47
|
+
};
|
|
48
|
+
validate?: boolean;
|
|
49
|
+
iconLeft?: {
|
|
50
|
+
name?: string;
|
|
51
|
+
size?: number;
|
|
52
|
+
color?: string;
|
|
53
|
+
};
|
|
54
|
+
clearButton?: {
|
|
55
|
+
size?: number;
|
|
56
|
+
} | null;
|
|
57
|
+
clearBlurs?: boolean;
|
|
58
|
+
disabled?: boolean;
|
|
59
|
+
actionButton?: boolean;
|
|
60
|
+
borderType?: 'box' | 'underline' | 'none';
|
|
61
|
+
inputType?: 'text' | 'password';
|
|
62
|
+
noShow?: boolean;
|
|
63
|
+
}
|
|
64
|
+
export declare const MOTION_CONFIG: {
|
|
65
|
+
variants: {
|
|
66
|
+
initial: {
|
|
67
|
+
opacity: number;
|
|
68
|
+
};
|
|
69
|
+
animate: {
|
|
70
|
+
opacity: number;
|
|
71
|
+
};
|
|
72
|
+
exit: {
|
|
73
|
+
opacity: number;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
transition: Transition;
|
|
77
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { Transition, Variants } from 'motion/react';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
import type { ToolTip } from '../sharedTypes';
|
|
4
|
+
export interface UIButtonProps {
|
|
5
|
+
size?: 'large' | 'medium' | 'text';
|
|
6
|
+
variant?: 'solid' | 'outline' | 'text';
|
|
7
|
+
state?: 'normal' | 'hover' | 'disabled';
|
|
8
|
+
width?: string;
|
|
9
|
+
label?: string;
|
|
10
|
+
iconRight?: string;
|
|
11
|
+
iconLeft?: string;
|
|
12
|
+
fill?: boolean;
|
|
13
|
+
count?: number;
|
|
14
|
+
showDot?: boolean;
|
|
15
|
+
round?: boolean;
|
|
16
|
+
tooltip?: string;
|
|
17
|
+
iconSize?: number;
|
|
18
|
+
borderRadius?: number;
|
|
19
|
+
iconColor?: string;
|
|
20
|
+
bgColor?: string;
|
|
21
|
+
bgColorDisabled?: string;
|
|
22
|
+
labelColor?: string;
|
|
23
|
+
labelSize?: 's' | 'm' | 'l';
|
|
24
|
+
transition?: Transition;
|
|
25
|
+
variants?: Variants;
|
|
26
|
+
initial?: string;
|
|
27
|
+
animate?: string;
|
|
28
|
+
exit?: string;
|
|
29
|
+
underline?: boolean;
|
|
30
|
+
progress?: boolean;
|
|
31
|
+
working?: boolean;
|
|
32
|
+
duration?: number;
|
|
33
|
+
trigger?: boolean;
|
|
34
|
+
destructive?: boolean;
|
|
35
|
+
paddingRight?: number;
|
|
36
|
+
paddingLeft?: number;
|
|
37
|
+
onToolTip?: (tip: ToolTip | null) => void;
|
|
38
|
+
onClick?: (e: React.MouseEvent<HTMLDivElement, MouseEvent> | undefined) => void;
|
|
39
|
+
}
|
|
40
|
+
export interface UIButtonHandle {
|
|
41
|
+
triggerClick: () => void;
|
|
42
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ToolTip } from '../sharedTypes';
|
|
2
|
+
export type BarButton = {
|
|
3
|
+
icon?: string;
|
|
4
|
+
command?: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
tip: string;
|
|
7
|
+
};
|
|
8
|
+
export interface UIButtonBarProps {
|
|
9
|
+
options?: BarButton[];
|
|
10
|
+
label?: string;
|
|
11
|
+
current?: number;
|
|
12
|
+
onChange?: (option: BarButton) => void;
|
|
13
|
+
onToolTip?: (tip: ToolTip | null) => void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { IconNames } from '../Icon/_types';
|
|
3
|
+
import type { ToolTip } from '../sharedTypes';
|
|
4
|
+
export interface UIChipProps {
|
|
5
|
+
label?: string;
|
|
6
|
+
icon?: IconNames | string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
focused?: boolean;
|
|
9
|
+
tooltip?: string;
|
|
10
|
+
background?: string;
|
|
11
|
+
variant?: 'small' | 'regular';
|
|
12
|
+
labelSize?: 's' | 'm' | 'l';
|
|
13
|
+
unframed?: boolean;
|
|
14
|
+
iconRight?: boolean;
|
|
15
|
+
iconColor?: string;
|
|
16
|
+
onToolTip?: (tip: ToolTip | null) => void;
|
|
17
|
+
onClick?: (e: React.MouseEvent<HTMLDivElement> | undefined) => void;
|
|
18
|
+
onMouseDown?: (e: React.MouseEvent<HTMLDivElement> | undefined) => void;
|
|
19
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export type FileIconDefinition = {
|
|
3
|
+
name: string;
|
|
4
|
+
icon?: any;
|
|
5
|
+
};
|
|
6
|
+
export declare enum UIFileIcons {
|
|
7
|
+
Pdf = "pdf",
|
|
8
|
+
Document = "document",
|
|
9
|
+
Spreadhseet = "spreadsheet"
|
|
10
|
+
}
|
|
11
|
+
export interface UIFileIconProps {
|
|
12
|
+
name?: UIFileIcons | string;
|
|
13
|
+
size?: number;
|
|
14
|
+
pointer?: boolean;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
onClick?: (e: React.MouseEvent<SVGElement, MouseEvent>) => void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export interface UILabelProps {
|
|
3
|
+
label?: string;
|
|
4
|
+
state?: 'red' | 'yellow' | 'green' | 'blue' | 'grey' | 'lightgrey' | 'white';
|
|
5
|
+
noFill?: boolean;
|
|
6
|
+
round?: boolean;
|
|
7
|
+
button?: boolean;
|
|
8
|
+
onClick?: (e: React.MouseEvent<any>) => void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export type ToolTip = {
|
|
3
|
+
type?: ToolTipType;
|
|
4
|
+
payload?: {
|
|
5
|
+
label: string;
|
|
6
|
+
duration?: number;
|
|
7
|
+
};
|
|
8
|
+
ref?: React.RefObject<any> | null;
|
|
9
|
+
event?: MouseEvent | React.MouseEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
export declare enum ToolTipType {
|
|
12
|
+
menu = "menu",
|
|
13
|
+
button = "button",
|
|
14
|
+
general = "general",
|
|
15
|
+
other = "other"
|
|
16
|
+
}
|
|
17
|
+
export type ToolTipInfo = {
|
|
18
|
+
title?: string | null;
|
|
19
|
+
description?: string | null;
|
|
20
|
+
image?: string | null;
|
|
21
|
+
};
|