@lumiastream/ui 0.2.0 → 0.2.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.
Files changed (3) hide show
  1. package/dist/index.d.ts +222 -1
  2. package/dist/index.js +1309 -6
  3. package/package.json +59 -54
package/dist/index.d.ts CHANGED
@@ -1,4 +1,14 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { TextFieldProps } from '@mui/material/TextField';
3
+ import * as React from 'react';
4
+ import { JSX, ReactNode, HTMLAttributes } from 'react';
5
+ import { SelectProps } from '@mui/material/Select';
6
+ import { CheckboxProps } from '@mui/material/Checkbox';
7
+ import { FieldValues, Path } from 'react-hook-form';
8
+ import { RadioProps } from '@mui/material/Radio';
9
+ import { RadioGroupProps } from '@mui/material/RadioGroup';
10
+ import * as _mui_material from '@mui/material';
11
+ import { AutocompleteRenderOptionState } from '@mui/material/Autocomplete';
2
12
  import { CompletionContext } from '@codemirror/autocomplete';
3
13
 
4
14
  interface LSButtonProps {
@@ -16,6 +26,217 @@ interface LSButtonProps {
16
26
  /** Primary UI component for user interaction */
17
27
  declare const LSButton: ({ primary, size, backgroundColor, label, ...props }: LSButtonProps) => react_jsx_runtime.JSX.Element;
18
28
 
29
+ interface LSInputPropsChild$1 {
30
+ id?: string;
31
+ name?: string;
32
+ label?: React.ReactNode;
33
+ inputRef?: any;
34
+ inputAfterText?: React.ReactNode;
35
+ inputBeforeText?: React.ReactNode;
36
+ startAdornment?: React.ReactNode;
37
+ endAdornment?: React.ReactNode;
38
+ InputProps?: any;
39
+ InputLabelProps?: any;
40
+ inputProps?: any;
41
+ centerText?: boolean;
42
+ maxWidth?: string;
43
+ $maxWidth?: string;
44
+ readOnly?: boolean;
45
+ onChange?: (event: any, value?: string | number) => void;
46
+ onChangeStart?: (event?: any, value?: string | number) => void;
47
+ onChangeEnd?: (event?: any, value?: string | number) => void;
48
+ $noMinHeight?: boolean;
49
+ $minHeight?: string;
50
+ bypasscolor?: 'inherit' | 'primary' | 'secondary' | 'default';
51
+ textColor?: string;
52
+ }
53
+ type ProtoExntends$2<T, U> = U & Omit<T, keyof U>;
54
+ type LSInputProps$1 = ProtoExntends$2<TextFieldProps, LSInputPropsChild$1>;
55
+ declare const LSInput: React.ForwardRefExoticComponent<Omit<LSInputProps$1, "ref"> & React.RefAttributes<HTMLInputElement>>;
56
+
57
+ interface LSInputPropsChild {
58
+ name?: string;
59
+ value?: number;
60
+ autoFocus?: boolean;
61
+ defaultValue?: number;
62
+ label?: React.ReactNode;
63
+ inline?: boolean;
64
+ hasInfo?: boolean;
65
+ infoOpen?: () => void;
66
+ infoClose?: () => void;
67
+ type?: string;
68
+ isFloat?: boolean;
69
+ isMiliseconds?: boolean;
70
+ isFloatMiliseconds?: boolean;
71
+ step?: number;
72
+ min?: number;
73
+ max?: number;
74
+ inputAfterText?: string;
75
+ inputProps?: LSInputProps;
76
+ startIcon?: React.ElementType;
77
+ endIcon?: React.ElementType;
78
+ color?: 'primary' | 'secondary';
79
+ labelColor?: 'inherit' | 'initial' | 'primary' | 'secondary' | 'textPrimary' | 'textSecondary' | 'error';
80
+ onChange?: (value: any) => any;
81
+ fullWidth?: boolean;
82
+ helperText?: React.ReactNode;
83
+ hideInput?: boolean;
84
+ hideSlider?: boolean;
85
+ valueLabelFormat?: (value: number) => React.ReactNode;
86
+ }
87
+ type ProtoExntends$1<T, U> = U & Omit<T, keyof U>;
88
+ type LSInputProps = ProtoExntends$1<LSInputProps$1, LSInputPropsChild>;
89
+ declare const LSSliderInput: React.FC<LSInputProps>;
90
+
91
+ interface LSSelectPropsChild {
92
+ noBg?: boolean;
93
+ placeholder?: React.ReactNode | string;
94
+ }
95
+ type ProtoExntends<T, U> = U & Omit<T, keyof U>;
96
+ type LSSelectProps = ProtoExntends<SelectProps, LSSelectPropsChild>;
97
+ declare const LSSelect: React.FC<LSSelectProps>;
98
+
99
+ type LSCheckboxProps = CheckboxProps & {
100
+ inputRef?: React.Ref<HTMLInputElement>;
101
+ };
102
+ declare const LSCheckbox: React.ForwardRefExoticComponent<Omit<LSCheckboxProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
103
+ type LSCheckboxFieldProps<TFieldValues extends FieldValues> = {
104
+ name: Path<TFieldValues>;
105
+ label: React.ReactNode;
106
+ control?: any;
107
+ className?: string;
108
+ disabled?: boolean;
109
+ labelPlacement?: 'end' | 'start' | 'top' | 'bottom';
110
+ checkboxProps?: Omit<LSCheckboxProps, 'checked' | 'onChange' | 'name' | 'inputRef'>;
111
+ };
112
+ declare function LSCheckboxField<TFieldValues extends FieldValues>({ name, label, control, className, disabled, labelPlacement, checkboxProps, }: LSCheckboxFieldProps<TFieldValues>): JSX.Element;
113
+
114
+ type LSColorPickerProps = {
115
+ value?: string;
116
+ onChange: (value: string) => void;
117
+ onBlur?: () => void;
118
+ className?: string;
119
+ name?: string;
120
+ label?: ReactNode;
121
+ helperText?: ReactNode;
122
+ placeholder?: string;
123
+ hideGradientControls?: boolean;
124
+ usePopup?: boolean;
125
+ disabled?: boolean;
126
+ };
127
+ declare const LSColorPicker: ({ value, onChange, onBlur, className, name, label, helperText, placeholder, hideGradientControls, usePopup, disabled }: LSColorPickerProps) => react_jsx_runtime.JSX.Element;
128
+
129
+ interface FontPickerProps {
130
+ value: string;
131
+ onChange: (value: string) => void;
132
+ fonts?: string[];
133
+ localFonts?: string[];
134
+ onLoadFonts?: (fonts: string[]) => void;
135
+ defaultValue?: string;
136
+ placeholder?: string;
137
+ isAlertManager?: boolean;
138
+ label?: React.ReactNode;
139
+ helperText?: React.ReactNode;
140
+ }
141
+ declare const LSFontPicker: React.NamedExoticComponent<FontPickerProps>;
142
+
143
+ type Option = {
144
+ label: string | number;
145
+ value: string;
146
+ };
147
+ type LSMultiSelectProps = {
148
+ options: Option[];
149
+ placeholder?: string;
150
+ value: string[];
151
+ onChange: (selected: string[]) => void;
152
+ label?: string;
153
+ };
154
+ declare const LSMultiSelect: React.FC<LSMultiSelectProps>;
155
+
156
+ declare const LSRadio: React.FC<RadioProps>;
157
+ type LSRadioSelection = {
158
+ value: string;
159
+ label: React.ReactNode;
160
+ disabled?: boolean;
161
+ };
162
+ type LSRadioGroupProps = RadioGroupProps & {
163
+ selections: LSRadioSelection[];
164
+ optionClassName?: string;
165
+ };
166
+ declare const LSRadioGroup: React.FC<LSRadioGroupProps>;
167
+
168
+ type LSTextFieldProps = TextFieldProps & {
169
+ InputLabelProps?: Record<string, unknown>;
170
+ InputProps?: Record<string, unknown>;
171
+ };
172
+ declare const LSTextField: React.ForwardRefExoticComponent<(Omit<_mui_material.FilledTextFieldProps & {
173
+ InputLabelProps?: Record<string, unknown>;
174
+ InputProps?: Record<string, unknown>;
175
+ }, "ref"> | Omit<_mui_material.OutlinedTextFieldProps & {
176
+ InputLabelProps?: Record<string, unknown>;
177
+ InputProps?: Record<string, unknown>;
178
+ }, "ref"> | Omit<_mui_material.StandardTextFieldProps & {
179
+ InputLabelProps?: Record<string, unknown>;
180
+ InputProps?: Record<string, unknown>;
181
+ }, "ref">) & React.RefAttributes<HTMLDivElement>>;
182
+
183
+ interface IVariables {
184
+ name: string;
185
+ system: boolean;
186
+ locked?: boolean;
187
+ origin: string;
188
+ allowedPlaces?: string[];
189
+ description: string;
190
+ counter?: boolean;
191
+ value: string | number;
192
+ }
193
+ type LSVariableInputTranslate = (key: string, fallback?: string, options?: Record<string, unknown>) => string;
194
+ type LSVariableInputContextValue = {
195
+ systemVariables?: Record<string, unknown>;
196
+ functionVariables?: string[];
197
+ translate?: LSVariableInputTranslate;
198
+ onVariableTranslationsNeeded?: () => void;
199
+ };
200
+ declare const LSVariableInputProvider: ({ children, value }: {
201
+ children: ReactNode;
202
+ value: LSVariableInputContextValue;
203
+ }) => react_jsx_runtime.JSX.Element;
204
+ type LSVariableInputFieldProps = {
205
+ name?: string;
206
+ label?: ReactNode;
207
+ type?: string;
208
+ isAutoComplete?: boolean;
209
+ autoCompleteOptions?: Array<{
210
+ label: string;
211
+ value: any;
212
+ }>;
213
+ hideVariables?: boolean;
214
+ allowedVariables?: IVariables[] | string[] | any;
215
+ disabled?: boolean;
216
+ autoFocus?: boolean;
217
+ inputProps?: any;
218
+ multiline?: boolean;
219
+ rows?: number;
220
+ maxRows?: number;
221
+ value?: string | number | any[];
222
+ placeholder?: string;
223
+ renderOption?: (props: HTMLAttributes<HTMLLIElement>, option: any, state: AutocompleteRenderOptionState) => ReactNode;
224
+ variant?: 'standard' | 'filled' | 'outlined';
225
+ ListboxComponent?: any;
226
+ onScrollListBox?: (e: any) => void;
227
+ onHighlightChange?: (e: any, value: any) => void;
228
+ onPopupClose?: (e: any, reason: any) => void;
229
+ onPopupOpen?: (e: any) => void;
230
+ onAutocompleteKeyUp?: (e: any, value: any) => void;
231
+ afterFilter?: (filtered: any[]) => void;
232
+ onChange?: (value: string) => void;
233
+ systemVariables?: Record<string, unknown>;
234
+ functionVariables?: string[];
235
+ translate?: LSVariableInputTranslate;
236
+ onVariableTranslationsNeeded?: () => void;
237
+ };
238
+ declare const LSVariableInputField: React.ForwardRefExoticComponent<LSVariableInputFieldProps & React.RefAttributes<HTMLInputElement>>;
239
+
19
240
  declare function variableCompletionOptions(context: CompletionContext, variables: {
20
241
  label: string;
21
242
  displayLabel: string;
@@ -228,4 +449,4 @@ declare const resolvePlatformChatterProfileUrl: ({ platform, username, displayna
228
449
  declare const normalizeHttpUrl: (value: unknown) => string | null;
229
450
  declare const resolveChatterProfileUrlWithResolvers: ({ platform, username, displayname, userId, extraSettings, resolvers, }: ResolveChatterProfileUrlWithResolversInput) => Promise<string | null>;
230
451
 
231
- export { type BuildChatMessageContentOptions, type ChatMessageContentItem, type ChatMessageEmoteStore, type ChatMessageToken, type ChatMessageTokenizationOptions, type ChatboxMediaPreview, type ChatboxMediaPreviewKind, type ChatterProfileResolver, type ChatterProfileResolverPayload, type ChatterProfileUrlInput, LSButton, type LSButtonProps, MEDIA_PREVIEW_USER_LEVEL_VALUES, type MediaPreviewRoleSettings, type MediaPreviewRoleSettingsInput, type MediaPreviewUserLevel, type MessageLinkPart, type ResolveChatterProfileUrlWithResolversInput, buildChatMessageContent, codeMirrorlinterOptions, getMediaPreviewFromUrl, getNormalizedUserLevels, isMediaPreviewAllowedForUser, normalizeHttpUrl, normalizeMediaPreviewUserLevels, parseMessageLinks, resolveChatterProfileUrlWithResolvers, resolveMediaPreviewRoleSettings, resolveMediaPreviewSetting, resolvePlatformChatterProfileUrl, tokenizeChatMessage, variableCompletionOptions };
452
+ export { type BuildChatMessageContentOptions, type ChatMessageContentItem, type ChatMessageEmoteStore, type ChatMessageToken, type ChatMessageTokenizationOptions, type ChatboxMediaPreview, type ChatboxMediaPreviewKind, type ChatterProfileResolver, type ChatterProfileResolverPayload, type ChatterProfileUrlInput, type IVariables, LSButton, type LSButtonProps, LSCheckbox, LSCheckboxField, LSColorPicker, type LSColorPickerProps, LSFontPicker, LSInput, type LSInputProps$1 as LSInputProps, LSMultiSelect, LSRadio, LSRadioGroup, LSSelect, LSSliderInput, type LSInputProps as LSSliderInputProps, LSTextField, type LSTextFieldProps, type LSVariableInputContextValue, LSVariableInputField, type LSVariableInputFieldProps, LSVariableInputProvider, MEDIA_PREVIEW_USER_LEVEL_VALUES, type MediaPreviewRoleSettings, type MediaPreviewRoleSettingsInput, type MediaPreviewUserLevel, type MessageLinkPart, type ResolveChatterProfileUrlWithResolversInput, buildChatMessageContent, codeMirrorlinterOptions, getMediaPreviewFromUrl, getNormalizedUserLevels, isMediaPreviewAllowedForUser, normalizeHttpUrl, normalizeMediaPreviewUserLevels, parseMessageLinks, resolveChatterProfileUrlWithResolvers, resolveMediaPreviewRoleSettings, resolveMediaPreviewSetting, resolvePlatformChatterProfileUrl, tokenizeChatMessage, variableCompletionOptions };