@eifi1/ui-kit 0.25.0 → 0.26.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.
Files changed (53) hide show
  1. package/README.md +3 -3
  2. package/dist/components/data-table.js +3 -2
  3. package/dist/components/data-table.js.map +1 -1
  4. package/dist/components/swipeable-row.d.ts +5 -1
  5. package/dist/components/swipeable-row.js.map +1 -1
  6. package/dist/components/translation-review-labels.d.ts +4 -0
  7. package/dist/components/translation-review-labels.js +2 -1
  8. package/dist/components/translation-review-labels.js.map +1 -1
  9. package/dist/components/translation-review.d.ts +67 -7
  10. package/dist/components/translation-review.js +115 -29
  11. package/dist/components/translation-review.js.map +1 -1
  12. package/dist/hooks/use-search-param-state.d.ts +1 -1
  13. package/dist/hooks/use-search-param-state.js +8 -1
  14. package/dist/hooks/use-search-param-state.js.map +1 -1
  15. package/dist/i18n/german.js +1 -0
  16. package/dist/i18n/german.js.map +1 -1
  17. package/dist/i18n/locales/en.js +1 -0
  18. package/dist/i18n/locales/en.js.map +1 -1
  19. package/dist/i18n/locales/es.js +1 -0
  20. package/dist/i18n/locales/es.js.map +1 -1
  21. package/dist/i18n/locales/fr.js +1 -0
  22. package/dist/i18n/locales/fr.js.map +1 -1
  23. package/dist/i18n/locales/hu.js +1 -0
  24. package/dist/i18n/locales/hu.js.map +1 -1
  25. package/dist/i18n/locales/it.js +1 -0
  26. package/dist/i18n/locales/it.js.map +1 -1
  27. package/dist/i18n/locales/zh.js +1 -0
  28. package/dist/i18n/locales/zh.js.map +1 -1
  29. package/dist/i18n/review.js +1 -0
  30. package/dist/i18n/review.js.map +1 -1
  31. package/dist/index.d.ts +1 -1
  32. package/dist/index.js +7 -1
  33. package/dist/index.js.map +1 -1
  34. package/dist/lib/translation-review.d.ts +76 -1
  35. package/dist/lib/translation-review.js +30 -0
  36. package/dist/lib/translation-review.js.map +1 -1
  37. package/package.json +1 -1
  38. package/src/components/data-table.tsx +9 -2
  39. package/src/components/swipeable-row.tsx +5 -1
  40. package/src/components/translation-review-labels.ts +5 -0
  41. package/src/components/translation-review.tsx +275 -48
  42. package/src/hooks/use-search-param-state.ts +19 -4
  43. package/src/i18n/german.ts +1 -0
  44. package/src/i18n/locales/en.ts +1 -0
  45. package/src/i18n/locales/es.ts +1 -0
  46. package/src/i18n/locales/fr.ts +1 -0
  47. package/src/i18n/locales/hu.ts +1 -0
  48. package/src/i18n/locales/it.ts +1 -0
  49. package/src/i18n/locales/zh.ts +1 -0
  50. package/src/i18n/review.ts +1 -0
  51. package/src/index.ts +6 -0
  52. package/src/lib/translation-review.ts +109 -0
  53. package/tokens.css +4 -0
