tycho-components 0.25.9 → 0.25.10

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.
@@ -1,5 +1,5 @@
1
- import InconsistencyResponse from './InconsistencyResponse';
2
- import './style.scss';
1
+ import InconsistencyResponse from "./InconsistencyResponse";
2
+ import "./style.scss";
3
3
  type Props = {
4
4
  data: InconsistencyResponse;
5
5
  onClose: () => void;
@@ -1,11 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useState } from 'react';
3
- import { useTranslation } from 'react-i18next';
4
- import { AppModal } from '../deps';
5
- import { inconsistencies, } from './InconsistencyResponse';
6
- import './style.scss';
2
+ import { useState } from "react";
3
+ import { useTranslation } from "react-i18next";
4
+ import { AppModal } from "../deps";
5
+ import { inconsistencies, } from "./InconsistencyResponse";
6
+ import "./style.scss";
7
7
  export default function Inconsistency({ data, onClose }) {
8
- const { t } = useTranslation('inconsistency');
8
+ const { t } = useTranslation("inconsistency");
9
9
  const [pages, setPages] = useState([]);
10
10
  const getTotal = (key) => {
11
11
  const arr = data[key];
@@ -14,5 +14,5 @@ export default function Inconsistency({ data, onClose }) {
14
14
  const openPage = (uid) => {
15
15
  window.open(`${import.meta.env.VITE_APP_CATALOG_URL}/${uid}`);
16
16
  };
17
- return (_jsxs(AppModal, { title: t('modal.inconsistency.title'), className: "modal-inconsistency", hideFooter: true, close: onClose, children: [_jsx("p", { children: t('modal.inconsistency.description') }), _jsxs("table", { className: "inconsistency-table", children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { children: t('table.header.type') }), _jsx("th", { children: t('table.header.words') }), _jsx("th", { children: t('table.header.severity') }), _jsx("th", { children: t('table.header.action') })] }) }), _jsx("tbody", { children: inconsistencies.map((item, idx) => (_jsxs("tr", { children: [_jsx("td", { children: t(`type.label.${item.key}`) }), _jsx("td", { children: getTotal(item.key) }), _jsx("td", { children: t(`severity.label.${item.severity}`) }), _jsx("td", { children: t(`action.label.${item.auto}`) })] }, idx.valueOf()))) })] }), _jsx("div", { className: "inconsistency-warning", children: t('modal.inconsistency.warning') }), pages.length > 0 && (_jsx("div", { className: "links", children: pages.map((page) => (_jsxs("span", { onClick: () => openPage(page), children: [t('action.label.page'), page] }, page))) }))] }));
17
+ return (_jsxs(AppModal, { title: t("modal.inconsistency.title"), className: "modal-inconsistency", hideFooter: true, close: onClose, children: [_jsx("div", { className: "description", children: t("modal.inconsistency.description") }), _jsxs("table", { className: "table table-striped", children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { children: t("table.header.type") }), _jsx("th", { children: t("table.header.words") }), _jsx("th", { children: t("table.header.severity") }), _jsx("th", { children: t("table.header.action") })] }) }), _jsx("tbody", { children: inconsistencies.map((item, idx) => (_jsxs("tr", { children: [_jsx("td", { children: t(`type.label.${item.key}`) }), _jsx("td", { children: getTotal(item.key) }), _jsx("td", { children: t(`severity.label.${item.severity}`) }), _jsx("td", { children: t(`action.label.${item.auto}`) })] }, idx.valueOf()))) })] }), _jsx("div", { className: "inconsistency-warning", children: t("modal.inconsistency.warning") }), pages.length > 0 && (_jsx("div", { className: "links", children: pages.map((page) => (_jsxs("span", { onClick: () => openPage(page), children: [t("action.label.page"), page] }, page))) }))] }));
18
18
  }
@@ -8,24 +8,30 @@
8
8
  }
9
9
 
10
10
  .modal-inconsistency {
11
- .modal-body {
11
+ .body {
12
12
  max-height: 60vh;
13
13
  overflow-y: auto;
14
14
 
15
- .inconsistency-table {
15
+ .description {
16
+ margin-bottom: 16px;
17
+ }
18
+
19
+ .table {
16
20
  width: 100%;
17
21
  border-collapse: collapse;
18
- border: var(--border-default);
19
22
 
20
23
  th,
21
24
  td {
22
- padding: var(--spacing-100) var(--spacing-150);
23
- border: var(--border-default);
24
- text-align: left;
25
+ padding: 8px;
26
+ }
27
+
28
+ th:not(:first-child),
29
+ td:not(:first-child) {
30
+ text-align: center;
25
31
  }
26
32
 
27
- thead th {
28
- @include label-medium-2;
33
+ > thead {
34
+ @include body-medium-2;
29
35
  }
30
36
  }
31
37
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tycho-components",
3
3
  "private": false,
4
- "version": "0.25.9",
4
+ "version": "0.25.10",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {