@pihanga2/shadcn 0.2.15 → 0.2.18
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/AGENT.building-cards.md +68 -0
- package/AGENT.using-cards.md +15 -3
- package/README.md +4 -1
- package/cards/conditional/conditional.component.js +30 -12
- package/cards/conditional/conditional.component.js.map +1 -1
- package/cards/conditional/conditional.types.d.ts +21 -3
- package/cards/conditional/conditional.types.js +1 -1
- package/cards/conditional/conditional.types.js.map +1 -1
- package/cards/fileDrop/fileDrop.component.js.map +1 -1
- package/cards/fileDrop/fileDrop.css +1 -1
- package/cards/jsonViewer/jsonViewer.css +1 -1
- package/cards/keyboardOverlay/keyboardOverlay.component.js +25 -13
- package/cards/keyboardOverlay/keyboardOverlay.component.js.map +1 -1
- package/cards/keyboardOverlay/keyboardOverlay.types.d.ts +22 -4
- package/cards/keyboardOverlay/keyboardOverlay.types.js.map +1 -1
- package/cards/loadingOverlay/loadingOverlay.css +1 -1
- package/cards/modeToggle/mode-toggle.component.js +1 -1
- package/cards/modeToggle/mode-toggle.component.js.map +1 -1
- package/cards/pageWithNavbar/pageWithNavbar.css +1 -1
- package/cards/pasteTarget/pasteTarget.css +1 -1
- package/cards/resizableColumns/index.d.ts +1 -0
- package/cards/resizableColumns/index.js +12 -0
- package/cards/resizableColumns/index.js.map +1 -0
- package/cards/resizableColumns/resizableColumns.component.d.ts +4 -0
- package/cards/resizableColumns/resizableColumns.component.js +105 -0
- package/cards/resizableColumns/resizableColumns.component.js.map +1 -0
- package/cards/resizableColumns/resizableColumns.css +1 -0
- package/cards/resizableColumns/resizableColumns.types.d.ts +22 -0
- package/cards/resizableColumns/resizableColumns.types.js +7 -0
- package/cards/resizableColumns/resizableColumns.types.js.map +1 -0
- package/cards/resizableGrid/index.d.ts +1 -0
- package/cards/resizableGrid/index.js +12 -0
- package/cards/resizableGrid/index.js.map +1 -0
- package/cards/resizableGrid/resizableGrid.component.d.ts +4 -0
- package/cards/resizableGrid/resizableGrid.component.js +166 -0
- package/cards/resizableGrid/resizableGrid.component.js.map +1 -0
- package/cards/resizableGrid/resizableGrid.css +1 -0
- package/cards/resizableGrid/resizableGrid.types.d.ts +33 -0
- package/cards/resizableGrid/resizableGrid.types.js +7 -0
- package/cards/resizableGrid/resizableGrid.types.js.map +1 -0
- package/cards/scrollbarWithAnnotations/scrollbarWithAnnotations.css +1 -1
- package/cards/suspense/index.d.ts +1 -0
- package/cards/suspense/index.js +12 -0
- package/cards/suspense/index.js.map +1 -0
- package/cards/suspense/suspense.component.d.ts +15 -0
- package/cards/suspense/suspense.component.js +45 -0
- package/cards/suspense/suspense.component.js.map +1 -0
- package/cards/suspense/suspense.types.d.ts +67 -0
- package/cards/suspense/suspense.types.js +7 -0
- package/cards/suspense/suspense.types.js.map +1 -0
- package/cards/typography/typography.component.js +13 -12
- package/cards/typography/typography.component.js.map +1 -1
- package/cards/typography/typography.types.d.ts +2 -0
- package/cards/typography/typography.types.js.map +1 -1
- package/package.json +17 -2
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { PiCardRef } from '@pihanga2/core';
|
|
2
|
+
import { SkeletonRowSize, SkeletonSpacing } from '../loadingSkeleton';
|
|
3
|
+
export declare const SUSPENSE_CARD = "shad/suspense";
|
|
4
|
+
export declare const Suspense: <S extends import('@pihanga2/core').ReduxState>(p: import('@pihanga2/core').PiMapProps<SuspenseProps, S, {}>) => import('@pihanga2/core').PiCardDef;
|
|
5
|
+
/**
|
|
6
|
+
* Props for the `shad/suspense` card.
|
|
7
|
+
*
|
|
8
|
+
* Wraps `content` in a React `<Suspense>` boundary so it can suspend
|
|
9
|
+
* independently of its siblings (e.g. when its component is code-split via
|
|
10
|
+
* `React.lazy`).
|
|
11
|
+
*
|
|
12
|
+
* **Default fallback** — animated shimmer skeleton rows (same as
|
|
13
|
+
* `shad/loading-skeleton`); customise with `rows` / `rowSize` / `spacing`:
|
|
14
|
+
* ```ts
|
|
15
|
+
* registerCard("myApp/editorSection", PiSuspense({
|
|
16
|
+
* content: "myApp/codeEditor",
|
|
17
|
+
* rows: 5,
|
|
18
|
+
* rowSize: "lg",
|
|
19
|
+
* }));
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* **Custom fallback card** — pass any registered card name via `fallback` to
|
|
23
|
+
* replace the built-in skeleton entirely:
|
|
24
|
+
* ```ts
|
|
25
|
+
* registerCard("myApp/graphSection", PiSuspense({
|
|
26
|
+
* content: "myApp/graphView",
|
|
27
|
+
* fallback: "myApp/graphPlaceholder",
|
|
28
|
+
* }));
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export type SuspenseProps = {
|
|
32
|
+
/**
|
|
33
|
+
* The card to render inside the Suspense boundary.
|
|
34
|
+
* Typically registered with a `React.lazy` component so it can suspend.
|
|
35
|
+
*/
|
|
36
|
+
content: PiCardRef;
|
|
37
|
+
/**
|
|
38
|
+
* Optional card to use as the Suspense fallback.
|
|
39
|
+
* When provided, the built-in skeleton props below are ignored.
|
|
40
|
+
*/
|
|
41
|
+
fallback?: PiCardRef;
|
|
42
|
+
/**
|
|
43
|
+
* Number of placeholder rows shown while suspended.
|
|
44
|
+
* @default 3
|
|
45
|
+
*/
|
|
46
|
+
rows?: number;
|
|
47
|
+
/**
|
|
48
|
+
* Named height preset for each shimmer row.
|
|
49
|
+
* @default "md"
|
|
50
|
+
*/
|
|
51
|
+
rowSize?: SkeletonRowSize;
|
|
52
|
+
/**
|
|
53
|
+
* Named gap preset between shimmer rows.
|
|
54
|
+
* @default "md"
|
|
55
|
+
*/
|
|
56
|
+
spacing?: SkeletonSpacing;
|
|
57
|
+
/**
|
|
58
|
+
* Raw Tailwind classes for every shimmer row.
|
|
59
|
+
* When set, takes precedence over `rowSize`.
|
|
60
|
+
*/
|
|
61
|
+
rowClassName?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Raw Tailwind classes for the outer wrapper `<div>`.
|
|
64
|
+
* When set, takes precedence over `spacing`.
|
|
65
|
+
*/
|
|
66
|
+
className?: string;
|
|
67
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suspense.types.js","names":[],"sources":["../../../src/cards/suspense/suspense.types.ts"],"sourcesContent":["import {createCardDeclaration} from \"@pihanga2/core\";\nimport type {PiCardRef} from \"@pihanga2/core\";\nimport type {SkeletonRowSize, SkeletonSpacing} from \"@/cards/loadingSkeleton\";\n\n// ── Card id ───────────────────────────────────────────────────────────────────\n\nexport const SUSPENSE_CARD = \"shad/suspense\";\n\n// ── Card declaration factory ──────────────────────────────────────────────────\n\nexport const Suspense = createCardDeclaration<SuspenseProps>(SUSPENSE_CARD);\n\n// ── Props ─────────────────────────────────────────────────────────────────────\n\n/**\n * Props for the `shad/suspense` card.\n *\n * Wraps `content` in a React `<Suspense>` boundary so it can suspend\n * independently of its siblings (e.g. when its component is code-split via\n * `React.lazy`).\n *\n * **Default fallback** — animated shimmer skeleton rows (same as\n * `shad/loading-skeleton`); customise with `rows` / `rowSize` / `spacing`:\n * ```ts\n * registerCard(\"myApp/editorSection\", PiSuspense({\n * content: \"myApp/codeEditor\",\n * rows: 5,\n * rowSize: \"lg\",\n * }));\n * ```\n *\n * **Custom fallback card** — pass any registered card name via `fallback` to\n * replace the built-in skeleton entirely:\n * ```ts\n * registerCard(\"myApp/graphSection\", PiSuspense({\n * content: \"myApp/graphView\",\n * fallback: \"myApp/graphPlaceholder\",\n * }));\n * ```\n */\nexport type SuspenseProps = {\n /**\n * The card to render inside the Suspense boundary.\n * Typically registered with a `React.lazy` component so it can suspend.\n */\n content: PiCardRef;\n\n /**\n * Optional card to use as the Suspense fallback.\n * When provided, the built-in skeleton props below are ignored.\n */\n fallback?: PiCardRef;\n\n // ── Built-in skeleton fallback options (ignored when `fallback` is set) ────\n\n /**\n * Number of placeholder rows shown while suspended.\n * @default 3\n */\n rows?: number;\n\n /**\n * Named height preset for each shimmer row.\n * @default \"md\"\n */\n rowSize?: SkeletonRowSize;\n\n /**\n * Named gap preset between shimmer rows.\n * @default \"md\"\n */\n spacing?: SkeletonSpacing;\n\n /**\n * Raw Tailwind classes for every shimmer row.\n * When set, takes precedence over `rowSize`.\n */\n rowClassName?: string;\n\n /**\n * Raw Tailwind classes for the outer wrapper `<div>`.\n * When set, takes precedence over `spacing`.\n */\n className?: string;\n};\n// No events — display-only structural card.\n"],"mappings":";;AAMA,IAAa,IAAgB,iBAIhB,IAAW,EAAqC,CAAa"}
|
|
@@ -16,27 +16,28 @@ var a = {
|
|
|
16
16
|
small: ["small", "text-sm font-medium leading-none"],
|
|
17
17
|
muted: ["p", "text-sm text-muted-foreground"]
|
|
18
18
|
}, o = (s) => {
|
|
19
|
-
let { text: c, childCard: l, paragraph: u, level: d, className: f, style: p,
|
|
20
|
-
function
|
|
19
|
+
let { text: c, childCard: l, paragraph: u, level: d, className: f, style: p, id: m, cardName: h, _dispatch: g, _cls: _ } = s, [v, y] = d ? a[d] : ["div", ""];
|
|
20
|
+
function b() {
|
|
21
21
|
return l ? /* @__PURE__ */ i(n, {
|
|
22
22
|
cardName: l,
|
|
23
|
-
parentCard:
|
|
24
|
-
}) : u ? /* @__PURE__ */ i(r, { children: u.map((e, t) =>
|
|
23
|
+
parentCard: h
|
|
24
|
+
}) : u ? /* @__PURE__ */ i(r, { children: u.map((e, t) => x(e, t)) }) : c;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function x(e, t) {
|
|
27
27
|
return typeof e == "string" ? e : e && typeof e == "object" ? o({
|
|
28
28
|
...e,
|
|
29
|
-
_dispatch:
|
|
30
|
-
_cls:
|
|
31
|
-
cardName:
|
|
29
|
+
_dispatch: g,
|
|
30
|
+
_cls: _,
|
|
31
|
+
cardName: h,
|
|
32
32
|
key: t
|
|
33
33
|
}) : null;
|
|
34
34
|
}
|
|
35
|
-
return t.createElement(
|
|
36
|
-
className: e(
|
|
35
|
+
return t.createElement(v, {
|
|
36
|
+
className: e(y, f),
|
|
37
37
|
style: p,
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
...m ? { id: m } : {},
|
|
39
|
+
"data-pihanga": h
|
|
40
|
+
}, b());
|
|
40
41
|
};
|
|
41
42
|
//#endregion
|
|
42
43
|
export { o as TypographyComponent };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typography.component.js","names":[],"sources":["../../../src/cards/typography/typography.component.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {Card, type PiCardProps} from \"@pihanga2/core\";\nimport {cn} from \"@/lib/utils\";\nimport type {TypographyLevel, TypographyProps} from \"./typography.types\";\n\n/** Maps each level to [html element, tailwind classes] */\nconst LEVEL_CONFIG: Record<\n TypographyLevel,\n [keyof React.JSX.IntrinsicElements, string]\n> = {\n h1: [\"h1\", \"scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl\"],\n h2: [\n \"h2\",\n \"scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0\",\n ],\n h3: [\"h3\", \"scroll-m-20 text-2xl font-semibold tracking-tight\"],\n h4: [\"h4\", \"scroll-m-20 text-xl font-semibold tracking-tight\"],\n p: [\"p\", \"leading-7 [&:not(:first-child)]:mt-6\"],\n blockquote: [\"blockquote\", \"mt-6 border-l-2 pl-6 italic\"],\n code: [\n \"code\",\n \"relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold\",\n ],\n lead: [\"p\", \"text-xl text-muted-foreground\"],\n large: [\"div\", \"text-lg font-semibold\"],\n small: [\"small\", \"text-sm font-medium leading-none\"],\n muted: [\"p\", \"text-sm text-muted-foreground\"],\n};\n\nexport const TypographyComponent = (\n props: PiCardProps<TypographyProps>,\n): React.ReactNode => {\n const {\n text,\n childCard,\n paragraph,\n level,\n className,\n style,\n cardName,\n _dispatch,\n _cls,\n } = props;\n\n const [el, levelClass] = level ? LEVEL_CONFIG[level] : [\"div\", \"\"];\n\n function renderChildren(): React.ReactNode {\n if (childCard) {\n return <Card cardName={childCard} parentCard={cardName} />;\n }\n if (paragraph) {\n return <>{paragraph.map((item, i) => renderParaItem(item, i))}</>;\n }\n return text;\n }\n\n function renderParaItem(\n item: string | TypographyProps,\n key: number,\n ): React.ReactNode {\n if (typeof item === \"string\") {\n return item;\n }\n if (item && typeof item === \"object\") {\n return TypographyComponent({\n ...item,\n _dispatch,\n _cls,\n cardName,\n key,\n } as PiCardProps<TypographyProps> & {key: number});\n }\n return null;\n }\n\n return React.createElement(\n el,\n {\n className: cn(levelClass, className),\n style,\n \"data-pihanga\": cardName,\n },\n renderChildren(),\n );\n};\n"],"mappings":";;;;;AAMA,IAAM,IAGF;CACF,IAAI,CAAC,MAAM,gEAAgE;CAC3E,IAAI,CACF,MACA,4EACF;CACA,IAAI,CAAC,MAAM,mDAAmD;CAC9D,IAAI,CAAC,MAAM,kDAAkD;CAC7D,GAAG,CAAC,KAAK,sCAAsC;CAC/C,YAAY,CAAC,cAAc,6BAA6B;CACxD,MAAM,CACJ,QACA,mFACF;CACA,MAAM,CAAC,KAAK,+BAA+B;CAC3C,OAAO,CAAC,OAAO,uBAAuB;CACtC,OAAO,CAAC,SAAS,kCAAkC;CACnD,OAAO,CAAC,KAAK,+BAA+B;AAC9C,GAEa,KACX,MACoB;CACpB,IAAM,EACJ,SACA,cACA,cACA,UACA,cACA,UACA,aACA,cACA,YACE,GAEE,CAAC,GAAI,KAAc,IAAQ,EAAa,KAAS,CAAC,OAAO,EAAE;CAEjE,SAAS,IAAkC;EAOzC,OANI,IACK,kBAAC,GAAD;GAAM,UAAU;GAAW,YAAY;EAAW,CAAA,IAEvD,IACK,kBAAA,GAAA,EAAA,UAAG,EAAU,KAAK,GAAM,MAAM,EAAe,GAAM,CAAC,CAAC,EAAI,CAAA,IAE3D;CACT;CAEA,SAAS,EACP,GACA,GACiB;EAajB,OAZI,OAAO,KAAS,WACX,IAEL,KAAQ,OAAO,KAAS,WACnB,EAAoB;GACzB,GAAG;GACH;GACA;GACA;GACA;EACF,CAAiD,IAE5C;CACT;CAEA,OAAO,EAAM,cACX,GACA;EACE,WAAW,EAAG,GAAY,CAAS;EACnC;EACA,gBAAgB;CAClB,GACA,EAAe,CACjB;AACF"}
|
|
1
|
+
{"version":3,"file":"typography.component.js","names":[],"sources":["../../../src/cards/typography/typography.component.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {Card, type PiCardProps} from \"@pihanga2/core\";\nimport {cn} from \"@/lib/utils\";\nimport type {TypographyLevel, TypographyProps} from \"./typography.types\";\n\n/** Maps each level to [html element, tailwind classes] */\nconst LEVEL_CONFIG: Record<\n TypographyLevel,\n [keyof React.JSX.IntrinsicElements, string]\n> = {\n h1: [\"h1\", \"scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl\"],\n h2: [\n \"h2\",\n \"scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0\",\n ],\n h3: [\"h3\", \"scroll-m-20 text-2xl font-semibold tracking-tight\"],\n h4: [\"h4\", \"scroll-m-20 text-xl font-semibold tracking-tight\"],\n p: [\"p\", \"leading-7 [&:not(:first-child)]:mt-6\"],\n blockquote: [\"blockquote\", \"mt-6 border-l-2 pl-6 italic\"],\n code: [\n \"code\",\n \"relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold\",\n ],\n lead: [\"p\", \"text-xl text-muted-foreground\"],\n large: [\"div\", \"text-lg font-semibold\"],\n small: [\"small\", \"text-sm font-medium leading-none\"],\n muted: [\"p\", \"text-sm text-muted-foreground\"],\n};\n\nexport const TypographyComponent = (\n props: PiCardProps<TypographyProps>,\n): React.ReactNode => {\n const {\n text,\n childCard,\n paragraph,\n level,\n className,\n style,\n id,\n cardName,\n _dispatch,\n _cls,\n } = props;\n\n const [el, levelClass] = level ? LEVEL_CONFIG[level] : [\"div\", \"\"];\n\n function renderChildren(): React.ReactNode {\n if (childCard) {\n return <Card cardName={childCard} parentCard={cardName} />;\n }\n if (paragraph) {\n return <>{paragraph.map((item, i) => renderParaItem(item, i))}</>;\n }\n return text;\n }\n\n function renderParaItem(\n item: string | TypographyProps,\n key: number,\n ): React.ReactNode {\n if (typeof item === \"string\") {\n return item;\n }\n if (item && typeof item === \"object\") {\n return TypographyComponent({\n ...item,\n _dispatch,\n _cls,\n cardName,\n key,\n } as PiCardProps<TypographyProps> & {key: number});\n }\n return null;\n }\n\n return React.createElement(\n el,\n {\n className: cn(levelClass, className),\n style,\n ...(id ? {id} : {}),\n \"data-pihanga\": cardName,\n },\n renderChildren(),\n );\n};\n"],"mappings":";;;;;AAMA,IAAM,IAGF;CACF,IAAI,CAAC,MAAM,gEAAgE;CAC3E,IAAI,CACF,MACA,4EACF;CACA,IAAI,CAAC,MAAM,mDAAmD;CAC9D,IAAI,CAAC,MAAM,kDAAkD;CAC7D,GAAG,CAAC,KAAK,sCAAsC;CAC/C,YAAY,CAAC,cAAc,6BAA6B;CACxD,MAAM,CACJ,QACA,mFACF;CACA,MAAM,CAAC,KAAK,+BAA+B;CAC3C,OAAO,CAAC,OAAO,uBAAuB;CACtC,OAAO,CAAC,SAAS,kCAAkC;CACnD,OAAO,CAAC,KAAK,+BAA+B;AAC9C,GAEa,KACX,MACoB;CACpB,IAAM,EACJ,SACA,cACA,cACA,UACA,cACA,UACA,OACA,aACA,cACA,YACE,GAEE,CAAC,GAAI,KAAc,IAAQ,EAAa,KAAS,CAAC,OAAO,EAAE;CAEjE,SAAS,IAAkC;EAOzC,OANI,IACK,kBAAC,GAAD;GAAM,UAAU;GAAW,YAAY;EAAW,CAAA,IAEvD,IACK,kBAAA,GAAA,EAAA,UAAG,EAAU,KAAK,GAAM,MAAM,EAAe,GAAM,CAAC,CAAC,EAAI,CAAA,IAE3D;CACT;CAEA,SAAS,EACP,GACA,GACiB;EAajB,OAZI,OAAO,KAAS,WACX,IAEL,KAAQ,OAAO,KAAS,WACnB,EAAoB;GACzB,GAAG;GACH;GACA;GACA;GACA;EACF,CAAiD,IAE5C;CACT;CAEA,OAAO,EAAM,cACX,GACA;EACE,WAAW,EAAG,GAAY,CAAS;EACnC;EACA,GAAI,IAAK,EAAC,MAAE,IAAI,CAAC;EACjB,gBAAgB;CAClB,GACA,EAAe,CACjB;AACF"}
|
|
@@ -16,6 +16,8 @@ export type TypographyProps = {
|
|
|
16
16
|
paragraph?: (string | TypographyProps)[];
|
|
17
17
|
/** Semantic level — controls the HTML element and default prose styling. */
|
|
18
18
|
level?: TypographyLevel;
|
|
19
|
+
/** HTML `id` attribute — enables `<a href="#id">` anchor scrolling. */
|
|
20
|
+
id?: string;
|
|
19
21
|
/** Additional CSS classes applied directly to the element. */
|
|
20
22
|
className?: string;
|
|
21
23
|
/** Inline styles applied directly to the element. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typography.types.js","names":[],"sources":["../../../src/cards/typography/typography.types.ts"],"sourcesContent":["import * as React from \"react\";\nimport {type PiCardRef, createCardDeclaration} from \"@pihanga2/core\";\n\nexport const TYPOGRAPHY_CARD = \"shad/typography\";\n\nexport const Typography =\n createCardDeclaration<TypographyProps>(TYPOGRAPHY_CARD);\n\n/**\n * Semantic level controls both the rendered HTML element and default\n * Tailwind prose styling (following shadcn/ui typography conventions).\n */\nexport type TypographyLevel =\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"p\"\n | \"blockquote\"\n | \"code\"\n | \"lead\" // large muted intro paragraph\n | \"large\" // large text, semibold\n | \"small\" // small, medium-weight\n | \"muted\"; // small, muted-foreground\n\nexport type TypographyProps = {\n /** Plain text content. */\n text?: string;\n /** A child card rendered as content. */\n childCard?: PiCardRef;\n /** Inline paragraph: mix of literal strings and nested TypographyProps. */\n paragraph?: (string | TypographyProps)[];\n\n /** Semantic level — controls the HTML element and default prose styling. */\n level?: TypographyLevel;\n\n /** Additional CSS classes applied directly to the element. */\n className?: string;\n /** Inline styles applied directly to the element. */\n style?: React.CSSProperties;\n};\n"],"mappings":";;;AAGA,IAAa,IAAkB,mBAElB,IACX,EAAuC,CAAe"}
|
|
1
|
+
{"version":3,"file":"typography.types.js","names":[],"sources":["../../../src/cards/typography/typography.types.ts"],"sourcesContent":["import * as React from \"react\";\nimport {type PiCardRef, createCardDeclaration} from \"@pihanga2/core\";\n\nexport const TYPOGRAPHY_CARD = \"shad/typography\";\n\nexport const Typography =\n createCardDeclaration<TypographyProps>(TYPOGRAPHY_CARD);\n\n/**\n * Semantic level controls both the rendered HTML element and default\n * Tailwind prose styling (following shadcn/ui typography conventions).\n */\nexport type TypographyLevel =\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"p\"\n | \"blockquote\"\n | \"code\"\n | \"lead\" // large muted intro paragraph\n | \"large\" // large text, semibold\n | \"small\" // small, medium-weight\n | \"muted\"; // small, muted-foreground\n\nexport type TypographyProps = {\n /** Plain text content. */\n text?: string;\n /** A child card rendered as content. */\n childCard?: PiCardRef;\n /** Inline paragraph: mix of literal strings and nested TypographyProps. */\n paragraph?: (string | TypographyProps)[];\n\n /** Semantic level — controls the HTML element and default prose styling. */\n level?: TypographyLevel;\n\n /** HTML `id` attribute — enables `<a href=\"#id\">` anchor scrolling. */\n id?: string;\n /** Additional CSS classes applied directly to the element. */\n className?: string;\n /** Inline styles applied directly to the element. */\n style?: React.CSSProperties;\n};\n"],"mappings":";;;AAGA,IAAa,IAAkB,mBAElB,IACX,EAAuC,CAAe"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pihanga2/shadcn",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.18",
|
|
4
4
|
"description": "Pihanga core card components built on shadcn/ui and Radix UI — the npm distribution of pihanga-shadcn.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -128,6 +128,14 @@
|
|
|
128
128
|
"import": "./cards/resizable/index.js",
|
|
129
129
|
"types": "./cards/resizable/index.d.ts"
|
|
130
130
|
},
|
|
131
|
+
"./cards/resizableColumns": {
|
|
132
|
+
"import": "./cards/resizableColumns/index.js",
|
|
133
|
+
"types": "./cards/resizableColumns/index.d.ts"
|
|
134
|
+
},
|
|
135
|
+
"./cards/resizableGrid": {
|
|
136
|
+
"import": "./cards/resizableGrid/index.js",
|
|
137
|
+
"types": "./cards/resizableGrid/index.d.ts"
|
|
138
|
+
},
|
|
131
139
|
"./cards/scrollbarWithAnnotations": {
|
|
132
140
|
"import": "./cards/scrollbarWithAnnotations/index.js",
|
|
133
141
|
"types": "./cards/scrollbarWithAnnotations/index.d.ts"
|
|
@@ -156,6 +164,10 @@
|
|
|
156
164
|
"import": "./cards/stepper/index.js",
|
|
157
165
|
"types": "./cards/stepper/index.d.ts"
|
|
158
166
|
},
|
|
167
|
+
"./cards/suspense": {
|
|
168
|
+
"import": "./cards/suspense/index.js",
|
|
169
|
+
"types": "./cards/suspense/index.d.ts"
|
|
170
|
+
},
|
|
159
171
|
"./cards/switch": {
|
|
160
172
|
"import": "./cards/switch/index.js",
|
|
161
173
|
"types": "./cards/switch/index.d.ts"
|
|
@@ -233,6 +245,8 @@
|
|
|
233
245
|
"./cards/pageWithNavbarMeta/index.js",
|
|
234
246
|
"./cards/pasteTarget/index.js",
|
|
235
247
|
"./cards/resizable/index.js",
|
|
248
|
+
"./cards/resizableColumns/index.js",
|
|
249
|
+
"./cards/resizableGrid/index.js",
|
|
236
250
|
"./cards/scrollbarWithAnnotations/index.js",
|
|
237
251
|
"./cards/select/index.js",
|
|
238
252
|
"./cards/sheetCard/index.js",
|
|
@@ -240,6 +254,7 @@
|
|
|
240
254
|
"./cards/sliderValue/index.js",
|
|
241
255
|
"./cards/stack/index.js",
|
|
242
256
|
"./cards/stepper/index.js",
|
|
257
|
+
"./cards/suspense/index.js",
|
|
243
258
|
"./cards/switch/index.js",
|
|
244
259
|
"./cards/tabs/index.js",
|
|
245
260
|
"./cards/textField/index.js",
|
|
@@ -265,7 +280,7 @@
|
|
|
265
280
|
"peerDependencies": {
|
|
266
281
|
"react": "^19.1.0",
|
|
267
282
|
"react-dom": "^19.1.0",
|
|
268
|
-
"@pihanga2/core": "^0.3.
|
|
283
|
+
"@pihanga2/core": "^0.3.34",
|
|
269
284
|
"@pihanga2/cards": "*"
|
|
270
285
|
},
|
|
271
286
|
"dependencies": {
|