@firecms/ui 3.0.0-canary.11 → 3.0.0-canary.110

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 (98) hide show
  1. package/README.md +1 -1
  2. package/dist/components/Avatar.d.ts +1 -0
  3. package/dist/components/BooleanSwitch.d.ts +1 -1
  4. package/dist/components/CenteredView.d.ts +4 -2
  5. package/dist/components/Checkbox.d.ts +3 -2
  6. package/dist/components/Chip.d.ts +3 -2
  7. package/dist/components/DateTimeField.d.ts +3 -4
  8. package/dist/components/Dialog.d.ts +4 -1
  9. package/dist/components/InputLabel.d.ts +2 -2
  10. package/dist/components/Label.d.ts +4 -1
  11. package/dist/components/Markdown.d.ts +1 -0
  12. package/dist/components/Menu.d.ts +4 -2
  13. package/dist/components/Menubar.d.ts +79 -0
  14. package/dist/components/Popover.d.ts +2 -1
  15. package/dist/components/RadioGroup.d.ts +26 -3
  16. package/dist/components/Select.d.ts +4 -4
  17. package/dist/components/Sheet.d.ts +4 -0
  18. package/dist/components/Table.d.ts +10 -10
  19. package/dist/components/TextField.d.ts +1 -1
  20. package/dist/components/TextareaAutosize.d.ts +3 -34
  21. package/dist/components/Tooltip.d.ts +5 -2
  22. package/dist/components/index.d.ts +1 -1
  23. package/dist/hooks/index.d.ts +4 -0
  24. package/dist/hooks/useLocaleConfig.d.ts +1 -0
  25. package/dist/icons/Icon.d.ts +3 -3
  26. package/dist/index.css +79 -0
  27. package/dist/index.d.ts +1 -0
  28. package/dist/index.es.js +12979 -13497
  29. package/dist/index.es.js.map +1 -1
  30. package/dist/index.umd.js +19531 -49
  31. package/dist/index.umd.js.map +1 -1
  32. package/dist/styles.d.ts +7 -7
  33. package/dist/util/{cn.d.ts → cls.d.ts} +4 -0
  34. package/dist/util/index.d.ts +1 -3
  35. package/package.json +108 -118
  36. package/src/components/Alert.tsx +2 -2
  37. package/src/components/Autocomplete.tsx +4 -3
  38. package/src/components/Avatar.tsx +7 -6
  39. package/src/components/Badge.tsx +1 -1
  40. package/src/components/BooleanSwitch.tsx +15 -15
  41. package/src/components/BooleanSwitchWithLabel.tsx +8 -8
  42. package/src/components/Button.tsx +11 -13
  43. package/src/components/Card.tsx +3 -3
  44. package/src/components/CenteredView.tsx +25 -15
  45. package/src/components/Checkbox.tsx +11 -9
  46. package/src/components/Chip.tsx +8 -5
  47. package/src/components/CircularProgress.tsx +2 -2
  48. package/src/components/Collapse.tsx +3 -2
  49. package/src/components/Container.tsx +2 -2
  50. package/src/components/DateTimeField.tsx +38 -48
  51. package/src/components/Dialog.tsx +14 -5
  52. package/src/components/DialogActions.tsx +2 -2
  53. package/src/components/DialogContent.tsx +2 -2
  54. package/src/components/ExpandablePanel.tsx +10 -8
  55. package/src/components/FileUpload.tsx +6 -9
  56. package/src/components/IconButton.tsx +4 -6
  57. package/src/components/InfoLabel.tsx +2 -2
  58. package/src/components/InputLabel.tsx +12 -9
  59. package/src/components/Label.tsx +17 -4
  60. package/src/components/Markdown.tsx +14 -3
  61. package/src/components/Menu.tsx +42 -31
  62. package/src/components/Menubar.tsx +322 -0
  63. package/src/components/MultiSelect.tsx +8 -8
  64. package/src/components/Paper.tsx +2 -2
  65. package/src/components/Popover.tsx +17 -14
  66. package/src/components/RadioGroup.tsx +41 -9
  67. package/src/components/SearchBar.tsx +7 -8
  68. package/src/components/Select.tsx +89 -102
  69. package/src/components/Sheet.tsx +45 -28
  70. package/src/components/Skeleton.tsx +9 -6
  71. package/src/components/Table.tsx +50 -32
  72. package/src/components/Tabs.tsx +6 -7
  73. package/src/components/TextField.tsx +10 -13
  74. package/src/components/TextareaAutosize.tsx +3 -3
  75. package/src/components/Tooltip.tsx +27 -13
  76. package/src/components/Typography.tsx +34 -19
  77. package/src/components/common/SelectInputLabel.tsx +2 -2
  78. package/src/components/index.tsx +1 -1
  79. package/src/hooks/index.ts +4 -0
  80. package/src/hooks/useLocaleConfig.tsx +18 -0
  81. package/src/icons/Icon.tsx +46 -43
  82. package/src/icons/icon_keys.ts +114 -1301
  83. package/src/index.css +79 -0
  84. package/src/index.ts +1 -0
  85. package/src/scripts/generateIconKeys.ts +20 -11
  86. package/src/styles.ts +7 -7
  87. package/src/util/cls.ts +14 -0
  88. package/src/util/index.ts +1 -3
  89. package/tailwind.config.js +5 -3
  90. package/dist/components/Spinner.d.ts +0 -1
  91. package/src/components/Spinner.tsx +0 -18
  92. package/src/util/cn.ts +0 -6
  93. /package/dist/{util → hooks}/useDebounceValue.d.ts +0 -0
  94. /package/dist/{util → hooks}/useInjectStyles.d.ts +0 -0
  95. /package/dist/{util → hooks}/useOutsideAlerter.d.ts +0 -0
  96. /package/src/{util → hooks}/useDebounceValue.tsx +0 -0
  97. /package/src/{util → hooks}/useInjectStyles.tsx +0 -0
  98. /package/src/{util → hooks}/useOutsideAlerter.tsx +0 -0
