freemium-ui 2.0.25 → 2.0.27

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/lib/index.d.ts CHANGED
@@ -3,15 +3,15 @@ import * as react from 'react';
3
3
  import react__default, { ReactNode } from 'react';
4
4
  import { AccordionSingleProps } from '@radix-ui/react-accordion';
5
5
  import * as Popover$1 from '@radix-ui/react-popover';
6
- import { PopperContentProps, PortalProps } from '@radix-ui/react-popover';
7
- import { RadioGroupProps as RadioGroupProps$1, RadioGroupContextValue } from '@radix-ui/react-radio-group';
8
- import { CheckboxProps as CheckboxProps$1 } from '@radix-ui/react-checkbox';
6
+ import { PortalProps, PopperContentProps } from '@radix-ui/react-popover';
9
7
  import * as Select from '@radix-ui/react-select';
10
8
  import { SelectProps, SelectContentProps, SelectItemProps } from '@radix-ui/react-select';
11
9
  export { Item as RadixSelectItem } from '@radix-ui/react-select';
10
+ import { UseSelectProps, UseComboboxProps, UseMultipleSelectionProps } from 'downshift';
11
+ import { RadioGroupProps as RadioGroupProps$1, RadioGroupContextValue } from '@radix-ui/react-radio-group';
12
+ import { CheckboxProps as CheckboxProps$1 } from '@radix-ui/react-checkbox';
12
13
  import * as styled_components from 'styled-components';
13
14
  import * as styled_components_dist_types from 'styled-components/dist/types';
14
- import { UseSelectProps, UseComboboxProps, UseMultipleSelectionProps } from 'downshift';
15
15
  import * as _radix_ui_react_label from '@radix-ui/react-label';
16
16
  import { LabelProps } from '@radix-ui/react-label';
17
17
  import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
