@tantana/brand-credit 0.1.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Tantana Medya
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,56 @@
1
+ # @tantana/brand-credit
2
+
3
+ Reusable Tantana Medya footer credit for client websites.
4
+
5
+ **Agent / contributor docs:** see [`AGENTS.md`](./AGENTS.md) and [`ai/rules/`](./ai/rules/).
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ yarn add @tantana/brand-credit
11
+ ```
12
+
13
+ For local development across sibling repos:
14
+
15
+ ```json
16
+ {
17
+ "dependencies": {
18
+ "@tantana/brand-credit": "file:../../tantana-brand-credit"
19
+ }
20
+ }
21
+ ```
22
+
23
+ ## Usage
24
+
25
+ ```tsx
26
+ import { TantanaCredit } from '@tantana/brand-credit'
27
+
28
+ <TantanaCredit siteRef="tutav" locale="tr" theme="light" />
29
+ ```
30
+
31
+ ### Props
32
+
33
+ | Prop | Type | Default | Description |
34
+ |------|------|---------|-------------|
35
+ | `siteRef` | `string` | required | Referral slug for `?ref=` analytics |
36
+ | `locale` | `'tr' \| 'en'` | `'tr'` | Built-in label language |
37
+ | `label` | `string` | — | Custom label; overrides `locale` |
38
+ | `theme` | `'light' \| 'dark'` | `'light'` | Footer background theme |
39
+ | `className` | `string` | — | Extra wrapper classes |
40
+
41
+ > React reserves the `ref` prop, so the package uses `siteRef` instead of `ref="tutav"`.
42
+
43
+ ### With your own i18n
44
+
45
+ ```tsx
46
+ <TantanaCredit siteRef="immaks" label={dict.footer.designBy} theme="dark" />
47
+ ```
48
+
49
+ ## Publish
50
+
51
+ ```bash
52
+ yarn build
53
+ npm publish --access public
54
+ ```
55
+
56
+ Public package under the `@tantana` scope — requires npm org access to publish.
package/dist/index.cjs ADDED
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ TantanaCredit: () => TantanaCredit
24
+ });
25
+ module.exports = __toCommonJS(index_exports);
26
+
27
+ // #style-inject:#style-inject
28
+ function styleInject(css, { insertAt } = {}) {
29
+ if (!css || typeof document === "undefined") return;
30
+ const head = document.head || document.getElementsByTagName("head")[0];
31
+ const style = document.createElement("style");
32
+ style.type = "text/css";
33
+ if (insertAt === "top") {
34
+ if (head.firstChild) {
35
+ head.insertBefore(style, head.firstChild);
36
+ } else {
37
+ head.appendChild(style);
38
+ }
39
+ } else {
40
+ head.appendChild(style);
41
+ }
42
+ if (style.styleSheet) {
43
+ style.styleSheet.cssText = css;
44
+ } else {
45
+ style.appendChild(document.createTextNode(css));
46
+ }
47
+ }
48
+
49
+ // src/TantanaCredit.css
50
+ styleInject(".tantana-credit {\n flex-shrink: 0;\n text-decoration: none;\n}\n.tantana-credit__label {\n display: inline-flex;\n align-items: center;\n font-size: 0.75rem;\n line-height: 1;\n transition: color 300ms ease, transform 300ms ease;\n}\n.tantana-credit--light .tantana-credit__label {\n color: #737373;\n}\n.tantana-credit--dark .tantana-credit__label {\n color: rgb(255 255 255 / 0.55);\n}\n.tantana-credit:hover .tantana-credit__label {\n color: #fdd20b;\n}\n.tantana-credit__logo {\n width: 2rem;\n height: 2rem;\n flex-shrink: 0;\n object-fit: contain;\n transition: transform 300ms ease;\n}\n.tantana-credit:hover .tantana-credit__logo {\n transform: rotate(12deg);\n}\n");
51
+
52
+ // src/i18n.ts
53
+ var labels = {
54
+ tr: "Tasar\u0131m",
55
+ en: "Design"
56
+ };
57
+ function getLabel(locale) {
58
+ return labels[locale];
59
+ }
60
+
61
+ // src/TantanaLogo.tsx
62
+ var import_jsx_runtime = require("react/jsx-runtime");
63
+ function TantanaLogo({ className }) {
64
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
65
+ "svg",
66
+ {
67
+ className,
68
+ viewBox: "346 1020 150 200",
69
+ xmlns: "http://www.w3.org/2000/svg",
70
+ "aria-hidden": true,
71
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { transform: "rotate(90 421 1100)", children: [
72
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
73
+ "path",
74
+ {
75
+ fill: "#fdd20b",
76
+ stroke: "#fdd20b",
77
+ strokeWidth: "39.3599",
78
+ strokeMiterlimit: "10",
79
+ d: "M258.271,399.066"
80
+ }
81
+ ),
82
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
83
+ "path",
84
+ {
85
+ fill: "#fdd20b",
86
+ d: "M397.77,1084.891v47.94h47.94v-20.957c7.335,0,13.098,1.834,17.29,4.978c4.191,3.144,6.812,8.383,8.122,15.98h21.219c0.262-25.673-21.219-49.249-53.179-47.94H397.77z"
87
+ }
88
+ )
89
+ ] })
90
+ }
91
+ );
92
+ }
93
+
94
+ // src/TantanaCredit.tsx
95
+ var import_jsx_runtime2 = require("react/jsx-runtime");
96
+ var BASE_URL = "https://tantana.tr/";
97
+ function TantanaCredit({
98
+ siteRef,
99
+ locale = "tr",
100
+ label,
101
+ theme = "light",
102
+ className
103
+ }) {
104
+ const href = `${BASE_URL}?ref=${encodeURIComponent(siteRef)}`;
105
+ const text = label ?? getLabel(locale);
106
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
107
+ "a",
108
+ {
109
+ href,
110
+ target: "_blank",
111
+ rel: "noopener noreferrer",
112
+ title: "Tantana Medya",
113
+ className: ["tantana-credit", `tantana-credit--${theme}`, className].filter(Boolean).join(" "),
114
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "tantana-credit__label", children: [
115
+ text,
116
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(TantanaLogo, { className: "tantana-credit__logo" })
117
+ ] })
118
+ }
119
+ );
120
+ }
121
+ // Annotate the CommonJS export names for ESM import in node:
122
+ 0 && (module.exports = {
123
+ TantanaCredit
124
+ });
125
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","#style-inject:#style-inject","../src/TantanaCredit.css","../src/i18n.ts","../src/TantanaLogo.tsx","../src/TantanaCredit.tsx"],"sourcesContent":["export { TantanaCredit } from './TantanaCredit'\nexport type {\n TantanaCreditLocale,\n TantanaCreditProps,\n TantanaCreditTheme,\n} from './types'\n","\n export default function styleInject(css, { insertAt } = {}) {\n if (!css || typeof document === 'undefined') return\n \n const head = document.head || document.getElementsByTagName('head')[0]\n const style = document.createElement('style')\n style.type = 'text/css'\n \n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild)\n } else {\n head.appendChild(style)\n }\n } else {\n head.appendChild(style)\n }\n \n if (style.styleSheet) {\n style.styleSheet.cssText = css\n } else {\n style.appendChild(document.createTextNode(css))\n }\n }\n ","import styleInject from '#style-inject';styleInject(\".tantana-credit {\\n flex-shrink: 0;\\n text-decoration: none;\\n}\\n.tantana-credit__label {\\n display: inline-flex;\\n align-items: center;\\n font-size: 0.75rem;\\n line-height: 1;\\n transition: color 300ms ease, transform 300ms ease;\\n}\\n.tantana-credit--light .tantana-credit__label {\\n color: #737373;\\n}\\n.tantana-credit--dark .tantana-credit__label {\\n color: rgb(255 255 255 / 0.55);\\n}\\n.tantana-credit:hover .tantana-credit__label {\\n color: #fdd20b;\\n}\\n.tantana-credit__logo {\\n width: 2rem;\\n height: 2rem;\\n flex-shrink: 0;\\n object-fit: contain;\\n transition: transform 300ms ease;\\n}\\n.tantana-credit:hover .tantana-credit__logo {\\n transform: rotate(12deg);\\n}\\n\")","import type { TantanaCreditLocale } from './types'\n\nconst labels: Record<TantanaCreditLocale, string> = {\n tr: 'Tasarım',\n en: 'Design',\n}\n\nexport function getLabel(locale: TantanaCreditLocale): string {\n return labels[locale]\n}\n","type TantanaLogoProps = {\n className?: string\n}\n\nexport function TantanaLogo({ className }: TantanaLogoProps) {\n return (\n <svg\n className={className}\n viewBox=\"346 1020 150 200\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden\n >\n <g transform=\"rotate(90 421 1100)\">\n <path\n fill=\"#fdd20b\"\n stroke=\"#fdd20b\"\n strokeWidth=\"39.3599\"\n strokeMiterlimit=\"10\"\n d=\"M258.271,399.066\"\n />\n <path\n fill=\"#fdd20b\"\n d=\"M397.77,1084.891v47.94h47.94v-20.957c7.335,0,13.098,1.834,17.29,4.978c4.191,3.144,6.812,8.383,8.122,15.98h21.219c0.262-25.673-21.219-49.249-53.179-47.94H397.77z\"\n />\n </g>\n </svg>\n )\n}\n","import './TantanaCredit.css'\n\nimport { getLabel } from './i18n'\nimport { TantanaLogo } from './TantanaLogo'\nimport type { TantanaCreditProps } from './types'\n\nconst BASE_URL = 'https://tantana.tr/'\n\nexport function TantanaCredit({\n siteRef,\n locale = 'tr',\n label,\n theme = 'light',\n className,\n}: TantanaCreditProps) {\n const href = `${BASE_URL}?ref=${encodeURIComponent(siteRef)}`\n const text = label ?? getLabel(locale)\n\n return (\n <a\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n title=\"Tantana Medya\"\n className={['tantana-credit', `tantana-credit--${theme}`, className]\n .filter(Boolean)\n .join(' ')}\n >\n <span className=\"tantana-credit__label\">\n {text}\n <TantanaLogo className=\"tantana-credit__logo\" />\n </span>\n </a>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCyB,SAAR,YAA6B,KAAK,EAAE,SAAS,IAAI,CAAC,GAAG;AAC1D,MAAI,CAAC,OAAO,OAAO,aAAa,YAAa;AAE7C,QAAM,OAAO,SAAS,QAAQ,SAAS,qBAAqB,MAAM,EAAE,CAAC;AACrE,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,OAAO;AAEb,MAAI,aAAa,OAAO;AACtB,QAAI,KAAK,YAAY;AACnB,WAAK,aAAa,OAAO,KAAK,UAAU;AAAA,IAC1C,OAAO;AACL,WAAK,YAAY,KAAK;AAAA,IACxB;AAAA,EACF,OAAO;AACL,SAAK,YAAY,KAAK;AAAA,EACxB;AAEA,MAAI,MAAM,YAAY;AACpB,UAAM,WAAW,UAAU;AAAA,EAC7B,OAAO;AACL,UAAM,YAAY,SAAS,eAAe,GAAG,CAAC;AAAA,EAChD;AACF;;;ACvB8B,YAAY,mrBAAmrB;;;ACEvuB,IAAM,SAA8C;AAAA,EAClD,IAAI;AAAA,EACJ,IAAI;AACN;AAEO,SAAS,SAAS,QAAqC;AAC5D,SAAO,OAAO,MAAM;AACtB;;;ACGM;AARC,SAAS,YAAY,EAAE,UAAU,GAAqB;AAC3D,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,SAAQ;AAAA,MACR,OAAM;AAAA,MACN,eAAW;AAAA,MAEX,uDAAC,OAAE,WAAU,uBACX;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,QAAO;AAAA,YACP,aAAY;AAAA,YACZ,kBAAiB;AAAA,YACjB,GAAE;AAAA;AAAA,QACJ;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,GAAE;AAAA;AAAA,QACJ;AAAA,SACF;AAAA;AAAA,EACF;AAEJ;;;ACCM,IAAAA,sBAAA;AAtBN,IAAM,WAAW;AAEV,SAAS,cAAc;AAAA,EAC5B;AAAA,EACA,SAAS;AAAA,EACT;AAAA,EACA,QAAQ;AAAA,EACR;AACF,GAAuB;AACrB,QAAM,OAAO,GAAG,QAAQ,QAAQ,mBAAmB,OAAO,CAAC;AAC3D,QAAM,OAAO,SAAS,SAAS,MAAM;AAErC,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,QAAO;AAAA,MACP,KAAI;AAAA,MACJ,OAAM;AAAA,MACN,WAAW,CAAC,kBAAkB,mBAAmB,KAAK,IAAI,SAAS,EAChE,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,MAEX,wDAAC,UAAK,WAAU,yBACb;AAAA;AAAA,QACD,6CAAC,eAAY,WAAU,wBAAuB;AAAA,SAChD;AAAA;AAAA,EACF;AAEJ;","names":["import_jsx_runtime"]}
@@ -0,0 +1,19 @@
1
+ import * as react from 'react';
2
+
3
+ type TantanaCreditLocale = 'tr' | 'en';
4
+ type TantanaCreditTheme = 'light' | 'dark';
5
+ interface TantanaCreditProps {
6
+ /** Referral slug appended as `?ref=` on tantana.tr */
7
+ siteRef: string;
8
+ /** Built-in label locale. Ignored when `label` is provided. */
9
+ locale?: TantanaCreditLocale;
10
+ /** Optional custom label, e.g. from your own i18n setup. */
11
+ label?: string;
12
+ /** Visual theme for the footer background. */
13
+ theme?: TantanaCreditTheme;
14
+ className?: string;
15
+ }
16
+
17
+ declare function TantanaCredit({ siteRef, locale, label, theme, className, }: TantanaCreditProps): react.JSX.Element;
18
+
19
+ export { TantanaCredit, type TantanaCreditLocale, type TantanaCreditProps, type TantanaCreditTheme };
@@ -0,0 +1,19 @@
1
+ import * as react from 'react';
2
+
3
+ type TantanaCreditLocale = 'tr' | 'en';
4
+ type TantanaCreditTheme = 'light' | 'dark';
5
+ interface TantanaCreditProps {
6
+ /** Referral slug appended as `?ref=` on tantana.tr */
7
+ siteRef: string;
8
+ /** Built-in label locale. Ignored when `label` is provided. */
9
+ locale?: TantanaCreditLocale;
10
+ /** Optional custom label, e.g. from your own i18n setup. */
11
+ label?: string;
12
+ /** Visual theme for the footer background. */
13
+ theme?: TantanaCreditTheme;
14
+ className?: string;
15
+ }
16
+
17
+ declare function TantanaCredit({ siteRef, locale, label, theme, className, }: TantanaCreditProps): react.JSX.Element;
18
+
19
+ export { TantanaCredit, type TantanaCreditLocale, type TantanaCreditProps, type TantanaCreditTheme };
package/dist/index.js ADDED
@@ -0,0 +1,98 @@
1
+ // #style-inject:#style-inject
2
+ function styleInject(css, { insertAt } = {}) {
3
+ if (!css || typeof document === "undefined") return;
4
+ const head = document.head || document.getElementsByTagName("head")[0];
5
+ const style = document.createElement("style");
6
+ style.type = "text/css";
7
+ if (insertAt === "top") {
8
+ if (head.firstChild) {
9
+ head.insertBefore(style, head.firstChild);
10
+ } else {
11
+ head.appendChild(style);
12
+ }
13
+ } else {
14
+ head.appendChild(style);
15
+ }
16
+ if (style.styleSheet) {
17
+ style.styleSheet.cssText = css;
18
+ } else {
19
+ style.appendChild(document.createTextNode(css));
20
+ }
21
+ }
22
+
23
+ // src/TantanaCredit.css
24
+ styleInject(".tantana-credit {\n flex-shrink: 0;\n text-decoration: none;\n}\n.tantana-credit__label {\n display: inline-flex;\n align-items: center;\n font-size: 0.75rem;\n line-height: 1;\n transition: color 300ms ease, transform 300ms ease;\n}\n.tantana-credit--light .tantana-credit__label {\n color: #737373;\n}\n.tantana-credit--dark .tantana-credit__label {\n color: rgb(255 255 255 / 0.55);\n}\n.tantana-credit:hover .tantana-credit__label {\n color: #fdd20b;\n}\n.tantana-credit__logo {\n width: 2rem;\n height: 2rem;\n flex-shrink: 0;\n object-fit: contain;\n transition: transform 300ms ease;\n}\n.tantana-credit:hover .tantana-credit__logo {\n transform: rotate(12deg);\n}\n");
25
+
26
+ // src/i18n.ts
27
+ var labels = {
28
+ tr: "Tasar\u0131m",
29
+ en: "Design"
30
+ };
31
+ function getLabel(locale) {
32
+ return labels[locale];
33
+ }
34
+
35
+ // src/TantanaLogo.tsx
36
+ import { jsx, jsxs } from "react/jsx-runtime";
37
+ function TantanaLogo({ className }) {
38
+ return /* @__PURE__ */ jsx(
39
+ "svg",
40
+ {
41
+ className,
42
+ viewBox: "346 1020 150 200",
43
+ xmlns: "http://www.w3.org/2000/svg",
44
+ "aria-hidden": true,
45
+ children: /* @__PURE__ */ jsxs("g", { transform: "rotate(90 421 1100)", children: [
46
+ /* @__PURE__ */ jsx(
47
+ "path",
48
+ {
49
+ fill: "#fdd20b",
50
+ stroke: "#fdd20b",
51
+ strokeWidth: "39.3599",
52
+ strokeMiterlimit: "10",
53
+ d: "M258.271,399.066"
54
+ }
55
+ ),
56
+ /* @__PURE__ */ jsx(
57
+ "path",
58
+ {
59
+ fill: "#fdd20b",
60
+ d: "M397.77,1084.891v47.94h47.94v-20.957c7.335,0,13.098,1.834,17.29,4.978c4.191,3.144,6.812,8.383,8.122,15.98h21.219c0.262-25.673-21.219-49.249-53.179-47.94H397.77z"
61
+ }
62
+ )
63
+ ] })
64
+ }
65
+ );
66
+ }
67
+
68
+ // src/TantanaCredit.tsx
69
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
70
+ var BASE_URL = "https://tantana.tr/";
71
+ function TantanaCredit({
72
+ siteRef,
73
+ locale = "tr",
74
+ label,
75
+ theme = "light",
76
+ className
77
+ }) {
78
+ const href = `${BASE_URL}?ref=${encodeURIComponent(siteRef)}`;
79
+ const text = label ?? getLabel(locale);
80
+ return /* @__PURE__ */ jsx2(
81
+ "a",
82
+ {
83
+ href,
84
+ target: "_blank",
85
+ rel: "noopener noreferrer",
86
+ title: "Tantana Medya",
87
+ className: ["tantana-credit", `tantana-credit--${theme}`, className].filter(Boolean).join(" "),
88
+ children: /* @__PURE__ */ jsxs2("span", { className: "tantana-credit__label", children: [
89
+ text,
90
+ /* @__PURE__ */ jsx2(TantanaLogo, { className: "tantana-credit__logo" })
91
+ ] })
92
+ }
93
+ );
94
+ }
95
+ export {
96
+ TantanaCredit
97
+ };
98
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["#style-inject:#style-inject","../src/TantanaCredit.css","../src/i18n.ts","../src/TantanaLogo.tsx","../src/TantanaCredit.tsx"],"sourcesContent":["\n export default function styleInject(css, { insertAt } = {}) {\n if (!css || typeof document === 'undefined') return\n \n const head = document.head || document.getElementsByTagName('head')[0]\n const style = document.createElement('style')\n style.type = 'text/css'\n \n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild)\n } else {\n head.appendChild(style)\n }\n } else {\n head.appendChild(style)\n }\n \n if (style.styleSheet) {\n style.styleSheet.cssText = css\n } else {\n style.appendChild(document.createTextNode(css))\n }\n }\n ","import styleInject from '#style-inject';styleInject(\".tantana-credit {\\n flex-shrink: 0;\\n text-decoration: none;\\n}\\n.tantana-credit__label {\\n display: inline-flex;\\n align-items: center;\\n font-size: 0.75rem;\\n line-height: 1;\\n transition: color 300ms ease, transform 300ms ease;\\n}\\n.tantana-credit--light .tantana-credit__label {\\n color: #737373;\\n}\\n.tantana-credit--dark .tantana-credit__label {\\n color: rgb(255 255 255 / 0.55);\\n}\\n.tantana-credit:hover .tantana-credit__label {\\n color: #fdd20b;\\n}\\n.tantana-credit__logo {\\n width: 2rem;\\n height: 2rem;\\n flex-shrink: 0;\\n object-fit: contain;\\n transition: transform 300ms ease;\\n}\\n.tantana-credit:hover .tantana-credit__logo {\\n transform: rotate(12deg);\\n}\\n\")","import type { TantanaCreditLocale } from './types'\n\nconst labels: Record<TantanaCreditLocale, string> = {\n tr: 'Tasarım',\n en: 'Design',\n}\n\nexport function getLabel(locale: TantanaCreditLocale): string {\n return labels[locale]\n}\n","type TantanaLogoProps = {\n className?: string\n}\n\nexport function TantanaLogo({ className }: TantanaLogoProps) {\n return (\n <svg\n className={className}\n viewBox=\"346 1020 150 200\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden\n >\n <g transform=\"rotate(90 421 1100)\">\n <path\n fill=\"#fdd20b\"\n stroke=\"#fdd20b\"\n strokeWidth=\"39.3599\"\n strokeMiterlimit=\"10\"\n d=\"M258.271,399.066\"\n />\n <path\n fill=\"#fdd20b\"\n d=\"M397.77,1084.891v47.94h47.94v-20.957c7.335,0,13.098,1.834,17.29,4.978c4.191,3.144,6.812,8.383,8.122,15.98h21.219c0.262-25.673-21.219-49.249-53.179-47.94H397.77z\"\n />\n </g>\n </svg>\n )\n}\n","import './TantanaCredit.css'\n\nimport { getLabel } from './i18n'\nimport { TantanaLogo } from './TantanaLogo'\nimport type { TantanaCreditProps } from './types'\n\nconst BASE_URL = 'https://tantana.tr/'\n\nexport function TantanaCredit({\n siteRef,\n locale = 'tr',\n label,\n theme = 'light',\n className,\n}: TantanaCreditProps) {\n const href = `${BASE_URL}?ref=${encodeURIComponent(siteRef)}`\n const text = label ?? getLabel(locale)\n\n return (\n <a\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n title=\"Tantana Medya\"\n className={['tantana-credit', `tantana-credit--${theme}`, className]\n .filter(Boolean)\n .join(' ')}\n >\n <span className=\"tantana-credit__label\">\n {text}\n <TantanaLogo className=\"tantana-credit__logo\" />\n </span>\n </a>\n )\n}\n"],"mappings":";AACyB,SAAR,YAA6B,KAAK,EAAE,SAAS,IAAI,CAAC,GAAG;AAC1D,MAAI,CAAC,OAAO,OAAO,aAAa,YAAa;AAE7C,QAAM,OAAO,SAAS,QAAQ,SAAS,qBAAqB,MAAM,EAAE,CAAC;AACrE,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,OAAO;AAEb,MAAI,aAAa,OAAO;AACtB,QAAI,KAAK,YAAY;AACnB,WAAK,aAAa,OAAO,KAAK,UAAU;AAAA,IAC1C,OAAO;AACL,WAAK,YAAY,KAAK;AAAA,IACxB;AAAA,EACF,OAAO;AACL,SAAK,YAAY,KAAK;AAAA,EACxB;AAEA,MAAI,MAAM,YAAY;AACpB,UAAM,WAAW,UAAU;AAAA,EAC7B,OAAO;AACL,UAAM,YAAY,SAAS,eAAe,GAAG,CAAC;AAAA,EAChD;AACF;;;ACvB8B,YAAY,mrBAAmrB;;;ACEvuB,IAAM,SAA8C;AAAA,EAClD,IAAI;AAAA,EACJ,IAAI;AACN;AAEO,SAAS,SAAS,QAAqC;AAC5D,SAAO,OAAO,MAAM;AACtB;;;ACGM,SACE,KADF;AARC,SAAS,YAAY,EAAE,UAAU,GAAqB;AAC3D,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,SAAQ;AAAA,MACR,OAAM;AAAA,MACN,eAAW;AAAA,MAEX,+BAAC,OAAE,WAAU,uBACX;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,QAAO;AAAA,YACP,aAAY;AAAA,YACZ,kBAAiB;AAAA,YACjB,GAAE;AAAA;AAAA,QACJ;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,GAAE;AAAA;AAAA,QACJ;AAAA,SACF;AAAA;AAAA,EACF;AAEJ;;;ACCM,SAEE,OAAAA,MAFF,QAAAC,aAAA;AAtBN,IAAM,WAAW;AAEV,SAAS,cAAc;AAAA,EAC5B;AAAA,EACA,SAAS;AAAA,EACT;AAAA,EACA,QAAQ;AAAA,EACR;AACF,GAAuB;AACrB,QAAM,OAAO,GAAG,QAAQ,QAAQ,mBAAmB,OAAO,CAAC;AAC3D,QAAM,OAAO,SAAS,SAAS,MAAM;AAErC,SACE,gBAAAD;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,QAAO;AAAA,MACP,KAAI;AAAA,MACJ,OAAM;AAAA,MACN,WAAW,CAAC,kBAAkB,mBAAmB,KAAK,IAAI,SAAS,EAChE,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,MAEX,0BAAAC,MAAC,UAAK,WAAU,yBACb;AAAA;AAAA,QACD,gBAAAD,KAAC,eAAY,WAAU,wBAAuB;AAAA,SAChD;AAAA;AAAA,EACF;AAEJ;","names":["jsx","jsxs"]}
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "@tantana/brand-credit",
3
+ "version": "0.1.0",
4
+ "description": "Tantana Medya design credit for client site footers",
5
+ "type": "module",
6
+ "main": "./dist/index.cjs",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js",
13
+ "require": "./dist/index.cjs"
14
+ },
15
+ "./styles.css": "./dist/index.css"
16
+ },
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "scripts": {
21
+ "build": "tsup",
22
+ "dev": "tsup --watch",
23
+ "prepublishOnly": "yarn build"
24
+ },
25
+ "peerDependencies": {
26
+ "react": ">=18",
27
+ "react-dom": ">=18"
28
+ },
29
+ "devDependencies": {
30
+ "@types/react": "^19",
31
+ "@types/react-dom": "^19",
32
+ "react": "^19",
33
+ "react-dom": "^19",
34
+ "tsup": "^8.5.0",
35
+ "typescript": "^5"
36
+ },
37
+ "publishConfig": {
38
+ "access": "public"
39
+ },
40
+ "repository": {
41
+ "type": "git",
42
+ "url": "git+https://github.com/tantanamedya/tantana-brand-credit.git"
43
+ },
44
+ "bugs": {
45
+ "url": "https://github.com/tantanamedya/tantana-brand-credit/issues"
46
+ },
47
+ "homepage": "https://github.com/tantanamedya/tantana-brand-credit#readme",
48
+ "keywords": [
49
+ "tantana",
50
+ "footer",
51
+ "credit",
52
+ "react",
53
+ "brand"
54
+ ],
55
+ "license": "MIT"
56
+ }