@betterinternship/components 3.1.0 → 3.1.1
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,6 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export declare function PageHeader({ title, description, className, }: {
|
|
2
|
+
export declare function PageHeader({ title, description, animated, className, }: {
|
|
3
3
|
title: string;
|
|
4
4
|
description?: React.ReactNode;
|
|
5
|
+
/**
|
|
6
|
+
* Fades the header up into place when it mounts (skipped under reduced
|
|
7
|
+
* motion). Give the header a new `key` to play it again, e.g. on tab change.
|
|
8
|
+
* Leave it off in loading skeletons so the effect plays once, on the page.
|
|
9
|
+
*/
|
|
10
|
+
animated?: boolean;
|
|
5
11
|
className?: string;
|
|
6
12
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { cn } from '../utils.js';
|
|
3
3
|
|
|
4
|
-
function PageHeader({ title, description, className, }) {
|
|
5
|
-
return (jsxs("header", { className: cn('text-foreground', className), children: [jsx("h1", { className: "text-page-heading font-page-heading", children: title }), description && (jsx("p", { className: "mt-page-description-gap max-w-page-description text-muted-foreground text-base leading-page-description", children: description }))] }));
|
|
4
|
+
function PageHeader({ title, description, animated = false, className, }) {
|
|
5
|
+
return (jsxs("header", { className: cn('text-foreground', animated && 'motion-safe:animate-page-enter', className), children: [jsx("h1", { className: "text-page-heading font-page-heading", children: title }), description && (jsx("p", { className: "mt-page-description-gap max-w-page-description text-muted-foreground text-base leading-page-description", children: description }))] }));
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
export { PageHeader };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-header.js","sources":["../../src/components/page-header.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '@/utils';\n\n\nexport function PageHeader({\n title,\n description,\n className,\n}: {\n title: string;\n description?: React.ReactNode;\n className?: string;\n}) {\n return (\n <header
|
|
1
|
+
{"version":3,"file":"page-header.js","sources":["../../src/components/page-header.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '@/utils';\n\n\nexport function PageHeader({\n title,\n description,\n animated = false,\n className,\n}: {\n title: string;\n description?: React.ReactNode;\n /**\n * Fades the header up into place when it mounts (skipped under reduced\n * motion). Give the header a new `key` to play it again, e.g. on tab change.\n * Leave it off in loading skeletons so the effect plays once, on the page.\n */\n animated?: boolean;\n className?: string;\n}) {\n return (\n <header\n className={cn(\n 'text-foreground',\n animated && 'motion-safe:animate-page-enter',\n className,\n )}\n >\n <h1 className=\"text-page-heading font-page-heading\">\n {title}\n </h1>\n {description && (\n <p className=\"mt-page-description-gap max-w-page-description text-muted-foreground text-base leading-page-description\">{description}</p>\n )}\n </header>\n );\n}\n"],"names":["_jsxs","_jsx"],"mappings":";;;AAIM,SAAU,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,QAAQ,GAAG,KAAK,EAChB,SAAS,GAWV,EAAA;AACC,IAAA,QACEA,IAAA,CAAA,QAAA,EAAA,EACE,SAAS,EAAE,EAAE,CACX,iBAAiB,EACjB,QAAQ,IAAI,gCAAgC,EAC5C,SAAS,CACV,EAAA,QAAA,EAAA,CAECC,YAAI,SAAS,EAAC,qCAAqC,EAAA,QAAA,EAChD,KAAK,EAAA,CACH,EACJ,WAAW,KACVA,GAAA,CAAA,GAAA,EAAA,EAAG,SAAS,EAAC,yGAAyG,YAAE,WAAW,EAAA,CAAK,CACzI,CAAA,EAAA,CACI;AAEb;;;;"}
|
package/package.json
CHANGED
package/theme.css
CHANGED
|
@@ -159,6 +159,7 @@
|
|
|
159
159
|
--animate-accordion-down: accordion-down 0.2s ease-out;
|
|
160
160
|
--animate-accordion-up: accordion-up 0.2s ease-out;
|
|
161
161
|
--animate-error-bob: error-bob 2.8s ease-in-out infinite;
|
|
162
|
+
--animate-page-enter: page-enter 0.2s ease-out both;
|
|
162
163
|
|
|
163
164
|
--font-sans:
|
|
164
165
|
Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
|
@@ -240,6 +241,10 @@
|
|
|
240
241
|
0%, 100% { transform: translateY(0); }
|
|
241
242
|
50% { transform: translateY(-6px); }
|
|
242
243
|
}
|
|
244
|
+
/* Page title entrance: a short fade up when a page opens. */
|
|
245
|
+
@keyframes page-enter {
|
|
246
|
+
from { opacity: 0; transform: translateY(6px); }
|
|
247
|
+
}
|
|
243
248
|
}
|
|
244
249
|
|
|
245
250
|
.dark {
|