@firecms/ui 3.0.0-canary.12 → 3.0.0-canary.120

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 (101) 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 +6 -2
  13. package/dist/components/Menubar.d.ts +79 -0
  14. package/dist/components/MultiSelect.d.ts +1 -4
  15. package/dist/components/NewMultiSelect.d.ts +60 -0
  16. package/dist/components/Popover.d.ts +2 -1
  17. package/dist/components/RadioGroup.d.ts +26 -3
  18. package/dist/components/Select.d.ts +4 -4
  19. package/dist/components/Sheet.d.ts +4 -0
  20. package/dist/components/Table.d.ts +10 -10
  21. package/dist/components/TextField.d.ts +1 -1
  22. package/dist/components/TextareaAutosize.d.ts +3 -34
  23. package/dist/components/Tooltip.d.ts +5 -2
  24. package/dist/components/index.d.ts +2 -1
  25. package/dist/hooks/index.d.ts +4 -0
  26. package/dist/hooks/useLocaleConfig.d.ts +1 -0
  27. package/dist/icons/Icon.d.ts +3 -3
  28. package/dist/index.css +77 -0
  29. package/dist/index.d.ts +1 -0
  30. package/dist/index.es.js +13290 -13511
  31. package/dist/index.es.js.map +1 -1
  32. package/dist/index.umd.js +19828 -49
  33. package/dist/index.umd.js.map +1 -1
  34. package/dist/styles.d.ts +7 -7
  35. package/dist/util/{cn.d.ts → cls.d.ts} +4 -0
  36. package/dist/util/index.d.ts +1 -3
  37. package/package.json +109 -118
  38. package/src/components/Alert.tsx +2 -2
  39. package/src/components/Autocomplete.tsx +4 -3
  40. package/src/components/Avatar.tsx +7 -6
  41. package/src/components/Badge.tsx +1 -1
  42. package/src/components/BooleanSwitch.tsx +15 -15
  43. package/src/components/BooleanSwitchWithLabel.tsx +8 -8
  44. package/src/components/Button.tsx +11 -13
  45. package/src/components/Card.tsx +3 -3
  46. package/src/components/CenteredView.tsx +25 -15
  47. package/src/components/Checkbox.tsx +11 -9
  48. package/src/components/Chip.tsx +8 -5
  49. package/src/components/CircularProgress.tsx +2 -2
  50. package/src/components/Collapse.tsx +3 -2
  51. package/src/components/Container.tsx +2 -2
  52. package/src/components/DateTimeField.tsx +38 -48
  53. package/src/components/Dialog.tsx +15 -6
  54. package/src/components/DialogActions.tsx +2 -2
  55. package/src/components/DialogContent.tsx +2 -2
  56. package/src/components/ExpandablePanel.tsx +10 -8
  57. package/src/components/FileUpload.tsx +6 -9
  58. package/src/components/IconButton.tsx +4 -6
  59. package/src/components/InfoLabel.tsx +2 -2
  60. package/src/components/InputLabel.tsx +12 -9
  61. package/src/components/Label.tsx +17 -4
  62. package/src/components/Markdown.tsx +14 -3
  63. package/src/components/Menu.tsx +49 -31
  64. package/src/components/Menubar.tsx +322 -0
  65. package/src/components/MultiSelect.tsx +12 -14
  66. package/src/components/NewMultiSelect.tsx +370 -0
  67. package/src/components/Paper.tsx +2 -2
  68. package/src/components/Popover.tsx +17 -14
  69. package/src/components/RadioGroup.tsx +41 -9
  70. package/src/components/SearchBar.tsx +7 -8
  71. package/src/components/Select.tsx +92 -104
  72. package/src/components/Sheet.tsx +45 -28
  73. package/src/components/Skeleton.tsx +9 -6
  74. package/src/components/Table.tsx +50 -32
  75. package/src/components/Tabs.tsx +6 -7
  76. package/src/components/TextField.tsx +10 -13
  77. package/src/components/TextareaAutosize.tsx +3 -3
  78. package/src/components/Tooltip.tsx +27 -13
  79. package/src/components/Typography.tsx +34 -19
  80. package/src/components/common/SelectInputLabel.tsx +2 -2
  81. package/src/components/index.tsx +2 -1
  82. package/src/hooks/index.ts +4 -0
  83. package/src/hooks/useLocaleConfig.tsx +18 -0
  84. package/src/icons/Icon.tsx +46 -43
  85. package/src/icons/icon_keys.ts +114 -1301
  86. package/src/index.css +77 -0
  87. package/src/index.ts +1 -0
  88. package/src/scripts/generateIconKeys.ts +20 -11
  89. package/src/styles.ts +7 -7
  90. package/src/util/cls.ts +14 -0
  91. package/src/util/index.ts +1 -3
  92. package/tailwind.config.js +5 -3
  93. package/dist/components/Spinner.d.ts +0 -1
  94. package/src/components/Spinner.tsx +0 -18
  95. package/src/util/cn.ts +0 -6
  96. /package/dist/{util → hooks}/useDebounceValue.d.ts +0 -0
  97. /package/dist/{util → hooks}/useInjectStyles.d.ts +0 -0
  98. /package/dist/{util → hooks}/useOutsideAlerter.d.ts +0 -0
  99. /package/src/{util → hooks}/useDebounceValue.tsx +0 -0
  100. /package/src/{util → hooks}/useInjectStyles.tsx +0 -0
  101. /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
  /**
@@ -6,11 +6,15 @@ export type MenuProps = {
6
6
  defaultOpen?: boolean;
7
7
  onOpenChange?(open: boolean): void;
8
8
  portalContainer?: HTMLElement | null;
9
+ side?: "top" | "right" | "bottom" | "left";
10
+ align?: "start" | "center" | "end";
9
11
  };
10
- export declare function Menu({ children, trigger, open, defaultOpen, onOpenChange, portalContainer }: MenuProps): import("react/jsx-runtime").JSX.Element;
12
+ declare const Menu: React.ForwardRefExoticComponent<MenuProps & React.RefAttributes<HTMLButtonElement>>;
13
+ export { Menu };
11
14
  export type MenuItemProps = {
12
15
  children: React.ReactNode;
13
16
  dense?: boolean;
14
17
  onClick?: (event: React.MouseEvent) => void;
15
18
  };
16
- export declare function MenuItem({ children, dense, onClick }: MenuItemProps): import("react/jsx-runtime").JSX.Element;
19
+ export declare function MenuItem({ children, dense, // Default value is false if not provided
20
+ 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,10 +17,7 @@ export type MultiSelectProps = {
17
17
  disabled?: boolean;
18
18
  error?: boolean;
19
19
  position?: "item-aligned" | "popper";
20
- endAdornment?: React.ReactNode;
21
20
  inputRef?: React.RefObject<HTMLButtonElement>;
22
- padding?: boolean;
23
- includeFocusOutline?: boolean;
24
21
  children?: React.ReactNode;
25
22
  };
26
23
  interface MultiSelectContextProps {
@@ -29,7 +26,7 @@ interface MultiSelectContextProps {
29
26
  onValueChangeInternal: (v: string) => void;
30
27
  }
31
28
  export declare const MultiSelectContext: React.Context<MultiSelectContextProps>;
32
- export declare function MultiSelect({ value, open, onMultiValueChange, size, label, disabled, renderValue, renderValues, includeFocusOutline, containerClassName, className, children, error }: MultiSelectProps): import("react/jsx-runtime").JSX.Element;
29
+ export declare function MultiSelect({ value, open, onMultiValueChange, size, label, disabled, renderValue, renderValues, containerClassName, className, children, error }: MultiSelectProps): import("react/jsx-runtime").JSX.Element;
33
30
  export interface MultiSelectItemProps {
34
31
  value: string;
35
32
  children?: React.ReactNode;
@@ -0,0 +1,60 @@
1
+ import * as React from "react";
2
+ /**
3
+ * Props for MultiSelect component
4
+ */
5
+ interface MultiSelectProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
6
+ /**
7
+ * An array of option objects to be displayed in the multi-select component.
8
+ * Each option object has a label, value, and an optional icon.
9
+ */
10
+ options: {
11
+ /** The text to display for the option. */
12
+ label: string;
13
+ /** The unique value associated with the option. */
14
+ value: string;
15
+ }[];
16
+ /**
17
+ * Callback function triggered when the selected values change.
18
+ * Receives an array of the new selected values.
19
+ */
20
+ onValueChange: (value: string[]) => void;
21
+ /** The default selected values when the component mounts. */
22
+ defaultValue: string[];
23
+ /**
24
+ * Placeholder text to be displayed when no values are selected.
25
+ * Optional, defaults to "Select options".
26
+ */
27
+ placeholder?: string;
28
+ /**
29
+ * Animation duration in seconds for the visual effects (e.g., bouncing badges).
30
+ * Optional, defaults to 0 (no animation).
31
+ */
32
+ animation?: number;
33
+ /**
34
+ * Maximum number of items to display. Extra selected items will be summarized.
35
+ * Optional, defaults to 3.
36
+ */
37
+ maxCount?: number;
38
+ /**
39
+ * The modality of the popover. When set to true, interaction with outside elements
40
+ * will be disabled and only popover content will be visible to screen readers.
41
+ * Optional, defaults to false.
42
+ */
43
+ modalPopover?: boolean;
44
+ /**
45
+ * If true, renders the multi-select component as a child of another component.
46
+ * Optional, defaults to false.
47
+ */
48
+ asChild?: boolean;
49
+ /**
50
+ * Additional class names to apply custom styles to the multi-select component.
51
+ * Optional, can be used to add custom styles.
52
+ */
53
+ className?: string;
54
+ size?: "small" | "medium";
55
+ invisible?: boolean;
56
+ disabled?: boolean;
57
+ variant?: "default" | "secondary" | "destructive";
58
+ }
59
+ export declare const NewMultiSelect: React.ForwardRefExoticComponent<MultiSelectProps & React.RefAttributes<HTMLButtonElement>>;
60
+ export {};
@@ -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,14 +24,15 @@ 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";
29
+ export * from "./NewMultiSelect";
28
30
  export * from "./Paper";
