freemium-ui 2.1.0-alpha.4 → 2.1.0-alpha.5

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 (2) hide show
  1. package/lib/index.d.ts +119 -3
  2. package/package.json +1 -1
package/lib/index.d.ts CHANGED
@@ -8,8 +8,6 @@ import { SelectProps, SelectContentProps, SelectItemProps } from '@radix-ui/reac
8
8
  export { Item as RadixSelectItem } from '@radix-ui/react-select';
9
9
  import { UseSelectProps, UseComboboxProps, UseMultipleSelectionProps } from 'downshift';
10
10
  import { AxiosRequestConfig } from 'axios';
11
- import * as styled_components from 'styled-components';
12
- import * as styled_components_dist_types from 'styled-components/dist/types';
13
11
  import * as react from 'react';
14
12
  import react__default, { ReactNode, CSSProperties } from 'react';
15
13
  import { RadioGroupProps as RadioGroupProps$1, RadioGroupContextValue } from '@radix-ui/react-radio-group';
@@ -17,6 +15,8 @@ import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
17
15
  import { MenuItemProps as MenuItemProps$1 } from '@radix-ui/react-dropdown-menu';
18
16
  export { Item as RadixMenuItem } from '@radix-ui/react-dropdown-menu';
19
17
  import { CheckboxProps as CheckboxProps$1 } from '@radix-ui/react-checkbox';
18
+ import * as styled_components from 'styled-components';
19
+ import * as styled_components_dist_types from 'styled-components/dist/types';
20
20
  import * as _radix_ui_react_label from '@radix-ui/react-label';
21
21
  import { LabelProps } from '@radix-ui/react-label';
22
22
  import { DateInput3Props, DateRangeInput3Props, TimePrecision } from '@blueprintjs/datetime2';
@@ -273,6 +273,8 @@ interface DropdownProps<T extends DefaultDropdownItem = DefaultDropdownItem> ext
273
273
  buttonContentProps?: SelectContentProps;
274
274
  portalContainer?: PortalProps['container'];
275
275
  }
276
+ type DropdownButtonProps<T extends DefaultDropdownItem = DefaultDropdownItem> = DropdownProps<T>;
277
+ type DropdownInputProps<T extends DefaultDropdownItem = DefaultDropdownItem> = DropdownProps<T>;
276
278
  type DropdownItemProps = SelectItemProps & {
277
279
  showTick: boolean;
278
280
  };
@@ -432,6 +434,7 @@ type BoxedRadioProps<T extends BoxedRadioItemProps = BoxedRadioItemProps> = Omit
432
434
  declare const BoxedRadio: <T extends BoxedRadioItemProps>({ options, defaultValue, idAccessor, onChange, isErrored, errorText, disabled, getTextContent, className, id, isRequired, readOnly, itemComponent, label, value, customIndicator, ...props }: BoxedRadioProps<T>) => react_jsx_runtime.JSX.Element;
433
435
 
434
436
  type ButtonSizeKey = 'mini' | 'normal' | 'large';
