@firecms/ui 3.0.0-canary.8 → 3.0.0-canary.80
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/README.md +1 -1
- package/dist/components/Avatar.d.ts +1 -0
- package/dist/components/BooleanSwitch.d.ts +1 -1
- package/dist/components/CenteredView.d.ts +4 -2
- package/dist/components/Checkbox.d.ts +4 -3
- package/dist/components/DateTimeField.d.ts +2 -2
- package/dist/components/InputLabel.d.ts +2 -2
- package/dist/components/Label.d.ts +4 -1
- package/dist/components/Markdown.d.ts +1 -0
- package/dist/components/Menu.d.ts +2 -1
- package/dist/components/Menubar.d.ts +69 -0
- package/dist/components/RadioGroup.d.ts +25 -3
- package/dist/components/Select.d.ts +1 -1
- package/dist/components/TextField.d.ts +1 -1
- package/dist/components/TextareaAutosize.d.ts +3 -34
- package/dist/components/index.d.ts +1 -1
- package/dist/hooks/index.d.ts +4 -0
- package/dist/hooks/useLocaleConfig.d.ts +1 -0
- package/dist/icons/Icon.d.ts +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +8362 -8066
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +10 -10
- package/dist/index.umd.js.map +1 -1
- package/dist/styles.d.ts +6 -6
- package/dist/util/{cn.d.ts → cls.d.ts} +4 -0
- package/dist/util/index.d.ts +1 -3
- package/package.json +39 -49
- package/src/components/Alert.tsx +2 -2
- package/src/components/Autocomplete.tsx +4 -3
- package/src/components/Avatar.tsx +7 -4
- package/src/components/Badge.tsx +1 -1
- package/src/components/BooleanSwitch.tsx +9 -9
- package/src/components/BooleanSwitchWithLabel.tsx +5 -5
- package/src/components/Button.tsx +7 -7
- package/src/components/Card.tsx +2 -2
- package/src/components/CenteredView.tsx +25 -15
- package/src/components/Checkbox.tsx +31 -24
- package/src/components/Chip.tsx +2 -2
- package/src/components/CircularProgress.tsx +2 -2
- package/src/components/Collapse.tsx +3 -2
- package/src/components/Container.tsx +2 -2
- package/src/components/DateTimeField.tsx +10 -9
- package/src/components/Dialog.tsx +4 -4
- package/src/components/DialogActions.tsx +2 -2
- package/src/components/DialogContent.tsx +2 -2
- package/src/components/ExpandablePanel.tsx +8 -6
- package/src/components/FileUpload.tsx +5 -7
- package/src/components/IconButton.tsx +3 -3
- package/src/components/InfoLabel.tsx +2 -2
- package/src/components/InputLabel.tsx +10 -9
- package/src/components/Label.tsx +17 -4
- package/src/components/Markdown.tsx +14 -3
- package/src/components/Menu.tsx +13 -7
- package/src/components/Menubar.tsx +287 -0
- package/src/components/MultiSelect.tsx +7 -6
- package/src/components/Paper.tsx +2 -2
- package/src/components/Popover.tsx +3 -2
- package/src/components/RadioGroup.tsx +40 -9
- package/src/components/SearchBar.tsx +6 -6
- package/src/components/Select.tsx +24 -23
- package/src/components/Sheet.tsx +7 -7
- package/src/components/Skeleton.tsx +8 -5
- package/src/components/Table.tsx +6 -6
- package/src/components/Tabs.tsx +5 -5
- package/src/components/TextField.tsx +8 -7
- package/src/components/TextareaAutosize.tsx +3 -3
- package/src/components/Tooltip.tsx +4 -3
- package/src/components/Typography.tsx +20 -3
- package/src/components/common/SelectInputLabel.tsx +2 -2
- package/src/components/index.tsx +1 -1
- package/src/hooks/index.ts +4 -0
- package/src/hooks/useLocaleConfig.tsx +18 -0
- package/src/icons/Icon.tsx +44 -41
- package/src/index.ts +1 -0
- package/src/scripts/generateIconKeys.ts +0 -1
- package/src/styles.ts +6 -6
- package/src/util/cls.ts +14 -0
- package/src/util/index.ts +1 -3
- package/tailwind.config.js +70 -0
- package/dist/components/Spinner.d.ts +0 -1
- package/src/components/Spinner.tsx +0 -18
- package/src/util/cn.ts +0 -6
- /package/dist/{util → hooks}/useDebounceValue.d.ts +0 -0
- /package/dist/{util → hooks}/useInjectStyles.d.ts +0 -0
- /package/dist/{util → hooks}/useOutsideAlerter.d.ts +0 -0
- /package/src/{util → hooks}/useDebounceValue.tsx +0 -0
- /package/src/{util → hooks}/useInjectStyles.tsx +0 -0
- /package/src/{util → hooks}/useOutsideAlerter.tsx +0 -0
package/README.md
CHANGED
@@ -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>>;
|
@@ -1,7 +1,9 @@
|
|
1
1
|
import React from "react";
|
2
|
-
export
|
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
|
-
}
|
8
|
+
};
|
9
|
+
export declare const CenteredView: React.ForwardRefExoticComponent<CenteredViewProps & React.RefAttributes<HTMLDivElement>>;
|
@@ -1,10 +1,11 @@
|
|
1
|
-
interface CheckboxProps {
|
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;
|
7
|
+
padding?: boolean;
|
6
8
|
size?: "tiny" | "small" | "medium" | "large";
|
7
9
|
color?: "primary" | "secondary";
|
8
10
|
}
|
9
|
-
export declare const Checkbox: ({ checked, indeterminate, disabled, size, onCheckedChange, color }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
|
10
|
-
export {};
|
11
|
+
export declare const Checkbox: ({ id, checked, indeterminate, padding, disabled, size, onCheckedChange, color }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import React from "react";
|
2
2
|
interface DateTimeFieldProps {
|
3
3
|
value?: Date;
|
4
|
-
onChange: (date: Date |
|
4
|
+
onChange: (date: Date | undefined) => void;
|
5
5
|
mode?: "date" | "date_time";
|
6
6
|
disabled?: boolean;
|
7
7
|
clearable?: boolean;
|
8
8
|
error?: boolean;
|
9
|
-
size
|
9
|
+
size?: "small" | "medium";
|
10
10
|
label?: React.ReactNode;
|
11
11
|
className?: string;
|
12
12
|
style?: React.CSSProperties;
|
@@ -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
|
10
|
-
shrink?: boolean
|
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"> &
|
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 };
|
@@ -13,4 +13,5 @@ export type MenuItemProps = {
|
|
13
13
|
dense?: boolean;
|
14
14
|
onClick?: (event: React.MouseEvent) => void;
|
15
15
|
};
|
16
|
-
export declare function MenuItem({ children, dense,
|
16
|
+
export declare function MenuItem({ children, dense, // Default value is false if not provided
|
17
|
+
onClick }: MenuItemProps): import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,69 @@
|
|
1
|
+
export declare function Menubar({ children, className }: {
|
2
|
+
children: React.ReactNode;
|
3
|
+
className?: string;
|
4
|
+
}): import("react/jsx-runtime").JSX.Element;
|
5
|
+
export declare function MenubarMenu({ children, }: {
|
6
|
+
children: React.ReactNode;
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
8
|
+
export declare function MenubarTrigger({ children, className }: {
|
9
|
+
children: React.ReactNode;
|
10
|
+
className?: string;
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
12
|
+
export declare function MenubarPortal({ children, }: {
|
13
|
+
children: React.ReactNode;
|
14
|
+
}): import("react/jsx-runtime").JSX.Element;
|
15
|
+
export declare function MenubarContent({ children, className, align, sideOffset, alignOffset, ...rest }: {
|
16
|
+
children: React.ReactNode;
|
17
|
+
className?: string;
|
18
|
+
align?: "start" | "center" | "end";
|
19
|
+
sideOffset?: number;
|
20
|
+
alignOffset?: number;
|
21
|
+
}): import("react/jsx-runtime").JSX.Element;
|
22
|
+
export declare function MenubarItem({ children, leftPadding, className, disabled, ...rest }: {
|
23
|
+
children: React.ReactNode;
|
24
|
+
leftPadding?: boolean;
|
25
|
+
className?: string;
|
26
|
+
disabled?: boolean;
|
27
|
+
}): import("react/jsx-runtime").JSX.Element;
|
28
|
+
export declare function MenubarSeparator({ children, className, ...rest }: {
|
29
|
+
children?: React.ReactNode;
|
30
|
+
className?: string;
|
31
|
+
}): import("react/jsx-runtime").JSX.Element;
|
32
|
+
export declare function MenubarSub({ children, ...rest }: {
|
33
|
+
children?: React.ReactNode;
|
34
|
+
}): import("react/jsx-runtime").JSX.Element;
|
35
|
+
export declare function MenubarSubTrigger({ children, className, ...rest }: {
|
36
|
+
children?: React.ReactNode;
|
37
|
+
className?: string;
|
38
|
+
}): import("react/jsx-runtime").JSX.Element;
|
39
|
+
export declare function MenubarSubContent({ children, alignOffset, className, ...rest }: {
|
40
|
+
children?: React.ReactNode;
|
41
|
+
alignOffset?: number;
|
42
|
+
className?: string;
|
43
|
+
}): import("react/jsx-runtime").JSX.Element;
|
44
|
+
export declare function MenubarCheckboxItem({ children, checked, onCheckedChange, className, ...rest }: {
|
45
|
+
children?: React.ReactNode;
|
46
|
+
checked?: boolean;
|
47
|
+
onCheckedChange?: () => void;
|
48
|
+
className?: string;
|
49
|
+
}): import("react/jsx-runtime").JSX.Element;
|
50
|
+
export declare function MenubarItemIndicator({ children, className, ...rest }: {
|
51
|
+
children?: React.ReactNode;
|
52
|
+
className?: string;
|
53
|
+
}): import("react/jsx-runtime").JSX.Element;
|
54
|
+
export declare function MenubarRadioGroup({ children, className, value, onValueChange, ...rest }: {
|
55
|
+
children?: React.ReactNode;
|
56
|
+
value?: string;
|
57
|
+
onValueChange?: (value: string) => void;
|
58
|
+
className?: string;
|
59
|
+
}): import("react/jsx-runtime").JSX.Element;
|
60
|
+
export declare function MenubarRadioItem({ children, className, value, ...rest }: {
|
61
|
+
children?: React.ReactNode;
|
62
|
+
value: string;
|
63
|
+
className?: string;
|
64
|
+
}): import("react/jsx-runtime").JSX.Element;
|
65
|
+
export declare function MenubarShortcut({ children, className, ...rest }: {
|
66
|
+
children?: React.ReactNode;
|
67
|
+
className?: string;
|
68
|
+
}): import("react/jsx-runtime").JSX.Element;
|
69
|
+
export declare function MenubarSubTriggerIndicator(): import("react/jsx-runtime").JSX.Element;
|
@@ -1,5 +1,27 @@
|
|
1
1
|
import * as React from "react";
|
2
|
-
|
3
|
-
|
4
|
-
|
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
|
+
}
|
26
|
+
declare const RadioGroupItem: React.ForwardRefExoticComponent<RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
|
5
27
|
export { RadioGroup, RadioGroupItem };
|
@@ -14,7 +14,7 @@ export type SelectProps = {
|
|
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";
|
@@ -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.
|
7
|
-
|
8
|
-
|
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;
|
@@ -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 @@
|
|
1
|
+
export declare function useLocaleConfig(locale?: string): void;
|
package/dist/icons/Icon.d.ts
CHANGED
@@ -8,6 +8,6 @@ export type IconProps = {
|
|
8
8
|
onClick?: (e: React.SyntheticEvent) => void;
|
9
9
|
style?: React.CSSProperties;
|
10
10
|
};
|
11
|
-
export declare
|
11
|
+
export declare const Icon: React.ForwardRefExoticComponent<IconProps & {
|
12
12
|
iconKey: string;
|
13
|
-
}
|
13
|
+
} & React.RefAttributes<HTMLSpanElement>>;
|
package/dist/index.d.ts
CHANGED