freemium-ui 2.0.0-beta.22 → 2.0.0-beta.24

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/index.cjs.js CHANGED
@@ -3634,7 +3634,7 @@ className:"SelectScrollButton"},e.createElement(rr,{fill:n.colors.text.primary
3634
3634
  })))))),w&&z&&e.createElement(vc,null,z))
3635
3635
  },rm=({itemIdentifier:t="id",label:n,id:r,items:a=[],placeholder:o,readOnly:i=!1,disabled:l=!1,isRequired:c=!1,hideClear:s=!1,itemToString:u,name:d,filterKey:h,width:p,customValues:f,onCustomValueAdd:m,itemComponent:v,emptyItemsText:g,getCustomMessage:y,onChange:b,useComboboxProps:w,isErrored:C,errorText:z,defaultSelectedItem:M,isMenuLoading:x})=>{
3636
3636
  const E=qt(),[S,_]=e.useState(a),{isOpen:H,selectedItem:D,getToggleButtonProps:L,getLabelProps:V,getMenuProps:A,openMenu:k,highlightedIndex:T,setHighlightedIndex:R,setInputValue:P,inputValue:I,getItemProps:O,getInputProps:N}=ff({
3637
- selectedItem:M,items:S,isOpen:!0,onSelectedItemChange:({selectedItem:e})=>{
3637
+ selectedItem:M,items:S,onSelectedItemChange:({selectedItem:e})=>{
3638
3638
  console.log("onSelectedItemChange",{sI:e}),b?.(e??null)},
3639
3639
  onIsOpenChange:({isOpen:e})=>{
3640
3640
  if(e&&(""===I||D&&h&&(I||"").toLowerCase()===`${D?.[h||t]||""}`.toLowerCase()))_(a),
package/index.d.ts CHANGED
@@ -6,7 +6,7 @@ import { PopperContentProps } from '@radix-ui/react-popover';
6
6
  import { RadioGroupProps as RadioGroupProps$1, RadioGroupContextValue } from '@radix-ui/react-radio-group';
7
7
  import { CheckboxProps as CheckboxProps$1 } from '@radix-ui/react-checkbox';
8
8
  import * as Select from '@radix-ui/react-select';
9
- import { SelectProps } from '@radix-ui/react-select';
9
+ import { SelectProps, SelectItemProps } from '@radix-ui/react-select';
10
10
  export { Item as RadixSelectItem } from '@radix-ui/react-select';
11
11
  import * as styled_components from 'styled-components';
12
12
  import * as styled_components_dist_types from 'styled-components/dist/types';
@@ -355,6 +355,9 @@ type StyledListItemType = {
355
355
  isSelected?: boolean;
356
356
  isHilighted?: boolean;
357
357
  };
358
+ type DropdownInputItemProps = React.LiHTMLAttributes<HTMLLIElement> & StyledListItemType & {
359
+ key: string;
360
+ };
358
361
  type PickedSelectProps = Pick<SelectProps, 'name' | 'disabled' | 'value'>;
359
362
  interface DropdownProps<T extends DefaultDropdownItem = DefaultDropdownItem> extends PickedSelectProps {
360
363
  /**
@@ -466,7 +469,15 @@ interface DropdownProps<T extends DefaultDropdownItem = DefaultDropdownItem> ext
466
469
  *
467
470
  */
468
471
  useComboboxProps?: UseComboboxProps<T>;
472
+ itemComponent?: (item: T, props?: DropdownItemProps | DropdownInputItemProps) => React.ReactNode | string;
473
+ }
474
+ interface DropdownButtonProps<T extends DefaultDropdownItem = DefaultDropdownItem> extends DropdownProps<T> {
475
+ }
476
+ interface DropdownInputProps<T extends DefaultDropdownItem = DefaultDropdownItem> extends DropdownProps<T> {
469
477
  }
478
+ type DropdownItemProps = SelectItemProps & {
479
+ showTick: boolean;
480
+ };
470
481
 
471
482
  declare const ListItem: styled_components.IStyledComponent<"web", styled_components_dist_types.Substitute<react.DetailedHTMLProps<react.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, StyledListItemType>>;
472
483
 
@@ -1646,4 +1657,4 @@ declare namespace index_d {
1646
1657
  export { index_d_dark as dark, index_d_light as light };
1647
1658
  }
1648
1659
 
1649
- export { Alert, type AlertProps, type BaseProps, 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, 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, ListItem as DropdownInputItem, Item as DropdownItem, DropdownMenuItem, type DropdownProps, type DropdownTypes, Fade, type FadeProps, type FreemiumUiTheme, FreshLink, type FreshworksPalette, type FuiContextType, IconButton, 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, Radio, RadioGroup, type RadioGroupProps, type RadioItemProps, type RadioProps, Reorder, type ReorderItemType, type ReorderProps, RequiredIndicator, type RowData, Slide, SlideFade, type SlideFadeProps, type SlidePlacement, type SlideProps, StyledLabel, 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, Transition, type TransitionProps, type TransitionStyleState, type TransitionStyles, TriggerButtonWrapper, Typography, type TypographyProps, type TypographyVariantType, type TypographyWeightType, type UpdateToastsFunction, Warning, basicHide, basicShow, contentHide, contentShow, slideDownAndFade, slideLeftAndFade, slideRightAndFade, slideUpAndFade, useToasts };
1660
+ export { Alert, type AlertProps, type BaseProps, 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, 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, Fade, type FadeProps, type FreemiumUiTheme, FreshLink, type FreshworksPalette, type FuiContextType, IconButton, 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, Radio, RadioGroup, type RadioGroupProps, type RadioItemProps, type RadioProps, Reorder, type ReorderItemType, type ReorderProps, RequiredIndicator, type RowData, Slide, SlideFade, type SlideFadeProps, type SlidePlacement, type SlideProps, 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, Transition, type TransitionProps, type TransitionStyleState, type TransitionStyles, TriggerButtonWrapper, Typography, type TypographyProps, type TypographyVariantType, type TypographyWeightType, type UpdateToastsFunction, Warning, basicHide, basicShow, contentHide, contentShow, slideDownAndFade, slideLeftAndFade, slideRightAndFade, slideUpAndFade, useToasts };
package/index.js CHANGED
@@ -3624,7 +3624,7 @@ className:"SelectScrollButton"},t.createElement(xr,{fill:n.colors.text.primary
3624
3624
  })))))),w&&z&&t.createElement(Oc,null,z))