437
+ type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'link';
435
438
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
436
439
  /**
437
440
  * The size of the button
@@ -569,6 +572,12 @@ type MenuItemProps = MenuItemProps$1 & {
569
572
  isSelected?: boolean;
570
573
  };
571
574
 
575
+ interface DayProps {
576
+ $isSelected?: boolean;
577
+ id?: string;
578
+ value?: string;
579
+ disabled?: boolean;
580
+ }
572
581
  interface CalendarProps extends DefaultMenuItemProps {
573
582
  value?: Record<string, boolean>;
574
583
  items: DefaultMenuItemProps[];
@@ -1663,6 +1672,10 @@ interface ToastType {
1663
1672
  type ToastWithID = ToastType & {
1664
1673
  id: string;
1665
1674
  };
1675
+ type ToastItemProps = ToastWithID & {
1676
+ index: number;
1677
+ };
1678
+ type UpdateToastsFunction<T> = (fn: (toasts: Array<T>) => Array<T>) => void;
1666
1679
  interface ToastContextType {
1667
1680
  toasts: Array<ToastWithID>;
1668
1681
  windowState: 'focus' | 'blur';
@@ -1714,6 +1727,8 @@ interface ToggleProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
1714
1727
  declare const Toggle: ({ handleChange, hasIcon, on, isErrored, isRequired, size, thumbProps, ...rest }: ToggleProps) => react_jsx_runtime.JSX.Element;
1715
1728
 
1716
1729
  type TooltipPosition = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
1730
+ type TooltipSide = 'top' | 'right' | 'bottom' | 'left';
1731
+ type TooltipAlign = 'start' | 'end' | 'center';
1717
1732
  interface TooltipProps {
1718
1733
  /**
1719
1734
  * HTML to be rendered in the tooltip
@@ -1839,6 +1854,107 @@ interface WorkspaceTableProps<T extends WorkspaceRowDataType> {
1839
1854
  */
1840
1855
  declare const WorkspaceTable: <T extends WorkspaceRowDataType = WorkspaceRowDataType>(props: WorkspaceTableProps<T>) => react_jsx_runtime.JSX.Element;
1841
1856
 
1857
+ type FreshworksPalette = {
1858
+ primary: {
1859
+ elephant: string;
1860
+ smoke: string;
1861
+ milk: string;
1862
+ E900: string;
1863
+ E800: string;
1864
+ E700: string;
1865
+ E600: string;
1866
+ E500: string;
1867
+ E400: string;
1868
+ E300: string;
1869
+ E200: string;
1870
+ E100: string;
1871
+ E50: string;
1872
+ S900: string;
1873
+ S800: string;
1874
+ S700: string;
1875
+ S600: string;
1876
+ S500: string;
1877
+ S400: string;
1878
+ S300: string;
1879
+ S200: string;
1880
+ S100: string;
1881
+ S75: string;
1882
+ S50: string;
1883
+ S25: string;
1884
+ S10: string;
1885
+ };
1886
+ secondary: {
1887
+ jungle: string;
1888
+ J900: string;
1889
+ J800: string;
1890
+ J700: string;
1891
+ J600: string;
1892
+ J500: string;
1893
+ J400: string;
1894
+ J300: string;
1895
+ J200: string;
1896
+ J100: string;
1897
+ J50: string;
1898
+ azure: string;
1899
+ A900: string;
1900
+ A800: string;
1901
+ A700: string;
1902
+ A600: string;
1903
+ A500: string;
1904
+ A400: string;
1905
+ A300: string;
1906
+ A200: string;
1907
+ A100: string;
1908
+ A50: string;
1909
+ persimmon: string;
1910
+ P900: string;
1911
+ P800: string;
1912
+ P700: string;
1913
+ P600: string;
1914
+ P500: string;
1915
+ P400: string;
1916
+ P300: string;
1917
+ P200: string;
1918
+ P100: string;
1919
+ P50: string;
1920
+ casablanca: string;
1921
+ C900: string;
1922
+ C800: string;
1923
+ C700: string;
1924
+ C600: string;
1925
+ C500: string;
1926
+ C400: string;
1927
+ C300: string;
1928
+ C200: string;
1929
+ C100: string;
1930
+ C50: string;
1931
+ };
1932
+ common: {
1933
+ black: string;
1934
+ white: string;
1935
+ neutral: {
1936
+ light_mild: string;
1937
+ light_normal: string;
1938
+ light_bold: string;
1939
+ dark_mild: string;
1940
+ dark_normal: string;
1941
+ dark_bold: string;
1942
+ };
1943
+ };
1944
+ };
1945
+ type FuiContextType = {
1946
+ theme: FreemiumUiTheme;
1947
+ };
1948
+ type ModalCssType = {
1949
+ left?: string;
1950
+ top?: string;
1951
+ transform?: string;
1952
+ right?: string;
1953
+ bottom?: string;
1954
+ y?: string;
1955
+ x?: string;
1956
+ };
1957
+
1842
1958
  declare const StyledLabel: styled_components.IStyledComponent<"web", styled_components_dist_types.FastOmit<Omit<_radix_ui_react_label.LabelProps & react.RefAttributes<HTMLLabelElement>, "ref"> & {
1843
1959
  ref?: ((instance: HTMLLabelElement | null) => void) | react.RefObject<HTMLLabelElement> | null | undefined;
1844
1960
  }, never>> & Omit<react.ForwardRefExoticComponent<_radix_ui_react_label.LabelProps & react.RefAttributes<HTMLLabelElement>>, keyof react.Component<any, {}, any>>;
