@asafarim/shared-i18n 0.6.3 → 0.6.5

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
@@ -2,6 +2,8 @@
2
2
 
3
3
  Lightweight, simple translation module for any React + TypeScript app, built on top of i18next and react-i18next. It ships with sensible defaults (English and Dutch) but can support any language by adding JSON files to your locales folder.
4
4
 
5
+ * see Demo at: [https://alisafari-it.github.io/shared-i18n/](https://alisafari-it.github.io/shared-i18n/)
6
+
5
7
  ## Features
6
8
 
7
9
  - 🌍 Works in any React + TypeScript project (monorepo or standalone)
@@ -172,7 +174,9 @@ interface LanguageSwitcherProps {
172
174
 
173
175
  - **buttons** — Individual buttons for each language (default)
174
176
  - **select** — Native dropdown select element
177
+ ![Select Dropdown](https://github.com/AliSafari-IT/shared-i18n/blob/main/demo/public/Select%20Dropdown_Text%20Only.png?raw=true)
175
178
  - **icon-dropdown** — Custom dropdown showing flag emojis with language codes
179
+ ![Icon Dropdown](https://github.com/AliSafari-IT/shared-i18n/blob/main/demo/public/Icon%20Dropdown_Limited%20Languages.png?raw=true)
176
180
 
177
181
  ### Examples
178
182
 
package/demo/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shared-i18n-demo",
3
- "version": "0.6.2",
3
+ "version": "0.6.5",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "scripts": {
package/demo/src/App.tsx CHANGED
@@ -7,9 +7,12 @@ import StatusCard from './components/StatusCard'
7
7
  import OverviewSection from './components/OverviewSection'
8
8
  import GetStartedSection from './components/GetStartedSection'
9
9
  import LanguageSwitcherDemo from './components/LanguageSwitcherDemo'
10
+ import Logo from './components/Logo'
10
11
 
11
12
  type TabType = 'overview' | 'getStarted' | 'demo'
12
13
 
14
+
15
+
13
16
  export default function App() {
14
17
  const { t } = useTranslation('demo')
15
18
  const [activeTab, setActiveTab] = useState<TabType>('overview')
@@ -17,6 +20,7 @@ export default function App() {
17
20
  return (
18
21
  <div className="app-container">
19
22
  <header className="app-header">
23
+ <Logo />
20
24
  <div className="header-content">
21
25
  <h1>{t('title')}</h1>
22
26
  <p className="subtitle">{t('subtitle')}</p>
@@ -0,0 +1,7 @@
1
+ export default function Logo({width = 70}: {width?: number}) {
2
+ return (
3
+ <div className="logo">
4
+ <img src={import.meta.env.BASE_URL + "logo.svg"} alt="Logo" width={width} />
5
+ </div>
6
+ )
7
+ }
@@ -566,4 +566,40 @@ body {
566
566
  opacity: 1;
567
567
  max-height: 500px;
568
568
  }
569
- }
569
+ }
570
+
571
+ .logo {
572
+ width: 70px;
573
+ height: 70px;
574
+ }
575
+
576
+ .logo img {
577
+ width: 100%;
578
+ height: 100%;
579
+ }
580
+
581
+
582
+
583
+ /* Mobile adjustments */
584
+ @media (max-width: 768px) {
585
+ .logo {
586
+ width: 50px;
587
+ height: 50px;
588
+ }
589
+ }
590
+
591
+ /* Tablet adjustments */
592
+ @media (min-width: 769px) and (max-width: 1024px) {
593
+ .logo {
594
+ width: 60px;
595
+ height: 60px;
596
+ }
597
+ }
598
+
599
+ /* Desktop adjustments */
600
+ @media (min-width: 1025px) {
601
+ .logo {
602
+ width: 70px;
603
+ height: 70px;
604
+ }
605
+ }
@@ -13,6 +13,6 @@
13
13
  "noEmit": true,
14
14
  "jsx": "react-jsx"
15
15
  },
16
- "include": ["src", "../src/types", "../vite-env.d.ts"],
16
+ "include": ["src", "../src/types", "./vite-env.d.ts"],
17
17
  "references": [{ "path": "./tsconfig.node.json" }, { "path": "../tsconfig.json" }]
18
18
  }
@@ -2,6 +2,7 @@
2
2
 
3
3
  declare module 'vite/client' {
4
4
  interface ImportMetaEnv {
5
+ readonly BASE_URL: string
5
6
  readonly VITE_IDENTITY_API_URL?: string
6
7
  }
7
8
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@asafarim/shared-i18n",
3
3
  "description": "A shared i18n package for React applications",
4
- "version": "0.6.3",
4
+ "version": "0.6.5",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",