support-kurdistan 1.1.3 → 1.1.7

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/README.md CHANGED
@@ -1,183 +1,149 @@
1
- # Support Kurdistan Banner
1
+ # Support Kurdistan Banner 🇹🇯
2
2
 
3
- A custom HTML element that displays a banner showing support for Kurdistan.
3
+ Luxury, minimal banner component to show solidarity with Kurdistan.
4
+ Works with **React, Next.js, and Vue**.
4
5
 
5
- ## Features
6
+ ![Demo](./demo.gif)
6
7
 
7
- - Multi-language support (English, Kurdish, Arabic)
8
- - Multiple themes (light, dark, subtle)
9
- - Responsive design
10
- - Customizable text
11
- - Social media integration with hashtags
8
+ ![Preview](./demo1.png)
12
9
 
13
- ## Usage
10
+ ---
14
11
 
15
- Include the JavaScript file in your HTML:
12
+ ## Features
16
13
 
17
- ```html
18
- <script src="src/support-kurdistan.js"></script>
19
- ```
20
-
21
- Then use the element:
22
-
23
- ```html
24
- <support-kurdistan></support-kurdistan>
25
- ```
26
-
27
- ## Attributes
14
+ - Luxury minimal design
15
+ - RTL & LTR support
16
+ - Multi-language (EN, KU, CKB, AR)
17
+ - Themes: light, dark, subtle
18
+ - Sticky top or footer mode
19
+ - Responsive
20
+ - Zero dependencies
28
21
 
29
- - `locale`: Language code (en, ku, ckb, ar). Default: en
30
- - `theme`: Theme (light, dark, subtle). Default: light
31
- - `text`: Custom message. If provided, replaces the default message.
32
- - `mode`: Position (top, footer). Default: top
22
+ ---
33
23
 
34
- ## Examples
24
+ ## 📦 Installation
35
25
 
36
- ### Default banner
26
+ ```bash
27
+ npm install support-kurdistan
37
28
 
38
- ```html
39
- <support-kurdistan></support-kurdistan>
40
- ```
41
29
 
42
- ### Dark theme in Kurdish
30
+ ## React / Next.js Usage
43
31
 
44
- ```html
45
- <support-kurdistan locale="ku" theme="dark"></support-kurdistan>
46
- ```
47
-
48
- ### Custom text in footer
49
-
50
- ```html
51
- <support-kurdistan
52
- text="Custom support message"
53
- mode="footer"
54
- ></support-kurdistan>
55
- ```
32
+ import SupportKurdistan from "support-kurdistan/react";
56
33
 
57
- ### Arabic with subtle theme
34
+ export default function App() {
35
+ return (
36
+ <SupportKurdistan
37
+ locale="ckb"
38
+ theme="dark"
39
+ text=""
40
+ mode="top"
41
+ />
42
+ );
43
+ }
58
44
 
59
- ```html
60
- <support-kurdistan locale="ar" theme="subtle"></support-kurdistan>
61
- ```
45
+ ##Next.js (App Router)
62
46
 
63
- ## Framework Integration
47
+ "use client";
64
48
 
65
- **Note:** This custom element is framework-agnostic and works with any JavaScript framework. Make sure to include the `support-kurdistan.js` script before using the component. For frameworks with server-side rendering (like Next.js), the component will only render on the client side.
49
+ import SupportKurdistan from "support-kurdistan/react";
66
50
 
67
- This custom element can be used in various JavaScript frameworks. Below are examples for React, Vue, and Next.js.
51
+ export default function App() {
52
+ return (
53
+ <SupportKurdistan
54
+ locale="ckb"
55
+ theme="dark"
56
+ text=""
57
+ mode="top"
58
+ />
59
+ );
60
+ }
68
61
 
69
- ### React
70
62
 
71
- First, include the script in your HTML (e.g., in `public/index.html`):
63
+ 🟢 Vue 3 Usage
72
64
 
73
- ```html
74
- <script src="%PUBLIC_URL%/src/support-kurdistan.js"></script>
75
- ```
65
+ <script setup>
66
+ import SupportKurdistan from "support-kurdistan/vue";
67
+ </script>
76
68
 
77
- Then use it in your React component:
69
+ <template>
70
+ <SupportKurdistan
71
+ locale="ckb"
72
+ theme="dark"
73
+ mode="top"
74
+ />
75
+ </template>
78
76
 
79
- ```jsx
80
- import React from "react";
77
+ Props
81
78
 