@@ -137,6 +137,245 @@ interface AlertProps extends React.HTMLAttributes<HTMLDivElement> {
137
137
  */
138
138
  declare const Alert: ({ onClose, children, level, onDisappear, data, icon, overideClassName, timeout, canDismiss, alignContent, iconAlignment, ...props }: AlertProps) => react__default.JSX.Element | null;
139
139
 
140
+ type DropdownTypes = 'button' | 'input';
141
+ type DefaultDropdownItem = {
142
+ [key: string]: any;
143
+ group?: string;
144
+ };
145
+ type StyledListItemType = {
146
+ readOnly?: boolean;
147
+ $isSelected?: boolean;
148
+ $isHilighted?: boolean;
149
+ };
150
+ type DropdownInputItemProps = React.LiHTMLAttributes<HTMLLIElement> & StyledListItemType & {
151
+ key: string;
152
+ };
153
+ type PickedSelectProps = Pick<SelectProps, 'name' | 'disabled' | 'value'>;
154
+ interface DropdownProps<T extends DefaultDropdownItem = DefaultDropdownItem> extends PickedSelectProps {
155
+ /**
156
+ * The items to be displayed in the dropdown
157
+ */
158
+ items?: Array<T>;
159
+ /**
160
+ * The identifier for the items
161
+ */
162
+ itemIdentifier?: string;
163
+ isOpen?: SelectProps['open'];
164
+ defaultIsOpen?: SelectProps['defaultOpen'];
165
+ /**
166
+ * The selected item
167
+ */
168
+ defaultSelectedItem?: T | null;
169
+ /**
170
+ * Function to be called when the selected item changes
171
+ */
172
+ onChange?: (item: T | null) => void;
173
+ /**
174
+ * Fuction to give the string representation of the item
175
+ */
176
+ itemToString: (item: T, type?: 'list-item' | 'display' | 'downshift') => string;
177
+ /**
178
+ * The type of the dropdown
179
+ */
180
+ type?: DropdownTypes;
181
+ /**
182
+ * Is the dropdown read only
183
+ */
184
+ readOnly?: boolean;
185
+ /**
186
+ * Is the dropdown read only
187
+ */
188
+ showTick?: boolean;
189
+ /**
190
+ * The width of the dropdown
191
+ */
192
+ width?: string;
193
+ /**
194
+ * The key to be used for filtering
195
+ */
196
+ filterKey?: string;
197
+ /**
198
+ *
199
+ */
200
+ getCustomMessage?: (inoutValue: string) => string;
201
+ /**
202
+ *
203
+ */
204
+ emptyItemsText?: string;
205
+ /**
206
+ *
207
+ */
208
+ hideClear?: boolean;
209
+ /**
210
+ *
211
+ */
212
+ errorText?: string;
213
+ /**
214
+ *
215
+ */
216
+ className?: string;
217
+ /**
218
+ *
219
+ */
220
+ style?: React.CSSProperties;
221
+ /**
222
+ *
223
+ */
224
+ isErrored?: boolean;
225
+ /**
226
+ *
227
+ */
228
+ isRequired?: boolean;
229
+ /**
230
+ *
231
+ */
232
+ isMenuLoading?: boolean;
233
+ /**
234
+ *
235
+ */
236
+ matchButtonWidth?: boolean;
237
+ /**
238
+ *
239
+ */
240
+ onCustomValueAdd?: (item: {
241
+ inputValue: string;
242
+ customValues: boolean;
243
+ }) => void;
244
+ /**
245
+ *
246
+ */
247
+ customValues?: boolean;
248
+ /**
249
+ *
250
+ */
251
+ id?: string;
252
+ /**
253
+ *
254
+ */
255
+ label?: string;
256
+ /**
257
+ *
258
+ */
259
+ placeholder?: string;
260
+ /**
261
+ *
262
+ */
263
+ useSelectProps?: UseSelectProps<T>;
264
+ /**
265
+ *
266
+ */
267
+ useComboboxProps?: UseComboboxProps<T>;
268
+ itemComponent?: (item: T, props?: DropdownItemProps | DropdownInputItemProps) => React.ReactNode | string;
269
+ selectedItemComponent?: (item: T) => React.ReactNode | string;
270
+ clearInputOnselect?: boolean;
271
+ buttonContentProps?: SelectContentProps;
272
+ portalContainer?: PortalProps['container'];
273
+ }
274
+ interface DropdownButtonProps<T extends DefaultDropdownItem = DefaultDropdownItem> extends DropdownProps<T> {
275
+ }
276
+ interface DropdownInputProps<T extends DefaultDropdownItem = DefaultDropdownItem> extends DropdownProps<T> {
277
+ }
278
+ type DropdownItemProps = SelectItemProps & {
279
+ showTick: boolean;
280
+ };
281
+
282
+ declare const ListItem: styled_components.IStyledComponent<"web", styled_components_dist_types.Substitute<react.DetailedHTMLProps<react.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, StyledListItemType>>;
283
+
284
+ /**
285
+ * Dropdown displays a list or drop-down box that enables selection of an option or multiple options from an available list of values.
286
+ */
287
+ declare const Dropdown: <T extends DefaultDropdownItem>({ type, ...props }: DropdownProps<T>) => react__default.JSX.Element;
288
+ declare const Item: react__default.ForwardRefExoticComponent<Select.SelectItemProps & {
289
+ showTick: boolean;
290
+ } & react__default.RefAttributes<HTMLDivElement>>;
291
+
292
+ type DefaultAutoCompleteItem = DefaultDropdownItem;
293
+ type AutoCompleteInputItemProps = DropdownInputItemProps;
294
+ interface AutoCompleteProps<T extends DefaultAutoCompleteItem = DefaultAutoCompleteItem> {
295
+ /**
296
+ *
297
+ */
298
+ id?: string;
299
+ /**
300
+ *
301
+ */
302
+ url?: string;
303
+ /**
304
+ *
305
+ */
306
+ label?: string;
307
+ /**
308
+ *
309
+ */
310
+ disabled?: boolean;
311
+ /**
312
+ * Is the AutoComplete read only
313
+ */
314
+ readOnly?: boolean;
315
+ /**
316
+ * The width of the AutoComplete
317
+ */
318
+ width?: string;
319
+ /**
320
+ *
321
+ */
322
+ placeholder?: string;
323
+ /**
324
+ *
325
+ */
326
+ name?: string;
327
+ /**
328
+ * The items to be displayed in the AutoComplete
329
+ */
330
+ initialItems?: Array<T>;
331
+ /**
332
+ * The identifier for the items
333
+ */
334
+ itemIdentifier?: string;
335
+ /**
336
+ * The selected item
337
+ */
338
+ /**
339
+ * Function to be called when the selected item changes
340
+ */
341
+ onChange?: (item: T | null) => void;
342
+ defaultSelectedItem?: T | null;
343
+ /**
344
+ * Fuction to give the string representation of the item
345
+ */
346
+ itemToString: (item: T, type?: 'list-item' | 'display' | 'downshift') => string;
347
+ /**
348
+ *
349
+ */
350
+ errorText?: string;
351
+ /**
352
+ *
353
+ */
354
+ searchKey?: string;
355
+ /**
356
+ *
357
+ */
358
+ style?: React.CSSProperties;
359
+ /**
360
+ *
361
+ */
362
+ isErrored?: boolean;
363
+ /**
364
+ *
365
+ */
366
+ isRequired?: boolean;
367
+ /**
368
+ *
369
+ */
370
+ emptyItemsText?: string;
371
+ itemComponent?: (item: T, props?: AutoCompleteInputItemProps) => React.ReactNode | string;
372
+ }
373
+
374
+ /**
375
+ * Dropdown displays a list or drop-down box that enables selection of an option or multiple options from an available list of values.
376
+ */
377
+ declare const AutoComplete: <T extends DefaultDropdownItem>({ initialItems, disabled, id, label, errorText, name, placeholder, width, onChange, itemComponent, itemToString, searchKey, defaultSelectedItem, readOnly, itemIdentifier, isErrored, emptyItemsText, isRequired, style, url, }: AutoCompleteProps<T>) => react__default.JSX.Element;
378
+
140
379
  type ButtonSizeKey = 'mini' | 'normal' | 'large';
141
380
  type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'link';
142
381
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
@@ -415,158 +654,6 @@ interface DrawerProps {
415
654
  */
416
655
  declare const Drawer: ({ isOpen, children, hideDismissIcon, customClass, size, isFullHeight, placement, clickOutToClose, onDismiss, }: DrawerProps) => react__default.JSX.Element;
417
656
 
418
- type DropdownTypes = 'button' | 'input';
419
- type DefaultDropdownItem = {
420
- [key: string]: any;
421
- group?: string;
422
- };
423
- type StyledListItemType = {
424
- readOnly?: boolean;
425
- $isSelected?: boolean;
426
- $isHilighted?: boolean;
427
- };
428
- type DropdownInputItemProps = React.LiHTMLAttributes<HTMLLIElement> & StyledListItemType & {
429
- key: string;
430
- };
431
- type PickedSelectProps = Pick<SelectProps, 'name' | 'disabled' | 'value'>;
432
- interface DropdownProps<T extends DefaultDropdownItem = DefaultDropdownItem> extends PickedSelectProps {
433
- /**
434
- * The items to be displayed in the dropdown
435
- */
436
- items?: Array<T>;
437
- /**
438
- * The identifier for the items
439
- */
440
- itemIdentifier?: string;
441
- isOpen?: SelectProps['open'];
442
- defaultIsOpen?: SelectProps['defaultOpen'];
443
- /**
444
- * The selected item
445
- */
446
- defaultSelectedItem?: T | null;
447
- /**
448
- * Function to be called when the selected item changes
449
- */
450
- onChange?: (item: T | null) => void;
451
- /**
452
- * Fuction to give the string representation of the item
453
- */
454
- itemToString: (item: T, type?: 'list-item' | 'display' | 'downshift') => string;
455
- /**
456
- * The type of the dropdown
457
- */
458
- type?: DropdownTypes;
459
- /**
460
- * Is the dropdown read only
461
- */
462
- readOnly?: boolean;
463
- /**
464
- * Is the dropdown read only
465
- */
466
- showTick?: boolean;
467
- /**
468
- * The width of the dropdown
469
- */
470
- width?: string;
471
- /**
472
- * The key to be used for filtering
473
- */
474
- filterKey?: string;
475
- /**
476
- *
477
- */
478
- getCustomMessage?: (inoutValue: string) => string;
479
- /**
480
- *
481
- */
482
- emptyItemsText?: string;
483
- /**
484
- *
485
- */
486
- hideClear?: boolean;
487
- /**
488
- *
489
- */
490
- errorText?: string;
491
- /**
492
- *
493
- */
494
- className?: string;
495
- /**
496
- *
497
- */
498
- style?: React.CSSProperties;
499
- /**
500
- *
501
- */
502
- isErrored?: boolean;
503
- /**
504
- *
505
- */
506
- isRequired?: boolean;
507
- /**
508
- *
509
- */
510
- isMenuLoading?: boolean;
511
- /**
512
- *
513
- */
514
- matchButtonWidth?: boolean;
515
- /**
516
- *
517
- */
518
- onCustomValueAdd?: (item: {
519
- inputValue: string;
520
- customValues: boolean;
521
- }) => void;
522
- /**
523
- *
524
- */
525
- customValues?: boolean;
526
- /**
527
- *
528
- */
529
- id?: string;
530
- /**
531
- *
532
- */
533
- label?: string;
534
- /**
535
- *
536
- */
537
- placeholder?: string;
538
- /**
539
- *
540
- */
541
- useSelectProps?: UseSelectProps<T>;
542
- /**
543
- *
544
- */
545
- useComboboxProps?: UseComboboxProps<T>;
546
- itemComponent?: (item: T, props?: DropdownItemProps | DropdownInputItemProps) => React.ReactNode | string;
547
- selectedItemComponent?: (item: T) => React.ReactNode | string;
548
- clearInputOnselect?: boolean;
549
- buttonContentProps?: SelectContentProps;
550
- portalContainer?: PortalProps['container'];
551
- }
552
- interface DropdownButtonProps<T extends DefaultDropdownItem = DefaultDropdownItem> extends DropdownProps<T> {
553
- }
554
- interface DropdownInputProps<T extends DefaultDropdownItem = DefaultDropdownItem> extends DropdownProps<T> {
555
- }
556
- type DropdownItemProps = SelectItemProps & {
557
- showTick: boolean;
558
- };
559
-
560
- declare const ListItem: styled_components.IStyledComponent<"web", styled_components_dist_types.Substitute<react.DetailedHTMLProps<react.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, StyledListItemType>>;
561
-
562
- /**
563
- * Dropdown displays a list or drop-down box that enables selection of an option or multiple options from an available list of values.
564
- */
565
- declare const Dropdown: <T extends DefaultDropdownItem>({ type, ...props }: DropdownProps<T>) => react__default.JSX.Element;
566
- declare const Item: react__default.ForwardRefExoticComponent<Select.SelectItemProps & {
567
- showTick: boolean;
568
- } & react__default.RefAttributes<HTMLDivElement>>;
569
-
570
657
  declare const ChevronUp: react__default.ForwardRefExoticComponent<Omit<react__default.SVGProps<SVGSVGElement>, "ref"> & react__default.RefAttributes<SVGSVGElement>>;
571
658
 
572
659
  declare const Cross: react__default.ForwardRefExoticComponent<Omit<react__default.SVGProps<SVGSVGElement>, "ref"> & react__default.RefAttributes<SVGSVGElement>>;
@@ -1773,4 +1860,4 @@ declare namespace index_d {
1773
1860
  export { index_d_Z_INDEX as Z_INDEX, index_d_dark as dark, index_d_hextoRGB as hextoRGB, index_d_light as light };
1774
1861
  }
1775
1862
 
1776
- export { Accordion, type AccordionItemProps, type AccordionProps, Alert, type AlertProps, BoxedRadio, type BoxedRadioItemProps, type BoxedRadioProps, Button, ButtonDropdown, type ButtonDropdownItemProps, type ButtonDropdownProps, type ButtonProps, type ButtonSizeKey, type ButtonVariant, CardActions, CardContent, CardDescription, CardText, CardTitle, Checkbox, type CheckboxProps, Checkmark, ChevronUp, Confirmation, type ConfirmationProps, Cross as CrossIcon, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, DateTimePicker, type DateTimePickerProps, DateTimeRangePicker, type DateTimeRangePickerProps, type DefaultDropdownItem, type DefaultMultiSelectDropdownItem, type DefaultProps, Drawer, type DrawerPlacement, type DrawerProps, type DrawerSizeType, Dropdown, type DropdownButtonProps, ListItem as DropdownInputItem, type DropdownInputItemProps, type DropdownInputProps, Item as DropdownItem, type DropdownItemProps, DropdownMenuItem, type DropdownProps, type DropdownTypes, ErrorIcon, _default as FreemiumUIGlobalStyles, type FreemiumUiTheme, FreshLink, type FreshworksPalette, type FuiContextType, IconButton, InfoIcon, Input, InputLabel, type InputProps, type LevelType, Loader, type LoaderPropTypes, type LoaderSizes, type LoaderSpeeds, Menu, type MenuItemProps, type MenuProps, Minus, Modal, type ModalAlignType, type ModalCssType, type ModalPositionType, type ModalProps, type ModalSizeType, MoreVertical, MultiSelectDropdown, type MultiSelectDropdownProps, type Origin, Popover, PopoverClose, type PopoverProps, PopoverTrigger, Radio, RadioGroup, type RadioGroupProps, type RadioItemProps, type RadioProps, Reorder, type ReorderItemType, type ReorderProps, RequiredIndicator, type RowDataType, StyledLabel, type StyledListItemType, Table, type TableProps, Tabs, TabsContent, type TabsItemProps, TabsList, type TabsProps, TabsRoot, TabsTrigger, Tag, type TagProps, TextArea, type TextAreaProps, ThemeProvider, type ThemeProviderType, index_d as Themes, TickIcon, TimePicker, type TimePickerProps, type ToastContextType, type ToastItemProps, ToastProvider, type ToastType, type ToastTypes, type ToastWithID, Toggle, type ToggleProps, type ToggleSizes, Tooltip, type TooltipAlign, type TooltipPosition, type TooltipProps, type TooltipSide, TriggerButtonWrapper, Typography, type TypographyProps, type TypographyVariantType, type TypographyWeightType, type UpdateToastsFunction, Warning, dialogContentMixin, dialogOverlayMixin, useToasts };
1863
+ export { Accordion, type AccordionItemProps, type AccordionProps, Alert, type AlertProps, AutoComplete, type AutoCompleteInputItemProps, type AutoCompleteProps, BoxedRadio, type BoxedRadioItemProps, type BoxedRadioProps, Button, ButtonDropdown, type ButtonDropdownItemProps, type ButtonDropdownProps, type ButtonProps, type ButtonSizeKey, type ButtonVariant, CardActions, CardContent, CardDescription, CardText, CardTitle, Checkbox, type CheckboxProps, Checkmark, ChevronUp, Confirmation, type ConfirmationProps, Cross as CrossIcon, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, DateTimePicker, type DateTimePickerProps, DateTimeRangePicker, type DateTimeRangePickerProps, type DefaultAutoCompleteItem, type DefaultDropdownItem, type DefaultMultiSelectDropdownItem, type DefaultProps, Drawer, type DrawerPlacement, type DrawerProps, type DrawerSizeType, Dropdown, type DropdownButtonProps, ListItem as DropdownInputItem, type DropdownInputItemProps, type DropdownInputProps, Item as DropdownItem, type DropdownItemProps, DropdownMenuItem, type DropdownProps, type DropdownTypes, ErrorIcon, _default as FreemiumUIGlobalStyles, type FreemiumUiTheme, FreshLink, type FreshworksPalette, type FuiContextType, IconButton, InfoIcon, Input, InputLabel, type InputProps, type LevelType, Loader, type LoaderPropTypes, type LoaderSizes, type LoaderSpeeds, Menu, type MenuItemProps, type MenuProps, Minus, Modal, type ModalAlignType, type ModalCssType, type ModalPositionType, type ModalProps, type ModalSizeType, MoreVertical, MultiSelectDropdown, type MultiSelectDropdownProps, type Origin, Popover, PopoverClose, type PopoverProps, PopoverTrigger, Radio, RadioGroup, type RadioGroupProps, type RadioItemProps, type RadioProps, Reorder, type ReorderItemType, type ReorderProps, RequiredIndicator, type RowDataType, StyledLabel, type StyledListItemType, Table, type TableProps, Tabs, TabsContent, type TabsItemProps, TabsList, type TabsProps, TabsRoot, TabsTrigger, Tag, type TagProps, TextArea, type TextAreaProps, ThemeProvider, type ThemeProviderType, index_d as Themes, TickIcon, TimePicker, type TimePickerProps, type ToastContextType, type ToastItemProps, ToastProvider, type ToastType, type ToastTypes, type ToastWithID, Toggle, type ToggleProps, type ToggleSizes, Tooltip, type TooltipAlign, type TooltipPosition, type TooltipProps, type TooltipSide, TriggerButtonWrapper, Typography, type TypographyProps, type TypographyVariantType, type TypographyWeightType, type UpdateToastsFunction, Warning, dialogContentMixin, dialogOverlayMixin, useToasts };