@medusajs/dashboard 2.12.3-snapshot-20251217081413 → 2.12.3

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 (23) hide show
  1. package/dist/add-locales-GGNZCABB.mjs +81 -0
  2. package/dist/app.css +10 -0
  3. package/dist/app.js +483 -374
  4. package/dist/app.mjs +1 -1
  5. package/dist/{store-add-locales-I4GX3KAY.mjs → chunk-IKTGFXWR.mjs} +1 -66
  6. package/dist/{chunk-FJR3D6EM.mjs → chunk-LWYKUORZ.mjs} +14 -11
  7. package/dist/en.json +1 -2
  8. package/dist/{product-attributes-S535VXSC.mjs → product-attributes-STD47BGC.mjs} +1 -1
  9. package/dist/{product-create-DKBLOS3M.mjs → product-create-LVGWVQAT.mjs} +1 -1
  10. package/dist/{product-detail-D2PJ64Q3.mjs → product-detail-OYVHJH3D.mjs} +1 -1
  11. package/dist/{product-edit-K6CAQD5H.mjs → product-edit-3SIUUIW4.mjs} +1 -1
  12. package/dist/{product-organization-IQFN54D2.mjs → product-organization-3PQ45C4B.mjs} +1 -1
  13. package/dist/store-add-locales-GWCGIXHU.mjs +81 -0
  14. package/dist/{translation-list-KSM4QA3K.mjs → translation-list-FK7XYLHX.mjs} +182 -109
  15. package/package.json +9 -9
  16. package/src/dashboard-app/routes/get-route.map.tsx +4 -0
  17. package/src/i18n/translations/en.json +1 -2
  18. package/src/i18n/translations/es.json +1 -1
  19. package/src/routes/translations/add-locales/add-locales.tsx +29 -0
  20. package/src/routes/translations/add-locales/index.tsx +1 -0
  21. package/src/routes/translations/translation-list/components/active-locales-section/active-locales-section.tsx +41 -16
  22. package/src/routes/translations/translation-list/components/translation-list-section/translation-list-section.tsx +5 -1
  23. package/src/routes/translations/translation-list/components/translations-completion-section/translations-completion-section.tsx +144 -103
@@ -1,5 +1,5 @@
1
1
  import { AdminTranslationEntityStatistics, HttpTypes } from "@medusajs/types"
2
- import { Container, Heading, Text, Tooltip } from "@medusajs/ui"
2
+ import { Container, Divider, Heading, Text, Tooltip } from "@medusajs/ui"
3
3
  import { useMemo, useState } from "react"
4
4
  import { useTranslation } from "react-i18next"
5
5
 