82
- function App() {
83
- return (
84
- <div className="App">
85
- <support-kurdistan locale="en" theme="light"></support-kurdistan>
86
- </div>
87
- );
88
- }
79
+ locale
80
+ Type: string
81
+ Default: en
82
+ Description: Language code (en, ku, ckb, ar)
89
83
 
90
- export default App;
91
- ```
84
+ theme
85
+ Type: string
86
+ Default: light
87
+ Description: light, dark, subtle
92
88
 
93
- If you encounter TypeScript issues, declare the element:
89
+ text
90
+ Type: string
91
+ Default: auto
92
+ Description: Custom text override
94
93
 
95
- ```typescript
96
- declare global {
97
- namespace JSX {
98
- interface IntrinsicElements {
99
- "support-kurdistan": any;
100
- }
101
- }
102
- }
103
- ```
94
+ mode
95
+ Type: string
96
+ Default: top
97
+ Description: top or footer
104
98
 
105
- ### Vue
99
+
106
100
 
107
- Include the script in your `index.html`:
101
+ Supported Locales
108
102
 
109
- ```html
110
- <script src="./src/support-kurdistan.js"></script>
111
- ```
103
+ en - English
104
+ ku - Kurdish (Kurmanji)
105
+ ckb - Kurdish (Sorani)
106
+ ar - Arabic
112
107
 
113
- Then use it in your Vue component:
108
+ Themes
114
109
 
115
- ```vue
116
- <template>
117
- <div id="app">
118
- <support-kurdistan locale="ku" theme="dark" />
119
- </div>
120
- </template>
110
+ light
111
+ dark
112
+ subtle
121
113
 
122
- <script>
123
- export default {
124
- name: "App",
125
- };
126
- </script>
127
- ```
128
114
 
129
- In Vue 3, you may need to configure it in `main.js`:
115
+ Examples
130
116
 
131
- ```javascript
132
- import { createApp } from "vue";
133
- import App from "./App.vue";
117
+ Custom text:
118
+ <SupportKurdistan
119
+ text="Kurdistan Forever"
120
+ theme="dark"
121
+ />
134
122
 
135
- const app = createApp(App);
136
- app.config.compilerOptions.isCustomElement = (tag) =>
137
- tag === "support-kurdistan";
138
- app.mount("#app");
139
- ```
123
+ Arabic footer:
140
124
 
141
- ### Next.js
125
+ <SupportKurdistan
126
+ locale="ar"
127
+ theme="subtle"
128
+ mode="footer"
129
+ />
142
130
 
143
- Include the script in your `_document.js` or use `next/script`:
131
+ Notes
132
+ • RTL direction is detected automatically
133
+ • Works with SSR in Next.js
134
+ • No CSS import required
135
+ • Internal styles are scoped
136
+ • Vue and React versions are framework native
144
137
 
145
- ```jsx
146
- import { Html, Head, Main, NextScript } from "next/document";
147
138
 
