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

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
@@ -3608,7 +3608,7 @@ const e=i.reduce(((e,t)=>{const n=t.group??"default"
3608
3608
  ;return e[n]?e[n].push(t):e[n]=[t],e}),{})
3609
3609
  ;return Object.keys(e).sort(((e,t)=>"default"!==e?1:-1)).map((t=>({key:t,
3610
3610
  items:e[t]})))}),[i])
3611
- ;return console.log("groupedItems",E),e.createElement(fd,null,a&&e.createElement(e.Fragment,null,e.createElement(wn,{
3611
+ ;return e.createElement(fd,null,a&&e.createElement(e.Fragment,null,e.createElement(wn,{
3612
3612
  className:"input-label","aria-label":a,htmlFor:o
3613
3613
  },a,d&&e.createElement(zn,null,"*"))),e.createElement(md,{open:x,defaultOpen:M,
3614
3614
  name:f,required:d,disabled:u,value:b?.[r]??void 0,onValueChange:e=>{if(s)return
@@ -3657,10 +3657,11 @@ isOpen:F,fill:E.colors.text.primary,width:8,height:8})))
3657
3657
  onClick:e=>{e.stopPropagation(),m&&m({inputValue:I,customValues:!0}),P("")}
3658
3658
  },y?.(I)||"Click to add")):e.createElement(ud,{readOnly:!0
3659
3659
  },g||"No items")),H&&S.map(((n,r)=>{const a="string"==typeof n?n:n?.[t]
3660
- ;return e.createElement(ud,{isHilighted:T===r,isSelected:D===n,key:a,...O({
3661
- item:n,index:r})
3662
- },v?v(n):e.createElement(e.Fragment,null,u(n),D===n&&e.createElement(Lc,{
3663
- fill:E.colors.common.accent})))})))),C&&z&&e.createElement(vc,null,z))
3660
+ ;return e.createElement(e.Fragment,null,v?v(n,{isHilighted:T===r,
3661
+ isSelected:D===n,key:a,...O({item:n,index:r})}):e.createElement(ud,{
3662
+ isHilighted:T===r,isSelected:D===n,key:a,...O({item:n,index:r})
3663
+ },u(n),D===n&&e.createElement(Lc,{fill:E.colors.common.accent})))
3664
+ })))),C&&z&&e.createElement(vc,null,z))
3664
3665
  },am=e.forwardRef((({children:t,showTick:n=!0,...r},a)=>{const o=qt()
3665
3666
  ;return e.createElement(bd,{className:"SelectItem",...r,ref:a
3666
3667
  },e.createElement(Md,{className:"SelectItemText"},t),n&&e.createElement(Ed,{
@@ -16120,8 +16121,8 @@ forceMount:!0,className:`DialogContent ${a}`.trim(),isFullHeight:i,size:o,
16120
16121
  placement:l},!r&&e.createElement(Ys,{asChild:!0},e.createElement($s,{
16121
16122
  "aria-label":"Close"},e.createElement(qn,{fill:u.colors.text.inverse}))),n)))
16122
16123
  },exports.Dropdown=tm,
16123
- exports.DropdownItem=am,exports.DropdownMenuItem=Pl,exports.Fade=t=>{
16124
- const{timeout:n=150,...r}=t;return e.createElement(Wj,{
16124
+ exports.DropdownInputItem=ud,exports.DropdownItem=am,exports.DropdownMenuItem=Pl,
16125
+ exports.Fade=t=>{const{timeout:n=150,...r}=t;return e.createElement(Wj,{
16125
16126
  transition:`all ${n}ms cubic-bezier(0.175, 0.885, 0.320, 1.175)`,styles:Gj,
16126
16127
  timeout:{enter:0,exit:n},...r})
16127
16128
  },exports.FreshLink=xn,exports.IconButton=Mn,exports.Input=Kf,
@@ -16255,8 +16256,8 @@ onColumnOrderChange:e=>{let t=P??[];t="function"==typeof e?e(P??[]):e,I?.(t)},
16255
16256
  onRowSelectionChange:e=>{let t=F;t="function"==typeof e?e(F):e,B?.(t)},
16256
16257
  enableRowSelection:!0,manualPagination:!0,rowCount:Z?-1:w
16257
16258
  }),{getPageCount:te,getRowModel:ne,getState:re,getCanNextPage:ae,getCanPreviousPage:oe,getPageOptions:ie,previousPage:le,setPageIndex:ce,nextPage:se,lastPage:ue,firstPage:de}=ee,{rows:he}=ne(),{pagination:{pageIndex:pe,pageSize:fe}}=re(),me=pe*fe+(pe<te()-1?fe:he.length),ve=ee.getAllColumns().filter((e=>e.getIsVisible())).length+(L?0:1)+(_?1:0)
16258
- ;return console.log("STATE",re()),e.createElement(cF,{className:"TableContainer"
16259
- },!b&&e.createElement(fF,{className:"table-actions"
16259
+ ;return e.createElement(cF,{className:"TableContainer"},!b&&e.createElement(fF,{
16260
+ className:"table-actions"
16260
16261
  },d&&e.createElement(e.Fragment,null,d),e.createElement(gF,{
16261
16262
  className:"table-header-component"},h??null),e.createElement(yF,{
16262
16263
  className:"pagination-actions"
package/index.d.ts CHANGED
@@ -5,17 +5,17 @@ import * as Popover$1 from '@radix-ui/react-popover';
5
5
  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
- import * as _radix_ui_react_select from '@radix-ui/react-select';
9
- import { SelectProps, SelectItemProps } from '@radix-ui/react-select';
8
+ import * as Select from '@radix-ui/react-select';
9
+ import { SelectProps } from '@radix-ui/react-select';
10
10
  export { Item as RadixSelectItem } from '@radix-ui/react-select';
11
+ import * as styled_components from 'styled-components';
12
+ import * as styled_components_dist_types from 'styled-components/dist/types';
11
13
  import { UseSelectProps, UseComboboxProps, UseMultipleSelectionProps } from 'downshift';
12
14
  import * as _radix_ui_react_label from '@radix-ui/react-label';
13
15
  import { LabelProps } from '@radix-ui/react-label';
14
16
  import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
15
17
  import { MenuItemProps as MenuItemProps$1 } from '@radix-ui/react-dropdown-menu';
16
18
  export { Item as RadixMenuItem } from '@radix-ui/react-dropdown-menu';
17
- import * as styled_components from 'styled-components';
18
- import * as styled_components_dist_types from 'styled-components/dist/types';
19
19
  import { DateInput3Props, DateRangeInput3Props, TimePrecision } from '@blueprintjs/datetime2';
20
20
  import { DraggableSyntheticListeners } from '@dnd-kit/core';
21
21
  import { CoreOptions, ColumnDef, Cell, RowSelectionState } from '@tanstack/react-table';
@@ -350,6 +350,11 @@ type DefaultDropdownItem = {
350
350
  [key: string]: any;
351
351
  group?: string;
352
352
  };
353
+ type StyledListItemType = {
354
+ readOnly?: boolean;
355
+ isSelected?: boolean;
356
+ isHilighted?: boolean;
357
+ };
353
358
  type PickedSelectProps = Pick<SelectProps, 'name' | 'disabled' | 'value'>;
354
359
  interface DropdownProps<T extends DefaultDropdownItem = DefaultDropdownItem> extends PickedSelectProps {
355
360
  /**
@@ -374,10 +379,6 @@ interface DropdownProps<T extends DefaultDropdownItem = DefaultDropdownItem> ext
374
379
  * Fuction to give the string representation of the item
375
380
  */
376
381
  itemToString: (item: T, type?: 'list-item' | 'display' | 'downshift') => string;
377
- /**
378
- * Fuction to give the string representation of the item
379
- */
380
- itemComponent?: (item: T, props?: DropdownItemProps) => React.ReactNode | string;
381
382
  /**
382
383
  * The type of the dropdown
383
384
  */
@@ -466,15 +467,14 @@ interface DropdownProps<T extends DefaultDropdownItem = DefaultDropdownItem> ext
466
467
  */
467
468
  useComboboxProps?: UseComboboxProps<T>;
468
469
  }
469
- type DropdownItemProps = SelectItemProps & {
470
- showTick: boolean;
471
- };
470
+
471
+ declare const ListItem: styled_components.IStyledComponent<"web", styled_components_dist_types.Substitute<react.DetailedHTMLProps<react.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, StyledListItemType>>;
472
472
 
473
473
  /**
474
474
  * Dropdown displays a list or drop-down box that enables selection of an option or multiple options from an available list of values.
475
475
  */
476
476
  declare const Dropdown: <T extends DefaultDropdownItem>({ type, ...props }: DropdownProps<T>) => react__default.JSX.Element;
477
- declare const Item: react__default.ForwardRefExoticComponent<_radix_ui_react_select.SelectItemProps & {
477
+ declare const Item: react__default.ForwardRefExoticComponent<Select.SelectItemProps & {
478
478
  showTick: boolean;
479
479
  } & react__default.RefAttributes<HTMLDivElement>>;
480
480
 
@@ -1646,4 +1646,4 @@ declare namespace index_d {
1646
1646
  export { index_d_dark as dark, index_d_light as light };
1647
1647
  }
1648
1648
 
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, 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 };
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 };
package/index.js CHANGED
@@ -3598,7 +3598,7 @@ const e=i.reduce(((e,t)=>{const n=t.group??"default"
3598
3598
  ;return e[n]?e[n].push(t):e[n]=[t],e}),{})
3599
3599
  ;return Object.keys(e).sort(((e,t)=>"default"!==e?1:-1)).map((t=>({key:t,
3600
3600
  items:e[t]})))}),[i])
3601
- ;return console.log("groupedItems",S),t.createElement(Nd,null,a&&t.createElement(t.Fragment,null,t.createElement(Fn,{
3601
+ ;return t.createElement(Nd,null,a&&t.createElement(t.Fragment,null,t.createElement(Fn,{
3602
3602
  className:"input-label","aria-label":a,htmlFor:o
3603
3603
  },a,d&&t.createElement(jn,null,"*"))),t.createElement(Fd,{open:x,defaultOpen:M,
3604
3604
  name:f,required:d,disabled:u,value:b?.[r]??void 0,onValueChange:e=>{if(s)return
@@ -3647,10 +3647,11 @@ isOpen:F,fill:S.colors.text.primary,width:8,height:8})))
3647
3647
  onClick:e=>{e.stopPropagation(),m&&m({inputValue:R,customValues:!0}),I("")}
3648
3648
  },y?.(R)||"Click to add")):t.createElement(Pd,{readOnly:!0
3649
3649
  },g||"No items")),H&&E.map(((n,r)=>{const a="string"==typeof n?n:n?.[e]
3650
- ;return t.createElement(Pd,{isHilighted:T===r,isSelected:D===n,key:a,...O({
3651
- item:n,index:r})
3652
- },v?v(n):t.createElement(t.Fragment,null,u(n),D===n&&t.createElement(Jc,{
3653
- fill:S.colors.common.accent})))})))),C&&z&&t.createElement(Oc,null,z))
3650
+ ;return t.createElement(t.Fragment,null,v?v(n,{isHilighted:T===r,
3651
+ isSelected:D===n,key:a,...O({item:n,index:r})}):t.createElement(Pd,{
3652
+ isHilighted:T===r,isSelected:D===n,key:a,...O({item:n,index:r})
3653
+ },u(n),D===n&&t.createElement(Jc,{fill:S.colors.common.accent})))
3654
+ })))),C&&z&&t.createElement(Oc,null,z))
3654
3655
  },Lm=t.forwardRef((({children:e,showTick:n=!0,...r},a)=>{const o=vn()
3655
3656
  ;return t.createElement($d,{className:"SelectItem",...r,ref:a
3656
3657
  },t.createElement(Kd,{className:"SelectItemText"},e),n&&t.createElement(Zd,{
@@ -15432,8 +15433,8 @@ onColumnOrderChange:e=>{let t=I??[];t="function"==typeof e?e(I??[]):e,R?.(t)},
15432
15433
  onRowSelectionChange:e=>{let t=F;t="function"==typeof e?e(F):e,B?.(t)},
15433
15434
  enableRowSelection:!0,manualPagination:!0,rowCount:Z?-1:w
15434
15435
  }),{getPageCount:te,getRowModel:ne,getState:re,getCanNextPage:ae,getCanPreviousPage:oe,getPageOptions:ie,previousPage:le,setPageIndex:ce,nextPage:se,lastPage:ue,firstPage:de}=ee,{rows:he}=ne(),{pagination:{pageIndex:pe,pageSize:fe}}=re(),me=pe*fe+(pe<te()-1?fe:he.length),ve=ee.getAllColumns().filter((e=>e.getIsVisible())).length+(L?0:1)+(_?1:0)
15435
- ;return console.log("STATE",re()),t.createElement(jF,{className:"TableContainer"
15436
- },!b&&t.createElement(KF,{className:"table-actions"
15436
+ ;return t.createElement(jF,{className:"TableContainer"},!b&&t.createElement(KF,{
15437
+ className:"table-actions"
15437
15438
  },d&&t.createElement(t.Fragment,null,d),t.createElement(XF,{
15438
15439
  className:"table-header-component"},h??null),t.createElement(QF,{
15439
15440
  className:"pagination-actions"
@@ -16218,4 +16219,4 @@ return n=vM(e),t!==yM.STANDARD?[3,2]:[4,Promise.resolve().then((function(){
16218
16219
  return wM}))];case 1:return r=a.sent(),[3,4];case 2:
16219
16220
  return[4,Promise.resolve().then((function(){return zM}))];case 3:
16220
16221
  r=a.sent(),a.label=4;case 4:return[2,r[n]]}}))}))}})
16221
- ;export{br as Alert,Nc as BoxedRadio,zr as Button,oc as ButtonDropdown,Wn as CardActions,Yn as CardContent,Kn as CardDescription,qn as CardText,Gn as CardTitle,ts as Checkbox,xr as ChevronUp,lu as Confirmation,mr as CrossIcon,yI as DatePicker,wI as DateRangePicker,bI as DateTimePicker,CI as DateTimeRangePicker,yu as Drawer,_m as Dropdown,Lm as DropdownItem,rc as DropdownMenuItem,TU as Fade,$n as FreshLink,Un as IconButton,bm as Input,Bn as InputLabel,Em as Loader,ac as Menu,es as Minus,Om as Modal,Ld as MoreVertical,ev as MultiSelectDropdown,XI as Popover,ZI as PopoverClose,rR as Radio,aR as RadioGroup,Zl as RadixMenuItem,Sd as RadixSelectItem,WN as Reorder,jn as RequiredIndicator,RU as Slide,OU as SlideFade,Fn as StyledLabel,CB as Table,OB as Tabs,PB as TabsContent,IB as TabsList,TB as TabsRoot,RB as TabsTrigger,Jm as Tag,wm as TextArea,Rj as ThemeProvider,YU as Themes,Jc as TickIcon,MI as TimePicker,Pj as ToastProvider,Qj as Toggle,VU as Tooltip,AU as Transition,Zn as TriggerButtonWrapper,yr as Typography,vr as Warning,Qn as basicHide,er as basicShow,nr as contentHide,ar as contentShow,ur as slideDownAndFade,hr as slideLeftAndFade,cr as slideRightAndFade,ir as slideUpAndFade,Ij as useToasts};
16222
+ ;export{br as Alert,Nc as BoxedRadio,zr as Button,oc as ButtonDropdown,Wn as CardActions,Yn as CardContent,Kn as CardDescription,qn as CardText,Gn as CardTitle,ts as Checkbox,xr as ChevronUp,lu as Confirmation,mr as CrossIcon,yI as DatePicker,wI as DateRangePicker,bI as DateTimePicker,CI as DateTimeRangePicker,yu as Drawer,_m as Dropdown,Pd as DropdownInputItem,Lm as DropdownItem,rc as DropdownMenuItem,TU as Fade,$n as FreshLink,Un as IconButton,bm as Input,Bn as InputLabel,Em as Loader,ac as Menu,es as Minus,Om as Modal,Ld as MoreVertical,ev as MultiSelectDropdown,XI as Popover,ZI as PopoverClose,rR as Radio,aR as RadioGroup,Zl as RadixMenuItem,Sd as RadixSelectItem,WN as Reorder,jn as RequiredIndicator,RU as Slide,OU as SlideFade,Fn as StyledLabel,CB as Table,OB as Tabs,PB as TabsContent,IB as TabsList,TB as TabsRoot,RB as TabsTrigger,Jm as Tag,wm as TextArea,Rj as ThemeProvider,YU as Themes,Jc as TickIcon,MI as TimePicker,Pj as ToastProvider,Qj as Toggle,VU as Tooltip,AU as Transition,Zn as TriggerButtonWrapper,yr as Typography,vr as Warning,Qn as basicHide,er as basicShow,nr as contentHide,ar as contentShow,ur as slideDownAndFade,hr as slideLeftAndFade,cr as slideRightAndFade,ir as slideUpAndFade,Ij as useToasts};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "freemium-ui",
3
- "version": "2.0.0-beta.21",
3
+ "version": "2.0.0-beta.22",
4
4
  "description": "React Ui Components for Freemium Apps",
5
5
  "main": "./index.js",
6
6
  "module": "./index.js",