@undp/create-app 0.2.14 → 0.2.16

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.
Files changed (137) hide show
  1. package/bin/generateFiles/generatePackageJson.js +12 -30
  2. package/bin/generateFiles/generateViteConfig.js +2 -4
  3. package/bin/index.js +1 -1
  4. package/bin/promptUser.js +21 -2
  5. package/bin/templates/next/auth/biome.json +67 -0
  6. package/bin/templates/next/basic/biome.json +67 -0
  7. package/bin/templates/vite/basic/biome.json +67 -0
  8. package/bin/templates/vite/query/biome.json +67 -0
  9. package/bin/templates/vite/query/src/App.tsx +1 -1
  10. package/bin/templates/vite/query+router/biome.json +67 -0
  11. package/bin/templates/vite/query+router/src/App.tsx +1 -1
  12. package/bin/templates/vite/query+router/src/components/Header.tsx +1 -1
  13. package/bin/templates/vite/query+router/src/routes/queryDemo.tsx +5 -5
  14. package/bin/templates/vite/router/biome.json +67 -0
  15. package/bin/templates/vite/router/src/App.tsx +1 -1
  16. package/bin/templates/vite/router/src/routes/about.tsx +5 -5
  17. package/bin/templates/viteWithLanguage/basic/README.md +75 -0
  18. package/bin/templates/viteWithLanguage/basic/biome.json +67 -0
  19. package/bin/templates/viteWithLanguage/basic/index.html +13 -0
  20. package/bin/templates/viteWithLanguage/basic/public/favicon.ico +0 -0
  21. package/bin/templates/viteWithLanguage/basic/public/imgs/Tailwind_CSS_Logo.svg +1 -0
  22. package/bin/templates/viteWithLanguage/basic/public/imgs/Vitejs-logo.svg +15 -0
  23. package/bin/templates/viteWithLanguage/basic/public/imgs/Zustand-logo.svg +266 -0
  24. package/bin/templates/viteWithLanguage/basic/public/imgs/undp-logo-blue.svg +1 -0
  25. package/bin/templates/viteWithLanguage/basic/src/App.tsx +95 -0
  26. package/bin/templates/viteWithLanguage/basic/src/assets/undp-logo-blue.svg +1 -0
  27. package/bin/templates/viteWithLanguage/basic/src/i18n.ts +31 -0
  28. package/bin/templates/viteWithLanguage/basic/src/locales/en/common.json +6 -0
  29. package/bin/templates/viteWithLanguage/basic/src/locales/es/common.json +6 -0
  30. package/bin/templates/viteWithLanguage/basic/src/locales/fr/common.json +6 -0
  31. package/bin/templates/viteWithLanguage/basic/src/main.tsx +15 -0
  32. package/bin/templates/viteWithLanguage/basic/src/stores/counter.ts +23 -0
  33. package/bin/templates/viteWithLanguage/basic/src/styles/fonts.css +213 -0
  34. package/bin/templates/viteWithLanguage/basic/src/styles/style.css +3 -0
  35. package/bin/templates/viteWithLanguage/basic/src/vite-env.d.ts +1 -0
  36. package/bin/templates/viteWithLanguage/basic/tailwind.config.js +7 -0
  37. package/bin/templates/viteWithLanguage/basic/tsconfig.json +29 -0
  38. package/bin/templates/viteWithLanguage/basic/tsconfig.node.json +9 -0
  39. package/bin/templates/viteWithLanguage/basic/vite.config.ts +58 -0
  40. package/bin/templates/viteWithLanguage/query/README.md +80 -0
  41. package/bin/templates/viteWithLanguage/query/biome.json +67 -0
  42. package/bin/templates/viteWithLanguage/query/index.html +13 -0
  43. package/bin/templates/viteWithLanguage/query/public/favicon.ico +0 -0
  44. package/bin/templates/viteWithLanguage/query/public/imgs/Tailwind_CSS_Logo.svg +1 -0
  45. package/bin/templates/viteWithLanguage/query/public/imgs/Tanstack-logo.png +0 -0
  46. package/bin/templates/viteWithLanguage/query/public/imgs/Vitejs-logo.svg +15 -0
  47. package/bin/templates/viteWithLanguage/query/public/imgs/Zustand-logo.svg +266 -0
  48. package/bin/templates/viteWithLanguage/query/public/imgs/undp-logo-blue.svg +1 -0
  49. package/bin/templates/viteWithLanguage/query/src/App.tsx +125 -0
  50. package/bin/templates/viteWithLanguage/query/src/assets/undp-logo-blue.svg +1 -0
  51. package/bin/templates/viteWithLanguage/query/src/constants.ts +16 -0
  52. package/bin/templates/viteWithLanguage/query/src/i18n.ts +31 -0
  53. package/bin/templates/viteWithLanguage/query/src/integration/tanstack-query.tsx +28 -0
  54. package/bin/templates/viteWithLanguage/query/src/locales/en/common.json +8 -0
  55. package/bin/templates/viteWithLanguage/query/src/locales/es/common.json +8 -0
  56. package/bin/templates/viteWithLanguage/query/src/locales/fr/common.json +8 -0
  57. package/bin/templates/viteWithLanguage/query/src/main.tsx +24 -0
  58. package/bin/templates/viteWithLanguage/query/src/stores/counter.ts +23 -0
  59. package/bin/templates/viteWithLanguage/query/src/styles/fonts.css +213 -0
  60. package/bin/templates/viteWithLanguage/query/src/styles/style.css +3 -0
  61. package/bin/templates/viteWithLanguage/query/src/vite-env.d.ts +1 -0
  62. package/bin/templates/viteWithLanguage/query/tailwind.config.js +7 -0
  63. package/bin/templates/viteWithLanguage/query/tsconfig.json +29 -0
  64. package/bin/templates/viteWithLanguage/query/tsconfig.node.json +9 -0
  65. package/bin/templates/viteWithLanguage/query/vite.config.ts +58 -0
  66. package/bin/templates/viteWithLanguage/query+router/README.md +111 -0
  67. package/bin/templates/viteWithLanguage/query+router/biome.json +67 -0
  68. package/bin/templates/viteWithLanguage/query+router/index.html +13 -0
  69. package/bin/templates/viteWithLanguage/query+router/public/favicon.ico +0 -0
  70. package/bin/templates/viteWithLanguage/query+router/public/imgs/Tailwind_CSS_Logo.svg +1 -0
  71. package/bin/templates/viteWithLanguage/query+router/public/imgs/Tanstack-logo.png +0 -0
  72. package/bin/templates/viteWithLanguage/query+router/public/imgs/Vitejs-logo.svg +15 -0
  73. package/bin/templates/viteWithLanguage/query+router/public/imgs/Zustand-logo.svg +266 -0
  74. package/bin/templates/viteWithLanguage/query+router/public/imgs/undp-logo-blue.svg +1 -0
  75. package/bin/templates/viteWithLanguage/query+router/src/App.tsx +75 -0
  76. package/bin/templates/viteWithLanguage/query+router/src/Icons.tsx +74 -0
  77. package/bin/templates/viteWithLanguage/query+router/src/assets/undp-logo-blue.svg +1 -0
  78. package/bin/templates/viteWithLanguage/query+router/src/components/Footer.tsx +16 -0
  79. package/bin/templates/viteWithLanguage/query+router/src/components/Header.tsx +70 -0
  80. package/bin/templates/viteWithLanguage/query+router/src/constants.ts +16 -0
  81. package/bin/templates/viteWithLanguage/query+router/src/i18n.ts +31 -0
  82. package/bin/templates/viteWithLanguage/query+router/src/integration/tanstack-query.tsx +28 -0
  83. package/bin/templates/viteWithLanguage/query+router/src/locales/en/common.json +13 -0
  84. package/bin/templates/viteWithLanguage/query+router/src/locales/es/common.json +13 -0
  85. package/bin/templates/viteWithLanguage/query+router/src/locales/fr/common.json +14 -0
  86. package/bin/templates/viteWithLanguage/query+router/src/main.tsx +95 -0
  87. package/bin/templates/viteWithLanguage/query+router/src/routes/queryDemo.tsx +78 -0
  88. package/bin/templates/viteWithLanguage/query+router/src/stores/counter.ts +23 -0
  89. package/bin/templates/viteWithLanguage/query+router/src/styles/fonts.css +213 -0
  90. package/bin/templates/viteWithLanguage/query+router/src/styles/style.css +3 -0
  91. package/bin/templates/viteWithLanguage/query+router/src/vite-env.d.ts +1 -0
  92. package/bin/templates/viteWithLanguage/query+router/tailwind.config.js +7 -0
  93. package/bin/templates/viteWithLanguage/query+router/tsconfig.json +29 -0
  94. package/bin/templates/viteWithLanguage/query+router/tsconfig.node.json +9 -0
  95. package/bin/templates/viteWithLanguage/query+router/vite.config.ts +58 -0
  96. package/bin/templates/viteWithLanguage/router/README.md +106 -0
  97. package/bin/templates/viteWithLanguage/router/biome.json +67 -0
  98. package/bin/templates/viteWithLanguage/router/index.html +13 -0
  99. package/bin/templates/viteWithLanguage/router/public/favicon.ico +0 -0
  100. package/bin/templates/viteWithLanguage/router/public/imgs/Tailwind_CSS_Logo.svg +1 -0
  101. package/bin/templates/viteWithLanguage/router/public/imgs/Tanstack-logo.png +0 -0
  102. package/bin/templates/viteWithLanguage/router/public/imgs/Vitejs-logo.svg +15 -0
  103. package/bin/templates/viteWithLanguage/router/public/imgs/Zustand-logo.svg +266 -0
  104. package/bin/templates/viteWithLanguage/router/public/imgs/undp-logo-blue.svg +1 -0
  105. package/bin/templates/viteWithLanguage/router/src/App.tsx +74 -0
  106. package/bin/templates/viteWithLanguage/router/src/Icons.tsx +74 -0
  107. package/bin/templates/viteWithLanguage/router/src/assets/undp-logo-blue.svg +1 -0
  108. package/bin/templates/viteWithLanguage/router/src/components/Footer.tsx +16 -0
  109. package/bin/templates/viteWithLanguage/router/src/components/Header.tsx +70 -0
  110. package/bin/templates/viteWithLanguage/router/src/constants.ts +16 -0
  111. package/bin/templates/viteWithLanguage/router/src/i18n.ts +31 -0
  112. package/bin/templates/viteWithLanguage/router/src/locales/en/common.json +11 -0
  113. package/bin/templates/viteWithLanguage/router/src/locales/es/common.json +11 -0
  114. package/bin/templates/viteWithLanguage/router/src/locales/fr/common.json +11 -0
  115. package/bin/templates/viteWithLanguage/router/src/main.tsx +89 -0
  116. package/bin/templates/viteWithLanguage/router/src/routes/about.tsx +58 -0
  117. package/bin/templates/viteWithLanguage/router/src/stores/counter.ts +23 -0
  118. package/bin/templates/viteWithLanguage/router/src/styles/fonts.css +213 -0
  119. package/bin/templates/viteWithLanguage/router/src/styles/style.css +3 -0
  120. package/bin/templates/viteWithLanguage/router/src/vite-env.d.ts +1 -0
  121. package/bin/templates/viteWithLanguage/router/tailwind.config.js +7 -0
  122. package/bin/templates/viteWithLanguage/router/tsconfig.json +29 -0
  123. package/bin/templates/viteWithLanguage/router/tsconfig.node.json +9 -0
  124. package/bin/templates/viteWithLanguage/router/vite.config.ts +58 -0
  125. package/package.json +1 -1
  126. package/bin/templates/next/auth/.prettierrc +0 -10
  127. package/bin/templates/next/auth/eslint.config.mjs +0 -103
  128. package/bin/templates/next/basic/.prettierrc +0 -10
  129. package/bin/templates/next/basic/eslint.config.mjs +0 -103
  130. package/bin/templates/vite/basic/.prettierrc +0 -10
  131. package/bin/templates/vite/basic/eslint.config.mjs +0 -97
  132. package/bin/templates/vite/query/.prettierrc +0 -10
  133. package/bin/templates/vite/query/eslint.config.mjs +0 -97
  134. package/bin/templates/vite/query+router/.prettierrc +0 -10
  135. package/bin/templates/vite/query+router/eslint.config.mjs +0 -97
  136. package/bin/templates/vite/router/.prettierrc +0 -10
  137. package/bin/templates/vite/router/eslint.config.mjs +0 -97