148
- export default function Document() {
149
- return (
150
- <Html>
151
- <Head>
152
- <script src="/src/support-kurdistan.js" />
153
- </Head>
154
- <body>
155
- <Main />
156
- <NextScript />
157
- </body>
158
- </Html>
159
- );
160
- }
161
- ```
139
+ This project was created to raise awareness and express solidarity with the people of Kurdistan through clean and respectful UI.
162
140
 
163
- Then use it in your pages:
141
+ License
164
142
 
165
- ```jsx
166
- export default function Home() {
167
- return (
168
- <div>
169
- <support-kurdistan locale="ar" theme="subtle" />
170
- </div>
171
- );
172
- }
173
- ```
143
+ MIT License
174
144
 
175
- For TypeScript support, add to `types.d.ts`:
145
+ Author
176
146
 
177
- ```typescript
178
- declare namespace JSX {
179
- interface IntrinsicElements {
180
- "support-kurdistan": any;
181
- }
182
- }
147
+ Abdulsamad Zuhair
148
+ Software Engineer
183
149
  ```
@@ -0,0 +1,19 @@
1
+ export declare class SupportKurdistanComponent {
2
+ locale: string;
3
+ theme: string;
4
+ text: string;
5
+ mode: string;
6
+ hashtags: string[];
7
+ translations: any;
8
+ themes: any;
9
+ get isRTL(): boolean;
10
+ get displayText(): any;
11
+ get style(): {
12
+ "--bg": any;
13
+ "--border": any;
14
+ "--accent": any;
15
+ position: string;
16
+ top: string;
17
+ zIndex: string;
18
+ };
19
+ }
@@ -0,0 +1,186 @@
1
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
2
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
3
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
4
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
5
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
6
+ var _, done = false;
7
+ for (var i = decorators.length - 1; i >= 0; i--) {
8
+ var context = {};
9
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
10
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
11
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
12
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
13
+ if (kind === "accessor") {
14
+ if (result === void 0) continue;
15
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
16
+ if (_ = accept(result.get)) descriptor.get = _;
17
+ if (_ = accept(result.set)) descriptor.set = _;
18
+ if (_ = accept(result.init)) initializers.unshift(_);
19
+ }
20
+ else if (_ = accept(result)) {
21
+ if (kind === "field") initializers.unshift(_);
22
+ else descriptor[key] = _;
23
+ }
24
+ }
25
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
26
+ done = true;
27
+ };
28
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
29
+ var useValue = arguments.length > 2;
30
+ for (var i = 0; i < initializers.length; i++) {
31
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
32
+ }
33
+ return useValue ? value : void 0;
34
+ };
35
+ var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
36
+ if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
37
+ return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
38
+ };
39
+ import { Component, Input } from "@angular/core";
40
+ let SupportKurdistanComponent = (() => {
41
+ let _classDecorators = [Component({
42
+ selector: "support-kurdistan",
43
+ standalone: true,
44
+ template: `
45
+ <div class="banner" [ngStyle]="style">
46
+ <div class="wrap">
47
+ <div class="left">
48
+ <img
49
+ src="https://cdn-icons-png.flaticon.com/512/10600/10600720.png"
50
+ width="36"
51
+ />
52
+ <p [dir]="isRTL ? 'rtl' : 'ltr'">
53
+ {{ displayText }}
54
+ <span *ngIf="!text" class="heart">❤️</span>
55
+ </p>
56
+ </div>
57
+
58
+ <div class="right">
59
+ <a
60
+ *ngFor="let tag of hashtags"
61
+ [href]="'https://twitter.com/search?q=' + tag"
62
+ target="_blank"
63
+ >
64
+ {{ tag }}
65
+ </a>
66
+ </div>
67
+ </div>
68
+ </div>
69
+ `,
70
+ styles: [
71
+ `
72
+ .banner {
73
+ width: 100%;
74
+ border-bottom: 1px solid var(--border);
75
+ background: var(--bg);
76
+ }
77
+ .wrap {
78
+ max-width: 1200px;
79
+ margin: auto;
80
+ padding: 12px 20px;
81
+ display: flex;
82
+ justify-content: space-between;
83
+ flex-wrap: wrap;
84
+ gap: 12px;
85
+ }
86
+ .left {
87
+ display: flex;
88
+ gap: 16px;
89
+ align-items: center;
90
+ }
91
+ p {
92
+ margin: 0;
93
+ font-family: Inter, sans-serif;
94
+ font-weight: 500;
95
+ }
96
+ .right {
97
+ display: flex;
98
+ gap: 14px;
99
+ flex-wrap: wrap;
100
+ }
101
+ a {
102
+ text-decoration: none;
103
+ font-weight: 500;
104
+ color: var(--accent);
105
+ }
106
+ a:hover {
107
+ opacity: 0.8;
108
+ }
109
+ .heart {
110
+ margin-left: 6px;
111
+ color: #e74c3c;
112
+ }
113
+ `,
114
+ ],
115
+ })];
116
+ let _classDescriptor;
117
+ let _classExtraInitializers = [];
118
+ let _classThis;
119
+ let _locale_decorators;
120
+ let _locale_initializers = [];
121
+ let _locale_extraInitializers = [];
122
+ let _theme_decorators;
123
+ let _theme_initializers = [];
124
+ let _theme_extraInitializers = [];
125
+ let _text_decorators;
126
+ let _text_initializers = [];
127
+ let _text_extraInitializers = [];
128
+ let _mode_decorators;
129
+ let _mode_initializers = [];
130
+ let _mode_extraInitializers = [];
131
+ var SupportKurdistanComponent = _classThis = class {
132
+ constructor() {
133
+ this.locale = __runInitializers(this, _locale_initializers, "en");
134
+ this.theme = (__runInitializers(this, _locale_extraInitializers), __runInitializers(this, _theme_initializers, "light"));
135
+ this.text = (__runInitializers(this, _theme_extraInitializers), __runInitializers(this, _text_initializers, ""));
136
+ this.mode = (__runInitializers(this, _text_extraInitializers), __runInitializers(this, _mode_initializers, "top"));
137
+ this.hashtags = (__runInitializers(this, _mode_extraInitializers), ["#SaveRojavaPeople", "#FreeRojava", "#SaveKurdistan"]);
138
+ this.translations = {
139
+ en: "We stand with Kurdistan",
140
+ ku: "ئێمە لەگەڵ کوردستانین",
141
+ ckb: "ئێمە لەگەڵ کوردستانین",
142
+ ar: "نحن نقف مع كوردستان",
143
+ };
144
+ this.themes = {
145
+ light: { bg: "#fff", border: "#e8e8e8", accent: "#c0392b" },
146
+ dark: { bg: "#1a1a1a", border: "#333", accent: "#e74c3c" },
147
+ subtle: { bg: "#f9f9f9", border: "#e0e0e0", accent: "#2980b9" },
148
+ };
149
+ }
150
+ get isRTL() {
151
+ return ["ar", "ku", "ckb"].includes(this.locale);
152
+ }
153
+ get displayText() {
154
+ return this.text || this.translations[this.locale] || this.translations.en;
155
+ }
156
+ get style() {
157
+ const t = this.themes[this.theme] || this.themes.light;
158
+ return {
159
+ "--bg": t.bg,
160
+ "--border": t.border,
161
+ "--accent": t.accent,
162
+ position: this.mode === "footer" ? "relative" : "sticky",
163
+ top: this.mode === "footer" ? null : "0",
164
+ zIndex: "100",
165
+ };
166
+ }
167
+ };
168
+ __setFunctionName(_classThis, "SupportKurdistanComponent");
169
+ (() => {
170
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
171
+ _locale_decorators = [Input()];
172
+ _theme_decorators = [Input()];
173
+ _text_decorators = [Input()];
174
+ _mode_decorators = [Input()];
175
+ __esDecorate(null, null, _locale_decorators, { kind: "field", name: "locale", static: false, private: false, access: { has: obj => "locale" in obj, get: obj => obj.locale, set: (obj, value) => { obj.locale = value; } }, metadata: _metadata }, _locale_initializers, _locale_extraInitializers);
176
+ __esDecorate(null, null, _theme_decorators, { kind: "field", name: "theme", static: false, private: false, access: { has: obj => "theme" in obj, get: obj => obj.theme, set: (obj, value) => { obj.theme = value; } }, metadata: _metadata }, _theme_initializers, _theme_extraInitializers);
177
+ __esDecorate(null, null, _text_decorators, { kind: "field", name: "text", static: false, private: false, access: { has: obj => "text" in obj, get: obj => obj.text, set: (obj, value) => { obj.text = value; } }, metadata: _metadata }, _text_initializers, _text_extraInitializers);
178
+ __esDecorate(null, null, _mode_decorators, { kind: "field", name: "mode", static: false, private: false, access: { has: obj => "mode" in obj, get: obj => obj.mode, set: (obj, value) => { obj.mode = value; } }, metadata: _metadata }, _mode_initializers, _mode_extraInitializers);
179
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
180
+ SupportKurdistanComponent = _classThis = _classDescriptor.value;
181
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
182
+ __runInitializers(_classThis, _classExtraInitializers);
183
+ })();
184
+ return SupportKurdistanComponent = _classThis;
185
+ })();
186
+ export { SupportKurdistanComponent };
@@ -0,0 +1,114 @@
1
+ 'use client';
2
+
3
+ import { useEffect } from "react";
4
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
+ export default function SupportKurdistan(_ref) {
6
+ var _ref$locale = _ref.locale,
7
+ locale = _ref$locale === void 0 ? "en" : _ref$locale,
8
+ _ref$theme = _ref.theme,
9
+ theme = _ref$theme === void 0 ? "light" : _ref$theme,
10
+ _ref$text = _ref.text,
11
+ text = _ref$text === void 0 ? "" : _ref$text,
12
+ _ref$mode = _ref.mode,
13
+ mode = _ref$mode === void 0 ? "top" : _ref$mode;
14
+ var translations = {
15
+ en: "We stand with Kurdistan",
16
+ ku: "ئێمە لەگەڵ کوردستانین",
17
+ ckb: "ئێمە لەگەڵ کوردستانین",
18
+ ar: "نحن نقف مع كوردستان"
19
+ };
20
+ var hashtags = ["#SaveRojavaPeople", "#FreeRojava", "#SaveKurdistan"];
21
+ var themes = {
22
+ light: {
23
+ bg: "#fff",
24
+ color: "#333",
25
+ border: "#e8e8e8",
26
+ accent: "#c0392b"
27
+ },
28
+ dark: {
29
+ bg: "#1a1a1a",
30
+ color: "#f5f5f5",
31
+ border: "#333",
32
+ accent: "#e74c3c"
33
+ },
34
+ subtle: {
35
+ bg: "#f9f9f9",
36
+ color: "#444",
37
+ border: "#e0e0e0",
38
+ accent: "#2980b9"
39
+ }
40
+ };
41
+ var t = themes[theme] || themes.light;
42
+ var isRTL = ["ar", "ku", "ckb"].includes(locale);
43
+ return /*#__PURE__*/_jsx("div", {
44
+ style: {
45
+ position: mode === "footer" ? "relative" : "sticky",
46
+ top: mode === "footer" ? undefined : 0,
47
+ zIndex: 100,
48
+ background: t.bg,
49
+ borderBottom: "1px solid ".concat(t.border),
50
+ width: "100%"
51
+ },
52
+ children: /*#__PURE__*/_jsxs("div", {
53
+ style: {
54
+ maxWidth: 1200,
55
+ margin: "0 auto",
56
+ padding: "12px 20px",
57
+ display: "flex",
58
+ justifyContent: "space-between",
59
+ alignItems: "center",
60
+ gap: 20,
61
+ flexWrap: "wrap"
62
+ },
63
+ children: [/*#__PURE__*/_jsxs("div", {
64
+ style: {
65
+ display: "flex",
66
+ alignItems: "center",
67
+ gap: 16
68
+ },
69
+ children: [/*#__PURE__*/_jsx("img", {
70
+ src: "https://cdn-icons-png.flaticon.com/512/10600/10600720.png",
71
+ width: 36,
72
+ height: 36
73
+ }), /*#__PURE__*/_jsxs("p", {
74
+ style: {
75
+ margin: 0,
76
+ fontFamily: "Inter, sans-serif",
77
+ fontSize: 16,
78
+ fontWeight: 500,
79
+ color: t.color,
80
+ direction: isRTL ? "rtl" : "ltr",
81
+ textAlign: isRTL ? "right" : "left"
82
+ },
83
+ children: [text || translations[locale] || translations.en, !text && /*#__PURE__*/_jsx("span", {
84
+ style: {
85
+ marginLeft: 6,
86
+ color: "#e74c3c"
87
+ },
88
+ children: "\u2764\uFE0F"
89
+ })]
90
+ })]
91
+ }), /*#__PURE__*/_jsx("div", {
92
+ style: {
93
+ display: "flex",
94
+ gap: 14,
95
+ flexWrap: "wrap"
96
+ },
97
+ children: hashtags.map(function (tag, i) {
98
+ return /*#__PURE__*/_jsx("a", {
99
+ href: "https://twitter.com/search?q=".concat(encodeURIComponent(tag)),
100
+ target: "_blank",
101
+ style: {
102
+ color: t.accent,
103
+ fontFamily: "Inter, sans-serif",
104
+ fontSize: 14,
105
+ fontWeight: 500,
106
+ textDecoration: "none"
107
+ },
108
+ children: tag
109
+ }, i);
110
+ })
111
+ })]
112
+ })
113
+ });
114
+ }
@@ -45,8 +45,10 @@ const isRTL = ["ar", "ku", "ckb"].includes(props.locale);
45
45
  <div class="right">
46
46
  <a
47
47
  v-for="tag in hashtags"
48
+ :key="tag"
48
49
  :href="`https://twitter.com/search?q=${encodeURIComponent(tag)}`"
