@mochi-ui/card
Advanced tools
Comparing version 0.1.3 to 0.1.6
@@ -1,10 +0,10 @@ | ||
import { PropsWithChildren } from 'react'; | ||
import * as Polymorphic from '@mochi-ui/polymorphic'; | ||
import * as react from 'react'; | ||
import { ComponentPropsWithoutRef } from 'react'; | ||
interface CardProps extends PropsWithChildren { | ||
interface CardProps extends ComponentPropsWithoutRef<'div'> { | ||
className?: string; | ||
asChild?: boolean; | ||
} | ||
type PolymorphicCard = Polymorphic.ForwardRefComponent<'div', CardProps>; | ||
declare const Card: PolymorphicCard; | ||
declare const Card: react.ForwardRefExoticComponent<CardProps & react.RefAttributes<HTMLDivElement>>; | ||
export { Card, CardProps }; |
@@ -28,6 +28,8 @@ "use strict"; | ||
var import_theme = require("@mochi-ui/theme"); | ||
var import_react_slot = require("@radix-ui/react-slot"); | ||
var import_jsx_runtime = require("react/jsx-runtime"); | ||
var { cardClsx } = import_theme.card; | ||
var Card = (0, import_react.forwardRef)( | ||
({ children, as: Component = "div", className, ...props }, ref) => { | ||
({ children, asChild, className, ...props }, ref) => { | ||
const Component = asChild ? import_react_slot.Slot : "div"; | ||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { ref, className: cardClsx({ className }), ...props, children }); | ||
@@ -34,0 +36,0 @@ } |
export { Card, CardProps } from './card.js'; | ||
import 'react'; | ||
import '@mochi-ui/polymorphic'; |
@@ -30,6 +30,8 @@ "use strict"; | ||
var import_theme = require("@mochi-ui/theme"); | ||
var import_react_slot = require("@radix-ui/react-slot"); | ||
var import_jsx_runtime = require("react/jsx-runtime"); | ||
var { cardClsx } = import_theme.card; | ||
var Card = (0, import_react.forwardRef)( | ||
({ children, as: Component = "div", className, ...props }, ref) => { | ||
({ children, asChild, className, ...props }, ref) => { | ||
const Component = asChild ? import_react_slot.Slot : "div"; | ||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { ref, className: cardClsx({ className }), ...props, children }); | ||
@@ -36,0 +38,0 @@ } |
{ | ||
"name": "@mochi-ui/card", | ||
"version": "0.1.3", | ||
"version": "0.1.6", | ||
"description": "...", | ||
@@ -32,6 +32,6 @@ "keywords": [ | ||
"dependencies": { | ||
"@radix-ui/react-slot": "^1.0.2", | ||
"class-variance-authority": "^0.7.0", | ||
"clsx": "^2.0.0", | ||
"@mochi-ui/polymorphic": "0.0.3", | ||
"@mochi-ui/theme": "0.13.0" | ||
"@mochi-ui/theme": "0.15.0" | ||
}, | ||
@@ -38,0 +38,0 @@ "clean-package": "../../../clean-package.config.json", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8069
123
+ Added@radix-ui/react-slot@^1.0.2
+ Added@mochi-ui/theme@0.15.0(transitive)
+ Added@radix-ui/react-compose-refs@1.1.0(transitive)
+ Added@radix-ui/react-slot@1.1.0(transitive)
- Removed@mochi-ui/polymorphic@0.0.3
- Removed@mochi-ui/polymorphic@0.0.3(transitive)
- Removed@mochi-ui/theme@0.13.0(transitive)
Updated@mochi-ui/theme@0.15.0