@@ -1876,4 +1992,4 @@ declare namespace index_d {
1876
1992
  export { index_d_Z_INDEX as Z_INDEX, index_d_dark as dark, index_d_hextoRGB as hextoRGB, index_d_light as light };
1877
1993
  }
1878
1994
 
1879
- export { Accordion, Alert, AutoComplete, BoxedRadio, Button, ButtonDropdown, Calendar, CardActions, CardContent, CardDescription, CardText, CardTitle, Checkbox, Confirmation, DatePicker, DateRangePicker, DateTimePicker, DateTimeRangePicker, Drawer, Dropdown, ListItem as DropdownInputItem, Item as DropdownItem, DropdownMenuItem, _default as FreemiumUIGlobalStyles, FreshLink, IconButton, Input, InputLabel, Loader, Menu, Modal, MultiSelectDropdown, Popover, PopoverClose, PopoverTrigger, Radio, RadioGroup, Reorder, RequiredIndicator, SortDropdown, StyledLabel, Table, Tabs, TabsContent, TabsList, TabsRoot, TabsTrigger, Tag, TextArea, ThemeProvider, index_d as Themes, TimePicker, ToastProvider, Toggle, Tooltip, TriggerButtonWrapper, Typography, WorkspaceTable, dialogContentMixin, dialogOverlayMixin, useToasts };
1995
+ export { Accordion, type AccordionItemProps, type AccordionProps, Alert, type AlertProps, AutoComplete, type AutoCompleteInputItemProps, type AutoCompleteProps, BoxedRadio, Button, ButtonDropdown, type ButtonProps, type ButtonSizeKey, type ButtonVariant, Calendar, type CalendarProps, CardActions, CardContent, CardDescription, CardText, CardTitle, Checkbox, type CheckboxProps, Confirmation, type ConfirmationProps, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, DateTimePicker, type DateTimePickerProps, DateTimeRangePicker, type DateTimeRangePickerProps, type DayProps, type DefaultAutoCompleteItem, type DefaultDropdownItem, type DefaultMenuItemProps, 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, _default as FreemiumUIGlobalStyles, type FreemiumUiTheme, FreshLink, type FreshworksPalette, type FuiContextType, type FuiTableColumnType$1 as FuiTableColumnType, IconButton, Input, InputLabel, type InputProps, type LevelType, Loader, type LoaderPropTypes, type LoaderSizes, type LoaderSpeeds, Menu, type MenuItemProps, type MenuProps, Modal, type ModalAlignType, type ModalCssType, type ModalPositionType, type ModalProps, type ModalSizeType, 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, SortDropdown, type SortingOptionsType, StyledLabel, type StyledListItemType, Table, type TableProps, type TableSortingMenuProps, Tabs, TabsContent, type TabsItemProps, TabsList, type TabsProps, TabsRoot, TabsTrigger, Tag, type TagProps, TextArea, type TextAreaProps, ThemeProvider, type ThemeProviderType, index_d as Themes, 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, WorkspaceTable, dialogContentMixin, dialogOverlayMixin, useToasts };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "freemium-ui",
3
- "version": "2.1.0-alpha.4",
3
+ "version": "2.1.0-alpha.5",
4
4
  "description": "React Ui Components for Freemium Apps",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",