package/README.md CHANGED
@@ -382,14 +382,14 @@ columns, strings and permissions (see the note at the top of `src/feedback/feedb
382
382
 
383
383
  <!-- BEGIN GENERATED: exports — node scripts/gen-export-inventory.mjs -->
384
384
 
385
- **1286 names from 193 modules** — 600 values and 686 types. _Italic_ is a type-only export.
385
+ **1291 names from 193 modules** — 603 values and 688 types. _Italic_ is a type-only export.
386
386
 
387
387
  Generated from `dist/index.d.ts` by `node scripts/gen-export-inventory.mjs`; the count
388
388
  is pinned by `src/__tests__/public-surface.test.ts`. Do not edit between the markers.
389
389
 
390
390
  | Entry point | Names |
391
391
  |---|---|
392
- | `@eifi1/ui-kit` | 1286 |
392
+ | `@eifi1/ui-kit` | 1291 |
393
393
  | `@eifi1/ui-kit/chart` | 104 |
394
394
  | `@eifi1/ui-kit/shell` | 24 |
395
395
  | `@eifi1/ui-kit/data-table` | 51 |
@@ -415,7 +415,7 @@ re-slicing of it, never a second API.
415
415
  | `lib/safe-storage` | `readStored`, `writeStored` |
416
416
  | `lib/qr-encode` | `encodeQr`, _`QrEncodeOptions`_, _`QrErrorCorrection`_, _`QrMatrix`_ |
417
417
  | `lib/server-wake` | `attachServerWake`, `createServerWake`, `serverWake`, `watchReadsAnd`, `wrapFetch`, _`AxiosLikeInstance`_, _`ServerWakeAxiosConfig`_, _`ServerWakeFilter`_, _`ServerWakeOptions`_, _`ServerWakeRequest`_, _`ServerWakeStage`_, _`ServerWakeWatcher`_ |
418
- | `lib/translation-review` | `DEFAULT_TRANSLATION_REVIEW_FILTER`, `dropReviews`, `filterTranslationRows`, `flattenStrings`, `fromApiReview`, `groupTranslationRows`, `keyInArea`, `keyInAreas`, `keyNamespace`, `mergeReviews`, `placeholderMismatch`, `placeholderTokens`, `REVIEW_STATUSES`, `reviewStatus`, `reviewUndo`, `reviewWrite`, `summariseRows`, `toApiWrite`, `translationCorrections`, `translationRows`, `unreviewedRows`, _`ApiTranslationReview`_, _`ApiTranslationReviewWrite`_, _`ReviewStatus`_, _`TranslationCorrection`_, _`TranslationReview`_, _`TranslationReviewFilter`_, _`TranslationReviewKey`_, _`TranslationReviewUndo`_, _`TranslationReviewWrite`_, _`TranslationRow`_, _`TranslationRowGroup`_, _`TranslationRowsInput`_, _`TranslationSummary`_, _`TranslationVerdict`_ |
418
+ | `lib/translation-review` | `DEFAULT_TRANSLATION_REVIEW_FILTER`, `DEFAULT_TRANSLATION_REVIEW_SWIPE`, `dropReviews`, `filterTranslationRows`, `flattenStrings`, `fromApiReview`, `groupTranslationRows`, `keyInArea`, `keyInAreas`, `keyNamespace`, `mergeReviews`, `placeholderMismatch`, `placeholderTokens`, `REVIEW_STATUSES`, `reviewStatus`, `reviewUndo`, `reviewWrite`, `summariseRows`, `toApiWrite`, `TRANSLATION_REVIEW_SWIPE_ACTIONS`, `translationCorrections`, `translationReviewSwipePlan`, `translationRows`, `unreviewedRows`, _`ApiTranslationReview`_, _`ApiTranslationReviewWrite`_, _`ReviewStatus`_, _`TranslationCorrection`_, _`TranslationReview`_, _`TranslationReviewFilter`_, _`TranslationReviewKey`_, _`TranslationReviewSwipeAction`_, _`TranslationReviewSwipeBinding`_, _`TranslationReviewUndo`_, _`TranslationReviewWrite`_, _`TranslationRow`_, _`TranslationRowGroup`_, _`TranslationRowsInput`_, _`TranslationSummary`_, _`TranslationVerdict`_ |
419
419
  | `lib/countries` | `COUNTRY_CODES`, `countryName` |
420
420
  | `lib/iban` | `compactIban`, `formatIban`, `IBAN_LENGTHS`, `ibanCheckDigits`, `ibanProblem`, `isQrIban`, `isValidIban`, _`IbanKind`_, _`IbanProblem`_ |
421
421
  | `lib/isin` | `formatIsin`, `isinCheckDigit`, `isValidIsin` |
@@ -324,8 +324,9 @@ function DataTable({
324
324
  label: a.label,
325
325
  icon: a.icon,
326
326
  onCommit: () => void runRowAction(a.action, row),
327
- className: a.tone === "danger" ? "bg-[var(--danger)]" : "bg-[var(--brand)]",
328
- armedClassName: a.tone === "danger" ? "bg-[var(--danger-hover)]" : "bg-[var(--brand-hover)]"
327
+ // Each fill's own text colour — the fills are pastels in dark mode (0.26).
328
+ className: a.tone === "danger" ? "bg-[var(--danger)] text-[var(--danger-contrast)]" : "bg-[var(--brand)] text-[var(--brand-contrast)]",
329
+ armedClassName: a.tone === "danger" ? "bg-[var(--danger-hover)] text-[var(--danger-contrast)]" : "bg-[var(--brand-hover)] text-[var(--brand-contrast)]"
329
330
  });
330
331
  return {
331
332
  start: swipes.filter((a) => a.swipe === "start").map(toSwipe),