@@ -0,0 +1 @@
1
+ <svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 60.8"><style>.st0{fill:#0468b1}.st1{fill:#fff}</style><path class="st0" d="M0 30.9h14.5v14.5H0z"/><path class="st1" d="M3.7 33.2v5.7c0 3 1.5 4.1 3.5 4.1 2.1 0 3.6-1.2 3.6-4.2v-5.7H9.6v5.8c0 2.1-1 3.1-2.4 3.1-1.3 0-2.3-.9-2.3-3.1v-5.7H3.7z"/><path class="st0" d="M15.4 30.9h14.5v14.5H15.4z"/><path class="st1" d="M20.2 43v-4.1c0-1.6 0-2.8-.1-4 .5 1.1 1.1 2.2 1.8 3.2L25 43h1.3v-9.6h-1.1v4.1c0 1.5 0 2.7.2 4-.4-1-1-2-1.7-3.2l-3.1-4.9h-1.4v9.7l1-.1z"/><path class="st0" d="M15.4 46.3h14.5v14.5H15.4z"/><path class="st1" d="M25.1 49.4c-.6-.5-1.5-.8-2.8-.8-1 0-1.8.1-2.4.2v9.6h1.2v-3.9c.3.1.6.1 1 .1 1.2 0 2.3-.4 2.9-1.1.5-.5.8-1.2.8-2.1.2-.8-.1-1.5-.7-2"/><path class="st0" d="M22.3 53.6c-.4 0-.8 0-1.1-.1v-3.7c.2 0 .6-.1 1.2-.1 1.4 0 2.3.6 2.3 1.9 0 1.3-.9 2-2.4 2M0 46.3h14.5v14.5H0z"/><path class="st1" d="M10.2 49.8c-.8-.8-2.1-1.2-3.9-1.2-1 0-1.9.1-2.7.2v9.6c.6.1 1.4.1 2.3.1 1.9 0 3.4-.5 4.3-1.4.9-.9 1.4-2.2 1.4-3.7 0-1.7-.5-2.8-1.4-3.6"/><path class="st0" d="M6.2 57.4c-.5 0-1 0-1.3-.1v-7.6c.3-.1.8-.2 1.5-.2 2.7 0 3.9 1.4 3.9 3.7 0 2.7-1.5 4.3-4.1 4.2M0 0h30v30H0z"/><path class="st1" d="M25.7 15.6c-.4.6-1 1.1-1.3 1.8 0-.5.1-1.1-.1-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.1-.1 0 0-.2-.1-.2 0-.1-.1-.1-.1-.2.2-.2-.2-.2-.2-.5 0-.2-.2-.2-.3-.4-.6-.2-1.2-.5-1.9-.6-.2 0-.3 0-.5-.1v.1c-.2.5-.2.8-.2 1.2"/><path class="st0" d="M19.5 9.4c.1 0 .1.2.2.2.3.2.4.5.6.6.2.3.5.6.5.9.3.8.6 1.5.6 2.5h1.2c-.1-.1 0-.2-.1-.4-.2-1.8-.9-3.3-2.1-4.6-.2.3-.5.6-.9.8z"/><path class="st1" d="M15.3 7.1c0-.1.2 0 .2 0l.6-.2c.2 0 .5 0 .6.2-.2.2-.3.2-.5.2-.3 0-.6.1-.9-.2m3.4.7c.1 0 .2.1.2.2s.1.2 0 .2c-.2.1-.2-.2-.4-.2v-.1c.1-.2.1 0 .2-.1"/></svg>
@@ -0,0 +1,74 @@
1
+ import { P } from '@undp/design-system-react/Typography';
2
+ import { Button } from '@undp/design-system-react/Button';
3
+ import { useTranslation } from 'react-i18next';
4
+ import { useCounterActions, useCounter } from './stores/counter';
5
+
6
+ export function App() {
7
+ const count = useCounter();
8
+ const { t } = useTranslation();
9
+ const { increment, decrement } = useCounterActions();
10
+ return (
11
+ <>
12
+ <div className='flex gap-4 items-center justify-center my-8 mx-auto'>
13
+ <img
14
+ src='/imgs/Vitejs-logo.svg'
15
+ alt='vite logo'
16
+ width='72px'
17
+ style={{ marginLeft: 'auto', marginRight: 'auto' }}
18
+ />
19
+ <P marginBottom='none'>&</P>
20
+ <img
21
+ src='/imgs/Tailwind_CSS_Logo.svg'
22
+ alt='tailwind logo'
23
+ width='72px'
24
+ style={{ marginLeft: 'auto', marginRight: 'auto' }}
25
+ />
26
+ <P marginBottom='none'>&</P>
27
+ <img
28
+ src='/imgs/Tanstack-logo.png'
29
+ alt='tanstack logo'
30
+ width='72px'
31
+ style={{ marginLeft: 'auto', marginRight: 'auto' }}
32
+ />
33
+ <P marginBottom='none'>&</P>
34
+ <img
35
+ src='/imgs/Zustand-logo.svg'
36
+ alt='Zustand logo'
37
+ width='72px'
38
+ style={{ marginLeft: 'auto', marginRight: 'auto' }}
39
+ />
40
+ <P marginBottom='none'>&</P>
41
+ <img
42
+ src='/imgs/undp-logo-blue.svg'
43
+ alt='UNDP logo'
44
+ width='72px'
45
+ style={{ marginLeft: 'auto', marginRight: 'auto' }}
46
+ />
47
+ </div>
48
+ <P marginBottom='xl' className='text-center'>
49
+ {t('started', { fileName: 'app.tsx' })}{' '}
50
+ <span className='font-bold'>{t('count', { count: count })}</span>
51
+ </P>
52
+ <div className='flex gap-4 justify-center mb-8'>
53
+ <Button
54
+ variant='tertiary'
55
+ onClick={() => {
56
+ increment();
57
+ }}
58
+ >
59
+ {t('increaseCount')}
60
+ </Button>
61
+ <Button
62
+ variant='tertiary'
63
+ onClick={() => {
64
+ decrement();
65
+ }}
66
+ >
67
+ {t('decreaseCount')}
68
+ </Button>
69
+ </div>
70
+ </>
71
+ );
72
+ }
73
+
74
+ export default App;
@@ -0,0 +1,74 @@
1
+ export function LanguageSwitcherIcon() {
2
+ return (
3
+ <svg
4
+ width='25'
5
+ height='26'
6
+ viewBox='0 0 25 26'
7
+ fill='none'
8
+ xmlns='http://www.w3.org/2000/svg'
9
+ >
10
+ <g>
11
+ <path
12
+ d='M16.599 23.688C17.7895 22.3987 18.4193 20.6895 18.35 18.936H0.75V0.75H23.88V15.468L23.875 15.474C23.875 15.521 23.875 15.568 23.875 15.616C23.905 20.278 17.206 24.488 16.175 24.488C15.921 24.488 16.004 24.24 16.599 23.688Z'
13
+ stroke='currentColor'
14
+ strokeWidth='1.5'
15
+ />
16
+ <path
17
+ d='M13.5854 13.542L16.9429 5.45215L20.2144 13.542'
18
+ stroke='currentColor'
19
+ strokeWidth='1.5'
20
+ strokeLinecap='round'
21
+ strokeLinejoin='round'
22
+ />
23
+ <path
24
+ d='M15.0576 10.6704H18.9863'
25
+ stroke='currentColor'
26
+ strokeWidth='1.5'
27
+ />
28
+ <path
29
+ d='M4.13086 6.76706H10.6748'
30
+ stroke='currentColor'
31
+ strokeWidth='1.5'
32
+ strokeLinecap='round'
33
+ />
34
+ <path
35
+ d='M4.13086 13.1656C4.13086 13.1656 9.59778 13.6368 9.92578 6.90781'
36
+ stroke='currentColor'
37
+ strokeWidth='1.5'
38
+ strokeLinecap='round'
39
+ />
40
+ <path
41
+ d='M10.8271 13.5417C10.8271 13.5417 6.38075 13.065 5.21875 9.11597'
42
+ stroke='currentColor'
43
+ strokeWidth='1.5'
44
+ strokeLinecap='round'
45
+ />
46
+ <path
47
+ d='M7.40723 4.08563V6.56317'
48
+ stroke='currentColor'
49
+ strokeWidth='1.5'
50
+ strokeLinecap='round'
51
+ />
52
+ </g>
53
+ </svg>
54
+ );
55
+ }
56
+
57
+ export function ChevronDown() {
58
+ return (
59
+ <svg
60
+ xmlns='http://www.w3.org/2000/svg'
61
+ width='24'
62
+ height='24'
63
+ viewBox='0 0 24 24'
64
+ fill='none'
65
+ stroke='currentColor'
66
+ stroke-width='2'
67
+ stroke-linecap='round'
68
+ stroke-linejoin='round'
69
+ className='transition-transform duration-200 chevron-down-icon chevron-down'
70
+ >
71
+ <path d='m6 9 6 6 6-6' />
72
+ </svg>
73
+ );
74
+ }
@@ -0,0 +1 @@
1
+ <svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 60.8"><style>.st0{fill:#0468b1}.st1{fill:#fff}</style><path class="st0" d="M0 30.9h14.5v14.5H0z"/><path class="st1" d="M3.7 33.2v5.7c0 3 1.5 4.1 3.5 4.1 2.1 0 3.6-1.2 3.6-4.2v-5.7H9.6v5.8c0 2.1-1 3.1-2.4 3.1-1.3 0-2.3-.9-2.3-3.1v-5.7H3.7z"/><path class="st0" d="M15.4 30.9h14.5v14.5H15.4z"/><path class="st1" d="M20.2 43v-4.1c0-1.6 0-2.8-.1-4 .5 1.1 1.1 2.2 1.8 3.2L25 43h1.3v-9.6h-1.1v4.1c0 1.5 0 2.7.2 4-.4-1-1-2-1.7-3.2l-3.1-4.9h-1.4v9.7l1-.1z"/><path class="st0" d="M15.4 46.3h14.5v14.5H15.4z"/><path class="st1" d="M25.1 49.4c-.6-.5-1.5-.8-2.8-.8-1 0-1.8.1-2.4.2v9.6h1.2v-3.9c.3.1.6.1 1 .1 1.2 0 2.3-.4 2.9-1.1.5-.5.8-1.2.8-2.1.2-.8-.1-1.5-.7-2"/><path class="st0" d="M22.3 53.6c-.4 0-.8 0-1.1-.1v-3.7c.2 0 .6-.1 1.2-.1 1.4 0 2.3.6 2.3 1.9 0 1.3-.9 2-2.4 2M0 46.3h14.5v14.5H0z"/><path class="st1" d="M10.2 49.8c-.8-.8-2.1-1.2-3.9-1.2-1 0-1.9.1-2.7.2v9.6c.6.1 1.4.1 2.3.1 1.9 0 3.4-.5 4.3-1.4.9-.9 1.4-2.2 1.4-3.7 0-1.7-.5-2.8-1.4-3.6"/><path class="st0" d="M6.2 57.4c-.5 0-1 0-1.3-.1v-7.6c.3-.1.8-.2 1.5-.2 2.7 0 3.9 1.4 3.9 3.7 0 2.7-1.5 4.3-4.1 4.2M0 0h30v30H0z"/><path class="st1" d="M25.7 15.6c-.4.6-1 1.1-1.3 1.8 0-.5.1-1.1-.1-1.5-.3-1-.6-1.9-.7-3.1v-.4c.2 1.1 1.3 1.9 1.2 3.1 0 .3-.1.6-.2.8v-.1c.2-.6.2-1.2.5-1.8.4-.8.8-1.6.6-2.6.8 1.2.6 2.7 0 3.8"/><path class="st1" d="M25.1 9.4c.7 1 .9 2.5.3 3.6-.2.5-.3 1-.4 1.5 0-.1 0-.2-.1-.3-.2-1.1-1.3-1.9-1.7-2.8-.2-.3-.2-.6-.3-1.1.4.8 1.5 1.2 1.9 2.2.2.2.1.5.2.8-.2-1-.1-1.9 0-2.8 0-.5-.1-1-.3-1.4.1-.1.2.1.4.3"/><path class="st1" d="M24.6 9.2c.2.8-.1 1.6.1 2.5-.5-.9-1.4-1.3-2.1-2-.4-.4-.6-1-.6-1.5.4.9 1.4 1.1 2 1.9.2.2.2.4.4.6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
@@ -0,0 +1,16 @@
1
+ import {
2
+ Footer,
3
+ FooterLogoUnit,
4
+ FooterCopyrightUnit,
5
+ } from '@undp/design-system-react/Footer';
6
+ import { useTranslation } from 'react-i18next';
7
+
8
+ export default function FooterEl() {
9
+ const { t } = useTranslation();
10
+ return (
11
+ <Footer>
12
+ <FooterLogoUnit>{t('subscribe')}</FooterLogoUnit>
13
+ <FooterCopyrightUnit>{t('footnote')}</FooterCopyrightUnit>
14
+ </Footer>
15
+ );
16
+ }
@@ -0,0 +1,70 @@
1
+ import {
2
+ Header,
3
+ HeaderActions,
4
+ HeaderLogoUnit,
5
+ HeaderMainNavUnit,
6
+ HeaderMenuUnit,
7
+ } from '@undp/design-system-react/Header';
8
+ import {
9
+ DropdownMenu,
10
+ DropdownMenuContent,
11
+ DropdownMenuItem,
12
+ DropdownMenuTrigger,
13
+ } from '@undp/design-system-react/DropdownMenu';
14
+ import { Link, useParams } from '@tanstack/react-router';
15
+ import { useTranslation } from 'react-i18next';
16
+
17
+ import { LanguageSwitcherIcon, ChevronDown } from '@/Icons';
18
+ import { DEFAULT_LANGUAGE, LANGUAGES } from '@/constants';
19
+
20
+ export default function HeaderEl() {
21
+ const params = useParams({ strict: false });
22
+ const locale =
23
+ params.locale && LANGUAGES.map(d => d.id).includes(params.locale)
24
+ ? params.locale
25
+ : DEFAULT_LANGUAGE;
26
+ const { t } = useTranslation();
27
+ return (
28
+ <Header>
29
+ <HeaderLogoUnit
30
+ hyperlink={locale === DEFAULT_LANGUAGE ? '/' : `/${locale}`}
31
+ siteName='Site name'
32
+ siteSubName='Sub-site name'
33
+ />
34
+ <HeaderMainNavUnit>
35
+ <HeaderMenuUnit>
36
+ <Link to='/{-$locale}'>{t('home')}</Link>
37
+ <Link to='/{-$locale}/about'>{t('about')}</Link>
38
+ </HeaderMenuUnit>
39
+ <HeaderActions>
40
+ <DropdownMenu>
41
+ <DropdownMenuTrigger asChild>
42
+ <div className='cursor-pointer flex h-9 flex gap-2 rtl:[direction:rtl] items-center text-primary-blue-600 hover:text-primary-blue-400 dark:text-primary-white dark:hover:text-primary-white uppercase font-semibold text-sm justify-between whitespace-nowrap bg-transparent p-0 data-[placeholder]:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 [&[data-state=open]>.chevron-down]:rotate-180'>
43
+ <LanguageSwitcherIcon />
44
+ {LANGUAGES.find(d => d.id === locale)?.label}
45
+ <ChevronDown />
46
+ </div>
47
+ </DropdownMenuTrigger>
48
+ <DropdownMenuContent>
49
+ {LANGUAGES.map(d => (
50
+ <DropdownMenuItem key={d.id} asChild>
51
+ <Link
52
+ to='.'
53
+ params={{
54
+ ...params,
55
+ locale: d.id,
56
+ }}
57
+ preload={false}
58
+ className='w-full'
59
+ >
60
+ {d.label}
61
+ </Link>
62
+ </DropdownMenuItem>
63
+ ))}
64
+ </DropdownMenuContent>
65
+ </DropdownMenu>
66
+ </HeaderActions>
67
+ </HeaderMainNavUnit>
68
+ </Header>
69
+ );
70
+ }
@@ -0,0 +1,16 @@
1
+ export const LANGUAGES = [
2
+ {
3
+ label: 'English',
4
+ id: 'en',
5
+ },
6
+ {
7
+ label: 'Français',
8
+ id: 'fr',
9
+ },
10
+ {
11
+ label: 'Español',
12
+ id: 'es',
13
+ },
14
+ ];
15
+
16
+ export const DEFAULT_LANGUAGE = 'en';
@@ -0,0 +1,31 @@
1
+ import i18n from 'i18next';
2
+ import { initReactI18next } from 'react-i18next';
3
+ import enCommon from './locales/en/common.json';
4
+ import esCommon from './locales/es/common.json';
5
+ import frCommon from './locales/fr/common.json';
6
+
7
+ i18n.use(initReactI18next).init({
8
+ resources: {
9
+ en: {
10
+ common: enCommon,
11
+ },
12
+ es: {
13
+ common: esCommon,
14
+ },
15
+ fr: {
16
+ common: frCommon,
17
+ },
18
+ },
19
+ ns: ['common'],
20
+ defaultNS: 'common',
21
+ fallbackLng: 'en',
22
+ initAsync: false,
23
+ interpolation: {
24
+ escapeValue: false,
25
+ },
26
+ react: {
27
+ useSuspense: true,
28
+ },
29
+ });
30
+
31
+ export default i18n;
@@ -0,0 +1,11 @@
1
+ {
2
+ "aboutPage": "To edit this page, edit the {{fileName}} file in the routes folder.",
3
+ "started":"To get started, edit the {{fileName}} file.",
4
+ "count":"Count: {{count}}",
5
+ "increaseCount":"Increase counter",
6
+ "decreaseCount":"Decrease counter",
7
+ "subscribe":"Subscribe to email",
8
+ "footnote":"Footnote can be added here",
9
+ "home":"Home",
10
+ "about":"About"
11
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "aboutPage": "Para editar esta página, edita el archivo {{fileName}} en la carpeta routes.",
3
+ "started": "Para comenzar, edita el archivo {{fileName}}.",
4
+ "count": "Contador: {{count}}",
5
+ "increaseCount": "Incrementar contador",
6
+ "decreaseCount": "Disminuir contador",
7
+ "subscribe": "Suscribirse al correo electrónico",
8
+ "footnote": "La nota al pie se puede agregar aquí",
9
+ "home": "Inicio",
10
+ "about": "Acerca de"
11
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "aboutPage": "Pour modifier cette page, modifiez le fichier {{fileName}} dans le dossier routes.",
3
+ "started": "Pour commencer, modifiez le fichier {{fileName}}.",
4
+ "count": "Compteur : {{count}}",
5
+ "increaseCount": "Augmenter le compteur",
6
+ "decreaseCount": "Diminuer le compteur",
7
+ "subscribe": "S’abonner par e-mail",
8
+ "footnote": "Une note de bas de page peut être ajoutée ici",
9
+ "home": "Accueil",
10
+ "about": "À propos"
11
+ }
@@ -0,0 +1,89 @@
1
+ import { StrictMode } from 'react';
2
+ import ReactDOM from 'react-dom/client';
3
+ import { I18nextProvider } from 'react-i18next';
4
+ import {
5
+ Outlet,
6
+ RouterProvider,
7
+ createRootRoute,
8
+ createRoute,
9
+ createRouter,
10
+ redirect,
11
+ } from '@tanstack/react-router';
12
+
13
+ import HeaderEl from './components/Header';
14
+ import FooterEl from './components/Footer';
15
+ import App from './App';
16
+ import createAboutRoute from './routes/about';
17
+ import i18n from './i18n';
18
+ import { DEFAULT_LANGUAGE, LANGUAGES } from './constants';
19
+
20
+ import './styles/fonts.css';
21
+ import './styles/style.css';
22
+
23
+ const rootRoute = createRootRoute({
24
+ component: () => <Outlet />,
25
+ });
26
+
27
+ const localeRoute = createRoute({
28
+ getParentRoute: () => rootRoute,
29
+ path: '/{-$locale}',
30
+ beforeLoad: async ({ params }) => {
31
+ const locale =
32
+ params.locale && LANGUAGES.map(d => d.id).includes(params.locale)
33
+ ? params.locale
34
+ : DEFAULT_LANGUAGE;
35
+
36
+ await i18n.changeLanguage(locale);
37
+
38
+ return { locale };
39
+ },
40
+ component: () => (
41
+ <div className='flex flex-col gap-0 min-h-screen'>
42
+ <HeaderEl />
43
+ <main className='grow-1 flex flex-col justify-center'>
44
+ <div className='flex flex-col justify-center'>
45
+ <Outlet />
46
+ </div>
47
+ </main>
48
+ <FooterEl />
49
+ </div>
50
+ ),
51
+ });
52
+
53
+ const indexRoute = createRoute({
54
+ getParentRoute: () => localeRoute,
55
+ path: '/',
56
+ component: App,
57
+ });
58
+
59
+ const routeTree = rootRoute.addChildren([
60
+ localeRoute.addChildren([
61
+ indexRoute,
62
+ createAboutRoute(localeRoute),
63
+ ]),
64
+ ]);
65
+
66
+ const router = createRouter({
67
+ routeTree,
68
+ defaultPreload: 'intent',
69
+ scrollRestoration: true,
70
+ defaultStructuralSharing: true,
71
+ defaultPreloadStaleTime: 0,
72
+ });
73
+
74
+ declare module '@tanstack/react-router' {
75
+ interface Register {
76
+ router: typeof router;
77
+ }
78
+ }
79
+
80
+ const rootElement = document.getElementById('root');
81
+ if (rootElement && !rootElement.innerHTML) {
82
+ ReactDOM.createRoot(rootElement).render(
83
+ <StrictMode>
84
+ <I18nextProvider i18n={i18n}>
85
+ <RouterProvider router={router} />
86
+ </I18nextProvider>
87
+ </StrictMode>,
88
+ );
89
+ }
@@ -0,0 +1,58 @@
1
+ import { createRoute } from '@tanstack/react-router';
2
+ import type { AnyRoute } from '@tanstack/react-router';
3
+ import { P } from '@undp/design-system-react/Typography';
4
+ import { useTranslation } from 'react-i18next';
5
+
6
+ export function About() {
7
+ const { t } = useTranslation();
8
+ return (
9
+ <>
10
+ <div className='flex gap-4 items-center justify-center my-8 mx-auto'>
11
+ <img
12
+ src='/imgs/Vitejs-logo.svg'
13
+ alt='vite logo'
14
+ width='72px'
15
+ style={{ marginLeft: 'auto', marginRight: 'auto' }}
16
+ />
17
+ <P marginBottom='none'>&</P>
18
+ <img
19
+ src='/imgs/Tailwind_CSS_Logo.svg'
20
+ alt='tailwind logo'
21
+ width='72px'
22
+ style={{ marginLeft: 'auto', marginRight: 'auto' }}
23
+ />
24
+ <P marginBottom='none'>&</P>
25
+ <img
26
+ src='/imgs/Tanstack-logo.png'
27
+ alt='tanstack logo'
28
+ width='72px'
29
+ style={{ marginLeft: 'auto', marginRight: 'auto' }}
30
+ />
31
+ <P marginBottom='none'>&</P>
32
+ <img
33
+ src='/imgs/Zustand-logo.svg'
34
+ alt='Zustand logo'
35
+ width='72px'
36
+ style={{ marginLeft: 'auto', marginRight: 'auto' }}
37
+ />
38
+ <P marginBottom='none'>&</P>
39
+ <img
40
+ src='/imgs/undp-logo-blue.svg'
41
+ alt='UNDP logo'
42
+ width='72px'
43
+ style={{ marginLeft: 'auto', marginRight: 'auto' }}
44
+ />
45
+ </div>
46
+ <P marginBottom='xl' className='text-center'>
47
+ {t('aboutPage')}
48
+ </P>
49
+ </>
50
+ );
51
+ }
52
+ export default function createAboutRoute(parentRoute: AnyRoute) {
53
+ return createRoute({
54
+ path: '/about',
55
+ component: About,
56
+ getParentRoute: () => parentRoute,
57
+ });
58
+ }
@@ -0,0 +1,23 @@
1
+ import { create } from 'zustand';
2
+
3
+ type Actions = {
4
+ increment: (d?: number) => void;
5
+ decrement: (d?: number) => void;
6
+ };
7
+
8
+ type Store = {
9
+ count: number;
10
+ actions: Actions;
11
+ };
12
+
13
+ export const useCounterStore = create<Store>(set => ({
14
+ count: 0,
15
+ actions: {
16
+ increment: (d = 1) => set(state => ({ count: state.count + d })),
17
+ decrement: (d = 1) => set(state => ({ count: state.count - d })),
18
+ },
19
+ }));
20
+
21
+ export const useCounter = () => useCounterStore(s => s.count);
22
+
23
+ export const useCounterActions = () => useCounterStore(s => s.actions);