29
31
  export * from "./RadioGroup";
30
32
  export * from "./SearchBar";
31
33
  export * from "./Select";
32
34
  export * from "./Separator";
33
35
  export * from "./Sheet";
34
- export * from "./Spinner";
35
36
  export * from "./TextareaAutosize";
36
37
  export * from "./TextField";
37
38
  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,77 @@
1
+ /* Chrome, Safari and Opera */
2
+ .no-scrollbar::-webkit-scrollbar {
3
+ display: none;
4
+ }
5
+
6
+ .no-scrollbar {
7
+ -ms-overflow-style: none; /* IE and Edge */
8
+ scrollbar-width: none; /* Firefox */
9
+ }
10
+
11
+ .typography-h1 {
12
+ @apply text-6xl font-headers font-light;
13
+ }
14
+
15
+ .typography-h2 {
16
+ @apply text-5xl font-headers font-light;
17
+ }
18
+
19
+ .typography-h3 {
20
+ @apply text-4xl font-headers font-normal;
21
+ }
22
+
23
+ .typography-h4 {
24
+ @apply text-3xl font-headers font-normal;
25
+ }
26
+
27
+ .typography-h5 {
28
+ @apply text-2xl font-headers font-normal;
29
+ }
30
+
31
+ .typography-h6 {
32
+ @apply text-xl font-headers font-medium;
33
+ }
34
+
35
+ .typography-subtitle1 {
36
+ @apply text-lg font-headers font-medium;
37
+ }
38
+
39
+ .typography-subtitle2 {
40
+ @apply text-base font-headers font-medium;
41
+ }
42
+
43
+ .typography-body1 {
44
+ }
45
+
46
+ .typography-body2 {
47
+ @apply text-sm;
48
+ }
49
+
50
+ .typography-caption {
51
+ @apply text-xs;
52
+ }
53
+
54
+ .typography-label {
55
+ @apply text-sm font-medium;
56
+ }
57
+
58
+ .typography-inherit {
59
+ @apply text-inherit;
60
+ }
61
+
62
+ .typography-button {
63
+ @apply text-sm font-medium;
64
+ }
65
+
66
+
67
+ :focus-visible {
68
+ @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
69
+ }
70
+
71
+ a {
72
+ @apply text-blue-600 dark:text-blue-400 dark:hover:text-blue-600 hover:text-blue-800
73
+ }
74
+
75
+ body {
76
+ @apply w-full min-h-screen bg-gray-50 dark:bg-gray-900 flex flex-col items-center justify-center;
77
+ }