@onbeam/ui
Advanced tools
Comparing version 1.0.0-9 to 1.0.0-10
import * as react from 'react'; | ||
import { PropsWithChildren, ReactNode as ReactNode$1, FC } from 'react'; | ||
import { PropsWithChildren, ReactNode, FC } from 'react'; | ||
import * as _onbeam_styled_system_types from '@onbeam/styled-system/types'; | ||
@@ -10,2 +10,9 @@ import { RecipeVariantProps } from '@onbeam/styled-system/types'; | ||
type WithClassName<P = {}> = P & { | ||
/** | ||
* Allows the consumer to add their own styles. Used to merge with default component styles | ||
*/ | ||
className?: string; | ||
}; | ||
type DistributiveOmit<T, K extends keyof any> = T extends any | ||
@@ -71,4 +78,7 @@ ? Omit<T, K> | ||
>( | ||
Component: React.ForwardRefRenderFunction<any, Props & { as?: OnlyAs }>, | ||
) => PolyForwardComponent<Default, Props, OnlyAs>; | ||
Component: React.ForwardRefRenderFunction< | ||
any, | ||
WithClassName<Props> & { as?: OnlyAs } | ||
>, | ||
) => PolyForwardComponent<Default, WithClassName<Props>, OnlyAs>; | ||
@@ -172,29 +182,12 @@ declare const buttonStyle: _onbeam_styled_system_types.SlotRecipeRuntimeFn<"root" | "iconLeft" | "iconRight" | "led", { | ||
// Redecalare forwardRef to support generic component casting | ||
declare module 'react' { | ||
function forwardRef<T, P = {}>( | ||
render: (props: P, ref: Ref<T>) => ReactNode | null, | ||
): (props: P & RefAttributes<T>) => ReactNode | null; | ||
} | ||
/** | ||
* Default props that should be applied to all components | ||
*/ | ||
type BeamComponentProps<P = {}> = P & { | ||
/** | ||
* Allows the consumer to add their own styles. Used to merge with default component styles | ||
*/ | ||
className?: string; | ||
}; | ||
type ButtonVariants = RecipeVariantProps<typeof buttonStyle>; | ||
type ButtonProps = BeamComponentProps<PropsWithChildren<ButtonVariants & { | ||
type ButtonProps = PropsWithChildren<ButtonVariants & { | ||
/** | ||
* Adds an icon to the left of the button. Combining this with `iconRight` or `hasLed` will throw an error. | ||
*/ | ||
iconLeft?: ReactNode$1; | ||
iconLeft?: ReactNode; | ||
/** | ||
* Adds an icon to the right of the button. Combining this with `iconLeft` or `hasLed` will throw an error. | ||
*/ | ||
iconRight?: ReactNode$1; | ||
iconRight?: ReactNode; | ||
/** | ||
@@ -212,36 +205,11 @@ * Adds an LED to the button. Combining this with `iconLeft` or `iconRight` will throw an error. | ||
disabled?: boolean; | ||
}>>; | ||
declare const Button: PolyForwardComponent<"a" | "button", ButtonProps, react.ElementType<any, keyof react.JSX.IntrinsicElements>>; | ||
declare const cardStyle: _onbeam_styled_system_types.SlotRecipeRuntimeFn<"root" | "edgeShadowHorizontal" | "edgeShadowVerticalLeft" | "edgeShadowVerticalRight", { | ||
size: { | ||
lg: { | ||
root: { | ||
p: number; | ||
maxW: "550px"; | ||
boxShadow: "sm"; | ||
}; | ||
}; | ||
md: { | ||
root: { | ||
p: number; | ||
maxW: "310px"; | ||
boxShadow: "lg"; | ||
}; | ||
}; | ||
sm: { | ||
root: { | ||
p: number; | ||
maxW: "140px"; | ||
boxShadow: "lg"; | ||
}; | ||
}; | ||
}; | ||
}>; | ||
type CardVariants = RecipeVariantProps<typeof cardStyle>; | ||
type CardProps = BeamComponentProps<PropsWithChildren<CardVariants>>; | ||
declare const Button: PolyForwardComponent<"a" | "button", WithClassName<ButtonProps>, react.ElementType<any, keyof react.JSX.IntrinsicElements>>; | ||
declare const Card: PolyForwardComponent<"div", CardProps, react.ElementType<any, keyof react.JSX.IntrinsicElements>>; | ||
declare const Card: PolyForwardComponent<"div", WithClassName<{ | ||
size?: "sm" | "md" | "lg" | undefined; | ||
} & { | ||
children?: react.ReactNode; | ||
}>, react.ElementType<any, keyof react.JSX.IntrinsicElements>>; | ||
@@ -248,0 +216,0 @@ type InputProps = React.InputHTMLAttributes<HTMLInputElement>; |
{ | ||
"name": "@onbeam/ui", | ||
"version": "1.0.0-9", | ||
"version": "1.0.0-10", | ||
"sideEffects": false, | ||
@@ -16,4 +16,4 @@ "license": "MIT", | ||
"dependencies": { | ||
"@onbeam/styled-system": "1.0.0-9", | ||
"@onbeam/icons": "1.0.0-9" | ||
"@onbeam/icons": "1.0.0-10", | ||
"@onbeam/styled-system": "1.0.0-10" | ||
}, | ||
@@ -31,3 +31,3 @@ "devDependencies": { | ||
"build": "tsup src/index.ts --format esm,cjs --dts --external react", | ||
"postbuild": "cp -rv fonts dist/fonts", | ||
"postbuild": "cp -rv fonts dist", | ||
"dev": "tsup src/index.ts --format esm,cjs --watch --dts --external react", | ||
@@ -34,0 +34,0 @@ "generate": "pnpm generate:barrels", |
Sorry, the diff of this file is not supported yet
1921086
929
+ Added@onbeam/icons@1.0.0-10(transitive)
+ Added@onbeam/styled-system@1.0.0-10(transitive)
- Removed@onbeam/icons@1.0.0-9(transitive)
- Removed@onbeam/styled-system@1.0.0-9(transitive)
Updated@onbeam/icons@1.0.0-10