@anyknown/ui 0.4.1 → 0.4.2

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.
@@ -1,2 +1,7 @@
1
1
  import type { ComponentProps } from "react";
2
- export declare function Card(props: ComponentProps<"div">): import("react").JSX.Element;
2
+ import { type StyleArg } from "../../lib/styled.js";
3
+ type CardProps = ComponentProps<"div"> & {
4
+ sx?: StyleArg;
5
+ };
6
+ export declare function Card({ sx, ...props }: CardProps): import("react").JSX.Element;
7
+ export {};
@@ -12,6 +12,6 @@ const styles = stylex.create({
12
12
  padding: space.lg,
13
13
  },
14
14
  });
15
- export function Card(props) {
16
- return _jsx("div", { ...props, ...styled(props, styles.base) });
15
+ export function Card({ sx, ...props }) {
16
+ return _jsx("div", { ...props, ...styled(props, styles.base, sx) });
17
17
  }
@@ -1,7 +1,9 @@
1
1
  import type { ComponentProps, ElementType } from "react";
2
+ import { type StyleArg } from "../../lib/styled.js";
2
3
  type TextProps = ComponentProps<"p"> & {
3
4
  as?: ElementType;
4
5
  variant?: "display" | "title" | "body" | "caption" | "mono";
6
+ sx?: StyleArg;
5
7
  };
6
- export declare function Text({ as: Tag, variant, ...props }: TextProps): import("react").JSX.Element;
8
+ export declare function Text({ as: Tag, variant, sx, ...props }: TextProps): import("react").JSX.Element;
7
9
  export {};
@@ -26,6 +26,6 @@ const styles = stylex.create({
26
26
  caption: { fontSize: text.sm, color: color.textMuted },
27
27
  mono: { fontFamily: font.mono, fontSize: text.sm },
28
28
  });
29
- export function Text({ as: Tag = "p", variant = "body", ...props }) {
30
- return _jsx(Tag, { ...props, ...styled(props, styles.base, styles[variant]) });
29
+ export function Text({ as: Tag = "p", variant = "body", sx, ...props }) {
30
+ return _jsx(Tag, { ...props, ...styled(props, styles.base, styles[variant], sx) });
31
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anyknown/ui",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "AnyKnown design system — StyleX tokens, themes, and 34 components",
5
5
  "homepage": "https://ui.anyknown.com",
6
6
  "bugs": {