@firecms/ui 3.0.0-canary.209 → 3.0.0-canary.210
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/dist/components/Button.d.ts +3 -2
- package/dist/components/IconButton.d.ts +0 -1
- package/dist/index.es.js +3 -3
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +3 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Button.tsx +9 -9
- package/src/components/IconButton.tsx +0 -1
- package/src/components/Menubar.tsx +1 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from "react";
|
2
|
-
export type ButtonProps<
|
2
|
+
export type ButtonProps<C extends React.ElementType = "button"> = {
|
3
3
|
children?: React.ReactNode;
|
4
4
|
variant?: "filled" | "neutral" | "outlined" | "text";
|
5
5
|
disabled?: boolean;
|
@@ -8,6 +8,7 @@ export type ButtonProps<P extends React.ElementType> = Omit<(P extends "button"
|
|
8
8
|
startIcon?: React.ReactNode;
|
9
9
|
fullWidth?: boolean;
|
10
10
|
className?: string;
|
11
|
+
component?: C;
|
11
12
|
onClick?: React.MouseEventHandler<any>;
|
12
|
-
}
|
13
|
+
} & React.ComponentPropsWithoutRef<C>;
|
13
14
|
export declare const Button: React.FC<ButtonProps<any>>;
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import React from "react";
|
2
2
|
export type IconButtonProps<C extends React.ElementType> = Omit<(C extends "button" ? React.ButtonHTMLAttributes<HTMLButtonElement> : React.ComponentProps<C>), "onClick"> & {
|
3
|
-
children?: React.ReactNode;
|
4
3
|
size?: "medium" | "small" | "smallest" | "large";
|
5
4
|
variant?: "ghost" | "filled";
|
6
5
|
shape?: "circular" | "square";
|
package/dist/index.es.js
CHANGED
@@ -859,8 +859,8 @@ const ButtonInner = React__default.forwardRef((t0, ref) => {
|
|
859
859
|
"border border-secondary bg-secondary focus:ring-secondary shadow hover:ring-1 hover:ring-secondary text-white hover:text-white": t9,
|
860
860
|
"border border-red-500 bg-red-500 hover:bg-red-500 focus:ring-red-500 shadow hover:ring-1 hover:ring-red-600 text-white hover:text-white": t10,
|
861
861
|
"border border-surface-accent-200 bg-surface-accent-200 hover:bg-surface-accent-300 focus:ring-surface-accent-400 shadow hover:ring-1 hover:ring-surface-accent-400 text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:dark:text-text-primary-dark": t11,
|
862
|
-
"border border-transparent text-primary hover:text-primary hover:bg-surface-accent-200 dark:hover:bg-surface-
|
863
|
-
"border border-transparent text-secondary hover:text-secondary hover:bg-
|
862
|
+
"border border-transparent text-primary hover:text-primary hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-800": t12,
|
863
|
+
"border border-transparent text-secondary hover:text-secondary hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-800": t13,
|
864
864
|
"border border-transparent text-red-500 hover:text-red-500 hover:bg-red-500 hover:bg-opacity-10": t14,
|
865
865
|
"border border-transparent text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:dark:text-text-primary-dark hover:bg-surface-accent-200 hover:dark:bg-surface-700": t15,
|
866
866
|
"border border-primary text-primary hover:text-primary hover:bg-primary-bg": t16,
|
@@ -28956,7 +28956,7 @@ function MenubarTrigger(t0) {
|
|
28956
28956
|
} = t0;
|
28957
28957
|
let t1;
|
28958
28958
|
if ($[0] !== className) {
|
28959
|
-
t1 = cls("py-2 px-3 outline-none select-none font-medium leading-none rounded text-text-primary dark:text-text-primary-dark text-[13px] flex items-center justify-between gap-[2px] data-[highlighted]:bg-surface-accent-100 data-[highlighted]:dark:bg-surface-800 data-[state=open]:bg-surface-accent-100 data-[state=open]:dark:bg-surface-800 hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-
|
28959
|
+
t1 = cls("py-2 px-3 outline-none select-none font-medium leading-none rounded text-text-primary dark:text-text-primary-dark text-[13px] flex items-center justify-between gap-[2px] data-[highlighted]:bg-surface-accent-100 data-[highlighted]:dark:bg-surface-800 data-[state=open]:bg-surface-accent-100 data-[state=open]:dark:bg-surface-800 hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-800", className);
|
28960
28960
|
$[0] = className;
|
28961
28961
|
$[1] = t1;
|
28962
28962
|
} else {
|