@@ -95,14 +95,15 @@ export const TranslationsCompletionSection = ({
95
95
  className="mr-0.5 h-full rounded-sm transition-all"
96
96
  style={{
97
97
  width: `${percentage}%`,
98
- backgroundColor: "var(--bg-interactive)",
98
+ backgroundColor: "var(--tag-blue-icon)",
99
+ boxShadow: "inset 0 0 0 0.5px var(--alpha-250)",
99
100
  }}
100
101
  />
101
102
  <div
102
103
  className="h-full flex-1 rounded-sm"
103
104
  style={{
104
- backgroundColor: "var(--bg-interactive)",
105
- opacity: 0.3,
105
+ backgroundColor: "var(--tag-blue-border)",
106
+ boxShadow: "inset 0 0 0 0.5px var(--alpha-250)",
106
107
  }}
107
108
  />
108
109
  </>
@@ -110,8 +111,8 @@ export const TranslationsCompletionSection = ({
110
111
  <div
111
112
  className="h-full w-full rounded-sm"
112
113
  style={{
113
- backgroundColor: "var(--bg-interactive)",
114
- opacity: 0.3,
114
+ backgroundColor: "var(--tag-blue-border)",
115
+ boxShadow: "inset 0 0 0 0.5px var(--alpha-250)",
115
116
  }}
116
117
  />
117
118
  )}
@@ -128,116 +129,156 @@ export const TranslationsCompletionSection = ({
128
129
  </div>
129
130
 
130
131
  {localeStats.length > 0 && (
131
- <div className="border-ui-border-strong flex flex-col gap-y-3 border-t border-dashed px-6 pb-6 pt-4">
132
- <div className="flex h-32 w-full items-end gap-1">
133
- {localeStats.map((locale) => {
134
- const heightPercent = (locale.total / maxTotal) * 100
135
- const translatedPercent =
136
- locale.total > 0 ? (locale.translated / locale.total) * 100 : 0
137
-
138
- return (
139
- <Tooltip
140
- key={locale.code}
141
- open={hoveredLocale === locale.code}
142
- content={
143
- <div className="flex flex-col gap-y-1 p-1">
144
- <Text size="small" weight="plus">
145
- {locale.name}
146
- </Text>
147
- <div className="flex items-center justify-between">
148
- <div className="flex items-center gap-x-2">
149
- <div
150
- className="h-2 w-2 rounded-full"
151
- style={{ backgroundColor: "var(--bg-interactive)" }}
152
- />
132
+ <>
133
+ <Divider variant="dashed" />
134
+ <div className="flex flex-col gap-y-3 px-6 pb-6 pt-4">
135
+ <div className="flex h-32 w-full items-end gap-1">
136
+ {localeStats.map((locale) => {
137
+ const heightPercent = (locale.total / maxTotal) * 100
138
+ const translatedPercent =
139
+ locale.total > 0
140
+ ? (locale.translated / locale.total) * 100
141
+ : 0
142
+
143
+ return (
144
+ <Tooltip
145
+ key={locale.code}
146
+ open={hoveredLocale === locale.code}
147
+ content={
148
+ <div className="flex min-w-[150px] flex-col gap-y-1 p-1">
149
+ <Text size="small" weight="plus">
150
+ {locale.name}
151
+ </Text>
152
+ <div className="flex items-center justify-between">
153
+ <div className="flex items-center gap-x-2">
154
+ <div
155
+ className="h-2 w-2 rounded-full"
156
+ style={{
157
+ backgroundColor: "var(--tag-blue-icon)",
158
+ boxShadow: "inset 0 0 0 0.5px var(--alpha-250)",
159
+ }}
160
+ />
161
+ <Text
162
+ size="small"
163
+ weight="plus"
164
+ className="text-ui-fg-base"
165
+ >
166
+ {t("translations.completion.translated")}
167
+ </Text>
168
+ </div>
153
169
  <Text
154
170
  size="small"
155
171
  weight="plus"
156
- className="text-ui-fg-subtle"
172
+ className="text-ui-fg-base"
157
173
  >
158
- {t("translations.completion.translated")}
174
+ {locale.translated}
175
+ </Text>
176
+ </div>
177
+ <div className="flex items-center justify-between">
178
+ <div className="flex items-center gap-x-2">
179
+ <div
180
+ className="h-2 w-2 rounded-full"
181
+ style={{
182
+ backgroundColor: "var(--tag-blue-border)",
183
+ boxShadow: "inset 0 0 0 0.5px var(--alpha-250)",
184
+ }}
185
+ />
186
+ <Text
187
+ size="small"
188
+ weight="plus"
189
+ className="text-ui-fg-base"
190
+ >
191
+ {t("translations.completion.toTranslate")}
192
+ </Text>
193
+ </div>
194
+ <Text
195
+ size="small"
196
+ weight="plus"
197
+ className="text-ui-fg-base"
198
+ >
199
+ {locale.toTranslate}
159
200
  </Text>
160
201
  </div>
161
- <Text size="small" weight="plus">
162
- {locale.translated}
163
- </Text>
164
202
  </div>
165
- <div className="flex items-center gap-x-2">
166
- <div
167
- className="h-2 w-2 rounded-full"
168
- style={{
169
- backgroundColor: "var(--bg-interactive)",
170
- opacity: 0.3,
171
- }}
172
- />
173
- <Text
174
- size="small"
175
- weight="plus"
176
- className="text-ui-fg-subtle"
177
- >
178
- {t("translations.completion.toTranslate")}
179
- </Text>
180
- <Text size="small" weight="plus">
181
- {locale.toTranslate}
182
- </Text>
203
+ }
204
+ >
205
+ <div className="flex h-full flex-1 items-end justify-center">
206
+ <div
207
+ className="flex w-full min-w-2 max-w-[96px] flex-col justify-end overflow-hidden rounded-t-sm transition-opacity"
208
+ style={{ height: `${heightPercent}%` }}
209
+ onMouseEnter={() => setHoveredLocale(locale.code)}
210
+ onMouseLeave={() => setHoveredLocale(null)}
211
+ >
212
+ {translatedPercent === 0 ? (
213
+ <div
214
+ className="w-full rounded-sm"
215
+ style={{
216
+ height: "100%",
217
+ backgroundColor: "var(--tag-neutral-bg)",
218
+ boxShadow: "inset 0 0 0 0.5px var(--alpha-250)",
219
+ }}
220
+ />
221
+ ) : (
222
+ <>
223
+ <div
224
+ className="w-full rounded-sm"
225
+ style={{
226
+ height: `${100 - translatedPercent}%`,
227
+ backgroundColor: "var(--tag-blue-border)",
228
+ boxShadow: "inset 0 0 0 0.5px var(--alpha-250)",
229
+ minHeight: locale.toTranslate > 0 ? "2px" : "0",
230
+ }}
231
+ />
232
+ {translatedPercent > 0 && (
233
+ <div
234
+ className="mt-0.5 w-full rounded-sm"
235
+ style={{
236
+ height: `${translatedPercent}%`,
237
+ backgroundColor: "var(--tag-blue-icon)",
238
+ boxShadow:
239
+ "inset 0 0 0 0.5px var(--alpha-250)",
240
+ minHeight:
241
+ locale.translated > 0 ? "2px" : "0",
242
+ }}
243
+ />
244
+ )}
245
+ </>
246
+ )}
183
247
  </div>
184
248
  </div>
185
- }
186
- >
249
+ </Tooltip>
250
+ )
251
+ })}
252
+ </div>
253
+ {localeStatsCount < 9 && (
254
+ <div className="flex w-full gap-1">
255
+ {localeStats.map((locale) => (
187
256
  <div
188
- className="flex min-w-2 flex-1 flex-col justify-end overflow-hidden rounded-t-sm transition-opacity"
189
- style={{ height: `${heightPercent}%` }}
190
- onMouseEnter={() => setHoveredLocale(locale.code)}
191
- onMouseLeave={() => setHoveredLocale(null)}
257
+ key={locale.code}
258
+ className="flex flex-1 items-center justify-center"
192
259
  >
193
- <div
194
- className="w-full rounded-t-sm"
195
- style={{
196
- height: `${100 - translatedPercent}%`,
197
- backgroundColor: "var(--bg-interactive)",
198
- opacity: 0.3,
199
- minHeight: locale.toTranslate > 0 ? "2px" : "0",
200
- }}
201
- />
202
- {translatedPercent > 0 && (
203
- <div
204
- className="mt-0.5 w-full rounded-sm"
205
- style={{
206
- height: `${translatedPercent}%`,
207
- backgroundColor: "var(--bg-interactive)",
208
- minHeight: locale.translated > 0 ? "2px" : "0",
209
- }}
210
- />
211
- )}
260
+ <Text
261
+ size="xsmall"
262
+ weight="plus"
263
+ className="text-ui-fg-subtle min-w-2 whitespace-normal break-words text-center leading-tight"
264
+ >
265
+ {localeStatsCount < 6 ? locale.name : locale.code}
266
+ </Text>
212
267
  </div>
213
- </Tooltip>
214
- )
215
- })}
268
+ ))}
269
+ </div>
270
+ )}
271
+ {localeStatsCount > 9 && (
272
+ <Text
273
+ weight="plus"
274
+ size="xsmall"
275
+ className="text-ui-fg-subtle text-center"
276
+ >
277
+ {t("translations.completion.footer")}
278
+ </Text>
279
+ )}
216
280
  </div>
217
- {localeStatsCount < 9 && (
218
- <div className="flex w-full gap-1">
219
- {localeStats.map((locale) => (
220
- <Text
221
- key={locale.code}
222
- size="xsmall"
223
- weight="plus"
224
- className="text-ui-fg-subtle min-w-2 flex-1 whitespace-normal break-words text-center leading-tight"
225
- >
226
- {localeStatsCount < 6 ? locale.name : locale.code}
227
- </Text>
228
- ))}
229
- </div>
230
- )}
231
- {localeStatsCount > 9 && (
232
- <Text
233
- weight="plus"
234
- size="xsmall"
235
- className="text-ui-fg-subtle text-center"
236
- >
237
- {t("translations.completion.footer")}
238
- </Text>
239
- )}
240
- </div>
281
+ </>
241
282
  )}
242
283
  </Container>
243
284
  )