@jarrodmedrano/ui 0.1.9 → 0.1.10
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,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
"use client";
|
|
2
3
|
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -33,14 +34,16 @@ __export(header_exports, {
|
|
|
33
34
|
module.exports = __toCommonJS(header_exports);
|
|
34
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
36
|
var import_link = __toESM(require("next/link"), 1);
|
|
37
|
+
var import_next_themes = require("next-themes");
|
|
36
38
|
var import_logo = require("../icons/logo");
|
|
37
39
|
const Header = ({
|
|
38
40
|
label,
|
|
39
41
|
backButtonLabel,
|
|
40
42
|
backButtonHref
|
|
41
43
|
}) => {
|
|
44
|
+
const { resolvedTheme } = (0, import_next_themes.useTheme)();
|
|
42
45
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "sm:mx-auto sm:w-full sm:max-w-md", children: [
|
|
43
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.default, { href: "/", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_logo.Logo, { className: "mx-auto h-10 w-auto" }) }),
|
|
46
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.default, { href: "/", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_logo.Logo, { className: "mx-auto h-10 w-auto", theme: resolvedTheme }) }),
|
|
44
47
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "mt-6 text-center text-2xl font-bold leading-9 tracking-tight text-gray-500 dark:text-white", children: label }),
|
|
45
48
|
backButtonLabel ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-center text-sm text-gray-500 dark:text-gray-400", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.default, { href: backButtonHref, children: backButtonLabel }) }) : null
|
|
46
49
|
] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../components/card/header.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../../components/card/header.tsx"],"sourcesContent":["'use client'\n\nimport Link from 'next/link'\nimport { useTheme } from 'next-themes'\nimport { Logo } from '../icons/logo'\n\ninterface HeaderProps {\n label: string\n backButtonHref: string\n backButtonLabel: string\n}\n\nexport const Header = ({\n label,\n backButtonLabel,\n backButtonHref,\n}: HeaderProps) => {\n const { resolvedTheme } = useTheme()\n\n return (\n <div className=\"sm:mx-auto sm:w-full sm:max-w-md\">\n <Link href=\"/\">\n <Logo className=\"mx-auto h-10 w-auto\" theme={resolvedTheme} />\n </Link>\n <h2 className=\"mt-6 text-center text-2xl font-bold leading-9 tracking-tight text-gray-500 dark:text-white\">\n {label}\n </h2>\n\n {backButtonLabel ? (\n <p className=\"text-center text-sm text-gray-500 dark:text-gray-400\">\n <Link href={backButtonHref}>{backButtonLabel}</Link>\n </p>\n ) : null}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBI;AAlBJ,kBAAiB;AACjB,yBAAyB;AACzB,kBAAqB;AAQd,MAAM,SAAS,CAAC;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AACF,MAAmB;AACjB,QAAM,EAAE,cAAc,QAAI,6BAAS;AAEnC,SACE,6CAAC,SAAI,WAAU,oCACb;AAAA,gDAAC,YAAAA,SAAA,EAAK,MAAK,KACT,sDAAC,oBAAK,WAAU,uBAAsB,OAAO,eAAe,GAC9D;AAAA,IACA,4CAAC,QAAG,WAAU,8FACX,iBACH;AAAA,IAEC,kBACC,4CAAC,OAAE,WAAU,wDACX,sDAAC,YAAAA,SAAA,EAAK,MAAM,gBAAiB,2BAAgB,GAC/C,IACE;AAAA,KACN;AAEJ;","names":["Link"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../components/card/header.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../components/card/header.tsx"],"names":[],"mappings":"AAMA,UAAU,WAAW;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,cAAc,EAAE,MAAM,CAAA;IACtB,eAAe,EAAE,MAAM,CAAA;CACxB;AAED,eAAO,MAAM,MAAM,GAAI,6CAIpB,WAAW,gCAmBb,CAAA"}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import Link from "next/link";
|
|
4
|
+
import { useTheme } from "next-themes";
|
|
3
5
|
import { Logo } from "../icons/logo";
|
|
4
6
|
const Header = ({
|
|
5
7
|
label,
|
|
6
8
|
backButtonLabel,
|
|
7
9
|
backButtonHref
|
|
8
10
|
}) => {
|
|
11
|
+
const { resolvedTheme } = useTheme();
|
|
9
12
|
return /* @__PURE__ */ jsxs("div", { className: "sm:mx-auto sm:w-full sm:max-w-md", children: [
|
|
10
|
-
/* @__PURE__ */ jsx(Link, { href: "/", children: /* @__PURE__ */ jsx(Logo, { className: "mx-auto h-10 w-auto" }) }),
|
|
13
|
+
/* @__PURE__ */ jsx(Link, { href: "/", children: /* @__PURE__ */ jsx(Logo, { className: "mx-auto h-10 w-auto", theme: resolvedTheme }) }),
|
|
11
14
|
/* @__PURE__ */ jsx("h2", { className: "mt-6 text-center text-2xl font-bold leading-9 tracking-tight text-gray-500 dark:text-white", children: label }),
|
|
12
15
|
backButtonLabel ? /* @__PURE__ */ jsx("p", { className: "text-center text-sm text-gray-500 dark:text-gray-400", children: /* @__PURE__ */ jsx(Link, { href: backButtonHref, children: backButtonLabel }) }) : null
|
|
13
16
|
] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../components/card/header.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../../components/card/header.tsx"],"sourcesContent":["'use client'\n\nimport Link from 'next/link'\nimport { useTheme } from 'next-themes'\nimport { Logo } from '../icons/logo'\n\ninterface HeaderProps {\n label: string\n backButtonHref: string\n backButtonLabel: string\n}\n\nexport const Header = ({\n label,\n backButtonLabel,\n backButtonHref,\n}: HeaderProps) => {\n const { resolvedTheme } = useTheme()\n\n return (\n <div className=\"sm:mx-auto sm:w-full sm:max-w-md\">\n <Link href=\"/\">\n <Logo className=\"mx-auto h-10 w-auto\" theme={resolvedTheme} />\n </Link>\n <h2 className=\"mt-6 text-center text-2xl font-bold leading-9 tracking-tight text-gray-500 dark:text-white\">\n {label}\n </h2>\n\n {backButtonLabel ? (\n <p className=\"text-center text-sm text-gray-500 dark:text-gray-400\">\n <Link href={backButtonHref}>{backButtonLabel}</Link>\n </p>\n ) : null}\n </div>\n )\n}\n"],"mappings":";AAoBI,SAEI,KAFJ;AAlBJ,OAAO,UAAU;AACjB,SAAS,gBAAgB;AACzB,SAAS,YAAY;AAQd,MAAM,SAAS,CAAC;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AACF,MAAmB;AACjB,QAAM,EAAE,cAAc,IAAI,SAAS;AAEnC,SACE,qBAAC,SAAI,WAAU,oCACb;AAAA,wBAAC,QAAK,MAAK,KACT,8BAAC,QAAK,WAAU,uBAAsB,OAAO,eAAe,GAC9D;AAAA,IACA,oBAAC,QAAG,WAAU,8FACX,iBACH;AAAA,IAEC,kBACC,oBAAC,OAAE,WAAU,wDACX,8BAAC,QAAK,MAAM,gBAAiB,2BAAgB,GAC/C,IACE;AAAA,KACN;AAEJ;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jarrodmedrano/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -86,6 +86,7 @@
|
|
|
86
86
|
},
|
|
87
87
|
"dependencies": {
|
|
88
88
|
"@headlessui/react": "1.7.18",
|
|
89
|
+
"next-themes": "^0.2.1",
|
|
89
90
|
"@heroicons/react": "2.1.1",
|
|
90
91
|
"@hookform/resolvers": "3.3.4",
|
|
91
92
|
"@radix-ui/react-avatar": "^1.1.2",
|