@tomny-dev/uzi 0.5.0-pr.55.166.1.9b92ea6 → 0.5.0-pr.55.167.1.d08cad4
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.
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
* @param props.padding - Padding preset.
|
|
11
11
|
* @param props.interactive - Enables hover/focus affordance.
|
|
12
12
|
*/
|
|
13
|
-
import type {
|
|
13
|
+
import type { ComponentPropsWithoutRef } from "react";
|
|
14
14
|
export type CardTone = "default" | "muted" | "contrast";
|
|
15
15
|
export type CardPadding = "none" | "sm" | "md" | "lg";
|
|
16
16
|
type CardElement = "div" | "section" | "article";
|
|
17
|
-
|
|
17
|
+
type CardOwnProps<T extends CardElement> = {
|
|
18
18
|
/** Optional semantic element type. Defaults to `div`. */
|
|
19
|
-
as?:
|
|
19
|
+
as?: T;
|
|
20
20
|
/** Visual tone; drives background/border CSS vars. */
|
|
21
21
|
tone?: CardTone;
|
|
22
22
|
/** Padding preset; maps to CSS variables so consumers can override globally. */
|
|
@@ -24,6 +24,7 @@ export type CardProps = HTMLAttributes<HTMLElement> & {
|
|
|
24
24
|
/** Adds hover/focus affordance (lift + outline). */
|
|
25
25
|
interactive?: boolean;
|
|
26
26
|
};
|
|
27
|
-
export
|
|
27
|
+
export type CardProps<T extends CardElement = "div"> = CardOwnProps<T> & Omit<ComponentPropsWithoutRef<T>, keyof CardOwnProps<T>>;
|
|
28
|
+
export declare function Card<T extends CardElement = "div">({ as, tone, padding, interactive, className, children, ...rest }: CardProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
28
29
|
export {};
|
|
29
30
|
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/components/card/Card.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/components/card/Card.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,wBAAwB,EAAe,MAAM,OAAO,CAAC;AAInE,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC;AACxD,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEtD,KAAK,WAAW,GAAG,KAAK,GAAG,SAAS,GAAG,SAAS,CAAC;AAEjD,KAAK,YAAY,CAAC,CAAC,SAAS,WAAW,IAAI;IACzC,yDAAyD;IACzD,EAAE,CAAC,EAAE,CAAC,CAAC;IACP,sDAAsD;IACtD,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,gFAAgF;IAChF,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,oDAAoD;IACpD,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,WAAW,GAAG,KAAK,IACjD,YAAY,CAAC,CAAC,CAAC,GACf,IAAI,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,MAAM,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;AAE3D,wBAAgB,IAAI,CAAC,CAAC,SAAS,WAAW,GAAG,KAAK,EAAE,EAClD,EAAE,EACF,IAAgB,EAChB,OAAc,EACd,WAAmB,EACnB,SAAS,EACT,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,SAAS,CAAC,CAAC,CAAC,2CAiBd"}
|
package/dist/index10.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index10.cjs","names":[],"sources":["../src/components/card/Card.tsx"],"sourcesContent":["/**\n * Lightweight container for discrete content objects across the app.\n *\n * @remarks\n * Supports tone variants, padding presets, and an optional interactive affordance.\n * Use Surface for visual grouping that does not represent a discrete object.\n *\n * @param props.as - Semantic element to render (defaults to `div`).\n * @param props.tone - Visual tone variant.\n * @param props.padding - Padding preset.\n * @param props.interactive - Enables hover/focus affordance.\n */\nimport type {
|
|
1
|
+
{"version":3,"file":"index10.cjs","names":[],"sources":["../src/components/card/Card.tsx"],"sourcesContent":["/**\n * Lightweight container for discrete content objects across the app.\n *\n * @remarks\n * Supports tone variants, padding presets, and an optional interactive affordance.\n * Use Surface for visual grouping that does not represent a discrete object.\n *\n * @param props.as - Semantic element to render (defaults to `div`).\n * @param props.tone - Visual tone variant.\n * @param props.padding - Padding preset.\n * @param props.interactive - Enables hover/focus affordance.\n */\nimport type { ComponentPropsWithoutRef, ElementType } from \"react\";\nimport { cx } from \"../../utils/cx\";\nimport styles from \"./card.module.css\";\n\nexport type CardTone = \"default\" | \"muted\" | \"contrast\";\nexport type CardPadding = \"none\" | \"sm\" | \"md\" | \"lg\";\n\ntype CardElement = \"div\" | \"section\" | \"article\";\n\ntype CardOwnProps<T extends CardElement> = {\n /** Optional semantic element type. Defaults to `div`. */\n as?: T;\n /** Visual tone; drives background/border CSS vars. */\n tone?: CardTone;\n /** Padding preset; maps to CSS variables so consumers can override globally. */\n padding?: CardPadding;\n /** Adds hover/focus affordance (lift + outline). */\n interactive?: boolean;\n};\n\nexport type CardProps<T extends CardElement = \"div\"> =\n CardOwnProps<T> &\n Omit<ComponentPropsWithoutRef<T>, keyof CardOwnProps<T>>;\n\nexport function Card<T extends CardElement = \"div\">({\n as,\n tone = \"default\",\n padding = \"md\",\n interactive = false,\n className,\n children,\n ...rest\n}: CardProps<T>) {\n const Component = (as ?? \"div\") as ElementType;\n const TONE_CLASS: Record<CardTone, string | null> = { default: null, muted: \"tone-muted\", contrast: \"tone-contrast\" };\n const PADDING_CLASS: Record<CardPadding, string> = { none: \"padding-none\", sm: \"padding-sm\", md: \"padding-md\", lg: \"padding-lg\" };\n const classes = cx(\n styles.card,\n TONE_CLASS[tone] ? styles[TONE_CLASS[tone]] : null,\n styles[PADDING_CLASS[padding]],\n interactive && styles.interactive,\n className,\n );\n\n return (\n <Component className={classes} {...rest}>\n {children}\n </Component>\n );\n}\n"],"mappings":";;;;AAoCA,SAAgB,KAAoC,EAClD,IACA,OAAO,WACP,UAAU,MACV,cAAc,OACd,WACA,UACA,GAAG,QACY;CACf,MAAM,YAAa,MAAM;CACzB,MAAM,aAA8C;EAAE,SAAS;EAAM,OAAO;EAAc,UAAU;CAAgB;CAUpH,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,WAAD;EAAW,WATG,WAAA,GACd,oBAAA,QAAO,MACP,WAAW,QAAQ,oBAAA,QAAO,WAAW,SAAS,MAC9C,oBAAA,QAAO;GAJ4C,MAAM;GAAgB,IAAI;GAAc,IAAI;GAAc,IAAI;EAI1G,EAAc,WACrB,eAAe,oBAAA,QAAO,aACtB,SAIsB;EAAS,GAAI;EAChC;CACQ,CAAA;AAEf"}
|
package/dist/index9.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index9.js","names":[],"sources":["../src/components/card/Card.tsx"],"sourcesContent":["/**\n * Lightweight container for discrete content objects across the app.\n *\n * @remarks\n * Supports tone variants, padding presets, and an optional interactive affordance.\n * Use Surface for visual grouping that does not represent a discrete object.\n *\n * @param props.as - Semantic element to render (defaults to `div`).\n * @param props.tone - Visual tone variant.\n * @param props.padding - Padding preset.\n * @param props.interactive - Enables hover/focus affordance.\n */\nimport type {
|
|
1
|
+
{"version":3,"file":"index9.js","names":[],"sources":["../src/components/card/Card.tsx"],"sourcesContent":["/**\n * Lightweight container for discrete content objects across the app.\n *\n * @remarks\n * Supports tone variants, padding presets, and an optional interactive affordance.\n * Use Surface for visual grouping that does not represent a discrete object.\n *\n * @param props.as - Semantic element to render (defaults to `div`).\n * @param props.tone - Visual tone variant.\n * @param props.padding - Padding preset.\n * @param props.interactive - Enables hover/focus affordance.\n */\nimport type { ComponentPropsWithoutRef, ElementType } from \"react\";\nimport { cx } from \"../../utils/cx\";\nimport styles from \"./card.module.css\";\n\nexport type CardTone = \"default\" | \"muted\" | \"contrast\";\nexport type CardPadding = \"none\" | \"sm\" | \"md\" | \"lg\";\n\ntype CardElement = \"div\" | \"section\" | \"article\";\n\ntype CardOwnProps<T extends CardElement> = {\n /** Optional semantic element type. Defaults to `div`. */\n as?: T;\n /** Visual tone; drives background/border CSS vars. */\n tone?: CardTone;\n /** Padding preset; maps to CSS variables so consumers can override globally. */\n padding?: CardPadding;\n /** Adds hover/focus affordance (lift + outline). */\n interactive?: boolean;\n};\n\nexport type CardProps<T extends CardElement = \"div\"> =\n CardOwnProps<T> &\n Omit<ComponentPropsWithoutRef<T>, keyof CardOwnProps<T>>;\n\nexport function Card<T extends CardElement = \"div\">({\n as,\n tone = \"default\",\n padding = \"md\",\n interactive = false,\n className,\n children,\n ...rest\n}: CardProps<T>) {\n const Component = (as ?? \"div\") as ElementType;\n const TONE_CLASS: Record<CardTone, string | null> = { default: null, muted: \"tone-muted\", contrast: \"tone-contrast\" };\n const PADDING_CLASS: Record<CardPadding, string> = { none: \"padding-none\", sm: \"padding-sm\", md: \"padding-md\", lg: \"padding-lg\" };\n const classes = cx(\n styles.card,\n TONE_CLASS[tone] ? styles[TONE_CLASS[tone]] : null,\n styles[PADDING_CLASS[padding]],\n interactive && styles.interactive,\n className,\n );\n\n return (\n <Component className={classes} {...rest}>\n {children}\n </Component>\n );\n}\n"],"mappings":";;;;AAoCA,SAAgB,KAAoC,EAClD,IACA,OAAO,WACP,UAAU,MACV,cAAc,OACd,WACA,UACA,GAAG,QACY;CACf,MAAM,YAAa,MAAM;CACzB,MAAM,aAA8C;EAAE,SAAS;EAAM,OAAO;EAAc,UAAU;CAAgB;CAUpH,OACE,oBAAC,WAAD;EAAW,WATG,GACd,oBAAO,MACP,WAAW,QAAQ,oBAAO,WAAW,SAAS,MAC9C,oBAAO;GAJ4C,MAAM;GAAgB,IAAI;GAAc,IAAI;GAAc,IAAI;EAI1G,EAAc,WACrB,eAAe,oBAAO,aACtB,SAIsB;EAAS,GAAI;EAChC;CACQ,CAAA;AAEf"}
|