package/README.md CHANGED
@@ -49,7 +49,7 @@ FireCMS is based on this great technologies:
49
49
  The easiest way to get going is to check our quickstart guide! You will just
50
50
  need to follow some quick steps:
51
51
 
52
- https://firecms.co/docs/quickstart
52
+ https://firecms.co/docs
53
53
 
54
54
  ### Demo
55
55
 
@@ -4,6 +4,7 @@ export interface AvatarProps {
4
4
  alt?: string;
5
5
  children?: React.ReactNode;
6
6
  className?: string;
7
+ outerClassName?: string;
7
8
  style?: React.CSSProperties;
8
9
  }
9
10
  export declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLButtonElement>>;
@@ -3,7 +3,7 @@ export type BooleanSwitchProps = {
3
3
  value: boolean | null;
4
4
  className?: string;
5
5
  disabled?: boolean;
6
- size?: "small" | "medium";
6
+ size?: "smallest" | "small" | "medium";
7
7
  } & ({
8
8
  allowIndeterminate: true;
9
9
  onValueChange?: (newValue: boolean | null) => void;
@@ -1,7 +1,9 @@
1
1
  import React from "react";
2
- export declare function CenteredView({ children, maxWidth, className, fullScreen }: {
2
+ export type CenteredViewProps = {
3
3
  children: React.ReactNode;
4
4
  maxWidth?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl";
5
+ outerClassName?: string;
5
6
  className?: string;
6
7
  fullScreen?: boolean;
7
- }): import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ export declare const CenteredView: React.ForwardRefExoticComponent<CenteredViewProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,10 +1,11 @@
1
1
  export interface CheckboxProps {
2
2
  checked: boolean;
3
+ id?: string;
3
4
  disabled?: boolean;
4
5
  indeterminate?: boolean;
5
6
  onCheckedChange?: (checked: boolean) => void;
6
7
  padding?: boolean;
7
- size?: "tiny" | "small" | "medium" | "large";
8
+ size?: "smallest" | "small" | "medium" | "large";
8
9
  color?: "primary" | "secondary";
9
10
  }
10
- export declare const Checkbox: ({ checked, indeterminate, padding, disabled, size, onCheckedChange, color }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const Checkbox: ({ id, checked, indeterminate, padding, disabled, size, onCheckedChange, color }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
@@ -8,14 +8,15 @@ export type ChipColorKey = keyof typeof CHIP_COLORS;
8
8
  export interface ChipProps {
9
9
  className?: string;
10
10
  children: React.ReactNode;
11
- size?: "tiny" | "small" | "medium";
11
+ size?: "smallest" | "small" | "medium";
12
12
  colorScheme?: ChipColorScheme | ChipColorKey;
13
13
  error?: boolean;
14
14
  outlined?: boolean;
15
15
  onClick?: () => void;
16
16
  icon?: React.ReactNode;
17
+ style?: React.CSSProperties;
17
18
  }
18
19
  /**
19
20
  * @group Preview components
20
21
  */
21
- export declare function Chip({ children, colorScheme, error, outlined, onClick, icon, size, className }: ChipProps): import("react/jsx-runtime").JSX.Element;
22
+ export declare function Chip({ children, colorScheme, error, outlined, onClick, icon, size, className, style }: ChipProps): import("react/jsx-runtime").JSX.Element;
@@ -1,18 +1,17 @@
1
1
  import React from "react";
2
2
  interface DateTimeFieldProps {
3
- value?: Date;
4
- onChange: (date: Date | null) => void;
3
+ value?: Date | null;
4
+ onChange?: (date: Date | null) => void;
5
5
  mode?: "date" | "date_time";
6
6
  disabled?: boolean;
7
7
  clearable?: boolean;
8
8
  error?: boolean;
9
- size: "small" | "medium";
9
+ size?: "small" | "medium";
10
10
  label?: React.ReactNode;
11
11
  className?: string;
12
12
  style?: React.CSSProperties;
13
13
  inputClassName?: string;
14
14
  invisible?: boolean;
15
- preventOpenOnFocus?: boolean;
16
15
  locale?: string;
17
16
  }
18
17
  export declare const DateTimeField: React.FC<DateTimeFieldProps>;
@@ -11,6 +11,9 @@ export type DialogProps = {
11
11
  maxWidth?: keyof typeof widthClasses;
12
12
  modal?: boolean;
13
13
  onOpenAutoFocus?: (e: Event) => void;
14
+ onEscapeKeyDown?: (e: KeyboardEvent) => void;
15
+ onPointerDownOutside?: (e: Event) => void;
16
+ onInteractOutside?: (e: Event) => void;
14
17
  };
15
18
  declare const widthClasses: {
16
19
  xs: string;
@@ -26,5 +29,5 @@ declare const widthClasses: {
26
29
  "7xl": string;
27
30
  full: string;
28
31
  };
29
- export declare const Dialog: ({ open, onOpenChange, children, className, fullWidth, fullHeight, fullScreen, scrollable, maxWidth, modal, onOpenAutoFocus }: DialogProps) => import("react/jsx-runtime").JSX.Element;
32
+ export declare const Dialog: ({ open, onOpenChange, children, className, fullWidth, fullHeight, fullScreen, scrollable, maxWidth, modal, onOpenAutoFocus, onEscapeKeyDown, onPointerDownOutside, onInteractOutside }: DialogProps) => import("react/jsx-runtime").JSX.Element;
30
33
  export {};
@@ -6,6 +6,6 @@ export type InputLabelProps = {
6
6
  } & React.LabelHTMLAttributes<HTMLLabelElement>;
7
7
  export declare const InputLabel: React.ForwardRefExoticComponent<{
8
8
  children?: React.ReactNode;
9
- className?: string | undefined;
10
- shrink?: boolean | undefined;
9
+ className?: string;
10
+ shrink?: boolean;
11
11
  } & React.LabelHTMLAttributes<HTMLLabelElement> & React.RefAttributes<HTMLLabelElement>>;
@@ -1,4 +1,7 @@
1
1
  import * as React from "react";
2
2
  import * as LabelPrimitive from "@radix-ui/react-label";
3
- declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
3
+ declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & {
4
+ border?: boolean;
5
+ onClick?: React.MouseEventHandler<HTMLLabelElement>;
6
+ } & React.RefAttributes<HTMLLabelElement>>;
4
7
  export { Label };
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
2
  export interface MarkdownProps {
3
3
  source: string;
4
+ size?: "small" | "medium" | "large" | "xl" | "2xl";
4
5
  className?: string;
5
6
  }
6
7
  /**
@@ -7,10 +7,12 @@ export type MenuProps = {
7
7
  onOpenChange?(open: boolean): void;
8
8
  portalContainer?: HTMLElement | null;
9
9
  };
10
- export declare function Menu({ children, trigger, open, defaultOpen, onOpenChange, portalContainer }: MenuProps): import("react/jsx-runtime").JSX.Element;
10
+ declare const Menu: React.ForwardRefExoticComponent<MenuProps & React.RefAttributes<HTMLButtonElement>>;
11
+ export { Menu };
11
12
  export type MenuItemProps = {
12
13
  children: React.ReactNode;
13
14
  dense?: boolean;
14
15
  onClick?: (event: React.MouseEvent) => void;
15
16
  };
16
- export declare function MenuItem({ children, dense, onClick }: MenuItemProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare function MenuItem({ children, dense, // Default value is false if not provided
18
+ onClick }: MenuItemProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,79 @@
1
+ import * as React from "react";
2
+ export declare function Menubar({ children, onSelect, className }: {
3
+ children: React.ReactNode;
4
+ onSelect?: (event: React.SyntheticEvent) => void;
5
+ className?: string;
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ export declare function MenubarMenu({ children, }: {
8
+ children: React.ReactNode;
9
+ }): import("react/jsx-runtime").JSX.Element;
10
+ export declare function MenubarTrigger({ children, onSelect, className }: {
11
+ children: React.ReactNode;
12
+ onSelect?: (event: React.SyntheticEvent) => void;
13
+ className?: string;
14
+ }): import("react/jsx-runtime").JSX.Element;
15
+ export declare function MenubarPortal({ children, }: {
16
+ children: React.ReactNode;
17
+ }): import("react/jsx-runtime").JSX.Element;
18
+ export declare function MenubarContent({ children, className, align, sideOffset, alignOffset, onSelect, ...rest }: {
19
+ children: React.ReactNode;
20
+ className?: string;
21
+ onSelect?: (event: React.SyntheticEvent) => void;
22
+ align?: "start" | "center" | "end";
23
+ sideOffset?: number;
24
+ alignOffset?: number;
25
+ }): import("react/jsx-runtime").JSX.Element;
26
+ export declare function MenubarItem({ children, leftPadding, className, disabled, onSelect, ...rest }: {
27
+ children: React.ReactNode;
28
+ onSelect?: (event: Event) => void;
29
+ leftPadding?: boolean;
30
+ className?: string;
31
+ disabled?: boolean;
32
+ }): import("react/jsx-runtime").JSX.Element;
33
+ export declare function MenubarSeparator({ children, className, ...rest }: {
34
+ children?: React.ReactNode;
35
+ className?: string;
36
+ }): import("react/jsx-runtime").JSX.Element;
37
+ export declare function MenubarSub({ children, ...rest }: {
38
+ children?: React.ReactNode;
39
+ }): import("react/jsx-runtime").JSX.Element;
40
+ export declare function MenubarSubTrigger({ children, className, onSelect, ...rest }: {
41
+ children?: React.ReactNode;
42
+ onSelect?: (event: React.SyntheticEvent) => void;
43
+ className?: string;
44
+ }): import("react/jsx-runtime").JSX.Element;
45
+ export declare function MenubarSubContent({ children, alignOffset, className, onSelect, ...rest }: {
46
+ children?: React.ReactNode;
47
+ onSelect?: (event: React.SyntheticEvent) => void;
48
+ alignOffset?: number;
49
+ className?: string;
50
+ }): import("react/jsx-runtime").JSX.Element;
51
+ export declare function MenubarCheckboxItem({ children, checked, onCheckedChange, className, onSelect, ...rest }: {
52
+ children?: React.ReactNode;
53
+ onSelect?: (event: Event) => void;
54
+ checked?: boolean;
55
+ onCheckedChange?: () => void;
56
+ className?: string;
57
+ }): import("react/jsx-runtime").JSX.Element;
58
+ export declare function MenubarItemIndicator({ children, className, ...rest }: {
59
+ children?: React.ReactNode;
60
+ className?: string;
61
+ }): import("react/jsx-runtime").JSX.Element;
62
+ export declare function MenubarRadioGroup({ children, className, value, onValueChange, onSelect, ...rest }: {
63
+ children?: React.ReactNode;
64
+ onSelect?: (event: React.SyntheticEvent) => void;
65
+ value?: string;
66
+ onValueChange?: (value: string) => void;
67
+ className?: string;
68
+ }): import("react/jsx-runtime").JSX.Element;
69
+ export declare function MenubarRadioItem({ children, className, value, onSelect, ...rest }: {
70
+ children?: React.ReactNode;
71
+ onSelect?: (event: Event) => void;
72
+ value: string;
73
+ className?: string;
74
+ }): import("react/jsx-runtime").JSX.Element;
75
+ export declare function MenubarShortcut({ children, className, ...rest }: {
76
+ children?: React.ReactNode;
77
+ className?: string;
78
+ }): import("react/jsx-runtime").JSX.Element;
79
+ export declare function MenubarSubTriggerIndicator(): import("react/jsx-runtime").JSX.Element;
@@ -17,5 +17,6 @@ export interface PopoverProps {
17
17
  enabled?: boolean;
18
18
  modal?: boolean;
19
19
  className?: string;
20
+ portalContainer?: HTMLElement | null;
20
21
  }
21
- export declare function Popover({ trigger, children, open, onOpenChange, side, sideOffset, align, alignOffset, arrowPadding, sticky, hideWhenDetached, avoidCollisions, enabled, modal, className }: PopoverProps): import("react/jsx-runtime").JSX.Element;
22
+ export declare function Popover({ trigger, children, open, onOpenChange, side, sideOffset, align, alignOffset, arrowPadding, sticky, hideWhenDetached, avoidCollisions, enabled, modal, portalContainer, className }: PopoverProps): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,28 @@
1
1
  import * as React from "react";
2
- import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
3
- declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
- declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
2
+ export interface RadioGroupProps {
3
+ id?: string;
4
+ children: React.ReactNode;
5
+ name?: string;
6
+ required?: boolean;
7
+ disabled?: boolean;
8
+ /**
9
+ * Whether keyboard navigation should loop around
10
+ * @defaultValue false
11
+ */
12
+ loop?: boolean;
13
+ defaultValue?: string;
14
+ value?: string;
15
+ onValueChange?(value: string): void;
16
+ className?: string;
17
+ }
18
+ declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
19
+ export interface RadioGroupItemProps {
20
+ id?: string;
21
+ value: string;
22
+ checked?: boolean;
23
+ required?: boolean;
24
+ className?: string;
25
+ disabled?: boolean;
26
+ }
27
+ declare const RadioGroupItem: React.ForwardRefExoticComponent<RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
5
28
  export { RadioGroup, RadioGroupItem };
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React, { ChangeEvent } from "react";
2
2
  export type SelectProps = {
3
3
  open?: boolean;
4
4
  name?: string;
@@ -7,14 +7,14 @@ export type SelectProps = {
7
7
  value?: string | string[];
8
8
  className?: string;
9
9
  inputClassName?: string;
10
- onChange?: React.EventHandler<React.ChangeEvent<HTMLSelectElement>>;
10
+ onChange?: React.EventHandler<ChangeEvent<HTMLSelectElement>>;
11
11
  onValueChange?: (updatedValue: string) => void;
12
12
  onMultiValueChange?: (updatedValue: string[]) => void;
13
13
  placeholder?: React.ReactNode;
14
14
  renderValue?: (value: string, index: number) => React.ReactNode;
15
15
  renderValues?: (values: string[]) => React.ReactNode;
16
16
  size?: "small" | "medium";
17
- label?: React.ReactNode;
17
+ label?: React.ReactNode | string;
18
18
  disabled?: boolean;
19
19
  error?: boolean;
20
20
  position?: "item-aligned" | "popper";
@@ -26,7 +26,7 @@ export type SelectProps = {
26
26
  invisible?: boolean;
27
27
  children?: React.ReactNode;
28
28
  };
29
- export declare function Select({ inputRef, open, name, id, onOpenChange, value, onChange, onValueChange, onMultiValueChange, className, inputClassName, placeholder, renderValue, renderValues, label, size, includeFocusOutline, error, disabled, padding, position, endAdornment, multiple, invisible, children, ...props }: SelectProps): import("react/jsx-runtime").JSX.Element;
29
+ export declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLDivElement>>;
30
30
  export type SelectItemProps = {
31
31
  value: string;
32
32
  children?: React.ReactNode;
@@ -2,9 +2,13 @@ import React from "react";
2
2
  interface SheetProps {
3
3
  children: React.ReactNode;
4
4
  open: boolean;
5
+ title?: string;
5
6
  side?: "top" | "bottom" | "left" | "right";
7
+ darkBackground?: boolean;
6
8
  transparent?: boolean;
7
9
  onOpenChange?: (open: boolean) => void;
10
+ className?: string;
11
+ overlayClassName?: string;
8
12
  }
9
13
  export declare const Sheet: React.FC<SheetProps>;
10
14
  export {};
@@ -3,25 +3,25 @@ export type TableProps = {
3
3
  children: React.ReactNode;
4
4
  className?: string;
5
5
  style?: React.CSSProperties;
6
- };
7
- export declare const Table: ({ children, className, style }: TableProps) => import("react/jsx-runtime").JSX.Element;
6
+ } & React.TableHTMLAttributes<HTMLTableElement>;
7
+ export declare const Table: ({ children, className, style, ...rest }: TableProps) => import("react/jsx-runtime").JSX.Element;
8
8
  export type TableBodyProps = {
9
9
  children?: React.ReactNode;
10
10
  className?: string;
11
- };
12
- export declare const TableBody: ({ children, className }: TableBodyProps) => import("react/jsx-runtime").JSX.Element;
11
+ } & React.HTMLAttributes<HTMLTableSectionElement>;
12
+ export declare const TableBody: ({ children, className, ...rest }: TableBodyProps) => import("react/jsx-runtime").JSX.Element;
13
13
  export type TableHeaderProps = {
14
14
  children?: React.ReactNode;
15
15
  className?: string;
16
- };
17
- export declare const TableHeader: ({ children, className }: TableHeaderProps) => import("react/jsx-runtime").JSX.Element;
16
+ } & React.HTMLAttributes<HTMLTableSectionElement>;
17
+ export declare const TableHeader: ({ children, className, ...rest }: TableHeaderProps) => import("react/jsx-runtime").JSX.Element;
18
18
  export type TableRowProps = {
19
19
  children?: React.ReactNode;
20
20
  className?: string;
21
21
  onClick?: React.MouseEventHandler<any>;
22
22
  style?: React.CSSProperties;
23
- };
24
- export declare const TableRow: ({ children, className, onClick, style }: TableRowProps) => import("react/jsx-runtime").JSX.Element;
23
+ } & React.HTMLAttributes<HTMLTableRowElement>;
24
+ export declare const TableRow: ({ children, className, onClick, style, ...rest }: TableRowProps) => import("react/jsx-runtime").JSX.Element;
25
25
  export type TableCellProps = {
26
26
  children?: React.ReactNode;
27
27
  header?: boolean;
@@ -30,5 +30,5 @@ export type TableCellProps = {
30
30
  style?: React.CSSProperties;
31
31
  align?: "left" | "center" | "right";
32
32
  colspan?: number;
33
- };
34
- export declare const TableCell: ({ children, header, scope, align, className, style, colspan }: TableCellProps) => import("react/jsx-runtime").JSX.Element;
33
+ } & React.HTMLAttributes<HTMLTableCellElement>;
34
+ export declare const TableCell: ({ children, header, scope, align, className, style, colspan, ...rest }: TableCellProps) => import("react/jsx-runtime").JSX.Element;
@@ -13,7 +13,7 @@ export type TextFieldProps<T extends string | number> = {
13
13
  endAdornment?: React.ReactNode;
14
14
  autoFocus?: boolean;
15
15
  placeholder?: string;
16
- size?: "small" | "medium";
16
+ size?: "smallest" | "small" | "medium";
17
17
  className?: string;
18
18
  style?: React.CSSProperties;
19
19
  inputClassName?: string;
@@ -3,40 +3,9 @@ type State = {
3
3
  outerHeightStyle: number;
4
4
  overflow?: boolean | undefined;
5
5
  };
6
- export declare const TextareaAutosize: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLTextAreaElement>, "onResize"> & {
7
- className?: string | undefined;
8
- shadowClassName?: string | undefined;
9
- /**
10
- * Maximum number of rows to display.
11
- */
12
- maxRows?: string | number | undefined;
13
- /**
14
- * Minimum number of rows to display.
15
- * @default 1
16
- */
17
- minRows?: string | number | undefined;
18
- /**
19
- * @ignore
20
- */
21
- onChange?: ((event: React.ChangeEvent<HTMLTextAreaElement>) => void) | undefined;
22
- /**
23
- * @ignore
24
- */
25
- placeholder?: string | undefined;
26
- /**
27
- * @ignore
28
- */
29
- style?: object | undefined;
30
- /**
31
- * @ignore
32
- */
33
- value?: string | number | string[] | undefined;
34
- sizeRef?: React.RefObject<HTMLDivElement> | undefined;
35
- onScroll?: ((event: React.UIEvent<HTMLTextAreaElement>) => void) | undefined;
36
- onResize?: ((state: State) => void) | undefined;
37
- autoFocus?: boolean | undefined;
38
- ignoreBoxSizing?: boolean | undefined;
39
- } & React.RefAttributes<Element>>;
6
+ export declare const TextareaAutosize: React.FC<TextareaAutosizeProps & {
7
+ ref?: React.ForwardedRef<Element>;
8
+ }>;
40
9
  export type TextareaAutosizeProps = Omit<React.InputHTMLAttributes<HTMLTextAreaElement>, "onResize"> & {
41
10
  className?: string;
42
11
  shadowClassName?: string;
@@ -1,15 +1,18 @@
1
1
  import React from "react";
2
2
  export type TooltipProps = {
3
3
  open?: boolean;
4
+ defaultOpen?: boolean;
4
5
  onOpenChange?: (open: boolean) => void;
5
6
  side?: "top" | "bottom" | "left" | "right";
6
7
  align?: "start" | "center" | "end";
7
8
  sideOffset?: number;
8
9
  title?: string | React.ReactNode;
9
10
  delayDuration?: number;
10
- className?: string;
11
+ asChild?: boolean;
11
12
  tooltipClassName?: string;
13
+ tooltipStyle?: React.CSSProperties;
12
14
  children: React.ReactNode;
15
+ className?: string;
13
16
  style?: React.CSSProperties;
14
17
  };
15
- export declare const Tooltip: ({ open, side, delayDuration, sideOffset, align, onOpenChange, title, className, style, tooltipClassName, children }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const Tooltip: ({ open, defaultOpen, side, delayDuration, sideOffset, align, onOpenChange, title, tooltipClassName, tooltipStyle, children, asChild, className, style }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
@@ -24,6 +24,7 @@ export * from "./Label";
24
24
  export * from "./LoadingButton";
25
25
  export * from "./Markdown";
26
26
  export * from "./Menu";
27
+ export * from "./Menubar";
27
28
  export * from "./MultiSelect";
28
29
  export * from "./Paper";
29
30
  export * from "./RadioGroup";
@@ -31,7 +32,6 @@ export * from "./SearchBar";
31
32
  export * from "./Select";
32
33
  export * from "./Separator";
33
34
  export * from "./Sheet";
34
- export * from "./Spinner";
35
35
  export * from "./TextareaAutosize";
36
36
  export * from "./TextField";
37
37
  export * from "./Tooltip";
@@ -0,0 +1,4 @@
1
+ export * from "./useLocaleConfig";
2
+ export * from "./useInjectStyles";
3
+ export * from "./useOutsideAlerter";
4
+ export * from "./useDebounceValue";
@@ -0,0 +1 @@
1
+ export declare function useLocaleConfig(locale?: string): void;
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import "@material-design-icons/font/filled.css";
2
+ import 'material-icons/iconfont/filled.css';
3
3
  export type IconColor = "inherit" | "primary" | "secondary" | "disabled" | "error" | "success" | "warning";
4
4
  export type IconProps = {
5
5
  size?: "smallest" | "small" | "medium" | "large" | number;
@@ -8,6 +8,6 @@ export type IconProps = {
8
8
  onClick?: (e: React.SyntheticEvent) => void;
9
9
  style?: React.CSSProperties;
10
10
  };
11
- export declare function Icon({ iconKey, size, color, className, onClick, style }: IconProps & {
11
+ export declare const Icon: React.ForwardRefExoticComponent<IconProps & {
12
12
  iconKey: string;
13
- }): import("react/jsx-runtime").JSX.Element;
13
+ } & React.RefAttributes<HTMLSpanElement>>;
package/dist/index.css ADDED
@@ -0,0 +1,79 @@
1
+ @layer utilities {
2
+ /* Chrome, Safari and Opera */
3
+ .no-scrollbar::-webkit-scrollbar {
4
+ display: none;
5
+ }
6
+
7
+ .no-scrollbar {
8
+ -ms-overflow-style: none; /* IE and Edge */
9
+ scrollbar-width: none; /* Firefox */
10
+ }
11
+
12
+ .typography-h1 {
13
+ @apply text-6xl font-headers font-light;
14
+ }
15
+
16
+ .typography-h2 {
17
+ @apply text-5xl font-headers font-light;
18
+ }
19
+
20
+ .typography-h3 {
21
+ @apply text-4xl font-headers font-normal;
22
+ }
23
+
24
+ .typography-h4 {
25
+ @apply text-3xl font-headers font-normal;
26
+ }
27
+
28
+ .typography-h5 {
29
+ @apply text-2xl font-headers font-normal;
30
+ }
31
+
32
+ .typography-h6 {
33
+ @apply text-xl font-headers font-medium;
34
+ }
35
+
36
+ .typography-subtitle1 {
37
+ @apply text-lg font-headers font-medium;
38
+ }
39
+
40
+ .typography-subtitle2 {
41
+ @apply text-base font-headers font-medium;
42
+ }
43
+
44
+ .typography-body1 {
45
+ }
46
+
47
+ .typography-body2 {
48
+ @apply text-sm;
49
+ }
50
+
51
+ .typography-caption {
52
+ @apply text-xs;
53
+ }
54
+
55
+ .typography-label {
56
+ @apply text-sm font-medium;
57
+ }
58
+
59
+ .typography-inherit {
60
+ @apply text-inherit;
61
+ }
62
+
63
+ .typography-button {
64
+ @apply text-sm font-medium;
65
+ }
66
+ }
67
+
68
+
69
+ :focus-visible {
70
+ @apply outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-transparent
71
+ }
72
+
73
+ a {
74
+ @apply text-blue-600 dark:text-blue-400 dark:hover:text-blue-600 hover:text-blue-800
75
+ }
76
+
77
+ body {
78
+ @apply w-full min-h-screen bg-gray-50 dark:bg-gray-900 flex flex-col items-center justify-center;
79
+ }
package/dist/index.d.ts CHANGED
@@ -2,3 +2,4 @@ export * from "./components";
2
2
  export * from "./styles";
3
3
  export * from "./util";
4
4
  export * from "./icons";
5
+ export * from "./hooks";