3625
3625
  },Dm=({itemIdentifier:e="id",label:n,id:r,items:a=[],placeholder:o,readOnly:i=!1,disabled:l=!1,isRequired:c=!1,hideClear:s=!1,itemToString:u,name:d,filterKey:h,width:p,customValues:f,onCustomValueAdd:m,itemComponent:v,emptyItemsText:g,getCustomMessage:y,onChange:b,useComboboxProps:w,isErrored:C,errorText:z,defaultSelectedItem:M,isMenuLoading:x})=>{
3626
3626
  const S=vn(),[E,_]=t.useState(a),{isOpen:H,selectedItem:D,getToggleButtonProps:L,getLabelProps:V,getMenuProps:A,openMenu:k,highlightedIndex:T,setHighlightedIndex:P,setInputValue:I,inputValue:R,getItemProps:O,getInputProps:N}=Nf({
3627
- selectedItem:M,items:E,isOpen:!0,onSelectedItemChange:({selectedItem:e})=>{
3627
+ selectedItem:M,items:E,onSelectedItemChange:({selectedItem:e})=>{
3628
3628
  console.log("onSelectedItemChange",{sI:e}),b?.(e??null)},
3629
3629
  onIsOpenChange:({isOpen:t})=>{
3630
3630
  if(t&&(""===R||D&&h&&(R||"").toLowerCase()===`${D?.[h||e]||""}`.toLowerCase()))_(a),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "freemium-ui",
3
- "version": "2.0.0-beta.22",
3
+ "version": "2.0.0-beta.24",
4
4
  "description": "React Ui Components for Freemium Apps",
5
5
  "main": "./index.js",
6
6
  "module": "./index.js",