49
50
  target="_blank"
51
+ class="hashtag"
50
52
  >
51
53
  {{ tag }}
52
54
  </a>
@@ -79,3 +81,19 @@ a {
79
81
  text-decoration: none;
80
82
  }
81
83
  </style>
84
+
85
+ <style scoped>
86
+ .hashtag {
87
+ color: var(--accent, #c0392b);
88
+ font-family: Inter, sans-serif;
89
+ font-size: 14px;
90
+ font-weight: 500;
91
+ text-decoration: none;
92
+ transition: opacity 0.2s ease;
93
+ white-space: nowrap;
94
+ }
95
+
96
+ .hashtag:hover {
97
+ opacity: 0.8;
98
+ }
99
+ </style>
package/package.json CHANGED
@@ -1,17 +1,21 @@
1
1
  {
2
2
  "name": "support-kurdistan",
3
- "version": "1.1.3",
3
+ "version": "1.1.7",
4
4
  "description": "Luxury banner component to support Kurdistan for React, Next.js and Vue",
5
5
  "types": "./types/react.d.ts",
6
6
  "type": "module",
7
- "main": "./index.js",
7
+ "files": [
8
+ "dist",
9
+ "types"
10
+ ],
8
11
  "exports": {
9
- ".": "./index.js",
10
- "./react": {
11
- "types": "./types/react.d.ts",
12
- "default": "./react/SupportKurdistan.jsx"
13
- },
14
- "./vue": "./vue/SupportKurdistan.vue"
12
+ ".": "./dist/index.js",
13
+ "./react": "./dist/react/SupportKurdistan.js",
14
+ "./vue": "./dist/vue/SupportKurdistan.vue",
15
+ "./angular": {
16
+ "types": "./dist/angular/support-kurdistan.component.d.ts",
17
+ "default": "./dist/angular/support-kurdistan.component.js"
18
+ }
15
19
  },
16
20
  "keywords": [
17
21
  "kurdistan",
@@ -21,6 +25,28 @@
21
25
  "banner",
22
26
  "solidarity"
23
27
  ],
28
+ "scripts": {
29
+ "build:react": "babel src --out-dir dist --extensions \".jsx,.js\"",
30
+ "build:vue": "copyfiles -u 2 src/vue/*.vue dist/vue",
31
+ "build:angular": "npx tsc -p tsconfig.angular.json",
32
+ "build": "npm run build:react && npm run build:vue && npm run build:angular"
33
+ },
24
34
  "author": "Abdulsamad Zuhair",
25
- "license": "MIT"
35
+ "license": "MIT",
36
+ "devDependencies": {
37
+ "@babel/cli": "^7.28.6",
38
+ "@babel/core": "^7.28.6",
39
+ "@babel/preset-env": "^7.28.6",
40
+ "@babel/preset-react": "^7.28.5",
41
+ "copyfiles": "^2.4.1",
42
+ "typescript": "^5.9.3"
43
+ },
44
+ "dependencies": {
45
+ "@angular/common": "^21.1.1",
46
+ "@angular/core": "^21.1.1"
47
+ },
48
+ "peerDependencies": {
49
+ "@angular/core": ">=16.0.0",
50
+ "@angular/common": ">=16.0.0"
51
+ }
26
52
  }
@@ -1,94 +0,0 @@
1
- 'use client';
2
- import { useEffect } from "react";
3
-
4
- export default function SupportKurdistan({
5
- locale = "en",
6
- theme = "light",
7
- text = "",
8
- mode = "top"
9
- }) {
10
-
11
- const translations = {
12
- en: "We stand with Kurdistan",
13
- ku: "ئێمە لەگەڵ کوردستانین",
14
- ckb: "ئێمە لەگەڵ کوردستانین",
15
- ar: "نحن نقف مع كوردستان"
16
- };
17
-
18
- const hashtags = ["#SaveRojavaPeople", "#FreeRojava", "#SaveKurdistan"];
19
-
20
- const themes = {
21
- light: { bg:"#fff", color:"#333", border:"#e8e8e8", accent:"#c0392b" },
22
- dark: { bg:"#1a1a1a", color:"#f5f5f5", border:"#333", accent:"#e74c3c" },
23
- subtle: { bg:"#f9f9f9", color:"#444", border:"#e0e0e0", accent:"#2980b9" }
24
- };
25
-
26
- const t = themes[theme] || themes.light;
27
- const isRTL = ["ar","ku","ckb"].includes(locale);
28
-
29
- return (
30
- <div
31
- style={{
32
- position: mode === "footer" ? "relative" : "sticky",
33
- top: mode === "footer" ? undefined : 0,
34
- zIndex: 100,
35
- background: t.bg,
36
- borderBottom: `1px solid ${t.border}`,
37
- width: "100%"
38
- }}
39
- >
40
- <div style={{
41
- maxWidth:1200,
42
- margin:"0 auto",
43
- padding:"12px 20px",
44
- display:"flex",
45
- justifyContent:"space-between",
46
- alignItems:"center",
47
- gap:20,
48
- flexWrap:"wrap"
49
- }}>
50
-
51
- <div style={{display:"flex",alignItems:"center",gap:16}}>
52
- <img
53
- src="https://cdn-icons-png.flaticon.com/512/10600/10600720.png"
54
- width={36}
55
- height={36}
56
- />
57
-
58
- <p style={{
59
- margin:0,
60
- fontFamily:"Inter, sans-serif",
61
- fontSize:16,
62
- fontWeight:500,
63
- color:t.color,
64
- direction:isRTL?"rtl":"ltr",
65
- textAlign:isRTL?"right":"left"
66
- }}>
67
- {text || translations[locale] || translations.en}
68
- {!text && <span style={{marginLeft:6,color:"#e74c3c"}}>❤️</span>}
69
- </p>
70
- </div>
71
-
72
- <div style={{display:"flex",gap:14,flexWrap:"wrap"}}>
73
- {hashtags.map((tag,i)=>(
74
- <a
75
- key={i}
76
- href={`https://twitter.com/search?q=${encodeURIComponent(tag)}`}
77
- target="_blank"
78
- style={{
79
- color:t.accent,
80
- fontFamily:"Inter, sans-serif",
81
- fontSize:14,
82
- fontWeight:500,
83
- textDecoration:"none"
84
- }}
85
- >
86
- {tag}
87
- </a>
88
- ))}
89
- </div>
90
-
91
- </div>
92
- </div>
93
- );
94
- }
File without changes